@v2coding/ui 1.0.0 → 1.1.1

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 = {
@@ -2144,7 +2145,18 @@ var script$C = {
2144
2145
  showWordLimit: {
2145
2146
  type: Boolean,
2146
2147
  default: true
2148
+ },
2149
+ modifier: Function
2150
+ },
2151
+ methods: {
2152
+ onInput(val) {
2153
+ if (typeof this.modifier === 'function') {
2154
+ val = this.modifier(val);
2155
+ }
2156
+
2157
+ this.emitChange(val);
2147
2158
  }
2159
+
2148
2160
  }
2149
2161
  };
2150
2162
 
@@ -2168,8 +2180,11 @@ var __vue_render__$D = function () {
2168
2180
  "rows": _vm.rows,
2169
2181
  "autosize": _vm.autosize,
2170
2182
  "show-word-limit": _vm.showWordLimit
2183
+ },
2184
+ on: {
2185
+ "input": _vm.onInput
2171
2186
  }
2172
- }, 'el-input', _vm.$attrs, false), _vm.$listeners));
2187
+ }, 'el-input', _vm.$attrs, false), _vm._listeners));
2173
2188
  };
2174
2189
 
2175
2190
  var __vue_staticRenderFns__$D = [];
@@ -2177,7 +2192,7 @@ var __vue_staticRenderFns__$D = [];
2177
2192
 
