@v2coding/ui 1.1.0 → 1.1.2

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.
@@ -1304,7 +1304,8 @@ var Icon$1 = __vue_component__$F;
1304
1304
  var Icon = {
1305
1305
  install: Vue => {
1306
1306
  Vue.component(Icon$1.name, Icon$1);
1307
- }
1307
+ },
1308
+ Icon: Icon$1
1308
1309
  };
1309
1310
 
1310
1311
  const ID_Card = {
@@ -2778,7 +2779,13 @@ var script$z = {
2778
2779
  filterable: {
2779
2780
  type: Boolean,
2780
2781
  default: true
2781
- }
2782
+ },
2783
+ emptyOption: Boolean,
2784
+ emptyOptionLabel: {
2785
+ type: String,
2786
+ default: '全部'
2787
+ },
2788
+ emptyOptionValue: null
2782
2789
  },
2783
2790
 
2784
2791
  data() {
@@ -2796,17 +2803,37 @@ var script$z = {
2796
2803
  return this.getPickerValue(this.value);
2797
2804
  },
2798
2805
 
2806
+ enableEmptyOption() {
2807
+ if (this.multiple) {
2808
+ return false;
2809
+ }
2810
+
2811
+ return this.emptyOption;
2812
+ },
2813
+
2814
+ realOptions() {
2815
+ if (!this.enableEmptyOption) {
2816
+ return this.realData;
2817
+ }
2818
+
2819
+ const option = {
2820
+ label: this.emptyOptionLabel,
2821
+ value: this.emptyOptionValue
2822
+ };
2823
+ return [option, ...this.realData];
2824
+ },
2825
+
2799
2826
  displayOptions(_ref) {
2800
2827
  let {
2801
- realData,
2828
+ realOptions,
2802
2829
  query
2803
2830
  } = _ref;
2804
2831
 
2805
2832
  if (!query) {
2806
- return realData;
2833
+ return realOptions;
2807
2834
  }
2808
2835
 
2809
- return realData.filter(option => PinyinMatch.match(option.label, query));
2836
+ return realOptions.filter(option => PinyinMatch.match(option.label, query));
2810
2837
  }
2811
2838
 
2812
2839
  },
