@weitutech/by-components 1.1.168 → 1.1.171

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.
@@ -74274,6 +74274,7 @@ __webpack_require__.r(__webpack_exports__);
74274
74274
  __webpack_require__.d(__webpack_exports__, {
74275
74275
  ByBatchQuerySelector: function() { return /* reexport */ BatchQuerySelector; },
74276
74276
  ByCascaderPanel: function() { return /* reexport */ ByCascaderPanel; },
74277
+ ByCommonInput: function() { return /* reexport */ ByCommonInput; },
74277
74278
  ByCommonSelector: function() { return /* reexport */ ByCommonSelector; },
74278
74279
  ByCustomDatePicker: function() { return /* reexport */ custom_date_picker; },
74279
74280
  ByDatePickerRange: function() { return /* reexport */ date_picker_range; },
@@ -77486,8 +77487,8 @@ var table_component = normalizeComponent(
77486
77487
  )
77487
77488
 
77488
77489
  /* harmony default export */ var table = (table_component.exports);
77489
- ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5daa4f39-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/form.vue?vue&type=template&id=0cd9964a&scoped=true
77490
- var formvue_type_template_id_0cd9964a_scoped_true_render = function render() {
77490
+ ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5daa4f39-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/form.vue?vue&type=template&id=1d47f926&scoped=true
77491
+ var formvue_type_template_id_1d47f926_scoped_true_render = function render() {
77491
77492
  var _vm = this,
77492
77493
  _c = _vm._self._c;
77493
77494
  return _c('div', {
@@ -77573,7 +77574,29 @@ var formvue_type_template_id_0cd9964a_scoped_true_render = function render() {
77573
77574
  }
77574
77575
  });
77575
77576
  }), 1) : _vm._e()];
77576
- }) : _vm._e(), _vm._t("suffix"), _vm._t("prepend"), _vm._t("append")], 2)] : item.type === 'select' ? [_c('by-select', _vm._b({
77577
+ }) : _vm._e(), _vm._t("suffix"), _vm._t("prepend"), _vm._t("append")], 2)] : item.type === 'commonInput' ? [_c('by-common-input', _vm._b({
77578
+ staticStyle: {
77579
+ "width": "100%"
77580
+ },
77581
+ attrs: {
77582
+ "value": _vm.value[`${item.field}`],
77583
+ "placeholder": item.placeholder,
77584
+ "size": item.size || _vm.elSize,
77585
+ "show-batch-input": item.showBatchInput,
77586
+ "batch-input-popover-title": item.batchInputPopoverTitle || '批量输入',
77587
+ "batch-input-placeholder": item.batchInputPlaceholder || '多个请用换行、逗号、分号、空格分隔',
77588
+ "batch-input-popover-width": item.batchInputPopoverWidth || '300',
77589
+ "clearable": ""
77590
+ },
77591
+ on: {
77592
+ "input": function ($event) {
77593
+ return _vm.handleValueChange($event, item);
77594
+ },
77595
+ "batch-input": function ($event) {
77596
+ return _vm.handleValueChange($event, item);
77597
+ }
77598
+ }
77599
+ }, 'by-common-input', item.otherOptions || {}, false))] : item.type === 'select' ? [_c('by-select', _vm._b({
77577
77600
  staticStyle: {
77578
77601
  "width": "100%"
77579
77602
  },
@@ -77857,7 +77880,7 @@ var formvue_type_template_id_0cd9964a_scoped_true_render = function render() {
77857
77880
  staticClass: "footer"
77858
77881
  }, [_vm._t("footer")], 2)], 1);
77859
77882
  };
77860
- var formvue_type_template_id_0cd9964a_scoped_true_staticRenderFns = [];
77883
+ var formvue_type_template_id_1d47f926_scoped_true_staticRenderFns = [];
77861
77884
 
77862
77885
  ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5daa4f39-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/comps/pair-number-input.vue?vue&type=template&id=604235f6
