fomatte: 代码格式化

This commit is contained in:
lbw 2023-04-04 11:02:25 +08:00
parent bd252e71ea
commit fae8fb4fe5
8 changed files with 244 additions and 246 deletions

View File

@ -66,7 +66,7 @@ export const useGeneratorVFormApi = (dsName: any, tableName: any) => {
});
};
export const useGeneratorVFormSfcApi = (id:string) => {
export const useGeneratorVFormSfcApi = (id: string) => {
return request({
url: '/gen/generator/vform/sfc',
method: 'get',

View File

@ -232,7 +232,7 @@ export function useTable(options?: BasicTableProps) {
textAlign: 'center',
background: 'var(--el-table-row-hover-bg-color)',
color: 'var(--el-text-color-primary)',
}
},
};
return {

View File

@ -16,7 +16,7 @@
:title="$t(v.name)"
>
<div :class="themeConfig.columnsAsideLayout" v-if="!v.meta.isLink || (v.meta.isLink && v.meta.isIframe)">
<SvgIcon :name="v.meta.icon"/>
<SvgIcon :name="v.meta.icon" />
<div class="columns-vertical-title font12">
{{
$t(v.name) && $t(v.name).length >= 4
@ -27,7 +27,7 @@
</div>
<div :class="themeConfig.columnsAsideLayout" v-else>
<a :href="v.meta.isLink" target="_blank">
<SvgIcon :name="v.meta.icon"/>
<SvgIcon :name="v.meta.icon" />
<div class="columns-vertical-title font12">
{{
$t(v.name) && $t(v.name).length >= 4
@ -45,10 +45,10 @@
</template>
<script setup lang="ts" name="layoutColumnsAside">
import {RouteRecordRaw} from 'vue-router';
import { RouteRecordRaw } from 'vue-router';
import pinia from '/@/stores/index';
import {useRoutesList} from '/@/stores/routesList';
import {useThemeConfig} from '/@/stores/themeConfig';
import { useRoutesList } from '/@/stores/routesList';
import { useThemeConfig } from '/@/stores/themeConfig';
import mittBus from '/@/utils/mitt';
//
@ -56,8 +56,8 @@ const columnsAsideOffsetTopRefs = ref<RefType>([]);
const columnsAsideActiveRef = ref();
const stores = useRoutesList();
const storesThemeConfig = useThemeConfig();
const {routesList, isColumnsMenuHover, isColumnsNavHover} = storeToRefs(stores);
const {themeConfig} = storeToRefs(storesThemeConfig);
const { routesList, isColumnsMenuHover, isColumnsNavHover } = storeToRefs(stores);
const { themeConfig } = storeToRefs(storesThemeConfig);
const route = useRoute();
const router = useRouter();
const state = reactive<ColumnsAsideState>({
@ -78,14 +78,14 @@ const setColumnsAsideMove = (k: number) => {
//
const onColumnsAsideMenuClick = (v: RouteItem, k: number) => {
setColumnsAsideMove(k);
let {path, redirect} = v;
let { path, redirect } = v;
if (redirect) router.push(redirect);
else router.push(path);
};
//
const onColumnsAsideMenuMouseenter = (v: RouteRecordRaw, k: number) => {
if (!themeConfig.value.isColumnsMenuHoverPreload) return false;
let {path} = v;
let { path } = v;
state.liOldPath = path;
state.liOldIndex = k;
state.liHoverIndex = k;
@ -118,12 +118,12 @@ const setFilterRoutes = () => {
//
const setSendChildren = (path: string) => {
const parentRoute = searchParent(routesList.value, path) as any;
let currentData: MittMenu = {children: []};
let currentData: MittMenu = { children: [] };
state.columnsAsideList.map((v: RouteItem, k: number) => {
if (v.path === parentRoute.path) {
v['k'] = k;
currentData['item'] = {...v};
currentData['children'] = [{...v}];
currentData['item'] = { ...v };
currentData['children'] = [{ ...v }];
if (v.children) currentData['children'] = v.children;
}
});
@ -177,8 +177,7 @@ onMounted(() => {
});
//
onUnmounted(() => {
mittBus.off('restoreDefault', () => {
});
mittBus.off('restoreDefault', () => {});
});
//
onBeforeRouteUpdate((to) => {

View File

@ -17,7 +17,7 @@ export default {
inputNameTip: '请输入姓名',
importUserTip: '用户导入',
deleteDisabledTip: 'admin 不允许被删除',
noDataScopeTip: '没有数据权限'
noDataScopeTip: '没有数据权限',
},
personal: {
name: '个人信息',

View File

@ -90,7 +90,7 @@ const form = reactive({
name: '',
url: '',
username: '',
password: '' as string || undefined,
password: ('' as string) || undefined,
createTime: '',
updateTime: '',
dsType: '',

View File

@ -119,4 +119,3 @@ const timeCacl = () => {
}, 1000);
};
</script>