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.
- package/lib/affix.js +2 -2
- package/lib/ai.touchui-vue.common.js +994 -881
- package/lib/align.js +2 -2
- package/lib/animation.js +2 -2
- package/lib/article.js +2 -2
- package/lib/box.js +2 -2
- package/lib/button.js +2 -2
- package/lib/calendar.js +2 -2
- package/lib/card-item.js +4 -4
- package/lib/card.js +178 -178
- package/lib/cascader.js +2 -2
- package/lib/center-scroll.js +2 -2
- package/lib/chat.js +4 -4
- package/lib/checkbox.js +2 -2
- package/lib/checkboxes.js +2 -2
- package/lib/collapse.js +771 -771
- package/lib/color.js +2 -2
- package/lib/countdown.js +2 -2
- package/lib/date-picker.js +1466 -1466
- package/lib/date-range.js +2 -2
- package/lib/dialog.js +2 -2
- package/lib/dis.js +2 -2
- package/lib/ellipsis.js +2 -2
- package/lib/emote.js +2 -2
- package/lib/export.js +10 -10
- package/lib/filter.js +2 -2
- package/lib/fix.js +2 -2
- package/lib/float.js +2 -2
- package/lib/flow.js +4 -4
- package/lib/form.js +2 -2
- package/lib/grid.js +2 -2
- package/lib/guider.js +2 -2
- package/lib/header.js +2 -2
- package/lib/hide.js +2 -2
- package/lib/icon.js +2 -2
- package/lib/import.js +12 -12
- package/lib/index.js +1 -1
- package/lib/input.js +62 -10
- package/lib/ip.js +2 -2
- package/lib/line.js +2 -2
- package/lib/loading.js +11 -11
- package/lib/longtap.js +2 -2
- package/lib/menu-icon.js +673 -670
- package/lib/message.js +2 -2
- package/lib/msg.js +19 -19
- package/lib/org.js +582 -582
- package/lib/padding.js +2 -2
- package/lib/page.js +578 -578
- package/lib/param.js +24 -8
- package/lib/pic.js +4 -4
- package/lib/popup.js +2 -2
- package/lib/progress.js +2 -2
- package/lib/range.js +452 -18
- package/lib/rate.js +2 -2
- package/lib/reverser.js +2 -2
- package/lib/scroll.js +2 -2
- package/lib/segment.js +2 -2
- package/lib/select.js +2 -2
- package/lib/size.js +2 -2
- package/lib/skeleton.js +2 -2
- package/lib/slide.js +2 -2
- package/lib/space.js +2 -2
- package/lib/step.js +2 -2
- package/lib/submit.js +2 -2
- package/lib/switch.js +2 -2
- package/lib/tab.js +5 -5
- package/lib/table.js +10 -10
- package/lib/tag.js +2 -2
- package/lib/timeline.js +2 -2
- package/lib/tip.js +2 -2
- package/lib/tooltip.js +2 -2
- package/lib/transfer.js +2 -2
- package/lib/tree.js +2 -2
- package/lib/upload.js +14 -14
- package/package.json +1 -1
- package/packages/input/src/input.vue +65 -7
- package/packages/param/src/param.vue +6 -2
- package/packages/range/src/range.vue +17 -14
- package/packages/tab/src/tab.vue +1 -1
- package/packages/table/src/table-head.vue +1 -1
- 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')
|
|
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>
|
package/packages/tab/src/tab.vue
CHANGED
|
@@ -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="
|
|
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 }}
|
|
42
|
+
<span>{{ ToTable.indexColumnName || item.label }}</span>
|
|
43
43
|
</th>
|
|
44
44
|
<th
|
|
45
45
|
v-else-if="item.type === 'action' && configurable && ToTable.hasAction"
|