@v2coding/ui 0.1.27 → 0.1.29
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/dist/v2coding-ui.esm.js +66 -7
- package/dist/v2coding-ui.min.js +1 -1
- package/dist/v2coding-ui.ssr.js +67 -13
- package/package.json +1 -1
package/dist/v2coding-ui.esm.js
CHANGED
|
@@ -3111,6 +3111,19 @@ var script$y = {
|
|
|
3111
3111
|
|
|
3112
3112
|
expandMap() {
|
|
3113
3113
|
return this.getExpandMap(this.realData);
|
|
3114
|
+
},
|
|
3115
|
+
|
|
3116
|
+
realAllValue(_ref2) {
|
|
3117
|
+
let {
|
|
3118
|
+
realProps,
|
|
3119
|
+
allValue
|
|
3120
|
+
} = _ref2;
|
|
3121
|
+
|
|
3122
|
+
if (realProps.multiple) {
|
|
3123
|
+
return false;
|
|
3124
|
+
}
|
|
3125
|
+
|
|
3126
|
+
return allValue;
|
|
3114
3127
|
}
|
|
3115
3128
|
|
|
3116
3129
|
},
|
|
@@ -3183,16 +3196,35 @@ var script$y = {
|
|
|
3183
3196
|
},
|
|
3184
3197
|
|
|
3185
3198
|
matchValue(data, value) {
|
|
3199
|
+
if (this.realProps.multiple) {
|
|
3200
|
+
return this.matchMultipleValue(data, value);
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3203
|
+
return this.matchSingleValue(data, value);
|
|
3204
|
+
},
|
|
3205
|
+
|
|
3206
|
+
matchSingleValue(data, value) {
|
|
3186
3207
|
if (!value) {
|
|
3187
3208
|
return [];
|
|
3188
3209
|
}
|
|
3189
3210
|
|
|
3190
|
-
if (!this.
|
|
3211
|
+
if (!this.realAllValue) {
|
|
3191
3212
|
const fullValues = this.expandMap[value] || [];
|
|
3192
3213
|
return [...fullValues].reverse();
|
|
3193
3214
|
}
|
|
3194
3215
|
|
|
3195
|
-
return value.split(',');
|
|
3216
|
+
return String(value).split(',');
|
|
3217
|
+
},
|
|
3218
|
+
|
|
3219
|
+
matchMultipleValue(data, values) {
|
|
3220
|
+
if (!values) {
|
|
3221
|
+
return [];
|
|
3222
|
+
}
|
|
3223
|
+
|
|
3224
|
+
return values.split(',').map(value => {
|
|
3225
|
+
const fullValues = this.expandMap[value] || [];
|
|
3226
|
+
return [...fullValues].reverse();
|
|
3227
|
+
});
|
|
3196
3228
|
},
|
|
3197
3229
|
|
|
3198
3230
|
/**
|
|
@@ -3248,6 +3280,15 @@ var script$y = {
|
|
|
3248
3280
|
},
|
|
3249
3281
|
|
|
3250
3282
|
onChange(value) {
|
|
3283
|
+
if (this.realProps.multiple) {
|
|
3284
|
+
this.onMultipleChange(value);
|
|
3285
|
+
return;
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3288
|
+
this.onSingleChange(value);
|
|
3289
|
+
},
|
|
3290
|
+
|
|
3291
|
+
onSingleChange(value) {
|
|
3251
3292
|
const lastVal = value.length ? value[value.length - 1] : '';
|
|
3252
3293
|
|
|
3253
3294
|
if (!lastVal) {
|
|
@@ -3255,7 +3296,7 @@ var script$y = {
|
|
|
3255
3296
|
return;
|
|
3256
3297
|
}
|
|
3257
3298
|
|
|
3258
|
-
if (!this.
|
|
3299
|
+
if (!this.realAllValue) {
|
|
3259
3300
|
this.emitChange(lastVal);
|
|
3260
3301
|
return;
|
|
3261
3302
|
}
|
|
@@ -3265,6 +3306,20 @@ var script$y = {
|
|
|
3265
3306
|
this.emitChange(_value);
|
|
3266
3307
|
},
|
|
3267
3308
|
|
|
3309
|
+
onMultipleChange(list) {
|
|
3310
|
+
if (!Array.isArray(list) || list.length <= 0) {
|
|
3311
|
+
this.emitChange(undefined);
|
|
3312
|
+
return;
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3315
|
+
const _value = list.map(item => {
|
|
3316
|
+
const lastVal = item.length ? item[item.length - 1] : '';
|
|
3317
|
+
return lastVal;
|
|
3318
|
+
}).filter(Boolean).join(',');
|
|
3319
|
+
|
|
3320
|
+
this.emitChange(_value);
|
|
3321
|
+
},
|
|
3322
|
+
|
|
3268
3323
|
resetValue() {
|
|
3269
3324
|
this.onChange([]);
|
|
3270
3325
|
}
|
|
@@ -3345,8 +3400,8 @@ var __vue_staticRenderFns__$y = [];
|
|
|
3345
3400
|
|
|
3346
3401
|
const __vue_inject_styles__$z = function (inject) {
|
|
3347
3402
|
if (!inject) return;
|
|
3348
|
-
inject("data-v-
|
|
3349
|
-
source: ".ui-cascade-field[data-v-
|
|
3403
|
+
inject("data-v-e8617b10_0", {
|
|
3404
|
+
source: ".ui-cascade-field[data-v-e8617b10]{width:100%}.ui-cascade-field-popper[data-v-e8617b10]{z-index:99999!important}.ui-cascade-field-popper .el-cascader-menu__item[data-v-e8617b10]{padding-right:30px}[data-v-e8617b10] .el-loading-mask .el-loading-spinner{margin-top:-14px}",
|
|
3350
3405
|
map: undefined,
|
|
3351
3406
|
media: undefined
|
|
3352
3407
|
});
|
|
@@ -3354,7 +3409,7 @@ const __vue_inject_styles__$z = function (inject) {
|
|
|
3354
3409
|
/* scoped */
|
|
3355
3410
|
|
|
3356
3411
|
|
|
3357
|
-
const __vue_scope_id__$z = "data-v-
|
|
3412
|
+
const __vue_scope_id__$z = "data-v-e8617b10";
|
|
3358
3413
|
/* module identifier */
|
|
3359
3414
|
|
|
3360
3415
|
const __vue_module_identifier__$z = undefined;
|
|
@@ -8225,6 +8280,8 @@ var script$e = {
|
|
|
8225
8280
|
},
|
|
8226
8281
|
fields: Array,
|
|
8227
8282
|
loading: Boolean,
|
|
8283
|
+
labelWidth: String,
|
|
8284
|
+
labelPosition: String,
|
|
8228
8285
|
// 是否将抽屉放置于 body 内
|
|
8229
8286
|
transfer: {
|
|
8230
8287
|
type: Boolean,
|
|
@@ -8423,6 +8480,8 @@ var __vue_render__$d = function () {
|
|
|
8423
8480
|
ref: "form",
|
|
8424
8481
|
attrs: {
|
|
8425
8482
|
"fields": _vm.fields,
|
|
8483
|
+
"label-width": _vm.labelWidth,
|
|
8484
|
+
"label-position": _vm.labelPosition,
|
|
8426
8485
|
"disabled": _vm.disabled,
|
|
8427
8486
|
"actionButton": false
|
|
8428
8487
|
},
|
|
@@ -8456,7 +8515,7 @@ var __vue_staticRenderFns__$d = [];
|
|
|
8456
8515
|
|
|
8457
8516
|
const __vue_inject_styles__$e = function (inject) {
|
|
8458
8517
|
if (!inject) return;
|
|
8459
|
-
inject("data-v-
|
|
8518
|
+
inject("data-v-e849033e_0", {
|
|
8460
8519
|
source: ".ui-form-drawer{display:flex;flex-direction:column;padding:0;outline:0}.ui-form-drawer .ui-drawer-body{flex:1;padding:0;overflow:hidden;display:flex;flex-direction:column}.ui-form-drawer .ui-drawer-body>.el-form{flex:1;overflow:auto}.ui-form-drawer .ui-drawer-body>.action-button{flex:none}.ui-form-drawer .ui-form-drawer-wrapper{flex:1;overflow:hidden}.ui-form-drawer .ui-form-drawer-wrapper .el-form{width:100%;height:100%;overflow:auto;padding:16px;box-sizing:border-box}.ui-form-drawer .action-button{flex:none;padding:16px;border-top:1px solid #e8eaec;display:flex;flex-direction:row-reverse}.ui-form-drawer .action-button button+button{margin-right:16px}.ui-form-drawer .action-button::after{content:'';clear:both}",
|
|
8461
8520
|
map: undefined,
|
|
8462
8521
|
media: undefined
|