@@ -2832,7 +2859,7 @@ var script$z = {
2832
2859
  this.validateValue(String(this.value));
2833
2860
 
2834
2861
  if (!this.startNull) {
2835
- this.initDefaultValue(this.realData);
2862
+ this.initDefaultValue(this.realOptions);
2836
2863
  await this.$nextTick();
2837
2864
  this.done();
2838
2865
  }
@@ -2889,7 +2916,7 @@ var script$z = {
2889
2916
  },
2890
2917
 
2891
2918
  validatePickerValue(value) {
2892
- return (this.realData || []).some(item => item.value === value);
2919
+ return (this.realOptions || []).some(item => item.value === value);
2893
2920
  },
2894
2921
 
2895
2922
  getRealValue(value) {
@@ -3094,7 +3121,7 @@ var __vue_staticRenderFns__$A = [];
3094
3121
 
3095
3122
  const __vue_inject_styles__$A = function (inject) {
3096
3123
  if (!inject) return;
3097
- inject("data-v-216b333a_0", {
3124
+ inject("data-v-0ee8fd08_0", {
3098
3125
  source: ".ui-field-select .el-select{width:100%}.ui-field-select .el-input-group--append .el-select .el-input.is-focus .el-input__inner{border-color:var(--color-primary)}.ui-field-select .empty{font-size:12px;color:#909399;display:flex;align-items:center}.ui-field-select .el-loading-mask .el-loading-spinner{margin-top:-14px}",
3099
3126
  map: undefined,
3100
3127
  media: undefined
@@ -7357,7 +7384,8 @@ var script$g = {
7357
7384
  type: Boolean,
7358
7385
  default: false
7359
7386
  },
7360
- message: String
7387
+ message: String,
7388
+ emptyOption: Boolean
7361
7389
  },
7362
7390
 
7363
7391
  data() {
@@ -7527,7 +7555,8 @@ var __vue_render__$g = function () {
7527
7555
  "type": _vm.type,
7528
7556
  "disabled": _vm.realDisabled,
7529
7557
  "placeholder": _vm.realPlaceHolder,
7530
- "ignore": _vm.ignore
7558
+ "ignore": _vm.ignore,
7559
+ "emptyOption": _vm.emptyOption
7531
7560
  },
7532
7561
  on: {
7533
7562
  "update:lockedValue": function ($event) {
@@ -7554,8 +7583,8 @@ var __vue_staticRenderFns__$g = [];
7554
7583
 
7555
7584
  const __vue_inject_styles__$g = function (inject) {
7556
7585
  if (!inject) return;
7557
- inject("data-v-7980c558_0", {
7558
- source: ".ui-form-item.el-form-item--small[data-v-7980c558] .el-form-item__content .ui-form-item-prefix,.ui-form-item.el-form-item--small[data-v-7980c558] .el-form-item__content .ui-form-item-suffix{height:32px}.ui-form-item[data-v-7980c558] .el-form-item__content{display:flex;flex-direction:row;align-items:center}.ui-form-item[data-v-7980c558] .el-form-item__content>.ui-form-field:not(.ui-file-upload-field){flex:1;display:flex;align-items:center}.ui-form-item[data-v-7980c558] .el-form-item__content .ui-file-upload-field{flex:1;display:flex;flex-direction:column;align-items:flex-start}.ui-form-item[data-v-7980c558] .el-form-item__content .has-suffix .el-input__inner{border-top-right-radius:0;border-bottom-right-radius:0}.ui-form-item[data-v-7980c558] .el-form-item__content .ui-form-item-prefix,.ui-form-item[data-v-7980c558] .el-form-item__content .ui-form-item-suffix{flex:none;background-color:#f5f7fa;color:#909399;vertical-align:middle;display:table-cell;position:relative;border:1px solid #dcdfe6;border-left:0;height:36px;border-radius:0 4px 4px 0;padding:0 20px;white-space:nowrap}.ui-form-item .info[data-v-7980c558]{color:#909399;cursor:pointer;margin-left:4px}.ui-form-item.hidden-item[data-v-7980c558]{display:none!important}.el-form--inline .ui-form-item[data-v-7980c558] .el-form-item__label{flex:none;white-space:nowrap}.el-form--inline .ui-form-item[data-v-7980c558] .el-form-item__content{display:inline-flex}",
7586
+ inject("data-v-4131aba1_0", {
7587
+ source: ".ui-form-item.el-form-item--small[data-v-4131aba1] .el-form-item__content .ui-form-item-prefix,.ui-form-item.el-form-item--small[data-v-4131aba1] .el-form-item__content .ui-form-item-suffix{height:32px}.ui-form-item[data-v-4131aba1] .el-form-item__content{display:flex;flex-direction:row;align-items:center}.ui-form-item[data-v-4131aba1] .el-form-item__content>.ui-form-field:not(.ui-file-upload-field){flex:1;display:flex;align-items:center}.ui-form-item[data-v-4131aba1] .el-form-item__content .ui-file-upload-field{flex:1;display:flex;flex-direction:column;align-items:flex-start}.ui-form-item[data-v-4131aba1] .el-form-item__content .has-suffix .el-input__inner{border-top-right-radius:0;border-bottom-right-radius:0}.ui-form-item[data-v-4131aba1] .el-form-item__content .ui-form-item-prefix,.ui-form-item[data-v-4131aba1] .el-form-item__content .ui-form-item-suffix{flex:none;background-color:#f5f7fa;color:#909399;vertical-align:middle;display:table-cell;position:relative;border:1px solid #dcdfe6;border-left:0;height:36px;border-radius:0 4px 4px 0;padding:0 20px;white-space:nowrap}.ui-form-item .info[data-v-4131aba1]{color:#909399;cursor:pointer;margin-left:4px}.ui-form-item.hidden-item[data-v-4131aba1]{display:none!important}.el-form--inline .ui-form-item[data-v-4131aba1] .el-form-item__label{flex:none;white-space:nowrap}.el-form--inline .ui-form-item[data-v-4131aba1] .el-form-item__content{display:inline-flex}",
7559
7588
  map: undefined,
7560
7589
  media: undefined
7561
7590
  });
@@ -7563,7 +7592,7 @@ const __vue_inject_styles__$g = function (inject) {
7563
7592
  /* scoped */
7564
7593
 
7565
7594
 
7566
- const __vue_scope_id__$g = "data-v-7980c558";
7595
+ const __vue_scope_id__$g = "data-v-4131aba1";
7567
7596
  /* module identifier */
7568
7597
 
7569
7598
  const __vue_module_identifier__$g = undefined;
@@ -8963,7 +8992,13 @@ var Form = {
8963
8992
  Vue.component(FormDrawer.name, FormDrawer);
8964
8993
  Vue.component(FormFieldset.name, FormFieldset);
8965
8994
  },
8966
- FormFields
8995
+ Form: Form$1,
8996
+ FormItem,
8997
+ FormField,
8998
+ FormFields,
8999
+ FormDialog,
9000
+ FormDrawer,
9001
+ FormFieldset
8967
9002
  };
8968
9003
 
8969
9004
  const getReference = (el, binding, vnode) => {
@@ -10201,7 +10236,7 @@ const DefaultTypes = {
10201
10236
  direction: 'vertical'
10202
10237
  }
10203
10238
  }) : null, h('el-button', {
10204
- attrs: props,
10239
+ class: props.class,
10205
10240
  props: {
10206
10241
  type: 'text',
10207
10242
  size: 'mini',
@@ -10243,7 +10278,7 @@ const DefaultTypes = {
10243
10278
  ...props
10244
10279
  } = _ref8;
10245
10280
  return h('el-dropdown-item', {
10246
- attrs: props,
10281
+ class: props.class,
10247
10282
  props: { ...props,
10248
10283
  command: key
10249
10284
  }
@@ -11157,7 +11192,12 @@ var Table = {
11157
11192
  Vue.component(TablePagination.name, TablePagination);
11158
11193
  Vue.component(TableSelect.name, TableSelect);
11159
11194
  Vue.component(TableSelectItem.name, TableSelectItem);
11160
- }
11195
+ },
11196
+ Table: Table$1,
11197
+ TableColumn,
11198
+ TablePagination,
11199
+ TableSelect,
11200
+ TableSelectItem
11161
11201
  };
11162
11202
 
11163
11203
  var Drag = {
@@ -11473,13 +11513,16 @@ var Dialog = {
11473
11513
  install: Vue => {
11474
11514
  Vue.directive(Drag.name, Drag);
11475
11515
  Vue.component(Dialog$1.name, Dialog$1);
11476
- }
11516
+ },
11517
+ Drag,
11518
+ Dialog: Dialog$1
11477
11519
  };
11478
11520
 
11479
11521
  var Drawer = {
11480
11522
  install: Vue => {
11481
11523
  Vue.component(Drawer$1.name, Drawer$1);
11482
- }
11524
+ },
11525
+ Drawer: Drawer$1
11483
11526
  };
11484
11527
 
11485
11528
  var Fragment = {
@@ -11580,7 +11623,8 @@ var Permission$1 = {
11580
11623
  var Permission = {
11581
11624
  install: Vue => {
11582
11625
  Vue.component(Permission$1.name, Permission$1);
11583
- }
11626
+ },
11627
+ Permission: Permission$1
11584
11628
  };
11585
11629
 
11586
11630
  const setDocumentTitle = function (title) {
@@ -11667,7 +11711,8 @@ var DocumentTitle$1 = DocumentTitle;
11667
11711
  var FillView = {
11668
11712
  install: Vue => {
11669
11713
  Vue.component(FillView$1.name, FillView$1);
11670
- }
11714
+ },
11715
+ FillView: FillView$1
11671
11716
  };
11672
11717
 
11673
11718
  //
@@ -11892,7 +11937,8 @@ var ScrollView$1 = __vue_component__$4;
11892
11937
  var ScrollView = {
11893
11938
  install: Vue => {
11894
11939
  Vue.component(ScrollView$1.name, ScrollView$1);
11895
- }
11940
+ },
11941
+ ScrollView: ScrollView$1
11896
11942
  };
11897
11943
 
11898
11944
  //
@@ -12169,7 +12215,8 @@ var History$1 = __vue_component__$3;
12169
12215
  var History = {
12170
12216
  install: Vue => {
12171
12217
  Vue.component(History$1.name, History$1);
12172
- }
12218
+ },
12219
+ History: History$1
12173
12220
  };
12174
12221
 
12175
12222
  //
@@ -12352,7 +12399,8 @@ var Minimize$1 = __vue_component__$2;
12352
12399
  var Minimize = {
12353
12400
  install: Vue => {
12354
12401
  Vue.component(Minimize$1.name, Minimize$1);
12355
- }
12402
+ },
12403
+ Minimize: Minimize$1
12356
12404
  };
12357
12405
 
12358
12406
  //