Commit a201616e97f564a8679a10f2cb9fc88fef143e70

Authored by xp.Huang
2 parents a492541f 4a1e9987

Merge branch 'perf/water-flow-component' into 'main_dev'

perf: 优化流速设置时,新增tooltip提示

See merge request yunteng/thingskit-scada!179
... ... @@ -41,7 +41,7 @@ const modalMethods: ModalMethods = {
41 41 redoModalHeight: () => {
42 42 nextTick(() => {
43 43 if (unref(modalWrapperRef))
44   - (unref(modalWrapperRef) as any).setModalHeight()
  44 + (unref(modalWrapperRef) as any)?.setModalHeight?.()
45 45 })
46 46 },
47 47 }
... ...
... ... @@ -144,6 +144,10 @@ async function setModalHeight() {
144 144 console.log(error)
145 145 }
146 146 }
  147 +
  148 +defineExpose({
  149 + setModalHeight,
  150 +})
147 151 </script>
148 152
149 153 <template>
... ...
... ... @@ -33,7 +33,7 @@ export default defineComponent({
33 33
34 34 return () => {
35 35 return (
36   - <div>
  36 + <div class='flex justify-center items-center'>
37 37 {getIsEdit.value
38 38 ? (
39 39 <EditTableHeaderCell>{getTitle.value}</EditTableHeaderCell>
... ...
... ... @@ -57,6 +57,7 @@ export const tableColumns = (event: string | number): BasicColumn[] => {
57 57 {
58 58 title: '流速',
59 59 key: 'flowSpeed',
  60 + helpMessage: ['流速值越小,流速越快。最大值为100,最小值为0。'],
60 61 dataIndex: 'flowSpeed',
61 62 ifShow: event === ActTypeEnum.DYNAMIC,
62 63 },
... ...
... ... @@ -53,7 +53,7 @@ const [registerTable] = useTable({
53 53 pagination: false,
54 54 canResize: true,
55 55 dataSource,
56   - maxHeight: 250,
  56 + maxHeight: 350,
57 57 rowKey: 'uuid',
58 58 })
59 59
... ... @@ -138,7 +138,7 @@ defineExpose<ComponentExposeType>({
138 138 <div>
139 139 <BasicForm @register="registerSource" />
140 140 </div>
141   - <section class="w-full h-40">
  141 + <section class="w-full">
142 142 <BasicTable @register="registerTable">
143 143 <template #bodyCell="{ column, record }">
144 144 <template
... ... @@ -175,7 +175,7 @@ defineExpose<ComponentExposeType>({
175 175 <Input v-model:value="record.title" placeholder="请输入标签" class="!w-full" />
176 176 </template>
177 177 <template v-if="column.key === 'flowSpeed' && getDesign.event === ActTypeEnum.DYNAMIC">
178   - <InputNumber v-model:value="record.flowSpeed" placeholder="请输入流速" class="!w-full" />
  178 + <InputNumber v-model:value="record.flowSpeed" placeholder="请输入流速" :max="100" :min="0" class="!w-full" />
179 179 </template>
180 180 <template v-if="column.key === 'action'">
181 181 <TableAction
... ... @@ -210,7 +210,9 @@ defineExpose<ComponentExposeType>({
210 210 </template>
211 211
212 212 <style lang="less" scoped>
213   -:deep(.ant-table-cell>.css-dev-only-do-not-override-eq3tly) {
214   - margin: 0 !important
  213 +:deep(.ant-table-cell) {
  214 + .ant-form-item{
  215 + margin: 0 !important
  216 + }
215 217 }
216 218 </style>
... ...