refactor: 重构layout文件命名规范,更易读 (#1110)

This commit is contained in:
xiaoming
2024-04-30 22:27:54 +08:00
committed by GitHub
parent 2f9bc7e187
commit b8159a0d73
53 changed files with 332 additions and 378 deletions

View File

@@ -8,8 +8,8 @@ import Preferences from "./components/Preferences.vue";
import SecurityLog from "./components/SecurityLog.vue";
import { useGlobal, deviceDetection } from "@pureadmin/utils";
import AccountManagement from "./components/AccountManagement.vue";
import TopCollapse from "@/layout/components/sidebar/topCollapse.vue";
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
import LaySidebarTopCollapse from "@/layout/components/lay-sidebar/components/SidebarTopCollapse.vue";
import leftLine from "@iconify-icons/ri/arrow-left-s-line";
import ProfileIcon from "@iconify-icons/ri/user-3-line";
@@ -115,7 +115,7 @@ getMine().then(res => {
</el-menu>
</el-aside>
<el-main>
<TopCollapse
<LaySidebarTopCollapse
v-if="deviceDetection()"
class="px-0"
:is-active="isOpen"

View File

@@ -82,12 +82,7 @@ const dataList = ref([
<template>
<div>
<el-scrollbar>
<PureDescriptions
border
:data="props.data"
:columns="columns"
:column="5"
/>
<PureDescriptions border :data="data" :columns="columns" :column="5" />
</el-scrollbar>
<el-tabs :modelValue="'responseBody'" type="border-card" class="mt-4">
<el-tab-pane

View File

@@ -17,7 +17,7 @@ interface Tree {
children?: Tree[];
}
const props = defineProps({
defineProps({
treeLoading: Boolean,
treeData: Array
});
@@ -95,7 +95,7 @@ defineExpose({ onTreeReset });
<template>
<div
v-loading="props.treeLoading"
v-loading="treeLoading"
class="h-full bg-bg_color overflow-auto"
:style="{ minHeight: `calc(100vh - 141px)` }"
>
@@ -153,7 +153,7 @@ defineExpose({ onTreeReset });
<el-divider />
<el-tree
ref="treeRef"
:data="props.treeData"
:data="treeData"
node-key="id"
size="small"
:props="defaultProps"

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { tableDataMore } from "./data";
const props = withDefaults(
withDefaults(
defineProps<{
height?: string;
}>(),
@@ -62,12 +62,12 @@ function handleClick(row) {
<template>
<pure-table
:data="
props.height
height
? tableDataMore.concat(tableDataMore).concat(tableDataMore)
: tableDataMore
"
:columns="columns"
:height="props.height"
:height="height"
>
<template #operation="{ row }">
<el-button link type="primary" size="small" @click="handleClick(row)">