imeik-bizui 2.2.3 → 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.
@@ -29,6 +29,11 @@
29
29
  import { queryBudgetDepartManage } from '../../api/applycenter.js'
30
30
  export default {
31
31
  name: 'FieldCostBearDepartmentSelect',
32
+ inject: {
33
+ isConfig: {
34
+ default: false
35
+ }
36
+ },
32
37
  props: {
33
38
  value: {
34
39
  type: String,
@@ -179,8 +184,8 @@ export default {
179
184
  } else if (defaultType === '3') {
180
185
  tempValue = this.attrs.defaultValue
181
186
  }
182
- // 设置默认值并触发change事件
183
- if (tempValue && !this.value) {
187
+ // 当tempValue有值且没有初始值时,或者是在配置模式下,则设置默认值并触发change事件
188
+ if ((tempValue && !this.value) || this.isConfig) {
184
189
  this.myValue = tempValue
185
190
  this.onChange()
186
191
  }
@@ -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) {