n20-common-lib 3.0.86 → 3.0.88
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/package.json +1 -1
- package/src/assets/css/table.scss +11 -0
- package/src/assets/css/v3/table.scss +19 -0
- package/src/components/ApprovalButtons/index.vue +42 -23
- package/src/components/ApprovalButtons/selectSpr.vue +15 -0
- package/src/components/ApprovalButtons/showAppOpi.vue +5 -1
- package/src/components/ApprovalButtons/showOtherAttrNew.vue +40 -41
- package/src/components/ApprovalCard/index.vue +21 -5
- package/src/components/ApprovalRecord/approvalImgPro/index.vue +23 -3
- package/src/components/ApprovalRecord/index.vue +7 -2
- package/src/components/FileUploadTable/index.vue +4 -3
- package/src/components/HandlingAdvice/index.vue +97 -70
- package/src/components/InputNumber/README.md +112 -0
- package/src/components/Pivot/index.vue +15 -10
- package/src/components/TablePro/index.vue +12 -1
- package/src/components/TableProOperateColumn/OperateBtns.vue +25 -5
- package/src/components/TableProOperateColumn/childrenOperateBtn.vue +83 -25
- package/src/components/Tabs/index.vue +3 -3
- package/src/components/TertiaryTab/index.vue +2 -2
- package/src/components/Upload/uploadMsg.vue +2 -0
- package/src/components/v3/SecondaryTab/index.vue +3 -3
- package/src/components/v3/TablePro/index.vue +40 -7
- package/src/index.js +3 -0
- package/src/plugins/Sign/signV3/InfosecNetSignCNGAgent.min.js +4112 -1
- package/src/plugins/Sign/signV3/sign.js +23 -11
- package/style/index.css +1 -1
- package/theme/blue.css +1 -1
- package/theme/cctcRed.css +1 -1
- package/theme/green.css +1 -1
- package/theme/lightBlue.css +1 -1
- package/theme/orange.css +1 -1
- package/theme/purple.css +1 -1
- package/theme/red.css +1 -1
- package/theme/yellow.css +1 -1
- package/src/assets/css/table copy.scss +0 -234
- package/src/components/Pivot/ViewToggle.vue +0 -132
|
@@ -320,11 +320,19 @@
|
|
|
320
320
|
:type="btn.type || 'primary'"
|
|
321
321
|
:size="btn.size || 'mini'"
|
|
322
322
|
:icon="btn.icon"
|
|
323
|
-
:disabled="btn
|
|
323
|
+
:disabled="resolveDisabled(btn)"
|
|
324
324
|
:class="[btn.class]"
|
|
325
325
|
@click.stop="handleHoverBtnClick(btn, $event)"
|
|
326
326
|
>
|
|
327
|
-
|
|
327
|
+
<el-badge
|
|
328
|
+
v-if="resolveBadge(btn)"
|
|
329
|
+
:value="resolveBadge(btn)"
|
|
330
|
+
:max="btn.badgeMax || 99"
|
|
331
|
+
class="hover-btn-badge"
|
|
332
|
+
>
|
|
333
|
+
{{ btn.label }}
|
|
334
|
+
</el-badge>
|
|
335
|
+
<template v-else>{{ btn.label }}</template>
|
|
328
336
|
</el-button>
|
|
329
337
|
<!-- 更多按钮下拉菜单 -->
|
|
330
338
|
<el-dropdown
|
|
@@ -341,9 +349,14 @@
|
|
|
341
349
|
v-for="(btn, idx) in moreHoverBtns"
|
|
342
350
|
:key="'more-' + idx"
|
|
343
351
|
:command="btn"
|
|
344
|
-
:disabled="btn
|
|
352
|
+
:disabled="resolveDisabled(btn)"
|
|
345
353
|
>
|
|
346
|
-
<
|
|
354
|
+
<el-badge v-if="resolveBadge(btn)" :value="resolveBadge(btn)" :max="btn.badgeMax || 99">
|
|
355
|
+
<span :class="btn.type === 'danger' ? 'color-danger' : ''">
|
|
356
|
+
{{ btn.label }}
|
|
357
|
+
</span>
|
|
358
|
+
</el-badge>
|
|
359
|
+
<span v-else :class="btn.type === 'danger' ? 'color-danger' : ''">
|
|
347
360
|
{{ btn.label }}
|
|
348
361
|
</span>
|
|
349
362
|
</el-dropdown-item>
|
|
@@ -751,7 +764,7 @@ export default {
|
|
|
751
764
|
// 处理固定操作列的按钮事件
|
|
752
765
|
handleOperateCommand(command, row, rowIndex) {
|
|
753
766
|
this.$emit(command, row, rowIndex)
|
|
754
|
-
this.$emit('hover-btn-click', { btn
|
|
767
|
+
this.$emit('hover-btn-click', { btn, row, rowIndex })
|
|
755
768
|
},
|
|
756
769
|
// 处理 tableOperate 固定/取消固定切换
|
|
757
770
|
handleToggleOperateFixed(fixed) {
|
|
@@ -773,6 +786,26 @@ export default {
|
|
|
773
786
|
return isHas(row)
|
|
774
787
|
}
|
|
775
788
|
},
|
|
789
|
+
// 解析 badge 值,支持 number、string、function
|
|
790
|
+
resolveBadge(btn) {
|
|
791
|
+
if (!btn.badge) return null
|
|
792
|
+
if (typeof btn.badge === 'function') {
|
|
793
|
+
const val = btn.badge(this.hoverRowData)
|
|
794
|
+
return val || val === 0 ? val : null
|
|
795
|
+
}
|
|
796
|
+
return btn.badge
|
|
797
|
+
},
|
|
798
|
+
// 解析 disabled 值,支持 boolean 和 function
|
|
799
|
+
resolveDisabled(btn) {
|
|
800
|
+
if (btn.disabled === undefined || btn.disabled === null) {
|
|
801
|
+
return false
|
|
802
|
+
} else if (typeof btn.disabled === 'boolean') {
|
|
803
|
+
return btn.disabled
|
|
804
|
+
} else if (typeof btn.disabled === 'function') {
|
|
805
|
+
return btn.disabled(this.hoverRowData)
|
|
806
|
+
}
|
|
807
|
+
return false
|
|
808
|
+
},
|
|
776
809
|
// 全选/反选
|
|
777
810
|
toggleAllSelection() {
|
|
778
811
|
if (!this.$refs.vxeTable) return
|
|
@@ -1158,7 +1191,7 @@ export default {
|
|
|
1158
1191
|
},
|
|
1159
1192
|
// 处理悬浮按钮点击
|
|
1160
1193
|
handleHoverBtnClick(btn, $event) {
|
|
1161
|
-
if (btn
|
|
1194
|
+
if (this.resolveDisabled(btn)) return
|
|
1162
1195
|
|
|
1163
1196
|
if (typeof btn.command === 'function') {
|
|
1164
1197
|
btn.command(this.hoverRowData, this.hoverRowIndex, $event)
|
|
@@ -1175,7 +1208,7 @@ export default {
|
|
|
1175
1208
|
},
|
|
1176
1209
|
// 处理"更多"下拉菜单命令
|
|
1177
1210
|
handleMoreBtnCommand(btn) {
|
|
1178
|
-
if (!btn || btn
|
|
1211
|
+
if (!btn || this.resolveDisabled(btn)) return
|
|
1179
1212
|
this.handleHoverBtnClick(btn, null)
|
|
1180
1213
|
},
|
|
1181
1214
|
// 表格滚动时隐藏按钮组
|
package/src/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import ProFilterView from './components/ProFilterView/index.vue'
|
|
|
6
6
|
import AnchorItem from './components/Anchor/AnchorItem.vue'
|
|
7
7
|
import Anchor from './components/Anchor/index.vue'
|
|
8
8
|
import ApprovalButtons from './components/ApprovalButtons/index.vue'
|
|
9
|
+
import ShowAppOpi from './components/ApprovalButtons/showAppOpi.vue'
|
|
9
10
|
import ApproveCard from './components/ApprovalCard/ApproveCard.vue'
|
|
10
11
|
import ApprovalCard from './components/ApprovalCard/index.vue'
|
|
11
12
|
import ApprovalImg from './components/ApprovalRecord/approvalImg.vue'
|
|
@@ -190,6 +191,7 @@ const components = [
|
|
|
190
191
|
ApproveCard,
|
|
191
192
|
ApprovalRecord,
|
|
192
193
|
ApprovalButtons,
|
|
194
|
+
ShowAppOpi,
|
|
193
195
|
Expandable,
|
|
194
196
|
ExpandablePane,
|
|
195
197
|
Empty,
|
|
@@ -315,6 +317,7 @@ export {
|
|
|
315
317
|
Anchor,
|
|
316
318
|
AnchorItem,
|
|
317
319
|
ApprovalButtons,
|
|
320
|
+
ShowAppOpi,
|
|
318
321
|
ApprovalCard,
|
|
319
322
|
/* 中建科 */
|
|
320
323
|
ApprovalCardZjk,
|