@94ai/nf-search-form 8.0.22 → 8.0.23

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.
@@ -559,6 +559,13 @@ __sfc_main$3.setup = (__props, __ctx) => {
559
559
  var _a2, _b;
560
560
  if ((_b = (_a2 = props.itemOptions) == null ? void 0 : _a2.events) == null ? void 0 : _b.keyup) {
561
561
  props.itemOptions.events.keyup(event, instance);
562
+ } else if (typeof event === "string") {
563
+ currentVal.value = event.trim();
564
+ }
565
+ };
566
+ const trimInput = (event) => {
567
+ if (typeof event.target.value === "string") {
568
+ event.target.value = event.target.value.trim();
562
569
  }
563
570
  };
564
571
  return {
@@ -600,7 +607,8 @@ __sfc_main$3.setup = (__props, __ctx) => {
600
607
  isNumberRange,
601
608
  isTransferSelect,
602
609
  handleChange,
603
- handleInput
610
+ handleInput,
611
+ trimInput
604
612
  };
605
613
  };
606
614
  __sfc_main$3.components = Object.assign({
@@ -663,6 +671,11 @@ var _sfc_render$3 = function render3() {
663
671
  on: {
664
672
  "change": _vm.handleChange
665
673
  },
674
+ nativeOn: {
675
+ "input": function($event) {
676
+ return _vm.trimInput.apply(null, arguments);
677
+ }
678
+ },
666
679
  model: {
667
680
  value: _vm.currentVal,
668
681
  callback: function($$v) {
@@ -679,6 +692,11 @@ var _sfc_render$3 = function render3() {
679
692
  on: {
680
693
  "change": _vm.handleChange
681
694
  },
695
+ nativeOn: {
696
+ "input": function($event) {
697
+ return _vm.trimInput.apply(null, arguments);
698
+ }
699
+ },
682
700
  model: {
683
701
  value: _vm.currentVal,
684
702
  callback: function($$v) {
@@ -557,6 +557,13 @@ __sfc_main$3.setup = (__props, __ctx) => {
557
557
  var _a2, _b;
558
558
  if ((_b = (_a2 = props.itemOptions) == null ? void 0 : _a2.events) == null ? void 0 : _b.keyup) {
559
559
  props.itemOptions.events.keyup(event, instance);
560
+ } else if (typeof event === "string") {
561
+ currentVal.value = event.trim();
562
+ }
563
+ };
564
+ const trimInput = (event) => {
565
+ if (typeof event.target.value === "string") {
566
+ event.target.value = event.target.value.trim();
560
567
  }
561
568
  };
562
569
  return {
@@ -598,7 +605,8 @@ __sfc_main$3.setup = (__props, __ctx) => {
598
605
  isNumberRange,
599
606
  isTransferSelect,
600
607
  handleChange,
601
- handleInput
608
+ handleInput,
609
+ trimInput
602
610
  };
603
611
  };
604
612
  __sfc_main$3.components = Object.assign({
@@ -661,6 +669,11 @@ var _sfc_render$3 = function render3() {
661
669
  on: {
662
670
  "change": _vm.handleChange
663
671
  },
672
+ nativeOn: {
673
+ "input": function($event) {
674
+ return _vm.trimInput.apply(null, arguments);
675
+ }
676
+ },
664
677
  model: {
665
678
  value: _vm.currentVal,
666
679
  callback: function($$v) {
@@ -677,6 +690,11 @@ var _sfc_render$3 = function render3() {
677
690
  on: {
678
691
  "change": _vm.handleChange
679
692
  },
693
+ nativeOn: {
694
+ "input": function($event) {
695
+ return _vm.trimInput.apply(null, arguments);
696
+ }
697
+ },
680
698
  model: {
681
699
  value: _vm.currentVal,
682
700
  callback: function($$v) {
@@ -31,6 +31,7 @@
31
31
  </el-input-number>
32
32
 
33
33
  <nf-virtual-select
34
+ @input.native="trimInput"
34
35
  v-if="isSelect"
35
36
  :width="width"
36
37
  v-model="currentVal"
@@ -42,6 +43,7 @@
42
43
  />
43
44
 
44
45
  <nf-lazy-select
46
+ @input.native="trimInput"
45
47
  v-if="isLazySelect"
46
48
  :width="width"
47
49
  v-model="currentVal"
@@ -580,7 +582,14 @@ const handleChange = (event) => {
580
582
  const handleInput = (event) => {
581
583
  if (props.itemOptions?.events?.keyup) { // 新增keyup事件
582
584
  props.itemOptions.events.keyup(event, instance)
585
+ } else if (typeof event === 'string') {
586
+ currentVal.value = event.trim()
583
587
  }
584
588
  }
585
589
 
590
+ const trimInput = (event) => { // 表单类trim左右空格方便复制粘贴
591
+ if (typeof event.target.value === 'string') {
592
+ event.target.value = event.target.value.trim()
593
+ }
594
+ }
586
595
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-search-form",
3
- "version": "8.0.22",
3
+ "version": "8.0.23",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "zoujiahe <zoujiahe@94ai.com>",
@@ -14,23 +14,23 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/common-constants": "^8.0.22",
18
- "@94ai/common-utils": "^8.0.22",
19
- "@94ai/nf-button": "^8.0.22",
20
- "@94ai/nf-double-half-year": "^8.0.22",
21
- "@94ai/nf-double-quarter": "^8.0.22",
22
- "@94ai/nf-double-week": "^8.0.22",
23
- "@94ai/nf-double-year": "^8.0.22",
24
- "@94ai/nf-drawer": "^8.0.22",
25
- "@94ai/nf-form": "^8.0.22",
26
- "@94ai/nf-form-item": "^8.0.22",
27
- "@94ai/nf-half-year-picker": "^8.0.22",
28
- "@94ai/nf-lazy-select": "^8.0.22",
29
- "@94ai/nf-message": "^8.0.22",
30
- "@94ai/nf-quarter-picker": "^8.0.22",
31
- "@94ai/nf-theme-chalk": "^8.0.22",
32
- "@94ai/nf-transfer-select": "^8.0.22",
33
- "@94ai/nf-virtual-select": "^8.0.22",
17
+ "@94ai/common-constants": "^8.0.23",
18
+ "@94ai/common-utils": "^8.0.23",
19
+ "@94ai/nf-button": "^8.0.23",
20
+ "@94ai/nf-double-half-year": "^8.0.23",
21
+ "@94ai/nf-double-quarter": "^8.0.23",
22
+ "@94ai/nf-double-week": "^8.0.23",
23
+ "@94ai/nf-double-year": "^8.0.23",
24
+ "@94ai/nf-drawer": "^8.0.23",
25
+ "@94ai/nf-form": "^8.0.23",
26
+ "@94ai/nf-form-item": "^8.0.23",
27
+ "@94ai/nf-half-year-picker": "^8.0.23",
28
+ "@94ai/nf-lazy-select": "^8.0.23",
29
+ "@94ai/nf-message": "^8.0.23",
30
+ "@94ai/nf-quarter-picker": "^8.0.23",
31
+ "@94ai/nf-theme-chalk": "^8.0.23",
32
+ "@94ai/nf-transfer-select": "^8.0.23",
33
+ "@94ai/nf-virtual-select": "^8.0.23",
34
34
  "idb-keyval": "^6.2.1",
35
35
  "resize-observer-polyfill": "^1.5.1",
36
36
  "vue-demi": "^0.14.5",
@@ -50,5 +50,5 @@
50
50
  "types": "lib/index.d.ts",
51
51
  "main": "lib/nf-search-form.cjs.js",
52
52
  "module": "lib/nf-search-form.esm-bundler.js",
53
- "gitHead": "8d6fc09a3962c23a15a18da515aadf2cb02a1bc3"
53
+ "gitHead": "ca1689a2c0ec736df12a5d3a2c6edc51abb2e89b"
54
54
  }