n20-common-lib 2.6.4 → 2.6.6

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.6.4",
3
+ "version": "2.6.6",
4
4
  "private": false,
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -241,6 +241,14 @@ export default {
241
241
  loginTypes() {
242
242
  this.theType = this.loginTypes[0]
243
243
  },
244
+ showImageCode: {
245
+ handler(val) {
246
+ if (val) {
247
+ this.getImgCode()
248
+ }
249
+ },
250
+ immediate: true
251
+ },
244
252
  theType: {
245
253
  handler() {
246
254
  this.getImgCode()
@@ -191,7 +191,11 @@ export function evaluate(evalStr = '', decimal = 10, proceDecimal) {
191
191
  * @return {string}
192
192
  */
193
193
  export const subFixed = function (n, decimal = 6) {
194
- return XEUtils.toFixed(n, decimal)
194
+ if (n === undefined || n === null || n === '') {
195
+ return ''
196
+ } else {
197
+ return XEUtils.toFixed(n, decimal)
198
+ }
195
199
  }
196
200
  /**
197
201
  * 将数字或字符串格式的数字转换为千位分隔符格式的字符串