mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-22 21:22:33 +08:00
fomatte: 代码格式化
This commit is contained in:
parent
bd252e71ea
commit
fae8fb4fe5
@ -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',
|
||||
|
@ -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 {
|
||||
|
@ -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) => {
|
||||
|
@ -17,7 +17,7 @@ export default {
|
||||
inputNameTip: '请输入姓名',
|
||||
importUserTip: '用户导入',
|
||||
deleteDisabledTip: 'admin 不允许被删除',
|
||||
noDataScopeTip: '没有数据权限'
|
||||
noDataScopeTip: '没有数据权限',
|
||||
},
|
||||
personal: {
|
||||
name: '个人信息',
|
||||
|
@ -90,7 +90,7 @@ const form = reactive({
|
||||
name: '',
|
||||
url: '',
|
||||
username: '',
|
||||
password: '' as string || undefined,
|
||||
password: ('' as string) || undefined,
|
||||
createTime: '',
|
||||
updateTime: '',
|
||||
dsType: '',
|
||||
|
@ -119,4 +119,3 @@ const timeCacl = () => {
|
||||
}, 1000);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user