77863
77886
  var pair_number_inputvue_type_template_id_604235f6_render = function render() {
@@ -78157,8 +78180,8 @@ var custom_date_picker_component = normalizeComponent(
78157
78180
  )
78158
78181
 
78159
78182
  /* harmony default export */ var custom_date_picker = (custom_date_picker_component.exports);
78160
- ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5daa4f39-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/common-selector/ByCommonSelector.vue?vue&type=template&id=53a73a0f
78161
- var ByCommonSelectorvue_type_template_id_53a73a0f_render = function render() {
78183
+ ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5daa4f39-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/common-selector/ByCommonSelector.vue?vue&type=template&id=05ec4584
78184
+ var ByCommonSelectorvue_type_template_id_05ec4584_render = function render() {
78162
78185
  var _vm = this,
78163
78186
  _c = _vm._self._c;
78164
78187
  return _c('div', {
@@ -78750,7 +78773,7 @@ var ByCommonSelectorvue_type_template_id_53a73a0f_render = function render() {
78750
78773
  }
78751
78774
  }, [_vm._v(" 加载中... ")]) : _vm._e()], 2);
78752
78775
  };
78753
- var ByCommonSelectorvue_type_template_id_53a73a0f_staticRenderFns = [];
78776
+ var ByCommonSelectorvue_type_template_id_05ec4584_staticRenderFns = [];
78754
78777
 
78755
78778
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.some.js
78756
78779
  var es_iterator_some = __webpack_require__(3579);
@@ -89409,18 +89432,22 @@ const allOptionsNames = ['全部', '全选', '所有', '全部选项', 'All', 'a
89409
89432
  if (this.multiple) {
89410
89433
  // 多选情况:value 是数组
89411
89434
  if (Array.isArray(this.value) && this.value.length > 0) {
89412
- const defaultItems = this.enhancedAllOptions.filter(option => this.value.some(val => isValueEqual(val, option.id)));
89435
+ const defaultItems = this.normalizedEnhancedAllOptions.filter(option => this.value.some(val => isValueEqual(val, option.id)));
89413
89436
  return defaultItems;
89414
89437
  }
89415
89438
  } else {
89416
89439
  // 单选情况:value 是单个值
89417
89440
  if (this.value !== '') {
89418
- const defaultItem = this.enhancedAllOptions.find(option => isValueEqual(this.value, option.id));
89441
+ const defaultItem = this.normalizedEnhancedAllOptions.find(option => isValueEqual(this.value, option.id));
89419
89442
  return defaultItem ? [defaultItem] : [];
89420
89443
  }
89421
89444
  }
89422
89445
  }
89423
89446
  return this.dataList;
89447
+ },
89448
+ // 标准化后的 enhancedAllOptions(将 value/label 转为 id/name)
89449
+ normalizedEnhancedAllOptions() {
89450
+ return this.normalizeOptions(this.enhancedAllOptions || []);
89424
89451
  }
89425
89452
  },
