bri-components 1.4.9 → 1.4.10
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/components/controls/base/DshEditor.vue +2 -0
- package/src/components/controls/base/DshNumber/DshNumber.vue +48 -3
- package/src/components/list/mixins/tableBaseMixin.js +13 -5
- package/lib/0.bri-components.min.js +0 -1
- package/lib/1.bri-components.min.js +0 -1
- package/lib/10.bri-components.min.js +0 -1
- package/lib/11.bri-components.min.js +0 -1
- package/lib/2.bri-components.min.js +0 -1
- package/lib/3.bri-components.min.js +0 -1
- package/lib/4.bri-components.min.js +0 -1
- package/lib/5.bri-components.min.js +0 -1
- package/lib/6.bri-components.min.js +0 -1
- package/lib/7.bri-components.min.js +0 -1
- package/lib/8.bri-components.min.js +0 -1
- package/lib/9.bri-components.min.js +0 -1
- package/lib/bri-components.min.js +0 -90
package/package.json
CHANGED
|
@@ -126,6 +126,7 @@
|
|
|
126
126
|
"backColor", // 背景颜色
|
|
127
127
|
"link", // 插入链接
|
|
128
128
|
"list", // 列表
|
|
129
|
+
"table", // 表格
|
|
129
130
|
"justify", // 对齐方式
|
|
130
131
|
"quote", // 引用
|
|
131
132
|
"image", // 插入图片
|
|
@@ -164,6 +165,7 @@
|
|
|
164
165
|
editor.create();
|
|
165
166
|
if (!this.finalCanEdit)editor.disable();
|
|
166
167
|
this.editor = editor;
|
|
168
|
+
this.handleEdit();
|
|
167
169
|
},
|
|
168
170
|
handleEdit () {
|
|
169
171
|
if (this.finalCanEdit) {
|
|
@@ -30,9 +30,18 @@
|
|
|
30
30
|
<!-- 查看 -->
|
|
31
31
|
<template v-else>
|
|
32
32
|
<!-- 单元格的查看 进度条模式 -->
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
<div
|
|
34
|
+
v-if="selfPropsObj._showProgress"
|
|
35
|
+
class="DshNumber-show"
|
|
36
|
+
>
|
|
37
|
+
<Progress
|
|
38
|
+
:percent="progressNum"
|
|
39
|
+
:stroke-width="strokeWidth"
|
|
40
|
+
:stroke-color="[statusColor, statusColor]"
|
|
41
|
+
>
|
|
42
|
+
<span>{{ progressStr }}</span>
|
|
43
|
+
</Progress>
|
|
44
|
+
</div>
|
|
36
45
|
|
|
37
46
|
<!-- 单元格和查看页的查看 -->
|
|
38
47
|
<template v-else>
|
|
@@ -82,6 +91,11 @@
|
|
|
82
91
|
computed: {
|
|
83
92
|
selfPropsObj () {
|
|
84
93
|
return {
|
|
94
|
+
_strokeWidth: 12, // 参数还没配置
|
|
95
|
+
_overflowColor: "#87d068",
|
|
96
|
+
_compeleteColor: "#87d068",
|
|
97
|
+
_lessColor: "#108ee9",
|
|
98
|
+
|
|
85
99
|
...this.propsObj,
|
|
86
100
|
...this.commonDealPropsObj
|
|
87
101
|
};
|
|
@@ -131,6 +145,16 @@
|
|
|
131
145
|
},
|
|
132
146
|
|
|
133
147
|
// 进度条方式使用(此处先这样,实际是进度条使用要受0-100的数值范围限制)
|
|
148
|
+
strokeWidth () {
|
|
149
|
+
return this.selfPropsObj._strokeWidth;
|
|
150
|
+
},
|
|
151
|
+
statusColor () {
|
|
152
|
+
return this.curVal > 100
|
|
153
|
+
? this.selfPropsObj._overflowColor
|
|
154
|
+
: this.curVal === 100
|
|
155
|
+
? this.selfPropsObj._compeleteColor
|
|
156
|
+
: this.selfPropsObj._lessColor;
|
|
157
|
+
},
|
|
134
158
|
progressNum () {
|
|
135
159
|
return this.$isEmptyData(this.curVal) || this.curVal < 0
|
|
136
160
|
? 0
|
|
@@ -138,6 +162,9 @@
|
|
|
138
162
|
? 100
|
|
139
163
|
: Math.round(this.curVal * 100) / 100;
|
|
140
164
|
},
|
|
165
|
+
progressStr () {
|
|
166
|
+
return `${this.$isEmptyData(this.curVal) ? 0 : Math.round(this.curVal * 100) / 100}%`;
|
|
167
|
+
},
|
|
141
168
|
showVal () {
|
|
142
169
|
return this.$isEmptyData(this.curVal)
|
|
143
170
|
? this.emptyShowVal
|
|
@@ -163,5 +190,23 @@
|
|
|
163
190
|
color: @textColor;
|
|
164
191
|
}
|
|
165
192
|
}
|
|
193
|
+
|
|
194
|
+
&-show {
|
|
195
|
+
.ivu-progress-show-info {
|
|
196
|
+
display: flex;
|
|
197
|
+
flex-direction: row;
|
|
198
|
+
align-items: center;
|
|
199
|
+
|
|
200
|
+
.ivu-progress-outer {
|
|
201
|
+
padding-right: 0px;
|
|
202
|
+
margin-right: 0px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.ivu-progress-text {
|
|
206
|
+
width: 55px;
|
|
207
|
+
text-align: center;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
166
211
|
}
|
|
167
212
|
</style>
|
|
@@ -249,6 +249,7 @@ export default {
|
|
|
249
249
|
|
|
250
250
|
_disabledBtns: false, // 禁用增删按钮
|
|
251
251
|
_showCreateBtnColKeys: [], // 显示增删图标的列
|
|
252
|
+
_useInsertInOperationCol: false, // 操作列出现插入行按钮
|
|
252
253
|
_disabledFootCreateBtn: false, // 禁用底部新增按钮
|
|
253
254
|
_disabledDeleteDftRow: false, // 默认的数据行禁止删除
|
|
254
255
|
_disabledDeleteOldRow: false, // 保存的数据行禁止删除
|
|
@@ -343,6 +344,9 @@ export default {
|
|
|
343
344
|
showCreateBtnColKeys () {
|
|
344
345
|
return this.selfPropsObj._showCreateBtnColKeys || []; // 配置端有问题,高级依赖时值成undefined了
|
|
345
346
|
},
|
|
347
|
+
useInsertInOperationCol () {
|
|
348
|
+
return this.selfPropsObj._useInsertInOperationCol;
|
|
349
|
+
},
|
|
346
350
|
disabledFootCreateBtn () {
|
|
347
351
|
return this.isDftSet ? false : this.selfPropsObj._disabledFootCreateBtn;
|
|
348
352
|
},
|
|
@@ -530,8 +534,8 @@ export default {
|
|
|
530
534
|
align: "center",
|
|
531
535
|
_fixed: "right",
|
|
532
536
|
fixed: "right",
|
|
533
|
-
_width:
|
|
534
|
-
width:
|
|
537
|
+
_width: 100 + (this.rowOperationList.length - 1) * 110,
|
|
538
|
+
width: 100 + (this.rowOperationList.length - 1) * 110,
|
|
535
539
|
renderBodyCell: ({ row, rowIndex, column }, h) => {
|
|
536
540
|
return this.operationTdCellRender(h, { row, rowIndex, column });
|
|
537
541
|
}
|
|
@@ -697,7 +701,11 @@ export default {
|
|
|
697
701
|
);
|
|
698
702
|
},
|
|
699
703
|
rowOperationList () {
|
|
700
|
-
|
|
704
|
+
const btns = [
|
|
705
|
+
...(this.useInsertInOperationCol ? ["canInsert"] : []),
|
|
706
|
+
"canDelete"
|
|
707
|
+
];
|
|
708
|
+
return this.$getOperationList(btns);
|
|
701
709
|
}
|
|
702
710
|
},
|
|
703
711
|
watch: {
|
|
@@ -1042,7 +1050,7 @@ export default {
|
|
|
1042
1050
|
e.stopPropagation();
|
|
1043
1051
|
}
|
|
1044
1052
|
}
|
|
1045
|
-
|
|
1053
|
+
});
|
|
1046
1054
|
},
|
|
1047
1055
|
topSearchRender (h) {
|
|
1048
1056
|
return this.searchFormList.length
|
|
@@ -1332,7 +1340,7 @@ export default {
|
|
|
1332
1340
|
getRowDelBtnCanEdit (row, rowIndex) {
|
|
1333
1341
|
return row.__readonly__ !== true && // 不能为只读数据
|
|
1334
1342
|
(this.disabledDeleteDftRow ? row.__isDefault__ !== true : true) && // 默认数据可删除
|
|
1335
|
-
|
|
1343
|
+
(this.disabledDeleteOldRow ? row.__old__ !== true : true); // 老数据可删除
|
|
1336
1344
|
},
|
|
1337
1345
|
// 行内容是否可编辑
|
|
1338
1346
|
getRowCanEdit (row, rowIndex) {
|