perf: 优化显示

This commit is contained in:
kuaifan 2024-10-22 22:37:12 +08:00
parent 6aa868c8d8
commit 8a6868e811
10 changed files with 80 additions and 9 deletions

View File

@ -346,6 +346,10 @@ export default {
this.upTitleWidth() this.upTitleWidth()
} }
}, },
'selects.length'() {
this.upTitleWidth()
}
}, },
computed: { computed: {
...mapState([ ...mapState([

View File

@ -207,7 +207,14 @@
v-model="addShow" v-model="addShow"
:title="$L('新建项目')" :title="$L('新建项目')"
:mask-closable="false"> :mask-closable="false">
<Form ref="addProject" :model="addData" :rules="addRule" label-width="auto" @submit.native.prevent> <Form
ref="addProject"
:model="addData"
:rules="addRule"
:class="formLabelClassName"
:labelPosition="formLabelPosition"
:labelWidth="formLabelWidth"
@submit.native.prevent>
<FormItem prop="name" :label="$L('项目名称')"> <FormItem prop="name" :label="$L('项目名称')">
<Input ref="projectName" type="text" v-model="addData.name"></Input> <Input ref="projectName" type="text" v-model="addData.name"></Input>
</FormItem> </FormItem>
@ -527,7 +534,11 @@ export default {
'reportUnreadNumber', 'reportUnreadNumber',
'approveUnreadNumber', 'approveUnreadNumber',
'okrWindow' 'okrWindow',
'formLabelPosition',
'formLabelWidth',
'formLabelClassName'
]), ]),
...mapGetters(['dashboardTask']), ...mapGetters(['dashboardTask']),

View File

@ -1445,7 +1445,7 @@ export default {
if (list.length > 2) { if (list.length > 2) {
this.userCache.push({ this.userCache.push({
label: null, label: null,
list: [{id: 0, value: this.$L('所有人'), tip: this.$L('仅提示会话内成员')}] list: [{id: 0, value: this.$L('所有人'), tip: ''}]
}) })
} }
this.userCache.push(...[{ this.userCache.push(...[{
@ -1459,7 +1459,7 @@ export default {
if (list.length > 2) { if (list.length > 2) {
this.userCache.push(...[{ this.userCache.push(...[{
label: null, label: null,
list: [{id: 0, value: this.$L('所有人'), tip: this.$L('提示所有成员')}] list: [{id: 0, value: this.$L('所有人'), tip: ''}]
}, { }, {
label: [{id: 0, value: this.$L('会话内成员'), disabled: true}], label: [{id: 0, value: this.$L('会话内成员'), disabled: true}],
list, list,

View File

@ -481,7 +481,14 @@
width: '90%', width: '90%',
maxWidth: '450px' maxWidth: '450px'
}"> }">
<Form ref="formDelayTaskRef" :model="delayTaskForm" :rules="delayTaskRule" label-position="left" label-width="auto" @submit.native.prevent> <Form
ref="formDelayTaskRef"
:model="delayTaskForm"
:rules="delayTaskRule"
:class="formLabelClassName"
:labelPosition="formLabelPosition.replace('right', 'left')"
:labelWidth="formLabelWidth"
@submit.native.prevent>
<FormItem :label="$L('延期时长')" prop="time"> <FormItem :label="$L('延期时长')" prop="time">
<Input type="number" v-model="delayTaskForm.time" :placeholder="$L('请输入时长')"> <Input type="number" v-model="delayTaskForm.time" :placeholder="$L('请输入时长')">
<template #append> <template #append>
@ -691,6 +698,10 @@ export default {
'taskPriority', 'taskPriority',
'dialogId', 'dialogId',
'formLabelPosition',
'formLabelWidth',
'formLabelClassName'
]), ]),
projectName() { projectName() {

View File

@ -1,6 +1,13 @@
<template> <template>
<div class="setting-component-item"> <div class="setting-component-item">
<Form ref="formData" :model="formData" :rules="ruleData" label-width="auto" @submit.native.prevent> <Form
ref="formData"
:model="formData"
:rules="ruleData"
:class="formLabelClassName"
:labelPosition="formLabelPosition"
:labelWidth="formLabelWidth"
@submit.native.prevent>
<div class="block-setting-box" v-if="type=='all' || type=='ChatGPT'"> <div class="block-setting-box" v-if="type=='all' || type=='ChatGPT'">
<h3>ChatGPT</h3> <h3>ChatGPT</h3>
<div class="form-box"> <div class="form-box">
@ -120,6 +127,8 @@
</template> </template>
<script> <script>
import {mapState} from "vuex";
export default { export default {
name: "SystemAibot", name: "SystemAibot",
props: { props: {
@ -139,6 +148,10 @@ export default {
this.systemSetting(); this.systemSetting();
}, },
computed: {
...mapState(['formLabelPosition', 'formLabelWidth', 'formLabelClassName']),
},
methods: { methods: {
submitForm() { submitForm() {
this.$refs.formData.validate((valid) => { this.$refs.formData.validate((valid) => {

View File

@ -1,6 +1,13 @@
<template> <template>
<div class="setting-component-item"> <div class="setting-component-item">
<Form ref="formData" :model="formData" :rules="ruleData" label-width="auto" @submit.native.prevent> <Form
ref="formData"
:model="formData"
:rules="ruleData"
:class="formLabelClassName"
:labelPosition="formLabelPosition"
:labelWidth="formLabelWidth"
@submit.native.prevent>
<div class="block-setting-box"> <div class="block-setting-box">
<h3>{{ $L('签到设置') }}</h3> <h3>{{ $L('签到设置') }}</h3>
<div class="form-box"> <div class="form-box">
@ -117,6 +124,7 @@
import DrawerOverlay from "../../../../components/DrawerOverlay"; import DrawerOverlay from "../../../../components/DrawerOverlay";
import TeamManagement from "../../components/TeamManagement"; import TeamManagement from "../../components/TeamManagement";
import CheckinExport from "../../components/CheckinExport"; import CheckinExport from "../../components/CheckinExport";
import {mapState} from "vuex";
export default { export default {
name: "SystemCheckin", name: "SystemCheckin",
components: {CheckinExport, TeamManagement, DrawerOverlay}, components: {CheckinExport, TeamManagement, DrawerOverlay},
@ -142,6 +150,10 @@ export default {
this.systemSetting(); this.systemSetting();
}, },
computed: {
...mapState(['formLabelPosition', 'formLabelWidth', 'formLabelClassName']),
},
methods: { methods: {
submitForm() { submitForm() {
this.$refs.formData.validate((valid) => { this.$refs.formData.validate((valid) => {

View File

@ -1,6 +1,13 @@
<template> <template>
<div class="setting-component-item"> <div class="setting-component-item">
<Form ref="formData" :model="formData" :rules="ruleData" label-width="auto" @submit.native.prevent> <Form
ref="formData"
:model="formData"
:rules="ruleData"
:class="formLabelClassName"
:labelPosition="formLabelPosition"
:labelWidth="formLabelWidth"
@submit.native.prevent>
<div class="block-setting-box"> <div class="block-setting-box">
<h3>AgoraIO 声网</h3> <h3>AgoraIO 声网</h3>
<div class="form-box"> <div class="form-box">
@ -50,6 +57,8 @@
</template> </template>
<script> <script>
import {mapState} from "vuex";
export default { export default {
name: "SystemMeeting", name: "SystemMeeting",
data() { data() {
@ -68,6 +77,10 @@ export default {
this.systemSetting(); this.systemSetting();
}, },
computed: {
...mapState(['formLabelPosition', 'formLabelWidth', 'formLabelClassName']),
},
methods: { methods: {
submitForm() { submitForm() {
this.$refs.formData.validate((valid) => { this.$refs.formData.validate((valid) => {

View File

@ -842,7 +842,7 @@ body.window-portrait {
} }
.form-label-weight-bold { .form-label-weight-bold {
.ivu-form-item-label { .ivu-form-item-label {
font-weight: bold; font-weight: 500;
} }
} }
.confirm-popover { .confirm-popover {

View File

@ -888,6 +888,10 @@
font-size: 12px; font-size: 12px;
padding: 0 4px; padding: 0 4px;
line-height: 40px; line-height: 40px;
max-width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
} }
} }

View File

@ -388,6 +388,9 @@
@media (max-width: 510px) { @media (max-width: 510px) {
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
} }
&.btn {
-webkit-line-clamp: 1;
}
} }
.desc { .desc {