bri-components 1.2.60 → 1.2.61
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 +2 -2
- package/src/components/controls/base/BriUpload/BriUpload.vue +1 -1
- package/src/components/controls/base/DshEditor.vue +5 -5
- package/src/components/controls/base/DshSelect/DshSelect.vue +0 -52
- package/src/components/controls/control.less +2 -1
- package/src/components/small/DshModal.vue +1 -1
- package/src/components/unit/DshFormUnit.vue +113 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bri-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.61",
|
|
4
4
|
"author": "dengshanghui",
|
|
5
5
|
"description": "a component lib for vue project",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"ali-oss": "^6.13.1",
|
|
34
34
|
"axios": "^0.23.0",
|
|
35
|
-
"bri-datas": "^1.0.
|
|
35
|
+
"bri-datas": "^1.0.49",
|
|
36
36
|
"jshint": "^2.12.0",
|
|
37
37
|
"jsonlint": "^1.6.3",
|
|
38
38
|
"minio": "7.1.0",
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
...commonClass,
|
|
8
8
|
'DshEditor-edit': true
|
|
9
9
|
}"
|
|
10
|
-
v-show="
|
|
10
|
+
v-show="showStatus === 'show'"
|
|
11
11
|
v-html="showVal"
|
|
12
12
|
@click="handleEdit"
|
|
13
13
|
></div>
|
|
14
14
|
|
|
15
15
|
<div
|
|
16
16
|
v-if="finalCanEdit"
|
|
17
|
-
v-show="
|
|
17
|
+
v-show="showStatus === 'edit'"
|
|
18
18
|
class="DshEditor-wrap"
|
|
19
19
|
>
|
|
20
20
|
<div
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
data () {
|
|
77
77
|
return {
|
|
78
78
|
editor: null,
|
|
79
|
-
|
|
79
|
+
showStatus: "show",
|
|
80
80
|
operationMap: {
|
|
81
81
|
canSave: {
|
|
82
82
|
name: "完成",
|
|
@@ -167,11 +167,11 @@
|
|
|
167
167
|
handleEdit () {
|
|
168
168
|
if (this.finalCanEdit) {
|
|
169
169
|
this.editor.txt.html(this.value[this.propsObj._key]);
|
|
170
|
-
this.
|
|
170
|
+
this.showStatus = "edit";
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
clickSave () {
|
|
174
|
-
this.
|
|
174
|
+
this.showStatus = "show";
|
|
175
175
|
},
|
|
176
176
|
// 插入代码
|
|
177
177
|
insertHTML (value) {
|
|
@@ -155,57 +155,5 @@
|
|
|
155
155
|
|
|
156
156
|
.DshSelect {
|
|
157
157
|
#control-select(radio);
|
|
158
|
-
|
|
159
|
-
&-modal {
|
|
160
|
-
.ivu-modal-wrap {
|
|
161
|
-
display: flex;
|
|
162
|
-
align-items: center;
|
|
163
|
-
justify-content: center;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.ivu-modal {
|
|
167
|
-
width: 544px !important;
|
|
168
|
-
position: static;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.ivu-modal-content {
|
|
172
|
-
border-radius: 8px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.ivu-modal-header {
|
|
176
|
-
border-bottom: none;
|
|
177
|
-
padding: 32px 32px 0;
|
|
178
|
-
|
|
179
|
-
.ivu-modal-header-inner {
|
|
180
|
-
font-size: 18px;
|
|
181
|
-
font-family: Microsoft YaHei-Semibold, Microsoft YaHei;
|
|
182
|
-
font-weight: 600;
|
|
183
|
-
color: #252F36;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.DshModal-close {
|
|
188
|
-
right: 30px !important;
|
|
189
|
-
top: 30px !important;
|
|
190
|
-
background: #F4F6F8;
|
|
191
|
-
border-radius: 4px 4px 4px 4px;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.ivu-modal-body {
|
|
195
|
-
padding: 24px 32px 32px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&-footer {
|
|
199
|
-
margin-top: 24px;
|
|
200
|
-
text-align: right;
|
|
201
|
-
|
|
202
|
-
.ivu-btn {
|
|
203
|
-
font-size: 16px;
|
|
204
|
-
font-family: Microsoft YaHei-Semibold, Microsoft YaHei;
|
|
205
|
-
font-weight: 600;
|
|
206
|
-
border-radius: 4px;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
158
|
}
|
|
211
159
|
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#control-select(@control-type) {
|
|
1
|
+
#control-select (@control-type) {
|
|
2
2
|
&-flat {
|
|
3
3
|
width: 100%;
|
|
4
4
|
|
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
word-break: keep-all;
|
|
162
162
|
white-space: nowrap;
|
|
163
163
|
overflow: auto;
|
|
164
|
+
overflow-y: hidden;
|
|
164
165
|
|
|
165
166
|
.ivu-tag {
|
|
166
167
|
margin: 2px 4px 0px 0px;
|
|
@@ -43,10 +43,7 @@
|
|
|
43
43
|
</slot>
|
|
44
44
|
|
|
45
45
|
<!-- label后可自定义内容 -->
|
|
46
|
-
<dsh-render
|
|
47
|
-
v-if="formItem._tipsRender"
|
|
48
|
-
:render="tipsRender(formItem, formData)"
|
|
49
|
-
></dsh-render>
|
|
46
|
+
<dsh-render :render="tipsRender(formItem, formData)"></dsh-render>
|
|
50
47
|
</span>
|
|
51
48
|
</bri-tooltip>
|
|
52
49
|
</span>
|
|
@@ -154,13 +151,95 @@
|
|
|
154
151
|
this.$emit("changeField", ...params);
|
|
155
152
|
},
|
|
156
153
|
tipsRender (formItem, formData) {
|
|
157
|
-
return formItem._tipsRender
|
|
154
|
+
return formItem._tipsRender
|
|
155
|
+
? formItem._tipsRender.call(this, formItem, formData)
|
|
156
|
+
: formItem._openTip
|
|
157
|
+
? (h) => {
|
|
158
|
+
return h("span", {}, [
|
|
159
|
+
h("Icon", {
|
|
160
|
+
props: {
|
|
161
|
+
type: "md-help-circle"
|
|
162
|
+
},
|
|
163
|
+
style: {
|
|
164
|
+
cursor: "pointer"
|
|
165
|
+
},
|
|
166
|
+
on: {
|
|
167
|
+
click: () => {
|
|
168
|
+
if (formItem._tipKind === "dynamic" && !formItem._tipContent) {
|
|
169
|
+
if (formItem._tipUrl) {
|
|
170
|
+
this.$https({
|
|
171
|
+
url: {
|
|
172
|
+
module: "customPage",
|
|
173
|
+
name: formItem._tipUrl
|
|
174
|
+
},
|
|
175
|
+
params: {
|
|
176
|
+
formData: formData,
|
|
177
|
+
propsObj: formItem
|
|
178
|
+
},
|
|
179
|
+
callback: res => {
|
|
180
|
+
this.showTipModal = true;
|
|
181
|
+
formItem._tipContent = res;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
this.showTipModal = true;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}),
|
|
191
|
+
|
|
192
|
+
h("dsh-modal", {
|
|
193
|
+
props: {
|
|
194
|
+
value: this.showTipModal,
|
|
195
|
+
mode: "small",
|
|
196
|
+
propsObj: {
|
|
197
|
+
title: "温馨提示",
|
|
198
|
+
class: "DshFormUnit-modal",
|
|
199
|
+
showSlotClose: false,
|
|
200
|
+
maskClosable: true
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
on: {
|
|
204
|
+
input: bool => {
|
|
205
|
+
this.showTipModal = bool;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}, [
|
|
209
|
+
h("div", {
|
|
210
|
+
class: "wrap"
|
|
211
|
+
}, [
|
|
212
|
+
h("div", {
|
|
213
|
+
class: "wrap-content",
|
|
214
|
+
domProps: {
|
|
215
|
+
innerHTML: formItem._tipContent
|
|
216
|
+
}
|
|
217
|
+
}),
|
|
218
|
+
h("div", {
|
|
219
|
+
class: "wrap-btns"
|
|
220
|
+
}, [
|
|
221
|
+
h("Button", {
|
|
222
|
+
props: {
|
|
223
|
+
type: "primary"
|
|
224
|
+
},
|
|
225
|
+
on: {
|
|
226
|
+
click: () => {
|
|
227
|
+
this.showTipModal = false;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}, "我知道了")
|
|
231
|
+
])
|
|
232
|
+
])
|
|
233
|
+
])
|
|
234
|
+
]);
|
|
235
|
+
}
|
|
236
|
+
: undefined;
|
|
158
237
|
}
|
|
159
238
|
}
|
|
160
239
|
};
|
|
161
240
|
</script>
|
|
162
241
|
|
|
163
|
-
<style lang="less"
|
|
242
|
+
<style lang="less">
|
|
164
243
|
.DshFormUnit {
|
|
165
244
|
margin: 3px 6px; // 不可轻易改margin的左右值,上面style的width根据他calc
|
|
166
245
|
padding: 0px 10px 10px;
|
|
@@ -258,5 +337,33 @@
|
|
|
258
337
|
color: #E94829;
|
|
259
338
|
}
|
|
260
339
|
}
|
|
340
|
+
|
|
341
|
+
&-modal {
|
|
342
|
+
.wrap {
|
|
343
|
+
width: 100%;
|
|
344
|
+
height: 100%;
|
|
345
|
+
display: flex;
|
|
346
|
+
flex-direction: column;
|
|
347
|
+
|
|
348
|
+
&-content {
|
|
349
|
+
flex: 1;
|
|
350
|
+
min-height: 0px;
|
|
351
|
+
padding: 0px 12px;
|
|
352
|
+
overflow: auto;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
&-btns {
|
|
356
|
+
margin: 10px 0px;
|
|
357
|
+
text-align: right;
|
|
358
|
+
|
|
359
|
+
.ivu-btn {
|
|
360
|
+
font-size: 16px;
|
|
361
|
+
font-family: Microsoft YaHei-Semibold, Microsoft YaHei;
|
|
362
|
+
font-weight: 600;
|
|
363
|
+
border-radius: 4px;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
261
368
|
}
|
|
262
369
|
</style>
|