Refactor: deafult size

This commit is contained in:
unitwk 2023-08-23 17:53:04 +08:00
parent a35873fc23
commit 10fdbe1b3b
9 changed files with 29 additions and 35 deletions

View File

@ -39,6 +39,12 @@ if (isDarkUI) {
document.body.classList.add("app-light-theme");
}
import { Button, Select, Input, Table } from "ant-design-vue";
[Button, Select, Input, Table].forEach((element) => {
element.props.size.default = "middle";
});
const { execute: reqUserInfo } = userInfoApi();
onMounted(async () => {

View File

@ -1,7 +1,7 @@
.app-light-theme {
@extend .app-light-base-color;
--background-color: rgb(240, 240, 240);
--background-color: rgb(245, 245, 245);
--background-color-white: var(--color-gray-1);
--drag-background-color: rgb(212, 212, 212);
--new-card-list-background-color: rgba(201, 200, 200, 0.2);

View File

@ -61,7 +61,6 @@ const props = defineProps({
.card-panel-content {
flex-grow: 1;
color: var(--text-color);
font-size: 14px;
}
}
@ -69,6 +68,5 @@ const props = defineProps({
overflow: hidden;
zoom: 1;
word-break: break-all;
font-size: 14px;
}
</style>

View File

@ -45,15 +45,17 @@ const handleChangeMenu = (item: LeftMenuItem) => {
<style lang="scss" scoped>
.menu-body {
height: 100%;
display: flex;
.left-menu {
width: 280px;
height: 100%;
float: left;
width: 240px;
padding: 12px 16px;
background-color: var(--color-gray-4);
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.right-content {
overflow: hidden;
flex-grow: 1;
padding: 20px;
text-align: left;

View File

@ -303,17 +303,17 @@ export const ORIGIN_LAYOUT_CONFIG: PageLayoutConfig[] = [
meta: {},
type: "UserInfo",
title: t("个人信息"),
width: 12,
height: LayoutCardHeight.AUTO
},
{
id: getRandomId(),
meta: {},
type: "EmptyCard",
title: "",
width: 12,
height: LayoutCardHeight.MINI
width: 8,
height: LayoutCardHeight.MEDIUM
}
// {
// id: getRandomId(),
// meta: {},
// type: "EmptyCard",
// title: "",
// width: 12,
// height: LayoutCardHeight.MINI
// }
]
},

View File

@ -155,12 +155,7 @@ const rowSelection = () => {};
<a-col :span="24">
<CardPanel style="height: 100%">
<template #body>
<a-table
size="middle"
:row-selection="rowSelection"
:data-source="dataSource"
:columns="columns"
>
<a-table :row-selection="rowSelection" :data-source="dataSource" :columns="columns">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-dropdown>

View File

@ -187,12 +187,7 @@ breadcrumbs.push({
</a-breadcrumb-item>
</a-breadcrumb>
</div>
<a-table
size="middle"
:row-selection="rowSelection"
:data-source="dataSource"
:columns="columns"
>
<a-table :row-selection="rowSelection" :data-source="dataSource" :columns="columns">
<!-- eslint-disable-next-line vue/no-unused-vars -->
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">

View File

@ -98,7 +98,7 @@ const columns = computed(() => {
<a-col :span="24">
<CardPanel style="height: 100%">
<template #body>
<a-table size="middle" :data-source="dataSource" :columns="columns">
<a-table :data-source="dataSource" :columns="columns">
<template #bodyCell="{ column }">
<template v-if="column.key === 'action'">
<a-button danger>

View File

@ -1,14 +1,12 @@
<script setup lang="ts">
import CardPanel from "@/components/CardPanel.vue";
import DataStatistic from "@/components/DataStatistic.vue";
import LeftMenusPanel from "@/components/LeftMenusPanel.vue";
import { t } from "@/lang/i18n";
import { useAppStateStore } from "@/stores/useAppStateStore";
import type { LayoutCard } from "@/types/index";
import { MenuOutlined, ProjectOutlined, RobotOutlined } from "@ant-design/icons-vue";
import type { UnwrapRef } from "vue";
import { ProjectOutlined, RobotOutlined } from "@ant-design/icons-vue";
import { reactive, toRaw } from "vue";
const { state } = useAppStateStore();
const props = defineProps<{
card: LayoutCard;
}>();
@ -50,8 +48,6 @@ const onSubmit = () => {
};
const labelCol = { style: { width: "150px" } };
const wrapperCol = { span: 14 };
const userInfo = state.userInfo;
</script>
<template>
@ -98,7 +94,9 @@ const userInfo = state.userInfo;
</a-form-item>
</a-form>
</template>
<template #api>BBB</template>
<template #api>
{{ state.userInfo }}
</template>
</LeftMenusPanel>
</div>
</template>