Skip to content

Commit

Permalink
chore: some typo
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Feb 4, 2021
1 parent 612995a commit 70c0877
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/Upload/src/UploadModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
export default defineComponent({
components: { BasicModal, Upload, Alert, FileList },
props: basicProps,
emits: ['change'],
emits: ['change', 'register'],
setup(props, { emit }) {
const { t } = useI18n();
Expand Down
2 changes: 1 addition & 1 deletion src/components/Upload/src/UploadPreviewModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
export default defineComponent({
components: { BasicModal, FileList },
props: previewProps,
emits: ['list-change'],
emits: ['list-change', 'register'],
setup(props, { emit }) {
const [register, { closeModal }] = useModalInner();
const { t } = useI18n();
Expand Down
6 changes: 3 additions & 3 deletions src/design/ant/btn.less
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// button重置
.ant-btn {
display: inline-flex;
justify-content: center;
align-items: center;
// display: inline-flex;
// justify-content: center;
// align-items: center;
// &.ant-btn-success:not(.ant-btn-link),
// &.ant-btn-error:not(.ant-btn-link),
// &.ant-btn-warning:not(.ant-btn-link),
Expand Down
1 change: 1 addition & 0 deletions src/layouts/default/menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export default defineComponent({

function renderMenu() {
const menus = unref(menusRef);
// console.log(menus);
if (!menus || !menus.length) return null;
return !props.isHorizontal ? (
<SimpleMenu
Expand Down
2 changes: 1 addition & 1 deletion src/router/guard/permissionGuard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export function createPermissionGuard(router: Router) {
return;
}
const routes = await permissionStore.buildRoutesAction();

routes.forEach((route) => {
// router.addRoute(RootRoute.name!, route as RouteRecordRaw);
router.addRoute(route as RouteRecordRaw);
});

Expand Down
1 change: 0 additions & 1 deletion src/router/menus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export async function getCurrentParentPath(currentPath: string) {
export async function getShallowMenus(): Promise<Menu[]> {
const menus = await getAsyncMenus();
const routes = router.getRoutes();

const shallowMenuList = menus.map((item) => ({ ...item, children: undefined }));
return !isBackMode() ? shallowMenuList.filter(basicFilter(routes)) : shallowMenuList;
}
Expand Down
14 changes: 10 additions & 4 deletions src/views/demo/comp/upload/index.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<template>
<PageWrapper title="上传组件示例">
<a-alert message="基础示例" class="my-5" />
<BasicUpload :maxSize="20" :maxNumber="10" @change="handleChange" :api="uploadApi" />
<a-alert message="基础示例" />
<BasicUpload
:maxSize="20"
:maxNumber="10"
@change="handleChange"
:api="uploadApi"
class="my-5"
/>

<a-alert message="嵌入表单,加入表单校验" class="my-5" />
<a-alert message="嵌入表单,加入表单校验" />

<BasicForm @register="register" />
<BasicForm @register="register" class="my-5" />
</PageWrapper>
</template>
<script lang="ts">
Expand Down

0 comments on commit 70c0877

Please sign in to comment.