ai.touchui-vue 1.33.1 → 1.33.2

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.
@@ -26301,8 +26301,8 @@ disDirective.install = function (Vue) {
26301
26301
 
26302
26302
  dis: dis_src_directive
26303
26303
  });
26304
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=4a775748
26305
- var inputvue_type_template_id_4a775748_render = function () {
26304
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=7002140a
26305
+ var inputvue_type_template_id_7002140a_render = function () {
26306
26306
  var _vm = this
26307
26307
  var _h = _vm.$createElement
26308
26308
  var _c = _vm._self._c || _h
@@ -26701,11 +26701,11 @@ var inputvue_type_template_id_4a775748_render = function () {
26701
26701
  ]
26702
26702
  )
26703
26703
  }
26704
- var inputvue_type_template_id_4a775748_staticRenderFns = []
26705
- inputvue_type_template_id_4a775748_render._withStripped = true
26704
+ var inputvue_type_template_id_7002140a_staticRenderFns = []
26705
+ inputvue_type_template_id_7002140a_render._withStripped = true
26706
26706
 
26707
26707
 
26708
- // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=4a775748
26708
+ // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=7002140a
26709
26709
 
26710
26710
  // CONCATENATED MODULE: ./src/utils/string.js
26711
26711
  function filter(chars, from) {
@@ -27147,7 +27147,7 @@ function filter(chars, from) {
27147
27147
  if (this.inited) {
27148
27148
 
27149
27149
  // 处理 IOS 下,to-input type=number 可以输入小数点
27150
- if (this.type === 'number' && Number(this.dot) === 0 && !this.conversionType && String(this.data).indexOf('.') > -1) {
27150
+ if (this.type === 'number' && Number(this.dot) === 0 && !Number(this.conversionType) && String(this.data).indexOf('.') > -1) {
27151
27151
  this.data = this.data.replace('.', '');
27152
27152
  }
27153
27153
  if (this.spChars) {
@@ -27224,7 +27224,7 @@ function filter(chars, from) {
27224
27224
  }
27225
27225
  },
27226
27226
  inputKeyPress: function inputKeyPress(event) {
27227
- if (this.type === 'number' && !this.conversionType) {
27227
+ if (this.type === 'number' && !Number(this.conversionType)) {
27228
27228
  if ((event.keyCode !== 46 || Number(this.dot) === 0) && (event.keyCode !== 45 || Number(this.min) >= 0) && (event.keyCode < 48 || event.keyCode > 57)) {
27229
27229
  event.returnValue = false;
27230
27230
  }
@@ -27293,8 +27293,8 @@ function filter(chars, from) {
27293
27293
  this.data = 'NaN';
27294
27294
  }
27295
27295
 
27296
- if (this.conversionType) {
27297
- this.data = this.formatNumber(this.data, this.dot, this.conversionType);
27296
+ if (Number(this.conversionType)) {
27297
+ this.data = this.formatNumber(this.data, this.dot, Number(this.conversionType));
27298
27298
  }
27299
27299
  }
27300
27300
  this.focused = false;
@@ -27336,7 +27336,7 @@ function filter(chars, from) {
27336
27336
  var pre = this.data.substring(0, this.data.indexOf('.'));
27337
27337
  var suf = this.data.substring(this.data.indexOf('.') + 1);
27338
27338
 
27339
- if (!this.conversionType) {
27339
+ if (!Number(this.conversionType)) {
27340
27340
  // 去掉小数点之后的所有小圆点并截取所需数量
27341
27341
  suf = suf.replace(/[/.]/g, '').substring(0, Number(this.dot));
27342
27342
  }
@@ -27398,25 +27398,6 @@ function filter(chars, from) {
27398
27398
  // type 0:保持原状 1:向上取值 2:向下取值 3:四舍五入 4:保持原值无限输入小数
27399
27399
  if (type < 0 || type > 3) throw new Error('Invalid type');
27400
27400
 
27401
- // if (type === 0) {
27402
- // // 处理科学计数法并转换为字符串
27403
- // let strValue = value.toLocaleString('fullwide', { useGrouping: false });
27404
- // // 处理特殊情况,例如数值本身是整数
27405
- // if (strValue.indexOf('.') === -1) strValue += '.';
27406
-
27407
- // const [intPart, decimalPart = ''] = strValue.split('.');
27408
- // let formattedDecimal = decimalPart;
27409
-
27410
- // // 补零到指定的小数位数
27411
- // if (decimalPart.length < decimalPlaces) {
27412
- // formattedDecimal = decimalPart.padEnd(decimalPlaces, '0');
27413
- // }
27414
-
27415
- // return decimalPlaces === 0
27416
- // ? intPart
27417
- // : `${intPart}.${formattedDecimal}`;
27418
- // }
27419
-
27420
27401
  var factor = Math.pow(10, decimalPlaces);
27421
27402
  var processedValue = value;
27422
27403
 
@@ -27431,9 +27412,15 @@ function filter(chars, from) {
27431
27412
  break;
27432
27413
  case 3:
27433
27414
  // 四舍五入
27434
- processedValue = Math.round(value * factor) / factor;
27415
+ processedValue = Math.round(Number((value * factor).toFixed(1))) / factor;
27416
+ // processedValue = this.preciseMultiply(value, factor);
27435
27417
  break;
27436
27418
  }
27419
+ // console.log(value, 'value')
27420
+ // console.log(factor, 'factor')
27421
+ // console.log('processedValue', processedValue)
27422
+ // console.log('value * factor * 10', value * factor * 10)
27423
+ // console.log('Math.round(value * factor * 10)', Math.round(value * factor * 10))
27437
27424
  return processedValue.toFixed(decimalPlaces);
27438
27425
  }
27439
27426
  }
@@ -27450,8 +27437,8 @@ function filter(chars, from) {
27450
27437
 
27451
27438
  var input_component = normalizeComponent(
27452
27439
  src_inputvue_type_script_lang_js,
27453
- inputvue_type_template_id_4a775748_render,
27454
- inputvue_type_template_id_4a775748_staticRenderFns,
27440
+ inputvue_type_template_id_7002140a_render,
27441
+ inputvue_type_template_id_7002140a_staticRenderFns,
27455
27442
  false,
27456
27443
  null,
27457
27444
  null,
@@ -49729,7 +49716,7 @@ if (typeof window !== 'undefined' && window.Vue) {
49729
49716
  }
49730
49717
 
49731
49718
  /* harmony default export */ var src = __webpack_exports__["default"] = ({
49732
- version: '1.33.1',
49719
+ version: '1.33.2',
49733
49720
  locale: lib_locale_default.a.use,
49734
49721
  i18n: lib_locale_default.a.i18n,
49735
49722
  install: src_install,