ai.touchui-vue 1.32.1 → 1.33.0

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.
Files changed (81) hide show
  1. package/lib/affix.js +2 -2
  2. package/lib/ai.touchui-vue.common.js +994 -881
  3. package/lib/align.js +2 -2
  4. package/lib/animation.js +2 -2
  5. package/lib/article.js +2 -2
  6. package/lib/box.js +2 -2
  7. package/lib/button.js +2 -2
  8. package/lib/calendar.js +2 -2
  9. package/lib/card-item.js +4 -4
  10. package/lib/card.js +178 -178
  11. package/lib/cascader.js +2 -2
  12. package/lib/center-scroll.js +2 -2
  13. package/lib/chat.js +4 -4
  14. package/lib/checkbox.js +2 -2
  15. package/lib/checkboxes.js +2 -2
  16. package/lib/collapse.js +771 -771
  17. package/lib/color.js +2 -2
  18. package/lib/countdown.js +2 -2
  19. package/lib/date-picker.js +1466 -1466
  20. package/lib/date-range.js +2 -2
  21. package/lib/dialog.js +2 -2
  22. package/lib/dis.js +2 -2
  23. package/lib/ellipsis.js +2 -2
  24. package/lib/emote.js +2 -2
  25. package/lib/export.js +10 -10
  26. package/lib/filter.js +2 -2
  27. package/lib/fix.js +2 -2
  28. package/lib/float.js +2 -2
  29. package/lib/flow.js +4 -4
  30. package/lib/form.js +2 -2
  31. package/lib/grid.js +2 -2
  32. package/lib/guider.js +2 -2
  33. package/lib/header.js +2 -2
  34. package/lib/hide.js +2 -2
  35. package/lib/icon.js +2 -2
  36. package/lib/import.js +12 -12
  37. package/lib/index.js +1 -1
  38. package/lib/input.js +62 -10
  39. package/lib/ip.js +2 -2
  40. package/lib/line.js +2 -2
  41. package/lib/loading.js +11 -11
  42. package/lib/longtap.js +2 -2
  43. package/lib/menu-icon.js +673 -670
  44. package/lib/message.js +2 -2
  45. package/lib/msg.js +19 -19
  46. package/lib/org.js +582 -582
  47. package/lib/padding.js +2 -2
  48. package/lib/page.js +578 -578
  49. package/lib/param.js +24 -8
  50. package/lib/pic.js +4 -4
  51. package/lib/popup.js +2 -2
  52. package/lib/progress.js +2 -2
  53. package/lib/range.js +452 -18
  54. package/lib/rate.js +2 -2
  55. package/lib/reverser.js +2 -2
  56. package/lib/scroll.js +2 -2
  57. package/lib/segment.js +2 -2
  58. package/lib/select.js +2 -2
  59. package/lib/size.js +2 -2
  60. package/lib/skeleton.js +2 -2
  61. package/lib/slide.js +2 -2
  62. package/lib/space.js +2 -2
  63. package/lib/step.js +2 -2
  64. package/lib/submit.js +2 -2
  65. package/lib/switch.js +2 -2
  66. package/lib/tab.js +5 -5
  67. package/lib/table.js +10 -10
  68. package/lib/tag.js +2 -2
  69. package/lib/timeline.js +2 -2
  70. package/lib/tip.js +2 -2
  71. package/lib/tooltip.js +2 -2
  72. package/lib/transfer.js +2 -2
  73. package/lib/tree.js +2 -2
  74. package/lib/upload.js +14 -14
  75. package/package.json +1 -1
  76. package/packages/input/src/input.vue +65 -7
  77. package/packages/param/src/param.vue +6 -2
  78. package/packages/range/src/range.vue +17 -14
  79. package/packages/tab/src/tab.vue +1 -1
  80. package/packages/table/src/table-head.vue +1 -1
  81. package/src/index.js +1 -1
@@ -107,7 +107,7 @@ export default {
107
107
  },
108
108
  set: function(newVal) {
109
109
  this.progress = newVal
110
- this.x = this.length * this.progress / this.range
110
+ this.x = this.length.offsetWidth * this.progress / this.range
111
111
  }
112
112
  },
113
113
  startVal: {
@@ -116,7 +116,7 @@ export default {
116
116
  },
117
117
  set: function(newVal) {
118
118
  this.sProgress = newVal
119
- this.sx = this.length * this.sProgress / this.range
119
+ this.sx = this.length.offsetWidth * this.sProgress / this.range
120
120
  }
121
121
  },
