n20-common-lib 2.2.24 → 2.2.26

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n20-common-lib",
3
- "version": "2.2.24",
3
+ "version": "2.2.26",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -8,7 +8,6 @@
8
8
  :placeholder="phd"
9
9
  :clearable="isClearable"
10
10
  :validate-event="false"
11
- @clear="closeFn"
12
11
  @focus="focusFn"
13
12
  @input="inputFn"
14
13
  @blur="blurFn"
@@ -117,7 +116,7 @@ export default {
117
116
  let i_f = this.format.indexOf('.')
118
117
  return i_f === -1 ? 0 : this.format.length - i_f - 1
119
118
  }
120
- if (this.dNum) {
119
+ if (this.dNum || this.dNum === 0) {
121
120
  return this.dNum
122
121
  }
123
122
  if (this.type === 'rate') {
@@ -197,9 +196,12 @@ export default {
197
196
  let val = N(valStr)
198
197
  if (isNaN(val)) {
199
198
  this.valueStr = ''
200
- this.$emit('input', undefined)
201
- this.$emit('change', undefined)
202
- this.dispatch('ElFormItem', 'el.form.change', [undefined])
199
+ let oVal = this.value
200
+ if (oVal || oVal === 0) {
201
+ this.$emit('input', undefined)
202
+ this.$emit('change', undefined)
203
+ this.dispatch('ElFormItem', 'el.form.change', [undefined])
204
+ }
203
205
  return
204
206
  }
205
207
 
@@ -225,15 +227,13 @@ export default {
225
227
 
226
228
  this.$nextTick(() => {
227
229
  let nVar = Number(nStr)
228
- this.$emit('input', nVar)
229
- this.$emit('change', nVar)
230
-
231
- this.dispatch('ElFormItem', 'el.form.change', [nVar])
230
+ let oVal = this.value
231
+ if (oVal !== nVar) {
232
+ this.$emit('input', nVar)
233
+ this.$emit('change', nVar)
234
+ this.dispatch('ElFormItem', 'el.form.change', [nVar])
235
+ }
232
236
  })
233
- },
234
- closeFn() {
235
- this.$emit('input', undefined)
236
- this.$emit('change', undefined)
237
237
  }
238
238
  }
239
239
  }
@@ -19,8 +19,7 @@
19
19
  />
20
20
  <!-- <el-divider class="header-wrap-logo-hr" direction="vertical" /> -->
21
21
  <div class="m-l-m"></div>
22
- <!-- eslint-disable-next-line vue/no-v-html -->
23
- <h3 class="header-title m-r-auto" v-html="headerTitle"></h3>
22
+ <h3 class="header-title m-r-auto">{{ headerTitle | $l }}</h3>
24
23
  <!-- YSCW -->
25
24
  <slot name="header-ectad">
26
25
  <sapn v-if="ectad" class="f-s-s">
@@ -19,8 +19,7 @@
19
19
  />
20
20
  <!-- <el-divider class="header-wrap-logo-hr" direction="vertical" /> -->
21
21
  <div class="m-l-m"></div>
22
- <!-- eslint-disable-next-line vue/no-v-html -->
23
- <h3 class="header-title m-r-auto" v-html="headerTitle"></h3>
22
+ <h3 class="header-title m-r-auto">{{ headerTitle | $l }}</h3>
24
23
  <span v-if="byLabel && !inBack" class="header-uif-by">{{ byLabel }}</span>
25
24
  <!-- YSCW -->
26
25
  <slot name="header-ectad">
@@ -84,7 +83,7 @@
84
83
  <div class="uby-h flex-box flex-v">
85
84
  <i class="uby-h-icon iconfont icon-icon_huanyingmoshi"></i>
86
85
  <span
87
- >{{ '欢迎使用' | $lc }}<span>{{ headerTitle }}</span
86
+ >{{ '欢迎使用' | $lc }}<span>{{ headerTitle | $l }}</span
88
87
  >!</span
89
88
  >
90
89
  </div>
@@ -16,7 +16,7 @@ export function setRela() {
16
16
  let _relaNos = getItem('relaNos') // sessionStorage.getItem('relaNos')
17
17
  if (_relaNos) {
18
18
  let relaNos = _relaNos
19
- relaObj = relaNos.find((r) => r.appNo === name)
19
+ relaObj = relaNos.find((r) => r.appNo === name) || { appNo: name, relaNos: [] }
20
20
  let relaNosG = getItem('relaNosGlobal')
21
21
 
22
22
  console.log({ relaObj, relaNosGlobal: relaNosG }, 'has权限列表')
@@ -30,8 +30,11 @@ export function setRela() {
30
30
  forEachs(resources, (item) => {
31
31
  relaNos.push(item.relaNo)
32
32
  })
33
- relaObj.relaNos = relaNos
34
- relaObj.relaNosGlobal = relaNos
33
+ relaObj = {
34
+ appNo: name,
35
+ relaNos: relaNos,
36
+ relaNosGlobal: relaNos
37
+ }
35
38
  }
36
39
  }
37
40