Skip to content

Commit

Permalink
refactor(locales,layouts,router,views): ♻️ 语义化重构目录
Browse files Browse the repository at this point in the history
  • Loading branch information
jsxiaosi committed Aug 16, 2023
1 parent 7d4ab92 commit 9f76057
Show file tree
Hide file tree
Showing 50 changed files with 24 additions and 303 deletions.
34 changes: 0 additions & 34 deletions src/components/HelloWorld.vue

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
const errorPage = {
error403: {
export default {
403: {
title: 'No Access',
description: 'Sorry, access to this resource on the server is denied.',
},
error404: {
404: {
title: 'Page Not Found',
description: "Sorry, the page you're looking for cannot be accessed.",
},
error500: {
500: {
title: 'the server is reporting an error.',
description: 'An unexpected error occurred and your request could not be completed.',
},
back: 'Back Home',
};

export default errorPage;
2 changes: 0 additions & 2 deletions src/locales/en/modules/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ const route = {
editor_logicFlow: 'LogicFlow',
editor_richText: 'RichText Editor',
editor_markdown: 'Markdown',
userInfo: 'UserInfo',
userList: 'UserList',
asyncComponent: 'AsyncComponent',
refSyntax: 'RefSyntax',
userDateil: 'UserDateil',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
const errorPage = {
error403: {
export default {
403: {
title: '禁止访问',
description: '抱歉,访问服务器上的此资源被拒绝。',
},
error404: {
404: {
title: '找不到网页',
description: '抱歉,您要查找的页面无法访问。',
},
error500: {
500: {
title: '服务器报告错误。',
description: '抱歉,发生意外错误,无法完成您的请求。',
},
back: '返回首页',
};

export default errorPage;
2 changes: 0 additions & 2 deletions src/locales/zh-CN/modules/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ const route = {
editor_logicFlow: '流程图编辑器',
editor_richText: '富文本编辑器',
editor_markdown: 'Markdown',
userInfo: '用户管理',
userList: '用户列表',
asyncComponent: '异步组件',
refSyntax: 'ref语法糖',
userDateil: '用户详情',
Expand Down
2 changes: 1 addition & 1 deletion src/router/modules/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const component: AppRouteRecordRaw[] = [
{
path: 'table',
name: 'RtTable',
component: () => import('@/views/components/TablePage/index.vue'),
component: () => import('@/views/components/table-page/index.vue'),
meta: { title: t('route.pathName.table') },
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/router/modules/editor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const editor: AppRouteRecordRaw[] = [
{
path: 'rich-text',
name: 'RtRichText',
component: () => import('@/views/editor/richText/index.vue'),
component: () => import('@/views/editor/rich-text/index.vue'),
meta: { title: t('route.pathName.editor_richText') },
},
{
Expand All @@ -23,7 +23,7 @@ const editor: AppRouteRecordRaw[] = [
{
path: 'logic-flow',
name: 'RtLogicFlow',
component: () => import('@/views/editor/logicFlow/index.vue'),
component: () => import('@/views/editor/logic-flow/index.vue'),
meta: { title: t('route.pathName.editor_logicFlow') },
},
],
Expand Down
3 changes: 0 additions & 3 deletions src/router/modules/error/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import type { AppRouteRecordRaw } from '@/router/type';
import { t } from '@/hooks/web/useI18n';

const Layout = () => import('@/layouts/pageLayouts/index.vue');

const error: AppRouteRecordRaw[] = [
{
path: '/error',
redirect: '/error/404',
name: 'error',
component: Layout,
alwaysShow: true,
meta: {
title: 'route.pathName.error',
Expand Down
File renamed without changes.
5 changes: 1 addition & 4 deletions src/router/modules/functions/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import type { AppRouteRecordRaw } from '@/router/type';
import { t } from '@/hooks/web/useI18n';

const Layout = () => import('@/layouts/pageLayouts/index.vue');

const functions: AppRouteRecordRaw[] = [
{
path: '/functions',
redirect: '/functions/preview-pdf',
name: 'Functions',
component: Layout,
alwaysShow: true,
meta: {
title: 'route.pathName.functions',
Expand All @@ -20,7 +17,7 @@ const functions: AppRouteRecordRaw[] = [
{
path: 'water_mark',
name: 'RtWaterMark',
component: () => import('@/views/functions/waterMark/index.vue'),
component: () => import('@/views/functions/water-mark/index.vue'),
meta: { title: t('route.pathName.waterMark') },
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/router/modules/root/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AppRouteRecordRaw } from '@/router/type';
import { t } from '@/hooks/web/useI18n';

const Layout = () => import('@/layouts/pageLayouts/index.vue');
const Layout = () => import('@/layouts/page-layouts/index.vue');

const root: Array<AppRouteRecordRaw> = [
{
Expand Down
33 changes: 0 additions & 33 deletions src/router/modules/useradmin/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/styles/element-style.scss

This file was deleted.

1 change: 0 additions & 1 deletion src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@use 'element-plus/theme-chalk/src/dark/css-vars.scss';
@use './theme.scss';
@use './element-style.scss';
@use './intro.scss';
@use './transition.scss';
@use './sidebar.scss';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
} from '@logicflow/extension';
import '@logicflow/core/dist/style/index.css';
import '@logicflow/extension/lib/style/index.css';
import { toLogicFlowData } from './adpterForTurbo';
import demoData from './dataTurbo.json';
import { toLogicFlowData } from './adpter-for-turbo';
import demoData from './data-turbo.json';
import { configDefaultDndPanel, configAddItemControl } from './config';
const lf = ref<LogicFlow>({} as LogicFlow);
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/views/error/403.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<SvgIcon name="error-403" class-name="icon"></SvgIcon>
</div>
<div class="text">
<span>{{ $t('errorPage.error403.title') }}</span>
<span>{{ $t('error-page.403.title') }}</span>
</div>
<div class="description">{{ $t('errorPage.error403.description') }}</div>
<div class="description">{{ $t('error-page.403.description') }}</div>

<ElButton type="primary" @click="toHome">{{ $t('errorPage.back') }}</ElButton>
<ElButton type="primary" @click="toHome">{{ $t('error-page.back') }}</ElButton>
</div>
</template>

Expand Down
6 changes: 3 additions & 3 deletions src/views/error/404.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<SvgIcon name="error-404" class-name="icon"></SvgIcon>
</div>
<div class="text">
<span>{{ $t('errorPage.error404.title') }}</span>
<span>{{ $t('error-page.404.title') }}</span>
</div>
<div class="description">{{ $t('errorPage.error404.description') }}</div>
<div class="description">{{ $t('error-page.404.description') }}</div>

<ElButton type="primary" @click="toHome">{{ $t('errorPage.back') }}</ElButton>
<ElButton type="primary" @click="toHome">{{ $t('error-page.back') }}</ElButton>
</div>
</template>

Expand Down
6 changes: 3 additions & 3 deletions src/views/error/500.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<SvgIcon name="error-500" class-name="icon"></SvgIcon>
</div>
<div class="text">
<span>{{ $t('errorPage.error500.title') }}</span>
<span>{{ $t('error-page.500.title') }}</span>
</div>
<div class="description">{{ $t('errorPage.error500.description') }}</div>
<div class="description">{{ $t('error-page.500.description') }}</div>

<ElButton type="primary" @click="toHome">{{ $t('errorPage.back') }}</ElButton>
<ElButton type="primary" @click="toHome">{{ $t('error-page.back') }}</ElButton>
</div>
</template>

Expand Down
File renamed without changes.
72 changes: 0 additions & 72 deletions src/views/useradmin/async-component/component/ToModal.vue

This file was deleted.

27 changes: 0 additions & 27 deletions src/views/useradmin/async-component/index.vue

This file was deleted.

Loading

0 comments on commit 9f76057

Please sign in to comment.