123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005 |
- <template>
- <div class="props">
- <div
- class="real-times"
- v-if="props.pen.realTimes && props.pen.realTimes.length"
- >
- <div class="grid head">
- <div class="title">数据名</div>
- <div class="title">值</div>
- <div class="title">触发器</div>
- <div class="actions">
- <t-icon name="more" />
- </div>
- </div>
- <div class="grid" v-for="(item, i) in props.pen.realTimes">
- <t-tooltip :content="item.key" placement="top">
- <label class="label">{{ item.label }}</label>
- </t-tooltip>
- <div class="value">
- <t-tooltip :content="getBindsDesc(item)" placement="top">
- <t-icon
- name="link"
- class="hover"
- :class="{ primary: item.binds?.id }"
- @click="onBind(item)"
- />
- </t-tooltip>
- <t-input
- v-if="item.type === 'number'"
- v-model="pen[item.key]"
- placeholder="数字"
- @change="changeValue(item.key)"
- />
- <t-switch
- v-else-if="item.type === 'bool'"
- v-model="pen[item.key]"
- class="ml-8"
- size="small"
- @change="changeValue(item.key)"
- />
- <div
- v-else-if="item.type === 'array' || item.type === 'object'"
- class="gray ellipsis"
- style="height: 30px"
- >
- {{ JSON.stringify(pen[item.key]) }}
- </div>
- <t-input
- v-else
- v-model="pen[item.key]"
- placeholder="字符串"
- @change="changeValue(item.key)"
- />
- </div>
- <div>
- <t-tooltip :content="item.triggers?.length || '触发器'">
- <t-badge
- :count="item.triggers?.length"
- size="small"
- dot
- :offset="[0, 5]"
- >
- <t-icon
- name="relativity"
- class="hover"
- @click="onTrigger(item)"
- />
- </t-badge>
- </t-tooltip>
- </div>
- <div class="actions">
- <t-dropdown
- :options="moreOptions"
- @click="onMenuMore($event, item, i)"
- :minColumnWidth="80"
- >
- <t-icon name="more" class="more hover" />
- </t-dropdown>
- </div>
- </div>
- <div class="mt-8 pb-16">
- <t-dropdown
- :options="options"
- @click="addRealTime"
- :minColumnWidth="150"
- >
- <a class="ml-12"> <t-icon name="add-rectangle" /> 添加动态数据 </a>
- </t-dropdown>
- </div>
- </div>
- <div class="flex column center blank" v-else>
- <img src="/img/blank.png" />
- <div class="gray center">还没有动态数据</div>
- <div class="mt-8">
- <t-dropdown
- :options="options"
- @click="addRealTime"
- :minColumnWidth="150"
- >
- <t-button style="height: 30px"> 添加动态数据 </t-button>
- </t-dropdown>
- </div>
- </div>
- </div>
- <t-dialog
- v-if="addDataDialog.show"
- :visible="true"
- class="data-dialog"
- :header="addDataDialog.header"
- @close="addDataDialog.show = false"
- @confirm="onConfirmData"
- >
- <div class="form-item mt-16">
- <label>数据名</label>
- <t-input
- v-model="addDataDialog.data.label"
- placeholder="简短描述"
- :disabled="!!addDataDialog.data.keywords"
- @blur="onChangeLabel"
- />
- </div>
- <div class="form-item mt-16">
- <label>属性名</label>
- <t-input
- v-model="addDataDialog.data.key"
- placeholder="关键字"
- :disabled="!!addDataDialog.data.keywords"
- />
- </div>
- <div class="form-item mt-16">
- <label>类型</label>
- <t-select
- class="w-full"
- :options="typeOptions"
- v-model="addDataDialog.data.type"
- placeholder="字符串"
- :disabled="!!addDataDialog.data.keywords"
- @change="addDataDialog.data.value = null"
- />
- </div>
- <div class="form-item mt-16">
- <label>值</label>
- <div class="flex-grow" v-if="addDataDialog.data.type === 'number'">
- <t-input
- class="w-full"
- v-model="addDataDialog.data.value"
- placeholder="数字"
- />
- <div class="desc mt-8">
- 固定数字:直接输入数字。例如:5<br />
- 随机范围数字 :最小值-最大值。例如:0-1 或 0-100
- <br />
- 随机指定数字 :数字1,数字2,数字3... 。 例如:1,5,10,20<br />
- </div>
- </div>
- <div class="flex-grow" v-else-if="addDataDialog.data.type === 'bool'">
- <t-select v-model="addDataDialog.data.value">
- <t-option :key="true" :value="true" label="true"></t-option>
- <t-option :key="false" :value="false" label="false"></t-option>
- <t-option key="随机" label="随机"></t-option>
- </t-select>
- <div class="desc mt-8">
- 固定:指定true或false<br />
- 随机:随机生成一个布尔值<br />
- </div>
- </div>
- <div
- class="flex-grow"
- v-else-if="
- addDataDialog.data.type === 'array' ||
- addDataDialog.data.type === 'object'
- "
- >
- <CodeEditor v-model="addDataDialog.data.value" :json="true" />
- </div>
- <div class="flex-grow" v-else>
- <t-input
- class="w-full"
- v-model="addDataDialog.data.value"
- placeholder="字符串"
- />
- <div class="desc mt-8">
- 固定文字:直接输入。例如:大屏可视化<br />
- 随机文本:[文本长度]。例如:[8] 或 [16]<br />
- 随机指定文本:{文本1,文本2,文本3...} 。 例如:{大屏, 可视化}
- <br />
- </div>
- </div>
- </div>
- </t-dialog>
- <t-dialog
- v-if="dataBindDialog.show"
- :visible="true"
- class="data-link-dialog"
- header="动态数据绑定"
- @close="
- // dataBindDialog.data.binds = dataBindDialog.bkBinds;
- dataBindDialog.show = false
- "
- @confirm="dataBindDialog.show = false"
- :width="700"
- >
- <div class="form-item">
- <label>当前绑定:</label>
- <!-- <div class="label" v-if="dataBindDialog.data.binds?.length">
- <t-tooltip
- v-for="(tag, index) in dataBindDialog.data.binds"
- :key="index"
- :content="tag.id"
- >
- <t-tag class="mr-8 mb-8" closable @close="onRemoveBind(index)">
- {{ tag.label }}
- </t-tag>
- </t-tooltip>
- </div> -->
- <div class="label" v-if="dataBindDialog.data.binds?.id">
- <t-tooltip :content="dataBindDialog.data.binds?.id">
- <t-tag class="mr-8 mb-8" closable @close="onRemoveBind()">
- {{ dataBindDialog.data.binds?.label }}
- </t-tag>
- </t-tooltip>
- </div>
- <div class="label gray" v-else>无</div>
- </div>
- <div class="form-item mt-8">
- <t-input
- placeholder="搜索"
- v-model="dataBindDialog.input"
- @change="onSearchDataset"
- @enter="onSearchDataset"
- >
- <template #suffixIcon>
- <t-icon name="search" class="hover" @click="onSearchDataset" />
- </template>
- </t-input>
- </div>
- <t-table
- class="mt-12 data-list"
- row-key="id"
- :data="dataBindDialog.dataSet"
- :columns="dataSetColumns"
- size="small"
- bordered
- :loading="dataBindDialog.loading"
- :pagination="query"
- @page-change="onChangePagination"
- :selected-row-keys="dataBindDialog.selectedIds"
- @select-change="onSelectBindsChange"
- >
- </t-table>
- </t-dialog>
- <t-dialog
- v-if="triggersDialog.show"
- :visible="true"
- class="data-events-dialog"
- header="数据触发器"
- @confirm="triggersDialog.show = false"
- @close="triggersDialog.show = false"
- :width="700"
- >
- <div class="body">
- <t-collapse
- v-model="triggersDialog.openedCollapses"
- :borderless="true"
- :expand-on-row-click="false"
- >
- <t-collapse-panel
- v-for="(trigger, i) in triggersDialog.data.triggers"
- :value="i"
- >
- <template #header>
- <t-input v-model="trigger.name" class="mr-12" />
- </template>
- <template #headerRightContent>
- <t-popconfirm
- content="确认删除该触发器吗?"
- @confirm="triggersDialog.data.triggers.splice(i, 1)"
- >
- <t-icon name="delete" class="hover" />
- </t-popconfirm>
- </template>
- <section>
- <div class="form-item banner">
- <label>触发条件</label>
- <div class="w-full flex middle between">
- <div></div>
- <t-radio-group v-model="trigger.conditionType">
- <t-radio value="and"> 满足全部条件 </t-radio>
- <t-radio value="or"> 满足任意条件 </t-radio>
- </t-radio-group>
- </div>
- </div>
- <div v-for="(c, index) in trigger.conditions" class="mb-12">
- <div class="flex middle between head">
- <div class="flex middle">
- <t-icon name="arrow-right" class="mr-4" />
- 条件{{ index + 1 }}
- </div>
- <t-icon
- name="close"
- class="hover"
- @click="trigger.conditions.splice(index, 1)"
- />
- </div>
- <div class="px-16 py-4">
- <div class="form-item mt-4">
- <label>条件类型</label>
- <t-radio-group v-model="c.type">
- <t-radio value=""> 关系条件 </t-radio>
- <t-radio value="fn"> 高级条件 </t-radio>
- </t-radio-group>
- </div>
- <template v-if="!c.type">
- <div class="form-item mt-8">
- <label>比较条件</label>
- <div class="flex middle">
- <label class="shrink-0 mr-8">数据</label>
- <t-select
- v-model="c.operator"
- placeholder="关系运算"
- :options="operatorOptions"
- class="shrink-0 mr-8"
- style="width: 80px"
- />
- <t-select
- v-model="c.valueType"
- class="shrink-0 mr-8"
- style="width: 110px"
- placeholder="固定值"
- >
- <t-option key="" value="" label="固定值">
- 固定值
- </t-option>
- <t-option key="prop" value="prop" label="对象属性值">
- 对象属性值
- </t-option>
- </t-select>
- <template v-if="!c.valueType">
- <t-input
- v-model="c.value"
- class="shrink-0"
- style="width: 320px"
- />
- </template>
- <template v-else>
- <t-tree-select
- v-model="c.target"
- :data="penTree"
- filterable
- placeholder="对象"
- class="shrink-0 mr-8"
- style="width: 160px"
- @change="onChangeTriggerTarget(c)"
- />
- <t-select-input
- v-model:inputValue="c.value"
- :value="c.label"
- v-model:popupVisible="c.popupVisible"
- allow-input
- clearable
- @clear="c.label = undefined"
- @focus="c.popupVisible = true"
- @blur="c.popupVisible = undefined"
- @input-change="onInput(c)"
- class="shrink-0"
- style="width: 152px"
- >
- <template #panel>
- <ul style="padding: 8px 12px">
- <li
- v-for="item in c.targetProps"
- :key="item.value"
- @click="
- c.value = item.value;
- c.label = item.label;
- "
- >
- {{ item.label }}
- </li>
- </ul>
- </template>
- </t-select-input>
- </template>
- </div>
- </div>
- </template>
- <template v-else>
- <div>function condition(pen) {</div>
- <CodeEditor class="mt-4" v-model="c.fnJs" />
- <div class="mt-4">}</div>
- </template>
- </div>
- </div>
- <div class="mt-8">
- <a @click="addTriggerCondition(trigger)"> + 添加条件 </a>
- </div>
- <div class="form-item banner mt-16">
- <label>执行动作</label>
- </div>
- <Actions class="mt-8" :data="trigger" />
- </section>
- </t-collapse-panel>
- </t-collapse>
- <div class="mt-8">
- <a @click="onAddTrigger"> + 添加触发器 </a>
- </div>
- </div>
- </t-dialog>
- </template>
- <script lang="ts" setup>
- import {
- getCurrentInstance,
- onBeforeMount,
- onUnmounted,
- reactive,
- ref,
- toRaw,
- } from 'vue';
- import { useRoute, useRouter } from 'vue-router';
- import { MessagePlugin } from 'tdesign-vue-next';
- import axios from 'axios';
- import { debounce } from '@/services/debouce';
- import { getPenTree, typeOptions } from '@/services/common';
- import { updatePen } from './pen';
- import CodeEditor from '@/views/components/common/CodeEditor.vue';
- import Actions from './Actions.vue';
- const route = useRoute();
- const router = useRouter();
- const {
- proxy: { $forceUpdate },
- }: any = getCurrentInstance();
- const props = defineProps<{
- pen: any;
- }>();
- const options = ref<any>([
- {
- value: '',
- content: '自定义',
- divider: true,
- },
- {
- value: 'x',
- content: 'X',
- type: 'number',
- keywords: true,
- },
- {
- value: 'y',
- content: 'Y',
- type: 'number',
- keywords: true,
- },
- {
- value: 'width',
- content: '宽',
- type: 'number',
- keywords: true,
- },
- {
- value: 'height',
- content: '高',
- type: 'number',
- keywords: true,
- },
- {
- value: 'visible',
- content: '显示',
- type: 'bool',
- keywords: true,
- },
- {
- value: 'text',
- content: '文字',
- keywords: true,
- },
- {
- value: 'progress',
- content: '进度',
- type: 'number',
- keywords: true,
- },
- {
- value: 'showChild',
- content: '状态',
- type: 'number',
- keywords: true,
- },
- {
- value: 'rotate',
- content: '旋转',
- type: 'number',
- keywords: true,
- },
- ]);
- const moreOptions = ref<any>([
- {
- value: 'edit',
- content: '编辑',
- },
- {
- value: 'delete',
- content: '移除',
- },
- ]);
- const addDataDialog = reactive<any>({
- show: false,
- data: undefined,
- });
- const dataBindDialog = reactive<any>({
- show: false,
- data: undefined,
- });
- const dataSetColumns = [
- {
- colKey: 'row-select',
- type: 'single',
- width: 50,
- },
- {
- colKey: 'id',
- title: '编号',
- width: 150,
- ellipsis: { theme: 'light', trigger: 'context-menu' },
- },
- {
- colKey: 'label',
- title: '动态数据名称',
- width: 220,
- ellipsis: { theme: 'light', trigger: 'context-menu' },
- },
- {
- colKey: 'case',
- title: '场景',
- ellipsis: { theme: 'light', trigger: 'context-menu' },
- },
- ];
- const operatorOptions = ref<any>([
- { label: '=', value: '=' },
- { label: '!=', value: '!=' },
- { label: '>', value: '>' },
- { label: '<', value: '<' },
- { label: '>=', value: '>=' },
- { label: '<=', value: '<=' },
- { label: '包含', value: '[)' },
- { label: '不包含', value: '![)' },
- ]);
- const query = reactive<{
- current: number;
- pageSize: number;
- total: number;
- range: any[];
- }>({
- current: 1,
- pageSize: 10,
- total: 0,
- range: [],
- });
- const triggersDialog = reactive<any>({
- show: false,
- data: undefined,
- });
- const penTree: any = ref([]);
- let timer: any;
- onBeforeMount(() => {
- // realTimesOptions - 扩展的动态数据下拉列表
- if (props.pen.realTimesOptions) {
- options.value[options.value.length - 1].divider = true;
- options.value.push(...props.pen.realTimesOptions);
- }
- timer = setInterval($forceUpdate, 1000);
- });
- const addRealTime = (e: any) => {
- if (e.keywords) {
- if (!props.pen.realTimes) {
- props.pen.realTimes = [];
- }
- props.pen.realTimes.push({
- label: e.content,
- key: e.value,
- type: e.type,
- keywords: e.keywords,
- });
- return;
- }
- addDataDialog.header = '添加动态数据';
- addDataDialog.data = {
- label: e.content,
- key: e.value,
- type: e.type,
- keywords: e.keywords,
- };
- if (e.keywords) {
- addDataDialog.data.label = '';
- }
- addDataDialog.show = true;
- };
- const onChangeLabel = () => {
- if (!addDataDialog.data.key) {
- addDataDialog.data.key = addDataDialog.data.label;
- }
- };
- const onConfirmData = () => {
- if (!props.pen.realTimes) {
- props.pen.realTimes = [];
- }
- if (!addDataDialog.data.label || !addDataDialog.data.key) {
- MessagePlugin.error('数据名或属性名不能为空!');
- return;
- }
- if (addDataDialog.header === '添加动态数据') {
- const found = props.pen.realTimes.findIndex((item: any) => {
- return item.key === addDataDialog.data.key;
- });
- if (found > -1) {
- MessagePlugin.error('已经存在相同属性数据!');
- return;
- }
- props.pen.realTimes.push(addDataDialog.data);
- }
- meta2d.penMock(props.pen);
- addDataDialog.show = false;
- };
- const onMenuMore = (e: any, item: any, i: number) => {
- switch (e.value) {
- case 'edit':
- addDataDialog.header = '编辑动态数据';
- addDataDialog.data = item;
- addDataDialog.show = true;
- break;
- case 'delete':
- props.pen.realTimes.splice(i, 1);
- break;
- default:
- break;
- }
- };
- const onBind = (item: any) => {
- // if (!item.binds) {
- // item.binds = [];
- // }
- // dataBindDialog.data = item;
- // dataBindDialog.input = '';
- // dataBindDialog.selectedIds = [];
- // for (const i of item.binds) {
- // dataBindDialog.selectedIds.push(i.id);
- // }
- // dataBindDialog.bkBinds = [];
- // dataBindDialog.bkBinds.push(...item.binds);
- // dataBindDialog.show = true;
- dataBindDialog.data = item;
- dataBindDialog.input = '';
- dataBindDialog.selectedIds = [];
- if (item.binds && item.binds.id) {
- dataBindDialog.selectedIds.push(item.binds.id);
- }
- dataBindDialog.show = true;
- getDataset();
- };
- const onSearchDataset = () => {
- debounce(getDataset, 300);
- };
- const getDataset = async () => {
- // @ts-ignore
- const data: Meta2dBackData = meta2d.data();
- dataBindDialog.loading = true;
- // 应该从data获取url或结果列表
- const ret: any = await axios.get(
- `/api/device/data/set?mock=1&q=${dataBindDialog.input}¤t=${query.current}&pageSize=${query.pageSize}`
- );
- dataBindDialog.dataSet = ret.list;
- query.total = ret.total;
- dataBindDialog.loading = false;
- };
- const onChangePagination = (pageInfo: any) => {
- router.push({
- path: route.path,
- query: { current: pageInfo.current, pageSize: pageInfo.pageSize },
- });
- query.current = pageInfo.current;
- query.pageSize = pageInfo.pageSize;
- getDataset();
- };
- const onSelectBindsChange = (value: string[], options: any) => {
- // dataBindDialog.selectedIds = value;
- if (options.type === 'check') {
- // for (const item of options.selectedRowData) {
- // const found = dataBindDialog.data.binds.findIndex((elem: any) => {
- // return elem.id === item.id;
- // });
- // if (found < 0) {
- // dataBindDialog.data.binds.push(toRaw(item));
- // }
- // }
- dataBindDialog.selectedIds = value;
- dataBindDialog.data.binds = toRaw(options.selectedRowData[0]);
- } else if (options.type === 'uncheck') {
- // if (options.currentRowKey === 'CHECK_ALL_BOX') {
- // for (const data of dataBindDialog.dataSet) {
- // const found = dataBindDialog.data.binds.findIndex((elem: any) => {
- // return elem.id === data.id;
- // });
- // if (found > -1) {
- // dataBindDialog.data.binds.splice(found, 1);
- // }
- // }
- // } else {
- // const found = dataBindDialog.data.binds.findIndex((elem: any) => {
- // return elem.id === options.currentRowKey;
- // });
- // if (found > -1) {
- // dataBindDialog.data.binds.splice(found, 1);
- // }
- dataBindDialog.selectedIds = [];
- dataBindDialog.data.binds = {};
- // }
- }
- };
- const onRemoveBind = () => {
- // dataBindDialog.data.binds.splice(index, 1);
- dataBindDialog.selectedIds = [];
- // for (const i of dataBindDialog.data.binds) {
- // dataBindDialog.selectedIds.push(i.id);
- // }
- dataBindDialog.data.binds = undefined;
- };
- const getBindsDesc = (item: any) => {
- if (!item.binds || !item.binds.id) {
- return '绑定动态数据';
- }
- // let desc = '';
- // for (const i of item.binds) {
- // desc += i.label + ',';
- // }
- // if (desc && desc.length > 1) {
- // desc = desc.substring(0, desc.length - 1);
- // }
- return item.binds.label;
- };
- const changeValue = (prop: string) => {
- updatePen(props.pen, prop);
- };
- const onTrigger = (item: any) => {
- if (!item.triggers) {
- item.triggers = [];
- }
- triggersDialog.openedCollapses = [0];
- triggersDialog.data = item;
- triggersDialog.show = true;
- penTree.value = getPenTree();
- };
- const onAddTrigger = () => {
- const i = triggersDialog.data.triggers.length;
- triggersDialog.data.triggers.push({
- name: `触发器${i + 1}`,
- conditionType: 'and',
- conditions: [],
- actions: [],
- });
- triggersDialog.openedCollapses.push(i);
- };
- const addTriggerCondition = (trigger: any) => {
- trigger.conditions.push({
- type: '',
- operator: '=',
- valueType: '',
- });
- };
- const onChangeTriggerTarget = (c: any) => {
- c.targetProps = [
- {
- value: 'x',
- label: 'X',
- },
- {
- value: 'y',
- label: 'Y',
- },
- {
- value: 'width',
- label: '宽',
- },
- {
- value: 'height',
- label: '高',
- },
- {
- value: 'visible',
- label: '显示',
- },
- {
- value: 'text',
- label: '文字',
- },
- {
- value: 'progress',
- label: '进度',
- },
- {
- value: 'showChild',
- label: '状态',
- },
- {
- value: 'rotate',
- label: '旋转',
- },
- ];
- const target: any = meta2d.findOne(c.target);
- if (target) {
- for (const item of target.realTimes) {
- const found = c.targetProps.findIndex(
- (elem: any) => elem.value === item.key
- );
- if (found < 0) {
- c.targetProps.push({
- value: item.key,
- label: item.label,
- });
- }
- }
- }
- };
- const onInput = (item: any) => {
- item.label = item.value;
- };
- onUnmounted(() => {
- clearInterval(timer);
- });
- </script>
- <style lang="postcss" scoped>
- .props {
- height: 100%;
- .grid {
- grid-template-columns: 60px 140px 54px 30px;
- padding: 0 12px;
- &.head {
- background: var(--color-background-input);
- line-height: 36px;
- margin-bottom: 6px;
- .title {
- line-height: 36px;
- }
- }
- }
- .blank {
- height: 70%;
- img {
- padding: 16px;
- opacity: 0.9;
- }
- }
- .label {
- width: fit-content;
- font-size: 10px;
- line-height: 28px;
- color: var(--color-desc);
- }
- .value {
- padding-right: 8px;
- display: flex;
- align-items: center;
- svg {
- flex-shrink: 0;
- margin-right: 4px;
- }
- & > div {
- width: 110px;
- &.t-switch {
- width: fit-content;
- margin-left: 4px;
- }
- }
- :deep(.t-input) {
- padding-left: 4px;
- height: 26px;
- border-color: transparent;
- &:hover {
- border-color: var(--color-primary);
- }
- }
- }
- .actions {
- text-align: right;
- padding-right: 2px;
- }
- .data-list {
- height: 300px;
- overflow: auto;
- }
- }
- .body {
- :deep(.t-collapse.t--border-less) {
- .t-collapse-panel__header {
- border-top: none;
- border-bottom: 1px solid var(--td-border-level-1-color);
- padding: 8px 0;
- .t-input {
- border: none;
- padding-left: 0;
- font-size: 14px;
- }
- }
- .t-collapse-panel__content {
- padding: 8px 0;
- }
- }
- .title {
- position: relative;
- margin: 8px 0;
- :deep(.t-input) {
- border-color: var(--color-background-input);
- border-radius: 0;
- border-left: none;
- border-top: none;
- border-right: none;
- padding-left: 0;
- padding-bottom: 8px;
- font-size: 14px;
- &:hover {
- border-color: var(--color-border-input);
- }
- }
- }
- .head {
- margin-top: 10px;
- }
- .banner {
- background-color: var(--color-background-input);
- padding: 0 12px;
- }
- }
- </style>
|