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