2178
2193
  const __vue_inject_styles__$D = function (inject) {
2179
2194
  if (!inject) return;
2180
- inject("data-v-208093e4_0", {
2195
+ inject("data-v-44711bc5_0", {
2181
2196
  source: ".el-input__suffix-inner{display:flex;align-items:center;height:100%}.el-input--large .el-input__count .el-input__count-inner{line-height:38px}.el-input--medium .el-input__count .el-input__count-inner{line-height:34px}.el-input--mini .el-input__count .el-input__count-inner{line-height:26px}",
2182
2197
  map: undefined,
2183
2198
  media: undefined
@@ -2764,7 +2779,13 @@ var script$z = {
2764
2779
  filterable: {
2765
2780
  type: Boolean,
2766
2781
  default: true
2767
- }
2782
+ },
2783
+ emptyOption: Boolean,
2784
+ emptyOptionLabel: {
2785
+ type: String,
2786
+ default: '全部'
2787
+ },
2788
+ emptyOptionValue: null
2768
2789
  },
2769
2790
 
2770
2791
  data() {
@@ -2782,17 +2803,37 @@ var script$z = {
2782
2803
  return this.getPickerValue(this.value);
2783
2804
  },
2784
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
+
2785
2826
  displayOptions(_ref) {
2786
2827
  let {
2787
- realData,
2828
+ realOptions,
2788
2829
  query
2789
2830
  } = _ref;
2790
2831
 
2791
2832
  if (!query) {
2792
- return realData;
2833
+ return realOptions;
2793
2834
  }
2794
2835
 
2795
- return realData.filter(option => PinyinMatch.match(option.label, query));
2836
+ return realOptions.filter(option => PinyinMatch.match(option.label, query));
2796
2837
  }
2797
2838
 
2798
2839
  },
@@ -2818,7 +2859,7 @@ var script$z = {
2818
2859
  this.validateValue(String(this.value));
2819
2860
 
2820
2861
  if (!this.startNull) {
2821
- this.initDefaultValue(this.realData);
2862
+ this.initDefaultValue(this.realOptions);
2822
2863
  await this.$nextTick();
2823
2864
  this.done();
2824
2865
  }
@@ -2875,7 +2916,7 @@ var script$z = {
2875
2916
  },
2876
2917
 
2877
2918
  validatePickerValue(value) {
2878
- return (this.realData || []).some(item => item.value === value);
2919
+ return (this.realOptions || []).some(item => item.value === value);
2879
2920
  },
2880
2921
 
2881
2922
  getRealValue(value) {
@@ -3080,7 +3121,7 @@ var __vue_staticRenderFns__$A = [];
3080
3121
 
3081
3122
  const __vue_inject_styles__$A = function (inject) {
3082
3123
  if (!inject) return;
3083
- inject("data-v-216b333a_0", {
3124
+ inject("data-v-0ee8fd08_0", {
3084
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}",
3085
3126
  map: undefined,
3086
3127
  media: undefined
@@ -7343,7 +7384,8 @@ var script$g = {
7343
7384
  type: Boolean,
7344
7385
  default: false
7345
7386
  },
7346
- message: String
7387
+ message: String,
7388
+ emptyOption: Boolean
7347
7389
  },
7348
7390
 
7349
7391
  data() {
@@ -7513,7 +7555,8 @@ var __vue_render__$g = function () {
7513
7555
  "type": _vm.type,
7514
7556
  "disabled": _vm.realDisabled,
7515
7557
  "placeholder": _vm.realPlaceHolder,
7516
- "ignore": _vm.ignore
7558
+ "ignore": _vm.ignore,
7559
+ "emptyOption": _vm.emptyOption
7517
7560
  },
7518
7561
  on: {
7519
7562
  "update:lockedValue": function ($event) {
@@ -7540,8 +7583,8 @@ var __vue_staticRenderFns__$g = [];
7540
7583
 
7541
7584
  const __vue_inject_styles__$g = function (inject) {
7542
7585
  if (!inject) return;
7543
- inject("data-v-7980c558_0", {
7544
- 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}",
7545
7588
  map: undefined,
7546
7589
  media: undefined
7547
7590
  });
@@ -7549,7 +7592,7 @@ const __vue_inject_styles__$g = function (inject) {
7549
7592
  /* scoped */
7550
7593
 
7551
7594
 
7552
- const __vue_scope_id__$g = "data-v-7980c558";
7595
+ const __vue_scope_id__$g = "data-v-4131aba1";
7553
7596
  /* module identifier */
7554
7597
 
7555
7598
  const __vue_module_identifier__$g = undefined;
@@ -8949,7 +8992,13 @@ var Form = {
8949
8992
  Vue.component(FormDrawer.name, FormDrawer);
8950
8993
  Vue.component(FormFieldset.name, FormFieldset);
8951
8994
  },
8952
- FormFields
8995
+ Form: Form$1,
8996
+ FormItem,
8997
+ FormField,
8998
+ FormFields,
8999
+ FormDialog,
9000
+ FormDrawer,
9001
+ FormFieldset
8953
9002
  };
8954
9003
 
8955
9004
  const getReference = (el, binding, vnode) => {
@@ -11143,7 +11192,12 @@ var Table = {
11143
11192
  Vue.component(TablePagination.name, TablePagination);
11144
11193
  Vue.component(TableSelect.name, TableSelect);
11145
11194
  Vue.component(TableSelectItem.name, TableSelectItem);
11146
- }
11195
+ },
11196
+ Table: Table$1,
11197
+ TableColumn,
11198
+ TablePagination,
11199
+ TableSelect,
11200
+ TableSelectItem
11147
11201
  };
11148
11202
 
11149
11203
  var Drag = {
@@ -11459,13 +11513,16 @@ var Dialog = {
11459
11513
  install: Vue => {
11460
11514
  Vue.directive(Drag.name, Drag);
11461
11515
  Vue.component(Dialog$1.name, Dialog$1);
11462
- }
11516
+ },
11517
+ Drag,
11518
+ Dialog: Dialog$1
11463
11519
  };
11464
11520
 
11465
11521
  var Drawer = {
11466
11522
  install: Vue => {
11467
11523
  Vue.component(Drawer$1.name, Drawer$1);
11468
- }
11524
+ },
11525
+ Drawer: Drawer$1
11469
11526
  };
11470
11527
 
11471
11528
  var Fragment = {
@@ -11566,7 +11623,8 @@ var Permission$1 = {
11566
11623
  var Permission = {
11567
11624
  install: Vue => {
11568
11625
  Vue.component(Permission$1.name, Permission$1);
11569
- }
11626
+ },
11627
+ Permission: Permission$1
11570
11628
  };
11571
11629
 
11572
11630
  const setDocumentTitle = function (title) {
@@ -11653,7 +11711,8 @@ var DocumentTitle$1 = DocumentTitle;
11653
11711
  var FillView = {
11654
11712
  install: Vue => {
11655
11713
  Vue.component(FillView$1.name, FillView$1);
11656
- }
11714
+ },
11715
+ FillView: FillView$1
11657
11716
  };
11658
11717
 
11659
11718
  //
@@ -11878,7 +11937,8 @@ var ScrollView$1 = __vue_component__$4;
11878
11937
  var ScrollView = {
11879
11938
  install: Vue => {
11880
11939
  Vue.component(ScrollView$1.name, ScrollView$1);
11881
- }
11940
+ },
11941
+ ScrollView: ScrollView$1
11882
11942
  };
11883
11943
 
11884
11944
  //
@@ -12155,7 +12215,8 @@ var History$1 = __vue_component__$3;
12155
12215
  var History = {
12156
12216
  install: Vue => {
12157
12217
  Vue.component(History$1.name, History$1);
12158
- }
12218
+ },
12219
+ History: History$1
12159
12220
  };
12160
12221
 
12161
12222
  //
@@ -12338,7 +12399,8 @@ var Minimize$1 = __vue_component__$2;
12338
12399
  var Minimize = {
12339
12400
  install: Vue => {
12340
12401
  Vue.component(Minimize$1.name, Minimize$1);
12341
- }
12402
+ },
12403
+ Minimize: Minimize$1
12342
12404
  };
12343
12405
 
12344
12406
  //