agilebuilder-ui 1.1.33-sit5 → 1.1.34
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/lib/{401-a19c26f9.js → 401-7193e896.js} +1 -1
- package/lib/{404-97a9542c.js → 404-2852bd20.js} +1 -1
- package/lib/{iframe-page-cb203067.js → iframe-page-bcc25b1c.js} +1 -1
- package/lib/index-d502d8fe.js +72779 -0
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +89 -89
- package/lib/{tab-content-iframe-index-aac9a8b4.js → tab-content-iframe-index-48b3b846.js} +1 -1
- package/lib/{tab-content-index-0a8ddc6b.js → tab-content-index-d25e4873.js} +1 -1
- package/lib/{tache-subprocess-history-be4af7b1.js → tache-subprocess-history-a72dd967.js} +1 -1
- package/package.json +1 -1
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +1 -5
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +368 -343
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +42 -113
- package/packages/organization-input/src/organization-input.vue +0 -11
- package/packages/super-grid/src/apis.js +13 -13
- package/packages/super-grid/src/dynamic-input.vue +1 -11
- package/packages/super-grid/src/formatter.js +56 -55
- package/packages/super-grid/src/normal-column-content.vue +56 -126
- package/packages/super-grid/src/row-operation.vue +18 -35
- package/packages/super-grid/src/super-grid.vue +97 -135
- package/packages/super-icon/src/index.vue +18 -29
- package/src/styles/display-layout.scss +1 -1
- package/src/styles/index.scss +1 -7
- package/src/utils/auth-api.js +0 -4
- package/src/utils/common-util.js +0 -3
- package/src/utils/dingtalk-util.ts +17 -23
- package/src/views/dsc-component/Sidebar/Item.vue +62 -73
- package/src/views/layout/components/Menubar/Item.vue +74 -94
- package/lib/index-dd28e479.js +0 -73213
|
@@ -35,21 +35,9 @@
|
|
|
35
35
|
@open-page="openPageEvent"
|
|
36
36
|
/>
|
|
37
37
|
<div v-else class="column-text-main">
|
|
38
|
-
<div
|
|
39
|
-
v-if="
|
|
40
|
-
lineEdit.editable &&
|
|
41
|
-
(options?.configureObj?.props?.base?.columnEditable ?? false) &&
|
|
42
|
-
isEditable &&
|
|
43
|
-
!isHideEdit &&
|
|
44
|
-
!isContentViewText
|
|
45
|
-
"
|
|
46
|
-
class="column-text-edit-main"
|
|
47
|
-
@click="onEditing"
|
|
48
|
-
>
|
|
38
|
+
<div v-if="lineEdit.editable && (options?.configureObj?.props?.base?.columnEditable ?? false) && isEditable && !isHideEdit && !isContentViewText" class="column-text-edit-main" @click="onEditing">
|
|
49
39
|
<el-icon :size="14" color="#409eff"><Edit /></el-icon>
|
|
50
|
-
<span v-if="[undefined, null, ''].includes(row[column.prop])" table-column-placeholder>{{
|
|
51
|
-
$t('superGrid.editablePlaceholder')
|
|
52
|
-
}}</span>
|
|
40
|
+
<span v-if="[undefined, null, ''].includes(row[column.prop])" table-column-placeholder>{{ $t('superGrid.editablePlaceholder') }}</span>
|
|
53
41
|
</div>
|
|
54
42
|
<span v-if="column.operations" class="grid-operation-buttons" data-v="20250527">
|
|
55
43
|
<span
|
|
@@ -76,27 +64,29 @@
|
|
|
76
64
|
:command="beforeHandleCommand(buttonChild.props.code, row, rowIndex)"
|
|
77
65
|
:disabled="preventReclick"
|
|
78
66
|
>
|
|
79
|
-
{{
|
|
67
|
+
{{
|
|
68
|
+
$escapeHtml(buttonChild.props.label)
|
|
69
|
+
}}
|
|
80
70
|
</el-dropdown-item>
|
|
81
71
|
</span>
|
|
82
72
|
</el-dropdown-menu>
|
|
83
73
|
</template>
|
|
84
74
|
</el-dropdown>
|
|
85
75
|
<component
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
76
|
+
:is="operation.props.customControl"
|
|
77
|
+
v-else-if="operation.props.customControl"
|
|
78
|
+
v-permission="operation.props.permission"
|
|
79
|
+
:key="column.prop+'_'+rowIndex+'_'+currentPage"
|
|
80
|
+
:disabled="true"
|
|
81
|
+
:row="pageGridData[rowIndex]"
|
|
82
|
+
:entity="pageGridData[rowIndex]"
|
|
83
|
+
:prop="column.prop"
|
|
84
|
+
:parent="parentFormData"
|
|
85
|
+
:row-index="rowIndex"
|
|
86
|
+
:grid-data="gridData"
|
|
87
|
+
:page-grid-data="pageGridData"
|
|
88
|
+
:current-page="currentPage"
|
|
89
|
+
@refresh-list="refreshList"
|
|
100
90
|
/>
|
|
101
91
|
<row-operation
|
|
102
92
|
v-else
|
|
@@ -106,7 +96,6 @@
|
|
|
106
96
|
:is-show="operation.isShow"
|
|
107
97
|
:label="operation.props.label ? operation.props.label : row[column.prop]"
|
|
108
98
|
:on-click="operation.onClick"
|
|
109
|
-
:operation="operation"
|
|
110
99
|
:operation-index="operationIndex"
|
|
111
100
|
:operation-setting="operation.props"
|
|
112
101
|
:row-index="rowIndex"
|
|
@@ -196,9 +185,9 @@
|
|
|
196
185
|
<span v-if="column.formatter && column.formatter.type === 'files'" type="primary">
|
|
197
186
|
<span
|
|
198
187
|
:id="column.prop + 'DomData' + rowIndex"
|
|
199
|
-
:style="
|
|
188
|
+
:style="isShowForm ? {} : { width: cellWidth + 'px' }"
|
|
200
189
|
:title="isShowOverflowTooltip ? $escapeHtml(getLabel(row)) : ''"
|
|
201
|
-
:class="
|
|
190
|
+
:class="isShowForm ? '' : 'ellipsis cell--span'"
|
|
202
191
|
>
|
|
203
192
|
<FsPreview
|
|
204
193
|
:entity="row"
|
|
@@ -231,9 +220,9 @@
|
|
|
231
220
|
<span
|
|
232
221
|
v-if="isShowOverflowTooltip"
|
|
233
222
|
:id="column.prop + 'DomData' + rowIndex"
|
|
234
|
-
:style="
|
|
223
|
+
:style="isShowForm ? {} : { width: cellWidth + 'px' }"
|
|
235
224
|
:title="getMyHyperLinkSetting(row, rowIndex).title"
|
|
236
|
-
:class="
|
|
225
|
+
:class="isShowForm ? '' : 'ellipsis cell--span'"
|
|
237
226
|
>{{ getMyHyperLinkSetting(row, rowIndex).label }}
|
|
238
227
|
<el-icon v-if="getMyHyperLinkSetting(row, rowIndex).icon">
|
|
239
228
|
<component :is="(getMyHyperLinkSetting(row), rowIndex.icon)" />
|
|
@@ -249,9 +238,9 @@
|
|
|
249
238
|
<span
|
|
250
239
|
v-else-if="isShowOverflowTooltip"
|
|
251
240
|
:id="column.prop + 'DomData' + rowIndex"
|
|
252
|
-
:style="
|
|
241
|
+
:style="isShowForm ? {} : { width: cellWidth + 'px' }"
|
|
253
242
|
:title="$escapeHtml(getLabel(row))"
|
|
254
|
-
:class="
|
|
243
|
+
:class="isShowForm ? '' : 'ellipsis cell--span'"
|
|
255
244
|
>{{ $escapeHtml(getLabel(row, rowIndex)) }}</span
|
|
256
245
|
>
|
|
257
246
|
<span v-else :id="column.prop + 'DomData' + rowIndex" :class="isShowForm ? '' : 'cell--span'">{{
|
|
@@ -263,9 +252,9 @@
|
|
|
263
252
|
<span
|
|
264
253
|
v-if="isShowOverflowTooltip"
|
|
265
254
|
:id="column.prop + 'DomData' + rowIndex"
|
|
266
|
-
:style="
|
|
255
|
+
:style="isShowForm ? {} : { width: cellWidth + 'px' }"
|
|
267
256
|
:title="$escapeHtml(getLabel(row))"
|
|
268
|
-
:class="
|
|
257
|
+
:class="isShowForm ? '' : 'ellipsis cell--span'"
|
|
269
258
|
>
|
|
270
259
|
<FsPreview
|
|
271
260
|
:entity="row"
|
|
@@ -286,9 +275,9 @@
|
|
|
286
275
|
<span v-else-if="column.formatter && column.formatter.type === 'files'">
|
|
287
276
|
<span
|
|
288
277
|
:id="column.prop + 'DomData' + rowIndex"
|
|
289
|
-
:style="
|
|
278
|
+
:style="isShowForm ? {} : { width: cellWidth + 'px' }"
|
|
290
279
|
:title="isShowOverflowTooltip ? $escapeHtml(getLabel(row)) : ''"
|
|
291
|
-
:class="
|
|
280
|
+
:class="isShowForm ? '' : 'ellipsis cell--span'"
|
|
292
281
|
>
|
|
293
282
|
<FsPreview
|
|
294
283
|
:entity="row"
|
|
@@ -312,9 +301,9 @@
|
|
|
312
301
|
<span
|
|
313
302
|
v-if="isShowOverflowTooltip"
|
|
314
303
|
:id="column.prop + 'DomData' + rowIndex"
|
|
315
|
-
:style="
|
|
304
|
+
:style="isShowForm ? {} : { width: cellWidth + 'px' }"
|
|
316
305
|
:title="$escapeHtml(getMyHyperLinkSetting(row, rowIndex).title)"
|
|
317
|
-
:class="
|
|
306
|
+
:class="isShowForm ? '' : 'ellipsis cell--span'"
|
|
318
307
|
>{{ $escapeHtml(getMyHyperLinkSetting(row, rowIndex).label) }}
|
|
319
308
|
<el-icon v-if="getMyHyperLinkSetting(row, rowIndex).icon">
|
|
320
309
|
<component :is="getMyHyperLinkSetting(row, rowIndex).icon" />
|
|
@@ -345,9 +334,10 @@
|
|
|
345
334
|
<span
|
|
346
335
|
v-else-if="isShowOverflowTooltip"
|
|
347
336
|
:id="column.prop + 'DomData' + rowIndex"
|
|
348
|
-
:style="
|
|
337
|
+
:style="isShowForm ? {} : { width: cellWidth + 'px' }"
|
|
349
338
|
:title="getLabel(row)"
|
|
350
|
-
:class="
|
|
339
|
+
:class="isShowForm ? '' : 'ellipsis cell--span'"
|
|
340
|
+
style="white-space: pre"
|
|
351
341
|
v-html="$escapeHtml(getLabel(row, rowIndex))"
|
|
352
342
|
/>
|
|
353
343
|
<span v-else :id="column.prop + 'DomData' + rowIndex" :class="isShowForm ? '' : 'cell--span'">{{
|
|
@@ -377,8 +367,7 @@ import {
|
|
|
377
367
|
isRequiredEdit,
|
|
378
368
|
getAdditionalParamMap,
|
|
379
369
|
getContentAlign,
|
|
380
|
-
getHeaderAlign
|
|
381
|
-
isEditOptionFunction
|
|
370
|
+
getHeaderAlign
|
|
382
371
|
} from './utils'
|
|
383
372
|
import DynamicInput from './dynamic-input.vue'
|
|
384
373
|
import store from './store'
|
|
@@ -394,8 +383,7 @@ import FsPreview from '../../fs-preview'
|
|
|
394
383
|
import RichEditorViewer from '../../rich-editor/viewer.vue'
|
|
395
384
|
import GridIcon from './components/grid-icon.vue'
|
|
396
385
|
import { formatScanRuleSets } from './scan-util.ts'
|
|
397
|
-
import storeVuex from '../../../src/store'
|
|
398
|
-
import { isPromise } from '../../../src/utils/common-util'
|
|
386
|
+
import storeVuex from '../../../src/store';
|
|
399
387
|
|
|
400
388
|
export default {
|
|
401
389
|
components: {
|
|
@@ -505,13 +493,6 @@ export default {
|
|
|
505
493
|
if (gridParams.lineEdit !== null && gridParams.lineEdit !== undefined) {
|
|
506
494
|
lineEdit = gridParams.lineEdit
|
|
507
495
|
}
|
|
508
|
-
let textOverflow = 'hidden'
|
|
509
|
-
if (gridParams.basicInfo && gridParams.basicInfo.textOverflow) {
|
|
510
|
-
textOverflow = gridParams.basicInfo.textOverflow
|
|
511
|
-
}
|
|
512
|
-
if (this.isShowForm) {
|
|
513
|
-
textOverflow = 'newline'
|
|
514
|
-
}
|
|
515
496
|
return {
|
|
516
497
|
selectRow: null,
|
|
517
498
|
that: this,
|
|
@@ -543,8 +524,7 @@ export default {
|
|
|
543
524
|
rowLinkConfigMapping: {},
|
|
544
525
|
requiredClass: '',
|
|
545
526
|
lineEdit,
|
|
546
|
-
options
|
|
547
|
-
textOverflow
|
|
527
|
+
options
|
|
548
528
|
}
|
|
549
529
|
},
|
|
550
530
|
computed: {
|
|
@@ -576,7 +556,7 @@ export default {
|
|
|
576
556
|
return true
|
|
577
557
|
}
|
|
578
558
|
}
|
|
579
|
-
return this.row.$editing
|
|
559
|
+
return this.row.$editing;
|
|
580
560
|
} catch (error) {
|
|
581
561
|
return false
|
|
582
562
|
}
|
|
@@ -605,7 +585,7 @@ export default {
|
|
|
605
585
|
'row.$editing': {
|
|
606
586
|
deep: true,
|
|
607
587
|
handler(newValue) {
|
|
608
|
-
if
|
|
588
|
+
if([false].includes(newValue)) {
|
|
609
589
|
this.clearAllEditing()
|
|
610
590
|
}
|
|
611
591
|
}
|
|
@@ -799,14 +779,8 @@ export default {
|
|
|
799
779
|
}
|
|
800
780
|
},
|
|
801
781
|
// 手动编辑触发
|
|
802
|
-
|
|
782
|
+
onEditing(event) {
|
|
803
783
|
if (this.hasEditPermission && !this.isEditing) {
|
|
804
|
-
let canEdit = true
|
|
805
|
-
// 触发编辑前事件
|
|
806
|
-
if (isEditOptionFunction('beforeEdit', this.listCode)) {
|
|
807
|
-
canEdit = await this.triggerCustomEvent('beforeEdit')
|
|
808
|
-
}
|
|
809
|
-
if (!canEdit) return
|
|
810
784
|
event.stopPropagation()
|
|
811
785
|
|
|
812
786
|
const onEditing = () => {
|
|
@@ -818,13 +792,13 @@ export default {
|
|
|
818
792
|
setTimeout(this.focusBottomInput, 400)
|
|
819
793
|
}
|
|
820
794
|
|
|
821
|
-
if
|
|
795
|
+
if(!this.isFormSubTable) {
|
|
822
796
|
// 非子表
|
|
823
797
|
if (storeVuex.getters.isConfigEditing) {
|
|
824
798
|
if (storeVuex.getters.isRowEditing(this.$rowGuId)) {
|
|
825
799
|
onEditing()
|
|
826
800
|
} else {
|
|
827
|
-
const isNext =
|
|
801
|
+
const isNext = this.isLastEditRowSaveMessage(this.listCode)
|
|
828
802
|
if (!isNext) return
|
|
829
803
|
}
|
|
830
804
|
// else {
|
|
@@ -832,10 +806,10 @@ export default {
|
|
|
832
806
|
// // this.confirmBeforeSwitchingRow(this.listCode, () => { })
|
|
833
807
|
// }
|
|
834
808
|
} else {
|
|
835
|
-
const isNext =
|
|
809
|
+
const isNext = this.isLastEditRowSaveMessage(this.listCode)
|
|
836
810
|
if (!isNext) return
|
|
837
811
|
// 如果不是子表 则 开启 编辑模式
|
|
838
|
-
this.editRow(this.rowIndex, this.listCode, true
|
|
812
|
+
this.editRow(this.rowIndex, this.listCode, true)
|
|
839
813
|
onEditing()
|
|
840
814
|
}
|
|
841
815
|
} else {
|
|
@@ -851,27 +825,26 @@ export default {
|
|
|
851
825
|
this.$nextTick(() => {
|
|
852
826
|
try {
|
|
853
827
|
const getOffsetParent = (selectorAll) => {
|
|
854
|
-
return selectorAll
|
|
855
|
-
? Array.from(this.$refs.dynamicRef.$el.querySelectorAll(selectorAll)).filter(
|
|
856
|
-
(control) => !!control.offsetParent
|
|
857
|
-
)
|
|
858
|
-
: []
|
|
828
|
+
return selectorAll ? Array.from(this.$refs.dynamicRef.$el.querySelectorAll(selectorAll)).filter(control => !!control.offsetParent) : [];
|
|
859
829
|
}
|
|
860
830
|
|
|
861
|
-
let visibleFormControls = getOffsetParent('.el-select, .el-date-picker, .el-upload')
|
|
831
|
+
let visibleFormControls = getOffsetParent('.el-select, .el-date-picker, .el-upload');
|
|
862
832
|
if (visibleFormControls.length) {
|
|
863
833
|
visibleFormControls[0].click()
|
|
864
834
|
} else {
|
|
865
|
-
visibleFormControls = getOffsetParent('input, textarea')
|
|
835
|
+
visibleFormControls = getOffsetParent('input, textarea');
|
|
866
836
|
if (visibleFormControls.length > 0) {
|
|
867
837
|
const bottomControl = visibleFormControls.reduce((prev, current) => {
|
|
868
|
-
return current.getBoundingClientRect().bottom > prev.getBoundingClientRect().bottom
|
|
869
|
-
|
|
838
|
+
return current.getBoundingClientRect().bottom > prev.getBoundingClientRect().bottom
|
|
839
|
+
? current
|
|
840
|
+
: prev;
|
|
841
|
+
});
|
|
870
842
|
if (['INPUT', 'TEXTAREA'].includes(bottomControl.tagName)) {
|
|
871
|
-
bottomControl.focus()
|
|
872
|
-
bottomControl.select()
|
|
843
|
+
bottomControl.focus();
|
|
844
|
+
bottomControl.select();
|
|
873
845
|
}
|
|
874
846
|
}
|
|
847
|
+
|
|
875
848
|
}
|
|
876
849
|
} catch (error) {
|
|
877
850
|
console.error(error)
|
|
@@ -1142,14 +1115,7 @@ export default {
|
|
|
1142
1115
|
}
|
|
1143
1116
|
},
|
|
1144
1117
|
isRequired(editing) {
|
|
1145
|
-
if (
|
|
1146
|
-
!this.isFormSubTable &&
|
|
1147
|
-
this.lineEdit &&
|
|
1148
|
-
this.lineEdit.editable &&
|
|
1149
|
-
this.isEditable &&
|
|
1150
|
-
editing &&
|
|
1151
|
-
this.column.validations
|
|
1152
|
-
) {
|
|
1118
|
+
if (!this.isFormSubTable && this.lineEdit && this.lineEdit.editable && this.isEditable && editing && this.column.validations) {
|
|
1153
1119
|
if (this.column.validations.indexOf('"required":true') > 0) {
|
|
1154
1120
|
return true
|
|
1155
1121
|
}
|
|
@@ -1204,47 +1170,11 @@ export default {
|
|
|
1204
1170
|
}
|
|
1205
1171
|
},
|
|
1206
1172
|
changeRequired(required) {
|
|
1207
|
-
this.requiredClass = required
|
|
1173
|
+
this.requiredClass = required? 'm-requried' : ''
|
|
1208
1174
|
},
|
|
1209
1175
|
openPageEvent(openPageParams) {
|
|
1210
1176
|
console.log('normalColumnContent----openPageEvent----', openPageParams)
|
|
1211
1177
|
this.$emit('open-page', openPageParams)
|
|
1212
|
-
},
|
|
1213
|
-
triggerCustomEvent(type) {
|
|
1214
|
-
return new Promise((resolve) => {
|
|
1215
|
-
const gridParams = store.get(this.listCode)
|
|
1216
|
-
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
1217
|
-
// 每页显示多少条
|
|
1218
|
-
const pageSize = gridParams.pagination && gridParams.pagination.pageSize
|
|
1219
|
-
let canEdit = gridParams.options.lineEditOptions[type].call(this, {
|
|
1220
|
-
gridData: isSubTableShowPage ? gridParams.subTableData : gridParams.gridData,
|
|
1221
|
-
listCode: this.listCode,
|
|
1222
|
-
entity: gridParams.gridData[this.rowIndex],
|
|
1223
|
-
row: gridParams.gridData[this.rowIndex],
|
|
1224
|
-
rowIndex: this.rowIndex,
|
|
1225
|
-
columns: gridParams.columns,
|
|
1226
|
-
isMobile: false,
|
|
1227
|
-
pageGridData: isSubTableShowPage ? gridParams.gridData : null,
|
|
1228
|
-
pageSize,
|
|
1229
|
-
additionalParamMap: getAdditionalParamMap(gridParams),
|
|
1230
|
-
pageContext: gridParams.pageContext,
|
|
1231
|
-
configureObj: gridParams.configureObj
|
|
1232
|
-
})
|
|
1233
|
-
if (isPromise(canEdit)) {
|
|
1234
|
-
canEdit.then((result) => {
|
|
1235
|
-
if (result === undefined || result === true) {
|
|
1236
|
-
resolve(true)
|
|
1237
|
-
} else {
|
|
1238
|
-
resolve(false)
|
|
1239
|
-
}
|
|
1240
|
-
})
|
|
1241
|
-
} else {
|
|
1242
|
-
if (canEdit === undefined || canEdit === true) {
|
|
1243
|
-
resolve(true)
|
|
1244
|
-
}
|
|
1245
|
-
resolve(false)
|
|
1246
|
-
}
|
|
1247
|
-
})
|
|
1248
1178
|
}
|
|
1249
1179
|
},
|
|
1250
1180
|
emits: ['refresData', 'refresPortData', 'refresPortsData', 'refresMainTableFields', 'prohibitToEdit']
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!--将@click改为@mousedown.native是因为操作列保存按钮时事件和input等组件的@blur冲突,导致保存需要保存两次,因为
|
|
3
3
|
@blur先于@click执行的,所以只会执行@blur,@click就失效了,@mousedown是先于@blur执行的-->
|
|
4
|
-
<span
|
|
4
|
+
<span :style="myStyle">
|
|
5
5
|
<template v-if="isShowButton()">
|
|
6
6
|
<el-tooltip :disabled="tooltipDisabled" :content="label" placement="top">
|
|
7
|
-
<template v-if="operationSettingData
|
|
7
|
+
<template v-if="operationSettingData.permission">
|
|
8
8
|
<component
|
|
9
9
|
v-bind="operationSettingData"
|
|
10
10
|
:is="isElementType"
|
|
@@ -77,13 +77,9 @@ export default {
|
|
|
77
77
|
type: String,
|
|
78
78
|
default: null,
|
|
79
79
|
},
|
|
80
|
-
operation: {
|
|
81
|
-
type: Object,
|
|
82
|
-
default: () => ({}),
|
|
83
|
-
},
|
|
84
80
|
operationSetting: {
|
|
85
81
|
type: Object,
|
|
86
|
-
default:
|
|
82
|
+
default: null,
|
|
87
83
|
},
|
|
88
84
|
operationIndex: {
|
|
89
85
|
type: Number,
|
|
@@ -108,58 +104,45 @@ export default {
|
|
|
108
104
|
...mapGetters(['preventReclick']),
|
|
109
105
|
// 是否是保存按钮
|
|
110
106
|
isSaveRow() {
|
|
111
|
-
return
|
|
112
|
-
// return /^\s*function\s+saveRow*\s*\(/.test((this.onClick ?? ''))
|
|
107
|
+
return /^\s*function\s+saveRow*\s*\(/.test((this.onClick ?? ''))
|
|
113
108
|
},
|
|
114
109
|
// 是否是删除按钮
|
|
115
110
|
isDeleteRow() {
|
|
116
|
-
return
|
|
117
|
-
// return /^\s*function\s+deleteRow*\s*\(/.test((this.onClick ?? ''))
|
|
111
|
+
return /^\s*function\s+deleteRow*\s*\(/.test((this.onClick ?? ''))
|
|
118
112
|
},
|
|
119
113
|
// 是否是修改按钮
|
|
120
114
|
isEditRow() {
|
|
121
|
-
return
|
|
122
|
-
// return /^\s*function\s+editRow*\s*\(/.test((this.onClick ?? ''))
|
|
115
|
+
return /^\s*function\s+editRow*\s*\(/.test((this.onClick ?? ''))
|
|
123
116
|
},
|
|
124
117
|
// 是否是取消按钮
|
|
125
118
|
isRestoreRow() {
|
|
126
|
-
return
|
|
127
|
-
// return /^\s*function\s+restoreRow*\s*\(/.test((this.onClick ?? ''))
|
|
119
|
+
return /^\s*function\s+restoreRow*\s*\(/.test((this.onClick ?? ''))
|
|
128
120
|
},
|
|
129
121
|
// 前置图标
|
|
130
122
|
prefixIcon() {
|
|
131
123
|
if (this.suffixIcon) return undefined
|
|
132
|
-
if(['left', true
|
|
133
|
-
if(this.operationSetting.iconValue){
|
|
134
|
-
// 兼容非彩色图标默认按钮样式
|
|
135
|
-
if(this.isSaveRow && this.operationSetting.iconValue === 'amb-icon-save') return 'amb-color-icon-save'
|
|
136
|
-
if(this.isDeleteRow && this.operationSetting.iconValue === 'amb-icon-del') return 'amb-color-icon-del'
|
|
137
|
-
if(this.isEditRow && this.operationSetting.iconValue === 'amb-icon-edit') return 'amb-color-icon-edit'
|
|
138
|
-
if(this.isRestoreRow && this.operationSetting.iconValue === 'amb-icon-no-edit') return 'amb-color-icon-no-edit'
|
|
139
|
-
}
|
|
140
|
-
return this.operationSetting.iconValue
|
|
141
|
-
}
|
|
124
|
+
if(['left', true].includes(this.operationSettingData.iconPosition) || this.operationSetting.iconValue) return this.operationSetting.iconValue
|
|
142
125
|
if (this.isTextIcon) {
|
|
143
126
|
// 当没有初始图标,根据事件类型 绑定图标
|
|
144
|
-
if(this.isSaveRow) return 'amb-
|
|
145
|
-
if(this.isDeleteRow) return 'amb-
|
|
146
|
-
if(this.isEditRow) return 'amb-
|
|
147
|
-
if(this.isRestoreRow) return 'amb-
|
|
127
|
+
if(this.isSaveRow) return 'amb-icon-save'
|
|
128
|
+
if(this.isDeleteRow) return 'amb-icon-del'
|
|
129
|
+
if(this.isEditRow) return 'amb-icon-edit'
|
|
130
|
+
if(this.isRestoreRow) return 'amb-icon-no-edit'
|
|
148
131
|
}
|
|
149
132
|
return undefined
|
|
150
133
|
},
|
|
151
134
|
// 后置图标
|
|
152
135
|
suffixIcon() {
|
|
153
|
-
if(['right'].includes(this.
|
|
136
|
+
if(['right'].includes(this.operationSettingData.iconPosition)) return this.operationSetting.iconValue
|
|
154
137
|
return undefined
|
|
155
138
|
},
|
|
156
139
|
// 是否显示文字按钮 > 图标模式
|
|
157
140
|
isTextIcon() {
|
|
158
141
|
if (this.isTableBtnLinkShow) {
|
|
159
|
-
if (this.
|
|
142
|
+
if (this.operationSettingData.isTextIcon === undefined) {
|
|
160
143
|
return this.isSaveRow || this.isDeleteRow || this.isEditRow || this.isRestoreRow
|
|
161
144
|
}
|
|
162
|
-
return this.
|
|
145
|
+
return this.operationSettingData.isTextIcon
|
|
163
146
|
} else {
|
|
164
147
|
return false
|
|
165
148
|
}
|
|
@@ -174,14 +157,14 @@ export default {
|
|
|
174
157
|
},
|
|
175
158
|
// 是否自动开启表格 按钮 转 文字按钮
|
|
176
159
|
isTableBtnLinkShow() {
|
|
177
|
-
if (this.operationSetting
|
|
160
|
+
if (this.operationSetting.text) return true
|
|
178
161
|
if (this.isTableBtnLink && this.elementType === 'el-button') {
|
|
179
|
-
return [this.operationSetting
|
|
162
|
+
return [this.operationSetting.text, this.operationSetting.plain, this.operationSetting.round].every(v => v === undefined)
|
|
180
163
|
}
|
|
181
164
|
return false
|
|
182
165
|
},
|
|
183
166
|
operationSettingData() {
|
|
184
|
-
const dataList = { ...
|
|
167
|
+
const dataList = { ...this.operationSetting }
|
|
185
168
|
if (this.isTableBtnLinkShow) {
|
|
186
169
|
dataList.underline = false
|
|
187
170
|
delete dataList.text
|