Commit 70c0877d4fc357bb847d0937da62d9b21debc449

Authored by vben
1 parent 612995a5

chore: some typo

src/components/Upload/src/UploadModal.vue
@@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
64 export default defineComponent({ 64 export default defineComponent({
65 components: { BasicModal, Upload, Alert, FileList }, 65 components: { BasicModal, Upload, Alert, FileList },
66 props: basicProps, 66 props: basicProps,
67 - emits: ['change'], 67 + emits: ['change', 'register'],
68 setup(props, { emit }) { 68 setup(props, { emit }) {
69 const { t } = useI18n(); 69 const { t } = useI18n();
70 70
src/components/Upload/src/UploadPreviewModal.vue
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 export default defineComponent({ 27 export default defineComponent({
28 components: { BasicModal, FileList }, 28 components: { BasicModal, FileList },
29 props: previewProps, 29 props: previewProps,
30 - emits: ['list-change'], 30 + emits: ['list-change', 'register'],
31 setup(props, { emit }) { 31 setup(props, { emit }) {
32 const [register, { closeModal }] = useModalInner(); 32 const [register, { closeModal }] = useModalInner();
33 const { t } = useI18n(); 33 const { t } = useI18n();
src/design/ant/btn.less
1 // button重置 1 // button重置
2 .ant-btn { 2 .ant-btn {
3 - display: inline-flex;  
4 - justify-content: center;  
5 - align-items: center; 3 + // display: inline-flex;
  4 + // justify-content: center;
  5 + // align-items: center;
6 // &.ant-btn-success:not(.ant-btn-link), 6 // &.ant-btn-success:not(.ant-btn-link),
7 // &.ant-btn-error:not(.ant-btn-link), 7 // &.ant-btn-error:not(.ant-btn-link),
8 // &.ant-btn-warning:not(.ant-btn-link), 8 // &.ant-btn-warning:not(.ant-btn-link),
src/layouts/default/menu/index.tsx
@@ -128,6 +128,7 @@ export default defineComponent({ @@ -128,6 +128,7 @@ export default defineComponent({
128 128
129 function renderMenu() { 129 function renderMenu() {
130 const menus = unref(menusRef); 130 const menus = unref(menusRef);
  131 + // console.log(menus);
131 if (!menus || !menus.length) return null; 132 if (!menus || !menus.length) return null;
132 return !props.isHorizontal ? ( 133 return !props.isHorizontal ? (
133 <SimpleMenu 134 <SimpleMenu
src/router/guard/permissionGuard.ts
@@ -56,8 +56,8 @@ export function createPermissionGuard(router: Router) { @@ -56,8 +56,8 @@ export function createPermissionGuard(router: Router) {
56 return; 56 return;
57 } 57 }
58 const routes = await permissionStore.buildRoutesAction(); 58 const routes = await permissionStore.buildRoutesAction();
  59 +
59 routes.forEach((route) => { 60 routes.forEach((route) => {
60 - // router.addRoute(RootRoute.name!, route as RouteRecordRaw);  
61 router.addRoute(route as RouteRecordRaw); 61 router.addRoute(route as RouteRecordRaw);
62 }); 62 });
63 63
src/router/menus/index.ts
@@ -64,7 +64,6 @@ export async function getCurrentParentPath(currentPath: string) { @@ -64,7 +64,6 @@ export async function getCurrentParentPath(currentPath: string) {
64 export async function getShallowMenus(): Promise<Menu[]> { 64 export async function getShallowMenus(): Promise<Menu[]> {
65 const menus = await getAsyncMenus(); 65 const menus = await getAsyncMenus();
66 const routes = router.getRoutes(); 66 const routes = router.getRoutes();
67 -  
68 const shallowMenuList = menus.map((item) => ({ ...item, children: undefined })); 67 const shallowMenuList = menus.map((item) => ({ ...item, children: undefined }));
69 return !isBackMode() ? shallowMenuList.filter(basicFilter(routes)) : shallowMenuList; 68 return !isBackMode() ? shallowMenuList.filter(basicFilter(routes)) : shallowMenuList;
70 } 69 }
src/views/demo/comp/upload/index.vue
1 <template> 1 <template>
2 <PageWrapper title="上传组件示例"> 2 <PageWrapper title="上传组件示例">
3 - <a-alert message="基础示例" class="my-5" />  
4 - <BasicUpload :maxSize="20" :maxNumber="10" @change="handleChange" :api="uploadApi" /> 3 + <a-alert message="基础示例" />
  4 + <BasicUpload
  5 + :maxSize="20"
  6 + :maxNumber="10"
  7 + @change="handleChange"
  8 + :api="uploadApi"
  9 + class="my-5"
  10 + />
5 11
6 - <a-alert message="嵌入表单,加入表单校验" class="my-5" /> 12 + <a-alert message="嵌入表单,加入表单校验" />
7 13
8 - <BasicForm @register="register" /> 14 + <BasicForm @register="register" class="my-5" />
9 </PageWrapper> 15 </PageWrapper>
10 </template> 16 </template>
11 <script lang="ts"> 17 <script lang="ts">