resolver-egretimp-plus 0.1.108 → 0.1.110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as Renderer} from './src/renderer.jsx'
2
+ import { normalPageConfigs } from './src/components/helper/resolver.js'
2
3
  import { commonPropsType } from './src/utils/index.js'
3
4
 
4
5
 
@@ -11,5 +12,6 @@ const componentPropsType = Object.keys(commonPropsType).reduce((ret, key) => {
11
12
  }, {})
12
13
 
13
14
  export {
15
+ normalPageConfigs,
14
16
  componentPropsType
15
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resolver-egretimp-plus",
3
- "version": "0.1.108",
3
+ "version": "0.1.110",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -87,16 +87,37 @@ export async function executeLoadServices(services = [], {
87
87
  }
88
88
  }
89
89
 
90
- export function normalPageConfigs(pageConfig) {
90
+ export function normalPageConfigs(pageConfig, target) {
91
91
  const rootOptionComp = pageConfig?.pmPageMetaList?.find(item => item.metaType === 'PC-root-panel' || item.metaType === 'H5-root-panel')
92
92
  if (rootOptionComp) {
93
93
  pageConfig.pmPageMetaList = rootOptionComp.pmPageMetaList
94
94
  delete rootOptionComp.pmPageMetaList
95
95
  pageConfig.rootOptionComp = rootOptionComp
96
96
  }
97
+ if (target) {
98
+ const targetComp = getTargetComp(pageConfig, target)
99
+ if (targetComp) {
100
+ pageConfig.pmPageMetaList = [targetComp]
101
+ }
102
+ }
97
103
  return pageConfig
98
104
  }
99
105
 
106
+ // 获取配置的时候,设置了只需要展示指定的部分
107
+ function getTargetComp(config, target = '') {
108
+ let ret = config
109
+ if (target) {
110
+ metaCodes = target.split('->')
111
+ ret = metaCodes.reduce((ret, metaCode) => {
112
+ if (ret && ret.pmPageMetaList && Array.isArray(ret.pmPageMetaList)) {
113
+ return ret.pmPageMetaList.find(item => item.metaCode === metaCode)
114
+ }
115
+ return ret
116
+ }, config)
117
+ }
118
+ return ret
119
+ }
120
+
100
121
  export function resetConfigEventInit(dynamicMapComp) {
101
122
  Object.keys(dynamicMapComp).forEach(key => {
102
123
  if (hasOwn(dynamicMapComp[key], 'eventInit')) {
@@ -0,0 +1,74 @@
1
+ import AsyncValidator from 'async-validator'
2
+ import { calcDisable, getFormItemRule } from '../../utils'
3
+
4
+ export function getCustomerTableProps(commonPropsType, ElTableV2, ElTable, ElPagination) {
5
+ const ret = {
6
+ ...commonPropsType,
7
+ ...ElTableV2.props,
8
+ headerHeight: {
9
+ type: Number,
10
+ default: 40,
11
+ },
12
+ rowHeight: {
13
+ type: Number,
14
+ default: 40,
15
+ },
16
+ ...ElTable.props,
17
+ ...ElPagination.props
18
+ }
19
+ delete ret.columns
20
+ delete ret.data
21
+ return ret
22
+ }
23
+
24
+ export async function tableValidate({
25
+ props,
26
+ data,
27
+ lang,
28
+ rootValue,
29
+ dynamicMapComp,
30
+ messageInstance
31
+ }) {
32
+ const multiPmPageMetaList = props.config.multiPmPageMetaList || []
33
+ const list = (data || [])
34
+ for (let index = 0; index < list.length; index++) {
35
+ const row = list[index];
36
+ const configColumns = multiPmPageMetaList[index]
37
+ const rowScope = {row, $index: index}
38
+ for (let j = 0; j < configColumns.length; j++) {
39
+ const columnConfig = configColumns[j];
40
+ const renderProps = getItemRenderProps(columnConfig, props, rowScope)
41
+ const params = {
42
+ lang,
43
+ rootValue,
44
+ dynamicMapComp,
45
+ props: renderProps,
46
+ messageInstance
47
+ }
48
+ const compProps = {
49
+ disabled: calcDisable(columnConfig, props.mode)
50
+ }
51
+ const rules = getFormItemRule(columnConfig, lang, params, compProps)
52
+ const validator = new AsyncValidator({
53
+ [props.config.metaCode]: rules
54
+ // validator: (rule, value, callback) => {
55
+ // callback(new Error('test error'))
56
+ // return
57
+ // }
58
+ })
59
+ const a = await validator.validate({[columnConfig.metaCode]: row[columnConfig.metaCode]})
60
+ debugger
61
+ }
62
+ }
63
+
64
+ }
65
+
66
+ function getItemRenderProps(itemConfig, tableProps, rowScope) {
67
+ const {row } = rowScope
68
+ return {
69
+ config: itemConfig,
70
+ modelValue: row[itemConfig.metaCode],
71
+ rowScope,
72
+ mode: tableProps.mode
73
+ }
74
+ }
@@ -1,31 +1,28 @@
1
1
 
2
- import { ElAutoResizer, ElPagination, ElTableV2 } from 'element-plus'
2
+ import { ElAutoResizer, ElPagination, ElTableV2, formContextKey } from 'element-plus'
3
3
  import ElTable, { ElTableColumn } from '../table'
4
4
  import Renderer from '../../renderer.jsx'
5
- import { computed, inject, watch, h, ref, reactive } from 'vue'
6
- import { commonPropsType, TABLE_COLUMN_NOT_RENDER_META_TYPE, DISPLAY_SHOW, compareComponet, isPlainObject, hasOwn, cloneDeep, isPromise, isPlainColumn, generateUniqueId, calcDisable, camelize, capitalize, DISPLAY_HIDDEN, definePrivatelyProp, isArray } from '../../utils/index.js'
5
+ import { computed, inject, watch, h, ref, reactive, onMounted, unref } from 'vue'
6
+ import { commonPropsType, TABLE_COLUMN_NOT_RENDER_META_TYPE, DISPLAY_SHOW, compareComponet, isPlainObject, hasOwn, cloneDeep, isPromise, isPlainColumn, generateUniqueId, calcDisable, camelize, capitalize, DISPLAY_HIDDEN, definePrivatelyProp, isArray, eleIsOverflow } from '../../utils/index.js'
7
+ import { getCustomerTableProps, tableValidate } from '../helper/table'
7
8
  // import '../styles/CustomComponenTable.scss'
8
9
 
9
10
  export default {
10
11
  inheritAttrs: false,
11
12
  name: 'CustomComponentTable',
12
- props: {
13
- ...commonPropsType,
14
- ...ElTableV2.props,
15
- ...ElTable.props,
16
- ...ElPagination.props
17
- },
13
+ props: getCustomerTableProps(commonPropsType, ElTableV2, ElTable, ElPagination),
18
14
  setup(props, { expose, attrs, emit }) {
19
- // 虚拟表格列的属性
20
- const virtualizedColumnPropKeys = ['align', 'class', 'key', 'dataKey', 'fixed', 'flexGrow', 'flexShrink', 'headerClass', 'hidden', 'style', 'sortable', 'title', 'maxWidth', 'minWidth', 'width']
15
+ // 虚拟表格列的属性 'hidden'不需要这个属性,额外控制
16
+ const virtualizedColumnPropKeys = ['align', 'class', 'key', 'dataKey', 'fixed', 'flexGrow', 'flexShrink', 'headerClass', 'style', 'sortable', 'title', 'maxWidth', 'minWidth', 'width']
21
17
  // 开启虚拟化表格
22
18
  const isVirtualized = computed(() => {
23
- // if (props.config.metaCode === 'mksAttachList') {
24
- // return false
25
- // }
26
- // return true
27
19
  return props.config?.isVirtualized == '1'
28
20
  })
21
+ const toopTip = reactive({
22
+ show: false,
23
+ triggerRef: null,
24
+ content: ''
25
+ })
29
26
  let pageSize = 5 // 默认每页5条
30
27
  if (props.config?.pageSize) {
31
28
  pageSize = parseInt(props.config.pageSize) || 5
@@ -59,6 +56,8 @@ export default {
59
56
  const selectable = computed(() => {
60
57
  return props.config?.selectable == '1' || props.config?.canSelect
61
58
  })
59
+ const formContext = inject(formContextKey, undefined)
60
+ const messageInstance = inject('_messageInstance')
62
61
  const indectModeRef = inject('indectModeRef', ref(''))
63
62
  const ruleExecuter = inject('_ruleExecuter')
64
63
  const dynamicMapComp = inject('dynamicMapComp')
@@ -91,6 +90,30 @@ export default {
91
90
  if (!porpsObj.stripe) {
92
91
  porpsObj.stripe = true
93
92
  }
93
+ if (isVirtualized.value) {
94
+ const oldHeaderClass = porpsObj.headerClass
95
+ porpsObj.headerClass = function(params) {
96
+ let ret = 'table-v2-common-row'
97
+ const oldVal = typeof oldHeaderClass === 'function' ? oldHeaderClass(params) : oldHeaderClass
98
+ if (oldVal) {
99
+ ret = `${oldVal} ${ret}`
100
+ }
101
+ return ret
102
+ }
103
+ const oldRowClass = porpsObj.rowClass
104
+ porpsObj.rowClass = function(params) {
105
+ const {rowIndex} = params
106
+ let ret = 'table-v2-common-row'
107
+ const oldVal = typeof oldRowClass === 'function' ? oldRowClass(params) : oldRowClass
108
+ if (oldVal) {
109
+ ret = `${oldVal} ${ret}`
110
+ }
111
+ if (rowIndex % 2 === 1) {
112
+ ret = `${ret} table-v2-striped`
113
+ }
114
+ return ret
115
+ }
116
+ }
94
117
  return porpsObj
95
118
  })
96
119
 
@@ -198,95 +221,100 @@ export default {
198
221
  return config.displayType != DISPLAY_HIDDEN && !(config.width == 0 || config.width == '0px' || config.hidden == '1')
199
222
  })?.length
200
223
  const nextConfig = nextList.find(config => config.displayType != DISPLAY_HIDDEN)
201
- const columnkeys = isVirtualized.value ? virtualizedColumnPropKeys : ElTableColumn.props
202
- const retObj = Object.keys(columnkeys).reduce((ret, key) => {
224
+ let columnkeys = virtualizedColumnPropKeys
225
+ if (!isVirtualized.value) {
226
+ columnkeys = Object.keys(ElTableColumn.props)
227
+ }
228
+ const retObj = columnkeys.reduce((ret, key) => {
203
229
  if (hasOwn(config, key)) {
204
230
  ret[key] = config[key]
205
231
  }
206
232
  return ret
207
233
  }, {})
208
- if (config.showOverflowTooltip == '1' || config['show-overflow-tooltip'] == '1') {
209
- retObj['show-overflow-tooltip'] = true
210
- retObj.showOverflowTooltip = true
211
- } else {
212
- retObj['show-overflow-tooltip'] = false
213
- retObj.showOverflowTooltip = false
214
- }
215
- if (!retObj.prop) {
216
- retObj.prop = config.metaCode
217
- }
234
+
218
235
  if (config.columnWidth) {
219
236
  retObj.width = config.columnWidth
220
- if (isVirtualized.value) {
221
- retObj.width = parseInt(retObj.width)
222
- }
223
237
  }
224
238
  if (!retObj.width) {
225
239
  retObj.minWidth = 160
226
- if (isVirtualized.value) {
227
- retObj.width = 160
228
- retObj.headerClass = 'flex-grow-import'
229
- retObj.class = 'flex-grow-import'
230
- }
231
- }
232
- let classKey = 'className'
233
- if (isVirtualized.value) {
234
- classKey = 'class'
235
240
  }
236
241
  if (retObj.width == 0 || retObj.width == '0px' || config.hidden == '1') {
237
- retObj[classKey] = 'hidden-column'
242
+ retObj.className = 'hidden-column'
238
243
  retObj.width = 1
239
- if (isVirtualized.value) {
240
- retObj.headerClass = 'hidden-column'
241
- }
242
244
  }
243
245
  if (nextConfig && (nextConfig.width == 0 || nextConfig.width == '0px' || nextConfig.hidden == '1')) {
244
- retObj[classKey] = `${retObj[classKey] || ''} next-hidden-column`
246
+ retObj.className = `${retObj.className || ''} next-hidden-column`
245
247
  }
246
248
  if (isEndConfig) {
247
- retObj[classKey] = `${retObj[classKey] || ''} end-show-column`
249
+ retObj.className = `${retObj.className || ''} end-show-column`
248
250
  }
249
251
  if (config.metaType == 'CustomComponentSelectEmployees') {
250
- retObj[classKey] = `${retObj[classKey] || ''} clear-index`
251
- }
252
- if (
253
- isPlainColumn({...config, isColumn: true}, true) &&
254
- config.showOverflowTooltip != '0' &&
255
- config['show-overflow-tooltip'] != '0'
256
- ) {
257
- const showOverflowTooltipFn = (data) => {
258
- const currentConfig = multiPmPageMetaList.value?.[data.$index]?.[idx]
259
- if (currentConfig) {
260
- return isPlainColumn({...currentConfig, isColumn: true}, calcDisable(currentConfig, indectModeRef.value))
261
- }
262
- return true
252
+ retObj.className = `${retObj.className || ''} clear-index`
253
+ }
254
+ if (!isVirtualized.value) {
255
+ if (!retObj.prop) {
256
+ retObj.prop = config.metaCode
263
257
  }
264
- retObj['show-overflow-tooltip'] = showOverflowTooltipFn
265
- retObj.showOverflowTooltip = showOverflowTooltipFn
266
- }
267
- if (config.type === 'selection') {
268
- const orginSelectable = retObj.selectable
269
- retObj.selectable = (row, index) => {
270
- let orginRet = true
271
- if (orginSelectable && typeof orginSelectable === 'function') {
272
- orginRet = orginSelectable(row, index, {
273
- tableConfig: props.config,
274
- rootValue: rootValue,
275
- parentRootValue,
276
- parentDynamicMapComp
277
- })
258
+ // table设置show-overflow-tooltip额外的逻辑=====start=====
259
+ if (config.showOverflowTooltip == '1' || config['show-overflow-tooltip'] == '1') {
260
+ retObj['show-overflow-tooltip'] = true
261
+ retObj.showOverflowTooltip = true
262
+ } else {
263
+ retObj['show-overflow-tooltip'] = false
264
+ retObj.showOverflowTooltip = false
265
+ }
266
+ if (
267
+ isPlainColumn({...config, isColumn: true}, true) &&
268
+ config.showOverflowTooltip != '0' &&
269
+ config['show-overflow-tooltip'] != '0'
270
+ ) {
271
+ const showOverflowTooltipFn = (data) => {
272
+ const currentConfig = multiPmPageMetaList.value?.[data.$index]?.[idx]
273
+ if (currentConfig) {
274
+ return isPlainColumn({...currentConfig, isColumn: true}, calcDisable(currentConfig, indectModeRef.value))
275
+ }
276
+ return true
278
277
  }
279
- let parentSelectionsRet = true
280
- if (selectionsObj.selections && selectionsObj.selections.length && selectionsObj.primaryKeys && selectionsObj.primaryKeys.length) {
281
- const hasRow = selectionsObj.selections?.some(selectRow => {
282
- return selectionsObj.primaryKeys.map(key => key && selectRow[key] == row[key]).every(item => item)
283
- })
284
- parentSelectionsRet = !hasRow
278
+ retObj['show-overflow-tooltip'] = showOverflowTooltipFn
279
+ retObj.showOverflowTooltip = showOverflowTooltipFn
280
+ }
281
+ // table设置show-overflow-tooltip额外的逻辑=====end=====
282
+ if (config.type === 'selection') {
283
+ const orginSelectable = retObj.selectable
284
+ retObj.selectable = (row, index) => {
285
+ let orginRet = true
286
+ if (orginSelectable && typeof orginSelectable === 'function') {
287
+ orginRet = orginSelectable(row, index, {
288
+ tableConfig: props.config,
289
+ rootValue: rootValue,
290
+ parentRootValue,
291
+ parentDynamicMapComp
292
+ })
293
+ }
294
+ let parentSelectionsRet = true
295
+ if (selectionsObj.selections && selectionsObj.selections.length && selectionsObj.primaryKeys && selectionsObj.primaryKeys.length) {
296
+ const hasRow = selectionsObj.selections?.some(selectRow => {
297
+ return selectionsObj.primaryKeys.map(key => key && selectRow[key] == row[key]).every(item => item)
298
+ })
299
+ parentSelectionsRet = !hasRow
300
+ }
301
+ return orginRet && parentSelectionsRet
285
302
  }
286
- return orginRet && parentSelectionsRet
287
303
  }
288
304
  }
289
305
 
306
+ if (isVirtualized.value) {
307
+ let classValue = retObj.className || ''
308
+ if (retObj.width) {
309
+ retObj.width = parseInt(retObj.width)
310
+ } else {
311
+ retObj.width = 160
312
+ classValue = `${classValue} flex-grow-import`
313
+ }
314
+ retObj.class = `${classValue} table-body-cell`
315
+ retObj.headerClass = `${classValue} table-head-cell`
316
+ }
317
+
290
318
  return retObj
291
319
  }
292
320
 
@@ -525,6 +553,42 @@ export default {
525
553
  return ret
526
554
  }, {})
527
555
 
556
+ function validate() {
557
+ // lang,
558
+ // rootValue,
559
+ // dynamicMapComp,
560
+ // props,
561
+ // messageInstance: messageInstance?.value
562
+ return tableValidate({
563
+ props,
564
+ data: unref(modelValue),
565
+ lang,
566
+ rootValue,
567
+ dynamicMapComp,
568
+ messageInstance: messageInstance?.value
569
+ })
570
+ }
571
+
572
+ const context = reactive({
573
+ // ...toRefs(props),
574
+ // $el: formItemRef,
575
+ // size: _size,
576
+ // validateState,
577
+ // labelId,
578
+ // inputIds,
579
+ // isGroup,
580
+ // hasLabel,
581
+ // fieldValue,
582
+ // addInputId,
583
+ // removeInputId,
584
+ // resetField,
585
+ // clearValidate,
586
+ validate,
587
+ })
588
+ onMounted(() => {
589
+ // formContext?.addField(context)
590
+ })
591
+
528
592
  // 是否配置分页功能 ====== end======
529
593
  expose({
530
594
  multipleSelection,
@@ -540,6 +604,23 @@ export default {
540
604
  })
541
605
  // console.log('dynamicMapComp===:', inject('dynamicMapComp'))
542
606
 
607
+ function cellMouseEnenter(e) {
608
+ const {overflow, content} = eleIsOverflow(e)
609
+ toopTip.show = false
610
+ toopTip.content = ''
611
+ toopTip.triggerRef = null
612
+ if (overflow) {
613
+ toopTip.show = true
614
+ toopTip.content = content
615
+ toopTip.triggerRef = e.target
616
+ }
617
+ }
618
+ function cellMouseout(e) {
619
+ toopTip.show = false
620
+ toopTip.content = ''
621
+ toopTip.triggerRef = null
622
+ }
623
+
543
624
  function generateCellSolts(columnConfg, configIdx) {
544
625
  let headerKey = 'header'
545
626
  let cellKey = 'default'
@@ -548,21 +629,31 @@ export default {
548
629
  cellKey = 'cellRenderer'
549
630
  }
550
631
  return {
551
- [headerKey]: () => (
552
- <span className='head-span' title={lang.value.indexOf('zh') > -1 ? columnConfg.metaNameZh : columnConfg.metaNameEn}>
553
- { columnConfg.requiredFlag == '1' ? <span style="color: rgb(245, 34, 45); margin-right: 3px;">*</span> : '' }
554
- { columnConfg.headerRender ? columnConfg.headerRender(h, { props, config: columnConfg, lang, rootValue, selects })
555
- : (lang.value.indexOf('zh') > -1 ? columnConfg.metaNameZh : columnConfg.metaNameEn)
556
- }
557
- {
558
- columnConfg.hintFlag == '1' ? (
559
- <ElTooltip effect="dark" content={lang.value.indexOf('zh') > -1 ? columnConfg.hintContentZh : columnConfg.hintContentEn} placement="top">
560
- <elIcon style="fontSize: 16px; verticalAlign: sub; margin-left: 3px;"><QuestionFilled /></elIcon>
561
- </ElTooltip>
562
- ) : null
563
- }
564
- </span>
565
- ),
632
+ [headerKey]: () => {
633
+ let retVnode = (
634
+ <span className='head-span' title={lang.value.indexOf('zh') > -1 ? columnConfg.metaNameZh : columnConfg.metaNameEn}>
635
+ { columnConfg.requiredFlag == '1' ? <span style="color: rgb(245, 34, 45); margin-right: 3px;">*</span> : '' }
636
+ { columnConfg.headerRender ? columnConfg.headerRender(h, { props, config: columnConfg, lang, rootValue, selects })
637
+ : (lang.value.indexOf('zh') > -1 ? columnConfg.metaNameZh : columnConfg.metaNameEn)
638
+ }
639
+ {
640
+ columnConfg.hintFlag == '1' ? (
641
+ <ElTooltip effect="dark" content={lang.value.indexOf('zh') > -1 ? columnConfg.hintContentZh : columnConfg.hintContentEn} placement="top">
642
+ <elIcon style="fontSize: 16px; verticalAlign: sub; margin-left: 3px;"><QuestionFilled /></elIcon>
643
+ </ElTooltip>
644
+ ) : null
645
+ }
646
+ </span>
647
+ )
648
+ if (isVirtualized.value) {
649
+ retVnode = (
650
+ <div className="table-v2-cell">
651
+ {retVnode}
652
+ </div>
653
+ )
654
+ }
655
+ return retVnode
656
+ },
566
657
  [cellKey]: (params) => {
567
658
  let row = params.row
568
659
  let $index = params.$index
@@ -570,31 +661,48 @@ export default {
570
661
  row = params.rowData
571
662
  $index = params.rowIndex
572
663
  }
664
+ let retVnode = null
573
665
  if (row.totalFlag) {
574
- return totalCodeRenders.value[columnConfg.metaCode] ? totalCodeRenders.value[columnConfg.metaCode]({
666
+ retVnode = totalCodeRenders.value[columnConfg.metaCode] ? totalCodeRenders.value[columnConfg.metaCode]({
575
667
  val: row[columnConfg.metaCode],
576
668
  row,
577
669
  h
578
670
  }) : null
671
+ } else {
672
+ // const config = columnConfg
673
+ const config = multiPmPageMetaList.value?.[$index]?.[configIdx]
674
+ retVnode = (
675
+ tableColumnNotRender(config) ? null :
676
+ <Renderer key={`${config.columnId}-${config.rowIndex}`} class="error-tip-block" rowScope={{row, $index}} modelValue={getValue($index)} onUpdate:modelValue={(val) => { onUpdateModelValue(val, $index) }} config={config}></Renderer>
677
+ )
579
678
  }
580
- // const config = columnConfg
581
- const config = multiPmPageMetaList.value?.[$index]?.[configIdx]
582
- return (
583
- tableColumnNotRender(config) ? null :
584
- <Renderer key={`${config.columnId}-${config.rowIndex}`} class="error-tip-block" rowScope={{row, $index}} modelValue={getValue($index)} onUpdate:modelValue={(val) => { onUpdateModelValue(val, $index) }} config={config}></Renderer>
585
- )
679
+ if (isVirtualized.value) {
680
+ retVnode = (
681
+ <div className="table-v2-cell" onMouseenter={(e) => cellMouseEnenter(e)} onMouseout={(e) => cellMouseout(e)}>
682
+ {retVnode}
683
+ </div>
684
+ )
685
+ }
686
+ return retVnode
586
687
  }
587
688
  }
588
689
  }
589
690
 
590
691
  function generateRenderVnode() {
591
692
  if (isVirtualized.value) {
592
- let height = '500px'
693
+ let autoResizerStyle = {
694
+ height: tableProps.height
695
+ }
593
696
  if (!dataList.value?.length) {
594
- height = '100px'
697
+ autoResizerStyle.height = 100
698
+ } else {
699
+ if (!autoResizerStyle.height) {
700
+ autoResizerStyle.height = Math.min((dataList.value?.length) * 40, 350)
701
+ }
595
702
  }
703
+ autoResizerStyle.height = `${parseInt(autoResizerStyle.height)}px`
596
704
  return (
597
- <ElAutoResizer style={{height}}>
705
+ <ElAutoResizer style={autoResizerStyle}>
598
706
  {{
599
707
  default: ({ height, width }) => {
600
708
  const columns = tableColumnConfigs.value.map((columnConfg, configIdx) => {
@@ -652,6 +760,13 @@ export default {
652
760
  return () => {
653
761
  return (
654
762
  <div class="custom-component-table">
763
+ <ElTooltip
764
+ placement="top"
765
+ visible={toopTip.show && !!toopTip.triggerRef}
766
+ content={toopTip.content}
767
+ virtualTriggering
768
+ virtualRef={toopTip.triggerRef}
769
+ ></ElTooltip>
655
770
  { generateRenderVnode() }
656
771
  {
657
772
  pageable.value ?
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <ElButton @click.stop="buttonAction" v-bind="{...calcAttrs, ...calcPorps}">
2
+ <ElButton @click.stop="buttonAction" v-bind="{...calcAttrs, ...calcPorps}" :class="{'el-button--def': isDefSize}">
3
3
  {{label}}
4
4
  <template v-for="(_, keyaa) in slots" :key="keyaa" v-slot:[keyaa]="scope">
5
5
  <slot :name="keyaa" v-bind="scope"></slot>
@@ -20,9 +20,13 @@ const slots = useSlots()
20
20
  const props = defineProps({
21
21
  ...commonPropsType,
22
22
  ...ElButton.props,
23
+ size: String,
23
24
  plain: [String, Number, Boolean],
24
25
  circle: [String, Number, Boolean]
25
26
  })
27
+ const isDefSize = computed(() => {
28
+ return props?.config?.widgetSize === 'def'
29
+ })
26
30
  const calcPorps = computed(() => {
27
31
  const ret = Object.keys(ElButton.props).reduce((total, key) => {
28
32
  total[key] = props[key]
@@ -55,6 +59,9 @@ const calcPorps = computed(() => {
55
59
  if (ret.type === 'info') {
56
60
  ret.type = ''
57
61
  }
62
+ if (ret.size === 'def') {
63
+ ret.size = ''
64
+ }
58
65
  return ret
59
66
  })
60
67