122
122
  refVal: {
@@ -259,7 +259,7 @@ export default {
259
259
  mounted() {
260
260
  // 这里注意range的value改变不会触发视图刷新
261
261
  this.$nextTick(()=>{
262
- this.length = this.$el.querySelector('.to-rangeBar').offsetWidth
262
+ this.length = this.$el.querySelector('.to-rangeBar')
263
263
  this.initRangeVal()
264
264
  })
265
265
  },
@@ -287,12 +287,12 @@ export default {
287
287
  let leftX = e.offsetX
288
288
  this.x = e.clientX - leftX
289
289
  if (this.start) {
290
- let startLeft = this.startProgress / this.range * this.length
291
- let endLeft = this.rangeProgress / this.range * this.length
290
+ let startLeft = this.startProgress / this.range * this.length.offsetWidth
291
+ let endLeft = this.rangeProgress / this.range * this.length.offsetWidth
292
292
  let startLeftAbs = Math.abs(startLeft - leftX)
293
293
  let endLeftAbs = Math.abs(endLeft - leftX)
294
294
  if (startLeftAbs >= endLeftAbs) {
295
- this.progress = leftX / this.length * this.range
295
+ this.progress = leftX / this.length.offsetWidth * this.range
296
296
  this.progress = this.step ? this.step * Math.round(this.progress / this.step) : this.progress
297
297
  if (this.progress <= 0) {
298
298
  this.progress = 0
@@ -307,7 +307,7 @@ export default {
307
307
  }
308
308
  this.rangeProgress = progress
309
309
  } else {
310
- this.sProgress = leftX / this.length * this.range
310
+ this.sProgress = leftX / this.length.offsetWidth * this.range
311
311
  this.sProgress = this.step ? this.step * Math.round(this.sProgress / this.step) : this.sProgress
312
312
  if (this.sProgress <= 0) {
313
313
  this.sProgress = 0
@@ -323,7 +323,7 @@ export default {
323
323
  this.startProgress = progress
324
324
  }
325
325
  } else {
326
- this.progress = leftX / this.length * this.range
326
+ this.progress = leftX / this.length.offsetWidth * this.range
327
327
  this.progress = this.step ? this.step * Math.round(this.progress / this.step) : this.progress
328
328
  if (this.progress <= 0) {
329
329
  this.progress = 0
@@ -351,7 +351,7 @@ export default {
351
351
  if (this.isStart) {
352
352
  this.moveX = e.touches[0].clientX
353
353
  if (this.isStartMove === 'end') {
354
- this.progress = (this.x + this.moveX - this.endStartX) / this.length * this.range
354
+ this.progress = (this.x + this.moveX - this.endStartX) / this.length.offsetWidth * this.range
355
355
  if (this.progress <= 0) {
356
356
  this.progress = 0
357
357
  } else if (this.progress >= this.range) {
@@ -365,7 +365,7 @@ export default {
365
365
  }
366
366
  this.rangeProgress = progress
367
367
  } else if (this.isStartMove === 'start') {
368
- this.sProgress = (this.sx + this.moveX - this.startX) / this.length * this.range
368
+ this.sProgress = (this.sx + this.moveX - this.startX) / this.length.offsetWidth * this.range
369
369
  if (this.sProgress <= 0) {
370
370
  this.sProgress = 0
371
371
  } else if (this.sProgress >= this.range) {
@@ -389,14 +389,14 @@ export default {
389
389
  if (this.progress <= 0) {
390
390
  this.x = 0
391
391
  } else if (this.progress >= this.range) {
392
- this.x = this.length
392
+ this.x = this.length.offsetWidth
393
393
  }
394
394
  } else if (this.isStartMove === 'start') {
395
395
  this.sx += this.moveX - this.endStartX
396
396
  if (this.sProgress <= 0) {
397
397
  this.sx = 0
398
398
  } else if (this.sProgress >= this.range) {
399
- this.sx = this.length
399
+ this.sx = this.length.offsetWidth
400
400
  }
401
401
  }
402
402
  this.isStart = false
@@ -507,7 +507,7 @@ export default {
507
507
  }
508
508
  var currentX = event.clientX;
509
509
  if (this.isStartMove === 'end') {
510
- let diff = (currentX - this.startMoveX) / this.length * this.range
510
+ let diff = (currentX - this.startMoveX) / this.length.offsetWidth * this.range
511
511
  this.progress = this.startPosition + diff;
512
512
  if (this.progress <= 0) {
513
513
  this.progress = 0
@@ -525,7 +525,7 @@ export default {
525
525
  }
526
526
  this.rangeProgress = progress
527
527
  } else if (this.isStartMove === 'start') {
528
- let diff = (currentX - this.sStartMoveX) / this.length * this.range
528
+ let diff = (currentX - this.sStartMoveX) / this.length.offsetWidth * this.range
529
529
  this.sProgress = this.sStartPosition + diff;
530
530
  if (this.sProgress <= 0) {
531
531
  this.sProgress = 0
@@ -610,3 +610,6 @@ export default {
610
610
  }
611
611
  }
612
612
  </script>
613
+ <style>
614
+ //.to-rangeProgress{ transition: width 0.01s ease; }
615
+ </style>
@@ -7,7 +7,7 @@
7
7
  <div ref="list" class="list">
8
8
  <ul ref="ul" class="to-tab-ul" :style="setUlStyle" @mouseleave="taboutHandle" @mouseover="isOnTab = true">
9
9
  <template v-for="(item, index) in itabs">
10
- <li v-if="!$slots.center || Math.floor(itabs.length / 2) === index" :key="index" class="center">
10
+ <li v-if="$slots.center && Math.floor(itabs.length / 2) === index" :key="index" class="center">
11
11
  <slot name="center"></slot>
12
12
  </li>
13
13
  <li v-else :key="index" :style="setTabStyle(item)" :class="{ on: item.value === iValue, deletable, disabled: item.disabled}" @click="changeTab(item, index, 'click')" @mouseover="changeTab(item, index, 'mouseover')">
@@ -39,7 +39,7 @@
39
39
  <to-icon v-if="item.orderType == 'asc'" value="fold"></to-icon>
40
40
  <to-icon v-if="item.orderType == 'desc'" value="unfold"></to-icon>
41
41
  </template>
42
- <span>{{ ToTable.indexColumnName || item.label }}111</span>
42
+ <span>{{ ToTable.indexColumnName || item.label }}</span>
43
43
  </th>
44
44
  <th
45
45
  v-else-if="item.type === 'action' && configurable && ToTable.hasAction"
package/src/index.js CHANGED
@@ -455,7 +455,7 @@ if (typeof window !== 'undefined' && window.Vue) {
455
455
  }
456
456
 
457
457
  export default {
458
- version: '1.32.1',
458
+ version: '1.32.2',
459
459
  locale: locale.use,
460
460
  i18n: locale.i18n,
461
461
  install,