chore: some typo

This commit is contained in:
vben 2021-02-05 01:07:36 +08:00
parent 612995a532
commit 70c0877d4f
7 changed files with 17 additions and 11 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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),

View File

@ -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

View File

@ -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);
});

View File

@ -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;
}

View File

@ -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">