ai.touchui-vue 1.32.2 → 1.32.3
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/ai.touchui-vue.common.js +79 -103
- package/lib/cascader.js +24 -22
- package/lib/float.js +10 -31
- package/lib/index.js +1 -1
- package/lib/tab.js +29 -34
- package/lib/theme/css/theme/B-Design.css +1 -1
- package/lib/theme/css/theme/aiplan.css +1 -1
- package/lib/theme/css/theme/aiplangd.css +1 -1
- package/lib/theme/css/theme/chbn.css +1 -1
- package/lib/theme/css/theme/default.css +1 -1
- package/lib/theme/css/theme/dt.css +1 -1
- package/lib/theme/css/theme/ecloud.css +1 -1
- package/lib/theme/css/theme/hongkong.css +1 -1
- package/lib/theme/css/theme/narrow.css +1 -1
- package/lib/theme/css/theme/sdpf.css +1 -1
- package/lib/theme/css/theme/upc.css +1 -1
- package/lib/theme/css/theme/website.css +1 -1
- package/lib/theme/css/theme/zj.css +1 -1
- package/package.json +1 -1
- package/packages/cascader/src/cascader.vue +4 -4
- package/packages/float/src/main.vue +8 -29
- package/packages/tab/.DS_Store +0 -0
- package/packages/tab/src/tab-item.vue +4 -5
- package/packages/tab/src/tab.vue +15 -10
- package/packages/theme/lib/css/theme/B-Design.css +1 -1
- package/packages/theme/lib/css/theme/aiplan.css +1 -1
- package/packages/theme/lib/css/theme/aiplangd.css +1 -1
- package/packages/theme/lib/css/theme/chbn.css +1 -1
- package/packages/theme/lib/css/theme/default.css +1 -1
- package/packages/theme/lib/css/theme/dt.css +1 -1
- package/packages/theme/lib/css/theme/ecloud.css +1 -1
- package/packages/theme/lib/css/theme/hongkong.css +1 -1
- package/packages/theme/lib/css/theme/narrow.css +1 -1
- package/packages/theme/lib/css/theme/sdpf.css +1 -1
- package/packages/theme/lib/css/theme/upc.css +1 -1
- package/packages/theme/lib/css/theme/website.css +1 -1
- package/packages/theme/lib/css/theme/zj.css +1 -1
- package/packages/theme/src/less/component/float.less +1 -7
- package/packages/theme/src/less/component/tab.less +2 -3
- package/packages/theme/src/less/element/dis.less +1 -1
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<span v-if="multiple && selected.length > 0" class="to-selectTag">
|
|
13
13
|
<template v-if="selected.length > 0">
|
|
14
14
|
<template v-for="(item, index) in selected">
|
|
15
|
-
<to-tag :key="index" color="fg" mode="plain" :deletable="!disabled" @delete="removeCheck(item.value); setSelected()">{{ item.labelPath }}</to-tag>
|
|
15
|
+
<to-tag v-if="true" :key="index" color="fg" mode="plain" :deletable="!disabled" @delete="removeCheck(item.value); setSelected()">{{ item.labelPath }}</to-tag>
|
|
16
16
|
</template>
|
|
17
17
|
</template>
|
|
18
18
|
</span>
|
|
@@ -481,7 +481,7 @@ export default {
|
|
|
481
481
|
}
|
|
482
482
|
} else {
|
|
483
483
|
this.label = this.getLabelPath(val.value)
|
|
484
|
-
this.$emit('change', val.value)
|
|
484
|
+
this.$emit('change', val.value, val)
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
}
|
|
@@ -589,7 +589,7 @@ export default {
|
|
|
589
589
|
let that = this
|
|
590
590
|
function set(node, level = 0, path = '', labelPath = '', parent = '__root__') {
|
|
591
591
|
for (let i = 0; i < node.length; i++) {
|
|
592
|
-
arr.push({
|
|
592
|
+
arr.push(Object.assign(node[i], {
|
|
593
593
|
label: node[i][that.labelText] || '',
|
|
594
594
|
value: node[i][that.valueText] || '',
|
|
595
595
|
level: level,
|
|
@@ -597,7 +597,7 @@ export default {
|
|
|
597
597
|
labelPath: (labelPath + ' / ' + node[i][that.labelText]).substr(3),
|
|
598
598
|
parent: parent,
|
|
599
599
|
isLeaf: !(node[i][that.childrenText] && node[i][that.childrenText].length > 0)
|
|
600
|
-
})
|
|
600
|
+
}))
|
|
601
601
|
if (node[i][that.childrenText]) {
|
|
602
602
|
set(
|
|
603
603
|
node[i][that.childrenText],
|
|
@@ -10,10 +10,6 @@
|
|
|
10
10
|
export default {
|
|
11
11
|
name: 'ToFloat',
|
|
12
12
|
props: {
|
|
13
|
-
color: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: ''
|
|
16
|
-
},
|
|
17
13
|
slide: Boolean,
|
|
18
14
|
lazy: {
|
|
19
15
|
type: Boolean,
|
|
@@ -79,15 +75,6 @@ export default {
|
|
|
79
75
|
beforeClose: {
|
|
80
76
|
type: Function,
|
|
81
77
|
default: null
|
|
82
|
-
},
|
|
83
|
-
// 偏移量
|
|
84
|
-
dx: {
|
|
85
|
-
type: [String, Number],
|
|
86
|
-
default: 0
|
|
87
|
-
},
|
|
88
|
-
dy: {
|
|
89
|
-
type: [String, Number],
|
|
90
|
-
default: 0
|
|
91
78
|
}
|
|
92
79
|
},
|
|
93
80
|
data() {
|
|
@@ -110,9 +97,6 @@ export default {
|
|
|
110
97
|
if (this.show) {
|
|
111
98
|
arr.push('to-float-show')
|
|
112
99
|
}
|
|
113
|
-
if (this.color) {
|
|
114
|
-
arr.push(`to-float-color-${this.color}`)
|
|
115
|
-
}
|
|
116
100
|
if (this.slide) {
|
|
117
101
|
arr.push('to-float-slide')
|
|
118
102
|
} else {
|
|
@@ -289,8 +273,6 @@ export default {
|
|
|
289
273
|
let leftSpace; // 左侧空间宽度
|
|
290
274
|
let rightSpace; // 右侧空间宽度
|
|
291
275
|
let useSpace // 使用的空间高度
|
|
292
|
-
let dx = Number(this.dx) * this.$TouchUI.em() // 横坐标偏移
|
|
293
|
-
let dy = Number(this.dy) * this.$TouchUI.em() // 纵坐标偏移
|
|
294
276
|
|
|
295
277
|
// 传入的是触点
|
|
296
278
|
if (link.clientX || link.touches) {
|
|
@@ -367,38 +349,35 @@ export default {
|
|
|
367
349
|
// 设置显示位置
|
|
368
350
|
if (this.iposition === 'top') {
|
|
369
351
|
this.$el.style.top = ''
|
|
370
|
-
this.$el.style.bottom = bottomSpace + linkHeight - 1
|
|
352
|
+
this.$el.style.bottom = bottomSpace + linkHeight - 1 + 'px'
|
|
371
353
|
}
|
|
372
354
|
if (this.iposition === 'bottom') {
|
|
373
|
-
this.$el.style.top = topSpace + linkHeight - 1 +
|
|
355
|
+
this.$el.style.top = topSpace + linkHeight - 1 + 'px'
|
|
374
356
|
this.$el.style.bottom = ''
|
|
375
357
|
}
|
|
376
358
|
if (this.iposition === 'top' || this.iposition === 'bottom') {
|
|
377
359
|
if (this.ialign === 'left') {
|
|
378
|
-
this.$el.style.left = leftSpace +
|
|
379
|
-
this.$el.style.right = ''
|
|
380
|
-
} else if (this.ialign === 'center') {
|
|
381
|
-
this.$el.style.left = leftSpace - contentWidth / 2 + linkWidth / 2 + 'px'
|
|
360
|
+
this.$el.style.left = leftSpace + 'px'
|
|
382
361
|
this.$el.style.right = ''
|
|
383
362
|
} else {
|
|
384
|
-
this.$el.style.right = rightSpace
|
|
363
|
+
this.$el.style.right = rightSpace + 'px'
|
|
385
364
|
this.$el.style.left = ''
|
|
386
365
|
}
|
|
387
366
|
}
|
|
388
367
|
if (this.iposition === 'left') {
|
|
389
|
-
this.$el.style.right = rightSpace + linkWidth -
|
|
368
|
+
this.$el.style.right = rightSpace + linkWidth - 1 + 'px'
|
|
390
369
|
this.$el.style.left = ''
|
|
391
370
|
}
|
|
392
371
|
if (this.iposition === 'right') {
|
|
393
|
-
this.$el.style.left = leftSpace + linkWidth
|
|
372
|
+
this.$el.style.left = leftSpace + linkWidth - 1 + 'px'
|
|
394
373
|
this.$el.style.right = ''
|
|
395
374
|
}
|
|
396
375
|
if (this.iposition === 'left' || this.iposition === 'right') {
|
|
397
376
|
if (this.ialign === 'bottom') {
|
|
398
377
|
this.$el.style.top = ''
|
|
399
|
-
this.$el.style.bottom = bottomSpace
|
|
378
|
+
this.$el.style.bottom = bottomSpace + 'px'
|
|
400
379
|
} else {
|
|
401
|
-
this.$el.style.top = topSpace +
|
|
380
|
+
this.$el.style.top = topSpace + 'px'
|
|
402
381
|
this.$el.style.bottom = ''
|
|
403
382
|
}
|
|
404
383
|
}
|
package/packages/tab/.DS_Store
CHANGED
|
Binary file
|
|
@@ -33,8 +33,7 @@ export default {
|
|
|
33
33
|
default: ''
|
|
34
34
|
},
|
|
35
35
|
lazy: Boolean,
|
|
36
|
-
on: Boolean
|
|
37
|
-
disabled: Boolean
|
|
36
|
+
on: Boolean
|
|
38
37
|
},
|
|
39
38
|
data() {
|
|
40
39
|
return {
|
|
@@ -50,8 +49,8 @@ export default {
|
|
|
50
49
|
}
|
|
51
50
|
},
|
|
52
51
|
listenChange() {
|
|
53
|
-
const { value, label, icon, deletable, number, pic, on, data
|
|
54
|
-
return { value, label, icon, deletable, number, pic, on, data
|
|
52
|
+
const { value, label, icon, deletable, number, pic, on, data } = this;
|
|
53
|
+
return { value, label, icon, deletable, number, pic, on, data };
|
|
55
54
|
}
|
|
56
55
|
},
|
|
57
56
|
watch: {
|
|
@@ -79,7 +78,7 @@ export default {
|
|
|
79
78
|
if (this.$parent.data.length === 0) {
|
|
80
79
|
this.$parent.generateTabsFromSubTabItem();
|
|
81
80
|
}
|
|
82
|
-
})
|
|
81
|
+
});
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
};
|
package/packages/tab/src/tab.vue
CHANGED
|
@@ -7,10 +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="
|
|
11
|
-
<slot name="center"></slot>
|
|
12
|
-
</li>
|
|
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')">
|
|
10
|
+
<li v-if="item.label" :key="index" :style="setTabStyle(item)" :class="{ on: item.value === iValue, deletable }" @click="changeTab(item, index, 'click')" @mouseover="changeTab(item, index, 'mouseover')">
|
|
14
11
|
<div class="content">
|
|
15
12
|
<slot name="item" :item="item">
|
|
16
13
|
<div v-if="item.pic" class="pic">
|
|
@@ -33,11 +30,11 @@
|
|
|
33
30
|
</ul>
|
|
34
31
|
</div>
|
|
35
32
|
<div v-if="$slots.fn || overSize" class="fn">
|
|
36
|
-
<template v-if="
|
|
33
|
+
<template v-if="position==='top'&&tabOver === 'control'&&overSize && !$phone">
|
|
37
34
|
<to-button v-dis="left >= 0" mode="none" color="primary" icon="back" fillet="normal" @mousedown.native="moveToLeft" @mouseout.native="moveStop" @mouseup.native="moveStop"></to-button>
|
|
38
35
|
<to-button v-dis="left <= dis * -1" mode="none" color="primary" icon="next" fillet="normal" @mousedown.native="moveToRight" @mouseout.native="moveStop" @mouseup.native="moveStop"></to-button>
|
|
39
36
|
</template>
|
|
40
|
-
<template v-if="
|
|
37
|
+
<template v-if="position==='top'&&tabOver === 'float'&&overSize&&moreTabs.length">
|
|
41
38
|
<to-button ref="more" icon="unfold" color="primary" mode="none" fillet="normal" @click="$refs.float.toggle('more')"></to-button>
|
|
42
39
|
</template>
|
|
43
40
|
<slot name="fn"></slot>
|
|
@@ -161,6 +158,7 @@ export default {
|
|
|
161
158
|
tabs: [],
|
|
162
159
|
em: 0,
|
|
163
160
|
moreTabs: [],
|
|
161
|
+
timestamp: 0,
|
|
164
162
|
currentUlWidth: 0
|
|
165
163
|
};
|
|
166
164
|
},
|
|
@@ -175,6 +173,10 @@ export default {
|
|
|
175
173
|
return {
|
|
176
174
|
width: this.tabWidth + 'em'
|
|
177
175
|
}
|
|
176
|
+
} else if (item.label) {
|
|
177
|
+
// return {
|
|
178
|
+
// width: item.label.length*2 + 'em'
|
|
179
|
+
// };
|
|
178
180
|
} else {
|
|
179
181
|
return '';
|
|
180
182
|
}
|
|
@@ -279,7 +281,12 @@ export default {
|
|
|
279
281
|
|
|
280
282
|
// 点击层外关闭
|
|
281
283
|
document.body.addEventListener('click', this.blur)
|
|
284
|
+
|
|
285
|
+
// 默认隐藏 page
|
|
286
|
+
// this.showPage = false
|
|
282
287
|
}
|
|
288
|
+
this.em = this.$TouchUI.getRatio() * 12
|
|
289
|
+
this.timestamp = Math.round(new Date())
|
|
283
290
|
},
|
|
284
291
|
beforeDestroy() {
|
|
285
292
|
if (this.contentType === 'float') {
|
|
@@ -383,7 +390,6 @@ export default {
|
|
|
383
390
|
},
|
|
384
391
|
changeTab(item, index, event) {
|
|
385
392
|
if (event === 'click') {
|
|
386
|
-
if (item.disabled) return
|
|
387
393
|
this.$emit('tab-click', item.value, item, index)
|
|
388
394
|
}
|
|
389
395
|
if (event === 'mouseover') {
|
|
@@ -523,7 +529,7 @@ export default {
|
|
|
523
529
|
tabsItem.map(({ componentOptions = { propsData: {} } }) => {
|
|
524
530
|
const {
|
|
525
531
|
tag,
|
|
526
|
-
propsData: { label, value, icon, pic, number, on, data
|
|
532
|
+
propsData: { label, value, icon, pic, number, on, data }
|
|
527
533
|
} = componentOptions;
|
|
528
534
|
if (String(tag) === 'to-tab-item') {
|
|
529
535
|
tabs.push({
|
|
@@ -532,8 +538,7 @@ export default {
|
|
|
532
538
|
icon,
|
|
533
539
|
pic,
|
|
534
540
|
number,
|
|
535
|
-
data
|
|
536
|
-
disabled: disabled !== undefined
|
|
541
|
+
data
|
|
537
542
|
});
|
|
538
543
|
}
|
|
539
544
|
if (on === '' || on === true) {
|