bri-components 1.2.50 → 1.2.51
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/BriControlInput.vue +9 -6
- package/src/components/controls/base/DshDate/DshDate.vue +1 -1
- package/src/components/controls/base/DshDate/DshDaterange.vue +55 -99
- package/src/components/controls/base/DshEditor.vue +1 -1
- package/src/components/controls/base/DshInput/DshInput.vue +1 -3
- package/src/components/controls/base/DshNumber/DshNumber.vue +2 -43
- package/src/components/controls/base/DshNumber/DshNumberange.vue +9 -9
- package/src/components/controls/base/DshSelect/selectMixin.js +1 -3
- package/src/components/controls/base/DshSwitch/DshSwitch.vue +0 -5
- package/src/components/controls/base/DshSwitch/switchMixin.js +4 -4
- package/src/components/controls/controlMixin.js +6 -2
- package/src/components/controls/special/DshBack.vue +1 -1
- package/src/components/controls/special/DshUndeveloped.vue +1 -1
- package/src/components/form/DshDefaultSearch.vue +43 -81
- package/src/components/unit/DshFormUnit.vue +11 -10
- package/src/styles/components/controls/base/DshInput.less +0 -16
- package/src/styles/index.less +5 -3
- package/src/styles/reset-iview-controls.less +104 -0
- package/src/styles/{reset-iview.less → reset-iview-variables.less} +1 -47
- package/src/abolish/BriTransfer.less +0 -65
- package/src/abolish/BriTransfer.vue +0 -71
- package/src/abolish/BriTree.less +0 -57
- package/src/abolish/DshCascaders.less +0 -11
- package/src/abolish/DshCascaders.vue +0 -151
- package/src/abolish/DshCrumbs.less +0 -0
- package/src/abolish/DshCrumbs.vue +0 -62
- package/src/abolish/DshCrumbsItem.vue +0 -109
- package/src/abolish/DshEditPanel.less +0 -70
- package/src/abolish/DshEditPanel.vue +0 -152
- package/src/abolish/DshFileShow.less +0 -61
- package/src/abolish/DshFileShow.vue +0 -0
- package/src/abolish/DshFlatTable.less +0 -93
- package/src/abolish/DshFlatTable.vue +0 -605
- package/src/abolish/DshMenu.less +0 -37
- package/src/abolish/DshMenu.vue +0 -133
- package/src/abolish/DshTexts.less +0 -13
- package/src/abolish/DshTexts.vue +0 -89
- /package/src/{abolish/DshCrumbItem.less → styles/reset-iview-other.less} +0 -0
package/package.json
CHANGED
|
@@ -115,12 +115,7 @@
|
|
|
115
115
|
.placeholder {
|
|
116
116
|
flex: 1;
|
|
117
117
|
min-width: 0px;
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.ivu-icon {
|
|
122
|
-
padding: 5px;
|
|
123
|
-
color: @placeholder-disabled-color;
|
|
118
|
+
.dsh-ellipsis();
|
|
124
119
|
}
|
|
125
120
|
|
|
126
121
|
.icon {
|
|
@@ -133,3 +128,11 @@
|
|
|
133
128
|
}
|
|
134
129
|
}
|
|
135
130
|
</style>
|
|
131
|
+
<style lang="less">
|
|
132
|
+
.BriControlInput {
|
|
133
|
+
.ivu-icon {
|
|
134
|
+
padding: 5px;
|
|
135
|
+
color: @placeholder-disabled-color;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
</style>
|
|
@@ -29,26 +29,19 @@
|
|
|
29
29
|
@on-change="changeVal($event, 0)"
|
|
30
30
|
@on-open-change="changeOpen($event, 0)"
|
|
31
31
|
>
|
|
32
|
-
<
|
|
33
|
-
class="
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/>
|
|
46
|
-
<Icon
|
|
47
|
-
v-show="!val0"
|
|
48
|
-
type="ios-calendar-outline"
|
|
49
|
-
/>
|
|
50
|
-
</span>
|
|
51
|
-
</div>
|
|
32
|
+
<bri-control-input
|
|
33
|
+
:class="{
|
|
34
|
+
...commonClass,
|
|
35
|
+
'bri-control-nodata': this.$isEmptyData(this.showVal0),
|
|
36
|
+
'DshDaterange-item': true
|
|
37
|
+
}"
|
|
38
|
+
:canEdit="finalCanEdit"
|
|
39
|
+
:value="showVal0"
|
|
40
|
+
inputIcon="ios-calendar-outline"
|
|
41
|
+
:propsObj="selfPropsObj"
|
|
42
|
+
@clear="clickClear('', 0)"
|
|
43
|
+
@click.native="changeOpen(true, 0)"
|
|
44
|
+
></bri-control-input>
|
|
52
45
|
</DatePicker>
|
|
53
46
|
|
|
54
47
|
<span class="DshDaterange-center"> — </span>
|
|
@@ -66,26 +59,19 @@
|
|
|
66
59
|
@on-change="changeVal($event, 1)"
|
|
67
60
|
@on-open-change="changeOpen($event, 1)"
|
|
68
61
|
>
|
|
69
|
-
<
|
|
70
|
-
class="
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/>
|
|
83
|
-
<Icon
|
|
84
|
-
v-show="!val1"
|
|
85
|
-
type="ios-calendar-outline"
|
|
86
|
-
/>
|
|
87
|
-
</span>
|
|
88
|
-
</div>
|
|
62
|
+
<bri-control-input
|
|
63
|
+
:class="{
|
|
64
|
+
...commonClass,
|
|
65
|
+
'bri-control-nodata': this.$isEmptyData(this.showVal1),
|
|
66
|
+
'DshDaterange-item': true
|
|
67
|
+
}"
|
|
68
|
+
:canEdit="finalCanEdit"
|
|
69
|
+
:value="showVal1"
|
|
70
|
+
inputIcon="ios-calendar-outline"
|
|
71
|
+
:propsObj="selfPropsObj"
|
|
72
|
+
@clear="clickClear('', 1)"
|
|
73
|
+
@click.native="changeOpen(true, 1)"
|
|
74
|
+
></bri-control-input>
|
|
89
75
|
</DatePicker>
|
|
90
76
|
</template>
|
|
91
77
|
</div>
|
|
@@ -224,28 +210,13 @@
|
|
|
224
210
|
};
|
|
225
211
|
},
|
|
226
212
|
computed: {
|
|
227
|
-
val0: {
|
|
228
|
-
get () {
|
|
229
|
-
return this.getVal(0);
|
|
230
|
-
},
|
|
231
|
-
set (val) {
|
|
232
|
-
this.setVal(val, 0);
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
val1: {
|
|
236
|
-
get () {
|
|
237
|
-
return this.getVal(1);
|
|
238
|
-
},
|
|
239
|
-
set (val) {
|
|
240
|
-
this.setVal(val, 1);
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
|
|
244
213
|
selfPropsObj () {
|
|
245
214
|
return {
|
|
246
215
|
_useShortcuts: true,
|
|
216
|
+
|
|
247
217
|
...this.propsObj,
|
|
248
218
|
...this.commonDealPropsObj,
|
|
219
|
+
|
|
249
220
|
_type: "date"
|
|
250
221
|
};
|
|
251
222
|
},
|
|
@@ -255,18 +226,34 @@
|
|
|
255
226
|
useShortcuts () {
|
|
256
227
|
return this.selfPropsObj._useShortcuts;
|
|
257
228
|
},
|
|
258
|
-
|
|
259
229
|
options0 () {
|
|
260
230
|
return this.getOptions(0);
|
|
261
231
|
},
|
|
262
232
|
options1 () {
|
|
263
233
|
return this.getOptions(1);
|
|
264
234
|
},
|
|
235
|
+
|
|
236
|
+
val0: {
|
|
237
|
+
get () {
|
|
238
|
+
return this.getVal(0);
|
|
239
|
+
},
|
|
240
|
+
set (val) {
|
|
241
|
+
this.setVal(val, 0);
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
val1: {
|
|
245
|
+
get () {
|
|
246
|
+
return this.getVal(1);
|
|
247
|
+
},
|
|
248
|
+
set (val) {
|
|
249
|
+
this.setVal(val, 1);
|
|
250
|
+
}
|
|
251
|
+
},
|
|
265
252
|
showVal0 () {
|
|
266
|
-
return this.getShowVal(
|
|
253
|
+
return this.getShowVal(this.val0);
|
|
267
254
|
},
|
|
268
255
|
showVal1 () {
|
|
269
|
-
return this.getShowVal(
|
|
256
|
+
return this.getShowVal(this.val1);
|
|
270
257
|
}
|
|
271
258
|
},
|
|
272
259
|
created () {},
|
|
@@ -328,9 +315,7 @@
|
|
|
328
315
|
}
|
|
329
316
|
};
|
|
330
317
|
},
|
|
331
|
-
getShowVal (
|
|
332
|
-
const val = this[`val${index}`];
|
|
333
|
-
|
|
318
|
+
getShowVal (val) {
|
|
334
319
|
return this.isDynDateKey(val)
|
|
335
320
|
? (this.dynDate.find(dynItem => dynItem._key === val) || { name: `"${val}"dnDate不存在` }).name
|
|
336
321
|
: this.$transformDate(val, "-", this.subType);
|
|
@@ -342,56 +327,27 @@
|
|
|
342
327
|
};
|
|
343
328
|
</script>
|
|
344
329
|
|
|
345
|
-
<style lang="less"
|
|
330
|
+
<style lang="less">
|
|
346
331
|
.DshDaterange {
|
|
347
332
|
width: 100%;
|
|
333
|
+
display: flex;
|
|
334
|
+
align-items: center;
|
|
348
335
|
|
|
349
336
|
&-left,
|
|
350
337
|
&-right {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
background-color: #ffffff;
|
|
338
|
+
flex: 7;
|
|
339
|
+
min-width: 0px;
|
|
354
340
|
}
|
|
355
341
|
|
|
356
342
|
&-center {
|
|
357
|
-
|
|
343
|
+
flex: 1;
|
|
344
|
+
min-width: 10px;
|
|
358
345
|
text-align: center;
|
|
359
346
|
color: @textColor;
|
|
360
|
-
overflow: hidden;
|
|
361
|
-
line-height: 30px;
|
|
362
|
-
float: left;
|
|
363
|
-
margin: 0 1.5%;
|
|
364
347
|
}
|
|
365
348
|
|
|
366
349
|
&-item {
|
|
367
|
-
height: 32px;
|
|
368
|
-
border: 1px solid @borderColor;
|
|
369
|
-
border-radius: 4px;
|
|
370
|
-
overflow: hidden;
|
|
371
|
-
position: relative;
|
|
372
350
|
|
|
373
|
-
&-name {
|
|
374
|
-
display: inline-block;
|
|
375
|
-
width: 100%;
|
|
376
|
-
height: 100%;
|
|
377
|
-
line-height: 30px;
|
|
378
|
-
overflow: hidden;
|
|
379
|
-
padding-right: 32px;
|
|
380
|
-
padding-left: 7px;
|
|
381
|
-
white-space: nowrap;
|
|
382
|
-
text-overflow: ellipsis;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
&-icon {
|
|
386
|
-
position: absolute;
|
|
387
|
-
right: 0px;
|
|
388
|
-
top: 0px;
|
|
389
|
-
display: inline-block;
|
|
390
|
-
width: 32px;
|
|
391
|
-
height: 100%;
|
|
392
|
-
text-align: center;
|
|
393
|
-
line-height: 30px;
|
|
394
|
-
}
|
|
395
351
|
}
|
|
396
352
|
}
|
|
397
353
|
</style>
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
};
|
|
150
150
|
</script>
|
|
151
151
|
|
|
152
|
-
<style lang="less"
|
|
152
|
+
<style lang="less">
|
|
153
153
|
.DshNumber {
|
|
154
154
|
width: 100%;
|
|
155
155
|
|
|
@@ -163,45 +163,4 @@
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
</style>
|
|
167
|
-
<style lang="less">
|
|
168
|
-
.ivu-input-number {
|
|
169
|
-
width: 100%;
|
|
170
|
-
|
|
171
|
-
.ivu-input-number-input {
|
|
172
|
-
color: @textColor;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&-disabled {
|
|
176
|
-
.ivu-input-number-input {
|
|
177
|
-
opacity: 1;
|
|
178
|
-
background: @inputBg-disabled;
|
|
179
|
-
color: @textColor;
|
|
180
|
-
&::-webkit-input-placeholder {
|
|
181
|
-
color: @placeholder-disabled-color;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
&-handler {
|
|
187
|
-
&-wrap {
|
|
188
|
-
border-left: none;
|
|
189
|
-
}
|
|
190
|
-
&-down {
|
|
191
|
-
border: none;
|
|
192
|
-
}
|
|
193
|
-
&:hover {
|
|
194
|
-
background-color: @hoverBg;
|
|
195
|
-
|
|
196
|
-
.ivu-input-number-handler-down-inner,
|
|
197
|
-
.ivu-input-number-handler-up-inner {
|
|
198
|
-
color: @textColor;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
&-down-inner,
|
|
202
|
-
&-up-inner {
|
|
203
|
-
color: @contentColor;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
</style>
|
|
166
|
+
</style>
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
};
|
|
127
127
|
</script>
|
|
128
128
|
|
|
129
|
-
<style lang="less"
|
|
129
|
+
<style lang="less">
|
|
130
130
|
.DshNumberange {
|
|
131
131
|
width: 100%;
|
|
132
132
|
display: flex;
|
|
@@ -134,25 +134,25 @@
|
|
|
134
134
|
|
|
135
135
|
&-left,
|
|
136
136
|
&-right {
|
|
137
|
-
flex:
|
|
137
|
+
flex: 7;
|
|
138
|
+
flex: 7;
|
|
139
|
+
min-width: 0px;
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
&-center {
|
|
141
|
-
|
|
143
|
+
flex: 1;
|
|
144
|
+
min-width: 10px;
|
|
142
145
|
text-align: center;
|
|
143
146
|
color: @textColor;
|
|
144
147
|
}
|
|
145
148
|
|
|
146
149
|
&-suffix {
|
|
147
|
-
padding-right:
|
|
148
|
-
padding-left:
|
|
150
|
+
padding-right: 8px;
|
|
151
|
+
padding-left: 2px;
|
|
149
152
|
line-height: 30px;
|
|
150
153
|
white-space: nowrap;
|
|
151
154
|
}
|
|
152
|
-
|
|
153
|
-
</style>
|
|
154
|
-
<style lang="less">
|
|
155
|
-
.DshNumberange {
|
|
155
|
+
|
|
156
156
|
input {
|
|
157
157
|
text-overflow: ellipsis;
|
|
158
158
|
overflow: hidden;
|
|
@@ -25,13 +25,11 @@ export default {
|
|
|
25
25
|
...this.commonDealPropsObj,
|
|
26
26
|
|
|
27
27
|
_openText: this.propsObj._openText || "是", // 此行放在 ...this.propsObj的下面目的是,处理_openText为空字符串的情况
|
|
28
|
-
_closeText: this.propsObj._closeText || "否"
|
|
29
|
-
_disabled: this.propsObj._disabled || !this.finalCanEdit
|
|
28
|
+
_closeText: this.propsObj._closeText || "否"
|
|
30
29
|
};
|
|
31
30
|
},
|
|
32
31
|
mulPropsObj () {
|
|
33
32
|
return {
|
|
34
|
-
...this.propsObj,
|
|
35
33
|
_optionKind: "flat",
|
|
36
34
|
_data: [
|
|
37
35
|
{
|
|
@@ -44,7 +42,9 @@ export default {
|
|
|
44
42
|
name: this.selfPropsObj._closeText,
|
|
45
43
|
color: this.selfPropsObj._closeColor
|
|
46
44
|
}
|
|
47
|
-
]
|
|
45
|
+
],
|
|
46
|
+
|
|
47
|
+
...this.propsObj
|
|
48
48
|
};
|
|
49
49
|
},
|
|
50
50
|
showStyle () {
|
|
@@ -90,7 +90,7 @@ export default {
|
|
|
90
90
|
},
|
|
91
91
|
// 是否为多选模式
|
|
92
92
|
multipleMode () {
|
|
93
|
-
return ["numberange", "daterange", "checkbox", "regions", "cascaders"].includes(this.controlType) || !!this.propsObj._multiple;
|
|
93
|
+
return ["texts", "numberange", "daterange", "checkbox", "regions", "cascaders"].includes(this.controlType) || !!this.propsObj._multiple;
|
|
94
94
|
},
|
|
95
95
|
commonDealPropsObj () {
|
|
96
96
|
const selectControlTypes = ["date", "switch", "select", "checkbox", "file", "region", "regions", "cascader", "cascaders", "coordinates", "users", "departments"];
|
|
@@ -99,7 +99,8 @@ export default {
|
|
|
99
99
|
_placeholder: this.canEdit && this.propsObj._enterType !== "calculate"
|
|
100
100
|
? (this.propsObj._placeholder || `请${selectControlTypes.includes(this.controlType) ? "选择" : "输入"}${this.propsObj._name}`)
|
|
101
101
|
: undefined,
|
|
102
|
-
_clearable: this.finalCanEdit && (this.propsObj._clearable === undefined ? true : this.propsObj._clearable)
|
|
102
|
+
_clearable: this.finalCanEdit && (this.propsObj._clearable === undefined ? true : this.propsObj._clearable),
|
|
103
|
+
_disabled: this.propsObj._disabled || ["serialNumber"].includes(this.controlType) || !this.finalCanEdit
|
|
103
104
|
};
|
|
104
105
|
},
|
|
105
106
|
commonClass () {
|
|
@@ -133,6 +134,9 @@ export default {
|
|
|
133
134
|
isOnSearch () {
|
|
134
135
|
return !!this.propsObj.onSearch;
|
|
135
136
|
},
|
|
137
|
+
isOnDftSearch () {
|
|
138
|
+
return !!this.propsObj.onDftSearch;
|
|
139
|
+
},
|
|
136
140
|
isUnitUpdate () {
|
|
137
141
|
return this.isInTable && !!this.canEdit;
|
|
138
142
|
},
|