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({ export default defineComponent({
components: { BasicModal, Upload, Alert, FileList }, components: { BasicModal, Upload, Alert, FileList },
props: basicProps, props: basicProps,
emits: ['change'], emits: ['change', 'register'],
setup(props, { emit }) { setup(props, { emit }) {
const { t } = useI18n(); const { t } = useI18n();

View File

@@ -27,7 +27,7 @@
export default defineComponent({ export default defineComponent({
components: { BasicModal, FileList }, components: { BasicModal, FileList },
props: previewProps, props: previewProps,
emits: ['list-change'], emits: ['list-change', 'register'],
setup(props, { emit }) { setup(props, { emit }) {
const [register, { closeModal }] = useModalInner(); const [register, { closeModal }] = useModalInner();
const { t } = useI18n(); const { t } = useI18n();

View File

@@ -1,8 +1,8 @@
// button重置 // button重置
.ant-btn { .ant-btn {
display: inline-flex; // display: inline-flex;
justify-content: center; // justify-content: center;
align-items: center; // align-items: center;
// &.ant-btn-success:not(.ant-btn-link), // &.ant-btn-success:not(.ant-btn-link),
// &.ant-btn-error:not(.ant-btn-link), // &.ant-btn-error:not(.ant-btn-link),
// &.ant-btn-warning:not(.ant-btn-link), // &.ant-btn-warning:not(.ant-btn-link),

View File

@@ -128,6 +128,7 @@ export default defineComponent({
function renderMenu() { function renderMenu() {
const menus = unref(menusRef); const menus = unref(menusRef);
// console.log(menus);
if (!menus || !menus.length) return null; if (!menus || !menus.length) return null;
return !props.isHorizontal ? ( return !props.isHorizontal ? (
<SimpleMenu <SimpleMenu

View File

@@ -56,8 +56,8 @@ export function createPermissionGuard(router: Router) {
return; return;
} }
const routes = await permissionStore.buildRoutesAction(); const routes = await permissionStore.buildRoutesAction();
routes.forEach((route) => { routes.forEach((route) => {
// router.addRoute(RootRoute.name!, route as RouteRecordRaw);
router.addRoute(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[]> { export async function getShallowMenus(): Promise<Menu[]> {
const menus = await getAsyncMenus(); const menus = await getAsyncMenus();
const routes = router.getRoutes(); const routes = router.getRoutes();
const shallowMenuList = menus.map((item) => ({ ...item, children: undefined })); const shallowMenuList = menus.map((item) => ({ ...item, children: undefined }));
return !isBackMode() ? shallowMenuList.filter(basicFilter(routes)) : shallowMenuList; return !isBackMode() ? shallowMenuList.filter(basicFilter(routes)) : shallowMenuList;
} }

View File

@@ -1,11 +1,17 @@
<template> <template>
<PageWrapper title="上传组件示例"> <PageWrapper title="上传组件示例">
<a-alert message="基础示例" class="my-5" /> <a-alert message="基础示例" />
<BasicUpload :maxSize="20" :maxNumber="10" @change="handleChange" :api="uploadApi" /> <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> </PageWrapper>
</template> </template>
<script lang="ts"> <script lang="ts">