diff --git a/mock/role/index.ts b/mock/role/index.ts index f9ed8cf..aa43000 100644 --- a/mock/role/index.ts +++ b/mock/role/index.ts @@ -73,7 +73,7 @@ const adminList = [ { path: '/components', component: '#', - redirect: '/components/icon', + redirect: '/components/form/default-form', name: 'ComponentsDemo', meta: { title: 'router.component', @@ -119,6 +119,7 @@ const adminList = [ { path: 'table', component: '##', + redirect: '/components/table/default-table', name: 'TableDemo', meta: { title: 'router.table', @@ -154,6 +155,7 @@ const adminList = [ { path: 'editor-demo', component: '##', + redirect: '/components/editor-demo/editor', name: 'EditorDemo', meta: { title: 'router.editor', diff --git a/src/router/index.ts b/src/router/index.ts index 058dd0c..edb4b68 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -124,7 +124,6 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [ { path: '/components', component: Layout, - redirect: '/components/icon', name: 'ComponentsDemo', meta: { title: t('router.component'), @@ -135,6 +134,7 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [ { path: 'form', component: getParentLayout(), + redirect: '/components/form/default-form', name: 'Form', meta: { title: t('router.form'), @@ -170,6 +170,7 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [ { path: 'table', component: getParentLayout(), + redirect: '/components/table/default-table', name: 'TableDemo', meta: { title: t('router.table'), @@ -205,6 +206,7 @@ export const asyncRouterMap: AppRouteRecordRaw[] = [ { path: 'editor-demo', component: getParentLayout(), + redirect: '/components/editor-demo/editor', name: 'EditorDemo', meta: { title: t('router.editor'), diff --git a/src/views/Example/Dialog/ExampleDialog.vue b/src/views/Example/Dialog/ExampleDialog.vue index c28a09c..afc629d 100644 --- a/src/views/Example/Dialog/ExampleDialog.vue +++ b/src/views/Example/Dialog/ExampleDialog.vue @@ -157,6 +157,7 @@ const AddAction = () => { dialogTitle.value = t('exampleDemo.add') tableObject.currentRow = null dialogVisible.value = true + actionType.value = '' } const delLoading = ref(false)