89426
89453
  watch: {
@@ -89460,12 +89487,15 @@ const allOptionsNames = ['全部', '全选', '所有', '全部选项', 'All', 'a
89460
89487
  },
89461
89488
  options: {
89462
89489
  handler(newOptions, oldOptions) {
89490
+ // 标准化数据格式(将 value/label 转为 id/name)
89491
+ const normalizedOptions = this.normalizeOptions(newOptions || []);
89492
+
89463
89493
  // enhancedSelect 类型的特殊处理
89464
89494
  if (this.type === 'enhancedSelect') {
89465
- this.dataList = newOptions;
89495
+ this.dataList = normalizedOptions;
89466
89496
  // 更新缓存
89467
89497
  this.allData.clear();
89468
- newOptions.forEach(item => {
89498
+ normalizedOptions.forEach(item => {
89469
89499
  this.allData.set(item.id, item);
89470
89500
  });
89471
89501
  // 数据更新后,自动关闭加载状态
@@ -89480,7 +89510,7 @@ const allOptionsNames = ['全部', '全选', '所有', '全部选项', 'All', 'a
89480
89510
 
89481
89511
  // 其他类型的处理
89482
89512
  if (!this.loadOptions) {
89483
- this.localOptions = [...this.options];
89513
+ this.localOptions = [...normalizedOptions];
89484
89514
 
89485
89515
  // 判断数据总量是否变化
89486
89516
  const oldLength = oldOptions ? oldOptions.length : 0;
@@ -89534,7 +89564,7 @@ const allOptionsNames = ['全部', '全选', '所有', '全部选项', 'All', 'a
89534
89564
  return;
89535
89565
  }
89536
89566
 
89537
- // 当 enhancedAllOptions 加载完成后,重新处理默认值
89567
+ // 当 enhancedAllOptions 加载完成后,重新处理默认值(normalizedEnhancedAllOptions computed 会自动转换)
89538
89568
  this.$nextTick(() => {
89539
89569
  this.handleEnhancedSelectDefaultValue();
89540
89570
  this.enhancedDisabled = false;
@@ -89578,6 +89608,46 @@ const allOptionsNames = ['全部', '全选', '所有', '全部选项', 'All', 'a
89578
89608
  this.clearAllCheckTimers();
89579
89609
  },
89580
89610
  methods: {
89611
+ // 标准化选项数据格式:将 value/label 转换为 id/name(如果数据中没有 id/name)
89612
+ normalizeOptions(options) {
89613
+ if (!Array.isArray(options) || options.length === 0) {
89614
+ return options;
89615
+ }
89616
+
89617
+ // 检查第一个选项是否同时包含 id 和 name
89618
+ const firstItem = options[0];
89619
+ const hasIdName = firstItem && 'id' in firstItem && 'name' in firstItem;
89620
+
89621
+ // 如果已经有 id 和 name,直接返回(不修改原数据)
89622
+ if (hasIdName) {
89623
+ return options;
89624
+ }
89625
+
89626
+ // 检查是否有 value 和 label
89627
+ const hasValueLabel = firstItem && 'value' in firstItem && 'label' in firstItem;
89628
+
89629
+ // 如果有 value 和 label,进行转换
89630
+ if (hasValueLabel) {
89631
+ return options.map(item => {
89632
+ const normalized = {
89633
+ ...item
89634
+ };
89635
+ // 将 value 转为 id(如果 id 不存在)
89636
+ if ('value' in item && !('id' in item)) {
89637
+ normalized.id = item.value;
89638
+ }
89639
+ // 将 label 转为 name(如果 name 不存在)
89640
+ if ('label' in item && !('name' in item)) {
89641
+ normalized.name = item.label;
89642
+ }
89643
+ return normalized;
89644
+ });
89645
+ }
89646
+
89647
+ // 如果既没有完整的 id/name 也没有完整的 value/label,返回原数据
89648
+ // 这种情况在原有代码中也会有问题,不是本次修改引入的
89649
+ return options;
89650
+ },
89581
89651
  // 清除所有检查定时器
89582
89652
  clearAllCheckTimers() {
89583
89653
  // 清除所有检查定时器
@@ -89710,7 +89780,8 @@ const allOptionsNames = ['全部', '全选', '所有', '全部选项', 'All', 'a
89710
89780
  this.loading = true;
89711
89781
  const result = await this.loadOptions();
89712
89782
  if (Array.isArray(result)) {
89713
- this.localOptions = result;
89783
+ // 标准化数据格式(将 value/label 转为 id/name)
89784
+ this.localOptions = this.normalizeOptions(result);
89714
89785
  this.initData();
89715
89786
 
89716
89787
  // 数据加载完成后检查是否需要展开按钮
@@ -89732,10 +89803,12 @@ const allOptionsNames = ['全部', '全选', '所有', '全部选项', 'All', 'a
89732
89803
  initData() {
89733
89804
  // enhancedSelect 类型的特殊处理
89734
89805
  if (this.type === 'enhancedSelect') {
89735
- this.dataList = this.options;
89806
+ // 标准化数据格式(将 value/label 转为 id/name)
89807
+ const normalizedOptions = this.normalizeOptions(this.options || []);
89808
+ this.dataList = normalizedOptions;
89736
89809
  this.selectedValue = this.value;
89737
89810
  // 缓存所有数据
89738
- this.options.forEach(item => {
89811
+ normalizedOptions.forEach(item => {
89739
89812
  this.allData.set(item.id, item);
89740
89813
  });
89741
89814
  return;
@@ -89898,14 +89971,14 @@ const allOptionsNames = ['全部', '全选', '所有', '全部选项', 'All', 'a
89898
89971
  // 修复:优先从 enhancedAllOptions 中查找,确保多选时能正确获取对象数组
89899
89972
  if (Array.isArray(value) && value.length > 0) {
89900
89973
  // 从 enhancedAllOptions 中查找所有匹配的选项
89901
- const items = this.enhancedAllOptions.filter(option => value.some(val => isValueEqual(val, option.id)));
89974
+ const items = this.normalizedEnhancedAllOptions.filter(option => value.some(val => isValueEqual(val, option.id)));
89902
89975
  obj = items;
89903
89976
  }
89904
89977
  } else {
89905
89978
  obj = {};
89906
89979
  if (value !== undefined && value !== null && value !== '') {
89907
89980
  // 优先从 enhancedAllOptions 中查找
89908
- const item = this.enhancedAllOptions.find(option => isValueEqual(value, option.id));
89981
+ const item = this.normalizedEnhancedAllOptions.find(option => isValueEqual(value, option.id));
89909
89982
  if (item) {
89910
89983
  obj[this.enhancedDescriptionKey] = item[this.enhancedDescriptionKey];
89911
89984
  obj[this.enhancedTitleKey] = item[this.enhancedTitleKey];
@@ -90019,19 +90092,19 @@ const allOptionsNames = ['全部', '全选', '所有', '全部选项', 'All', 'a
90019
90092
  },
90020
90093
  // 处理 enhancedSelect 类型的默认值
90021
90094
  handleEnhancedSelectDefaultValue() {
90022
- if (this.value !== undefined && this.value !== null && this.value !== '' && this.enhancedAllOptions && this.enhancedAllOptions.length > 0) {
90095
+ if (this.value !== undefined && this.value !== null && this.value !== '' && this.normalizedEnhancedAllOptions && this.normalizedEnhancedAllOptions.length > 0) {
90023
90096
  // 确保默认值能正确显示
90024
90097
  this.selectedValue = this.value;
90025
90098
  if (this.multiple) {
90026
90099
  if (Array.isArray(this.value) && this.value.length > 0) {
90027
- const items = this.enhancedAllOptions.filter(option => this.value.some(val => isValueEqual(val, option.id)));
90100
+ const items = this.normalizedEnhancedAllOptions.filter(option => this.value.some(val => isValueEqual(val, option.id)));
90028
90101
  if (items.length > 0) {
90029
90102
  this.$emit('input', this.value);
90030
90103
  this.$emit('change', items);
90031
90104
  }
90032
90105
  }
90033
90106
  } else {
90034
- const item = this.enhancedAllOptions.find(option => isValueEqual(this.value, option.id));
90107
+ const item = this.normalizedEnhancedAllOptions.find(option => isValueEqual(this.value, option.id));
90035
90108
  if (item) {
90036
90109
  let obj = {};
90037
90110
  obj[this.enhancedDescriptionKey] = item[this.enhancedDescriptionKey];
@@ -90215,8 +90288,8 @@ const allOptionsNames = ['全部', '全选', '所有', '全部选项', 'All', 'a
90215
90288
  ;
90216
90289
  var ByCommonSelector_component = normalizeComponent(
90217
90290
  common_selector_ByCommonSelectorvue_type_script_lang_js,
90218
- ByCommonSelectorvue_type_template_id_53a73a0f_render,
90219
- ByCommonSelectorvue_type_template_id_53a73a0f_staticRenderFns,
90291
+ ByCommonSelectorvue_type_template_id_05ec4584_render,
90292
+ ByCommonSelectorvue_type_template_id_05ec4584_staticRenderFns,
90220
90293
  false,
90221
90294
  null,
90222
90295
  null,
@@ -90911,6 +90984,261 @@ var BatchQuerySelector_component = normalizeComponent(
90911
90984
  )
90912
90985
 
90913
90986
  /* harmony default export */ var BatchQuerySelector = (BatchQuerySelector_component.exports);
90987
+ ;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5daa4f39-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/common-input/ByCommonInput.vue?vue&type=template&id=71d628fa
90988
+ var ByCommonInputvue_type_template_id_71d628fa_render = function render() {
90989
+ var _vm = this,
90990
+ _c = _vm._self._c;
90991
+ return _c('div', {
90992
+ staticClass: "by-common-input-container"
90993
+ }, [_c('el-input', _vm._b({
90994
+ attrs: {
90995
+ "value": _vm.localValue,
90996
+ "size": _vm.actualSize
90997
+ },
90998
+ on: {
90999
+ "input": _vm.handleInput,
91000
+ "change": _vm.handleChange,
91001
+ "blur": _vm.handleBlur,
91002
+ "focus": _vm.handleFocus
91003
+ }
91004
+ }, 'el-input', _vm.$attrs, false)), _vm.showBatchInput ? _c('el-popover', {
91005
+ attrs: {
91006
+ "placement": "bottom-end",
91007
+ "width": _vm.batchInputPopoverWidth,
91008
+ "trigger": "click",
91009
+ "popper-class": "batch-input-popover"
91010
+ },
91011
+ model: {
91012
+ value: _vm.popoverVisible,
91013
+ callback: function ($$v) {
91014
+ _vm.popoverVisible = $$v;
91015
+ },
91016
+ expression: "popoverVisible"
91017
+ }
91018
+ }, [_c('div', {
91019
+ staticClass: "batch-input-container"
91020
+ }, [_c('div', {
91021
+ staticClass: "popover-title"
91022
+ }, [_vm._v(_vm._s(_vm.batchInputPopoverTitle))]), _c('el-input', {
91023
+ staticClass: "batch-input-textarea",
91024
+ attrs: {
91025
+ "type": "textarea",
91026
+ "rows": 10,
91027
+ "placeholder": _vm.batchInputPlaceholder
91028
+ },
91029
+ model: {
91030
+ value: _vm.batchInputContent,
91031
+ callback: function ($$v) {
91032
+ _vm.batchInputContent = $$v;
91033
+ },
91034
+ expression: "batchInputContent"
91035
+ }
91036
+ }), _c('div', {
91037
+ staticClass: "popover-footer"
91038
+ }, [_c('el-button', {
91039
+ attrs: {
91040
+ "size": "mini"
91041
+ },
91042
+ on: {
91043
+ "click": _vm.handleCancel
91044
+ }
91045
+ }, [_vm._v("取消")]), _c('el-button', {
91046
+ attrs: {
91047
+ "size": "mini",
91048
+ "type": "primary"
91049
+ },
91050
+ on: {
91051
+ "click": _vm.handleBatchInputConfirm
91052
+ }
91053
+ }, [_vm._v("确定")])], 1)], 1), _c('el-button', {
91054
+ staticClass: "batch-input-btn",
91055
+ attrs: {
91056
+ "slot": "reference",
91057
+ "size": _vm.actualSize
91058
+ },
91059
+ on: {
91060
+ "click": _vm.handleOpenBatchInput
91061
+ },
91062
+ slot: "reference"
91063
+ }, [_c('i', {
91064
+ staticClass: "el-icon-edit-outline",
91065
+ staticStyle: {
91066
+ "transform": "scale(2)",
91067
+ "display": "inline-block"
91068
+ }
91069
+ })])], 1) : _vm._e()], 1);
91070
+ };
91071
+ var ByCommonInputvue_type_template_id_71d628fa_staticRenderFns = [];
91072
+
91073
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/common-input/ByCommonInput.vue?vue&type=script&lang=js
91074
+
91075
+
91076
+
91077
+ /* harmony default export */ var ByCommonInputvue_type_script_lang_js = ({
91078
+ name: 'ByCommonInput',
91079
+ inheritAttrs: false,
91080
+ props: {
91081
+ /**
91082
+ * 输入框的值
91083
+ */
91084
+ value: {
91085
+ type: [String, Number],
91086
+ default: ''
91087
+ },
91088
+ /**
91089
+ * 是否显示批量输入按钮
91090
+ */
91091
+ showBatchInput: {
91092
+ type: Boolean,
91093
+ default: false
91094
+ },
91095
+ /**
91096
+ * 批量输入弹窗的标题
91097
+ */
91098
+ batchInputPopoverTitle: {
91099
+ type: String,
91100
+ default: '批量输入'
91101
+ },
91102
+ /**
91103
+ * 批量输入弹窗的placeholder
91104
+ */
91105
+ batchInputPlaceholder: {
91106
+ type: String,
91107
+ default: '多个请用换行、逗号、分号、空格分隔'
91108
+ },
91109
+ /**
91110
+ * 批量输入弹窗宽度
91111
+ */
91112
+ batchInputPopoverWidth: {
91113
+ type: [String, Number],
91114
+ default: '300'
91115
+ },
91116
+ /**
91117
+ * 输入框大小(用于批量输入按钮的大小)
91118
+ */
91119
+ size: {
91120
+ type: String,
91121
+ default: 'mini'
91122
+ }
91123
+ },
91124
+ data() {
91125
+ return {
91126
+ localValue: this.value,
91127
+ popoverVisible: false,
91128
+ // 批量输入弹窗是否显示
91129
+ batchInputContent: '' // 批量输入的内容
91130
+ };
91131
+ },
91132
+ computed: {
91133
+ // 获取实际的 size 值,优先使用 $attrs 中的 size
91134
+ actualSize() {
91135
+ return this.$attrs.size || this.size;
91136
+ }
91137
+ },
91138
+ watch: {
91139
+ value(newVal) {
91140
+ if (newVal !== this.localValue) {
91141
+ this.localValue = newVal;
91142
+ }
91143
+ }
91144
+ },
91145
+ methods: {
91146
+ /**
91147
+ * 处理输入事件
91148
+ */
91149
+ handleInput(value) {
91150
+ this.localValue = value;
91151
+ this.$emit('input', value);
91152
+ },
91153
+ /**
91154
+ * 处理change事件
91155
+ */
91156
+ handleChange(value) {
91157
+ this.$emit('change', value);
91158
+ },
91159
+ /**
91160
+ * 处理blur事件
91161
+ */
91162
+ handleBlur(event) {
91163
+ this.$emit('blur', event);
91164
+ },
91165
+ /**
91166
+ * 处理focus事件
91167
+ */
91168
+ handleFocus(event) {
91169
+ this.$emit('focus', event);
91170
+ },
91171
+ /**
91172
+ * 打开批量输入弹窗时,回显输入框的内容
91173
+ */
91174
+ handleOpenBatchInput() {
91175
+ // 将输入框的内容回显到批量输入弹窗中
91176
+ if (this.localValue) {
91177
+ // 将逗号分隔的内容转换为换行分隔,便于在文本框中编辑
91178
+ this.batchInputContent = String(this.localValue).split(',').map(item => item.trim()).filter(item => item).join('\n');
91179
+ } else {
91180
+ this.batchInputContent = '';
91181
+ }
91182
+ },
91183
+ /**
91184
+ * 处理批量输入确认
91185
+ */
91186
+ handleBatchInputConfirm() {
91187
+ this.popoverVisible = false;
91188
+ this.batchInputContent = this.batchInputContent.trim();
91189
+
91190
+ // 将批量输入的内容设置到输入框中,用英文逗号分隔
91191
+ if (this.batchInputContent) {
91192
+ // 处理输入内容,支持多种分隔符(换行、逗号、分号、空格)
91193
+ const items = this.batchInputContent.split(/[\n,,;;\s]+/) // 支持换行、逗号(中英文)、分号(中英文)、空格分隔
91194
+ .map(item => item.trim()).filter(item => item); // 过滤空项
91195
+
91196
+ // 将处理后的内容用英文逗号连接,设置到输入框
91197
+ const processedContent = items.join(',');
91198
+ this.localValue = processedContent;
91199
+ this.$emit('input', processedContent);
91200
+ this.$emit('change', processedContent);
91201
+ this.$emit('batch-input', this.batchInputContent, processedContent);
91202
+ } else {
91203
+ // 如果批量输入内容为空,清空输入框
91204
+ this.localValue = '';
91205
+ this.$emit('input', '');
91206
+ this.$emit('change', '');
91207
+ this.$emit('batch-input', '', '');
91208
+ }
91209
+ },
91210
+ /**
91211
+ * 处理取消按钮
91212
+ */
91213
+ handleCancel() {
91214
+ this.popoverVisible = false;
91215
+ // 清空批量输入内容
91216
+ this.batchInputContent = '';
91217
+ }
91218
+ }
91219
+ });
91220
+ ;// ./src/components/common-input/ByCommonInput.vue?vue&type=script&lang=js
91221
+ /* harmony default export */ var common_input_ByCommonInputvue_type_script_lang_js = (ByCommonInputvue_type_script_lang_js);
91222
+ ;// ./src/components/common-input/ByCommonInput.vue
91223
+
91224
+
91225
+
91226
+
91227
+
91228
+ /* normalize component */
91229
+ ;
91230
+ var ByCommonInput_component = normalizeComponent(
91231
+ common_input_ByCommonInputvue_type_script_lang_js,
91232
+ ByCommonInputvue_type_template_id_71d628fa_render,
91233
+ ByCommonInputvue_type_template_id_71d628fa_staticRenderFns,
91234
+ false,
91235
+ null,
91236
+ null,
91237
+ null
91238
+
91239
+ )
91240
+
91241
+ /* harmony default export */ var ByCommonInput = (ByCommonInput_component.exports);
90914
91242
  ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/form.vue?vue&type=script&lang=js
90915
91243
 
90916
91244
 
@@ -90919,13 +91247,15 @@ var BatchQuerySelector_component = normalizeComponent(
90919
91247
 
90920
91248
 
90921
91249
 
91250
+
90922
91251
  /* harmony default export */ var formvue_type_script_lang_js = ({
90923
91252
  name: 'ByForm',
90924
91253
  components: {
90925
91254
  PairNumberInput: pair_number_input,
90926
91255
  CustomDatePicker: custom_date_picker,
90927
91256
  ByCommonSelector: ByCommonSelector,
90928
- ByBatchQuerySelector: BatchQuerySelector
91257
+ ByBatchQuerySelector: BatchQuerySelector,
91258
+ ByCommonInput: ByCommonInput
90929
91259
  },
90930
91260
  props: {
90931
91261
  value: {
@@ -91210,10 +91540,10 @@ var BatchQuerySelector_component = normalizeComponent(
91210
91540
  });
91211
91541
  ;// ./src/components/form/form.vue?vue&type=script&lang=js
91212
91542
  /* harmony default export */ var form_formvue_type_script_lang_js = (formvue_type_script_lang_js);
91213
- ;// ./node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/form.vue?vue&type=style&index=0&id=0cd9964a&prod&lang=scss&scoped=true
91543
+ ;// ./node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/form/form.vue?vue&type=style&index=0&id=1d47f926&prod&lang=scss&scoped=true
91214
91544
  // extracted by mini-css-extract-plugin
91215
91545
 
91216
- ;// ./src/components/form/form.vue?vue&type=style&index=0&id=0cd9964a&prod&lang=scss&scoped=true
91546
+ ;// ./src/components/form/form.vue?vue&type=style&index=0&id=1d47f926&prod&lang=scss&scoped=true
91217
91547
 
91218
91548
  ;// ./src/components/form/form.vue
91219
91549
 
@@ -91226,11 +91556,11 @@ var BatchQuerySelector_component = normalizeComponent(
91226
91556
 
91227
91557
  var form_component = normalizeComponent(
91228
91558
  form_formvue_type_script_lang_js,
91229
- formvue_type_template_id_0cd9964a_scoped_true_render,
91230
- formvue_type_template_id_0cd9964a_scoped_true_staticRenderFns,
91559
+ formvue_type_template_id_1d47f926_scoped_true_render,
91560
+ formvue_type_template_id_1d47f926_scoped_true_staticRenderFns,
91231
91561
  false,
91232
91562
  null,
91233
- "0cd9964a",
91563
+ "1d47f926",
91234
91564
  null
91235
91565
 
91236
91566
  )
@@ -96399,6 +96729,7 @@ var ByGridLayout_component = normalizeComponent(
96399
96729
 
96400
96730
 
96401
96731
 
96732
+
96402
96733
 
96403
96734
 
96404
96735
  const components = {
@@ -96418,7 +96749,8 @@ const components = {
96418
96749
  ByCascaderPanel: ByCascaderPanel,
96419
96750
  ByFloatingMenu: ByFloatingMenu,
96420
96751
  ByPopoverSelector: ByPopoverSelector,
96421
- ByGridLayout: ByGridLayout
96752
+ ByGridLayout: ByGridLayout,
96753
+ ByCommonInput: ByCommonInput
96422
96754
  };
96423
96755
 
96424
96756
  // 设置当前 z-index 起始值
@@ -1 +1 @@
1
- .b-form .header[data-v-0cd9964a]{margin-bottom:20px}.b-form .footer[data-v-0cd9964a]{margin-top:20px}
1
+ .b-form .header[data-v-1d47f926]{margin-bottom:20px}.b-form .footer[data-v-1d47f926]{margin-top:20px}