imeik-bizui 2.2.4 → 2.2.5

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.
@@ -69,6 +69,10 @@ export default {
69
69
  },
70
70
  diffValue() {
71
71
  return this.attrs.diffValue || ''
72
+ },
73
+ // 禁止输入表情
74
+ noEmoji() {
75
+ return this.attrs.noEmoji || false
72
76
  }
73
77
  },
74
78
  watch: {
@@ -94,6 +98,9 @@ export default {
94
98
  this.myValue = this.value
95
99
  },
96
100
  onInput() {
101
+ if (this.noEmoji) {
102
+ this.myValue = this.myValue.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, '')
103
+ }
97
104
  this.$emit('input', this.myValue)
98
105
  },
99
106
  onEnter(e) {