ai.touchui-vue 1.31.1 → 1.31.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 +127 -108
- package/lib/date-picker.js +7 -7
- package/lib/dialog.js +4 -2
- package/lib/form.js +8 -8
- package/lib/header.js +4 -9
- package/lib/index.js +1 -1
- package/lib/tab.js +11 -2
- package/lib/table.js +57 -45
- 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/lib/tree.js +10 -9
- package/package.json +2 -2
- package/packages/date-picker/src/date-picker.vue +1 -1
- package/packages/dialog/src/dialog.vue +2 -0
- package/packages/form/src/form-item.vue +1 -1
- package/packages/header/src/header.vue +2 -3
- package/packages/tab/src/tab.vue +9 -0
- package/packages/table/src/table-head.vue +8 -5
- package/packages/table/src/table.vue +26 -23
- 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/dialog.less +1 -1
- package/packages/theme/src/less/component/tab.less +3 -0
- package/packages/theme/src/less/component/table.less +12 -2
- package/packages/tree/src/treeItem.vue +1 -1
- package/src/index.js +1 -1
package/lib/tree.js
CHANGED
|
@@ -278,8 +278,8 @@ render._withStripped = true
|
|
|
278
278
|
var external_vue_ = __webpack_require__(4);
|
|
279
279
|
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
280
280
|
|
|
281
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/treeItem.vue?vue&type=template&id=
|
|
282
|
-
var
|
|
281
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/treeItem.vue?vue&type=template&id=41a1126d
|
|
282
|
+
var treeItemvue_type_template_id_41a1126d_render = function () {
|
|
283
283
|
var _vm = this
|
|
284
284
|
var _h = _vm.$createElement
|
|
285
285
|
var _c = _vm._self._c || _h
|
|
@@ -327,11 +327,12 @@ var treeItemvue_type_template_id_202f7170_render = function () {
|
|
|
327
327
|
rawName: "v-tip.fg.right",
|
|
328
328
|
value:
|
|
329
329
|
!(node.children && node.children.length) &&
|
|
330
|
-
node.parent === "__root__"
|
|
330
|
+
node.parent === "__root__" &&
|
|
331
|
+
_vm.ToTree.type === "icon"
|
|
331
332
|
? node.label
|
|
332
333
|
: "",
|
|
333
334
|
expression:
|
|
334
|
-
"!(node.children && node.children.length) && node.parent === '__root__' ? node.label:''",
|
|
335
|
+
"!(node.children && node.children.length) && node.parent === '__root__' && ToTree.type === 'icon' ? node.label:''",
|
|
335
336
|
modifiers: { fg: true, right: true },
|
|
336
337
|
},
|
|
337
338
|
],
|
|
@@ -515,11 +516,11 @@ var treeItemvue_type_template_id_202f7170_render = function () {
|
|
|
515
516
|
)
|
|
516
517
|
: _vm._e()
|
|
517
518
|
}
|
|
518
|
-
var
|
|
519
|
-
|
|
519
|
+
var treeItemvue_type_template_id_41a1126d_staticRenderFns = []
|
|
520
|
+
treeItemvue_type_template_id_41a1126d_render._withStripped = true
|
|
520
521
|
|
|
521
522
|
|
|
522
|
-
// CONCATENATED MODULE: ./packages/tree/src/treeItem.vue?vue&type=template&id=
|
|
523
|
+
// CONCATENATED MODULE: ./packages/tree/src/treeItem.vue?vue&type=template&id=41a1126d
|
|
523
524
|
|
|
524
525
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/treeItem.vue?vue&type=script&lang=js
|
|
525
526
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
@@ -1016,8 +1017,8 @@ var componentNormalizer = __webpack_require__(0);
|
|
|
1016
1017
|
|
|
1017
1018
|
var component = Object(componentNormalizer["a" /* default */])(
|
|
1018
1019
|
src_treeItemvue_type_script_lang_js,
|
|
1019
|
-
|
|
1020
|
-
|
|
1020
|
+
treeItemvue_type_template_id_41a1126d_render,
|
|
1021
|
+
treeItemvue_type_template_id_41a1126d_staticRenderFns,
|
|
1021
1022
|
false,
|
|
1022
1023
|
null,
|
|
1023
1024
|
null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai.touchui-vue",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.3",
|
|
4
4
|
"description": "TouchUI Component Library for Vue.js.",
|
|
5
5
|
"main": "lib/ai.touchui-vue.common.js",
|
|
6
6
|
"files": [
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@typescript-eslint/eslint-plugin": "5.8.0",
|
|
61
61
|
"@vue/component-compiler-utils": "2.6.0",
|
|
62
|
-
"ai.touchui-chat": "1.
|
|
62
|
+
"ai.touchui-chat": "^1.9.0",
|
|
63
63
|
"ai.touchui-plugin": "^1.0.58",
|
|
64
64
|
"algoliasearch": "3.35.1",
|
|
65
65
|
"archiver": "5.3.1",
|
|
@@ -175,6 +175,8 @@ export default {
|
|
|
175
175
|
}
|
|
176
176
|
if (dialogHeaderEl) {
|
|
177
177
|
dialogHeaderEl.style.cursor = 'move';
|
|
178
|
+
} else {
|
|
179
|
+
return
|
|
178
180
|
}
|
|
179
181
|
// 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
|
|
180
182
|
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<li :class="setClass" :style="setStyle" @click="$emit('click')">
|
|
3
3
|
<div class="content">
|
|
4
4
|
<div v-if="label || $slots.label" ref="label" class="label" :class="setLabelClass">
|
|
5
|
-
<div ref="labelText" class="text">{{ label }}
|
|
5
|
+
<div ref="labelText" class="text"><slot name="label">{{ label }}</slot></div>
|
|
6
6
|
<div v-if="$slots.tip && ToForm.type === 'list'" class="tip"><slot name="tip"></slot></div>
|
|
7
7
|
</div>
|
|
8
8
|
<div class="value">
|
|
@@ -5,15 +5,14 @@
|
|
|
5
5
|
<slot name="left"></slot>
|
|
6
6
|
</div>
|
|
7
7
|
<div v-if="((title || $slots.title) && $listeners.back && titlePosition === 'left')" class="back">
|
|
8
|
-
<to-button mode="none" icon="back" @click="$emit('back')">{{ title }}
|
|
8
|
+
<to-button mode="none" icon="back" @click="$emit('back')"><slot name="title">{{ title }}</slot></to-button>
|
|
9
9
|
<span v-if="$slots.tip" class="tip">
|
|
10
10
|
<slot name="tip"></slot>
|
|
11
11
|
</span>
|
|
12
12
|
</div>
|
|
13
13
|
<div v-if="titlePosition === 'center'" class="center">
|
|
14
14
|
<slot name="icon"></slot>
|
|
15
|
-
{{ title }}
|
|
16
|
-
<slot name="title"></slot>
|
|
15
|
+
<slot name="title">{{ title }}</slot>
|
|
17
16
|
</div>
|
|
18
17
|
<div v-if="(title || $slots.title) && !$listeners.back && titlePosition === 'left'" class="text">
|
|
19
18
|
<slot name="icon"></slot>
|
package/packages/tab/src/tab.vue
CHANGED
|
@@ -134,6 +134,12 @@ export default {
|
|
|
134
134
|
beforeChange: {
|
|
135
135
|
type: Function,
|
|
136
136
|
default: null
|
|
137
|
+
},
|
|
138
|
+
// top:顶部
|
|
139
|
+
// left:左侧
|
|
140
|
+
iconPosition: {
|
|
141
|
+
type: String,
|
|
142
|
+
default: 'top'
|
|
137
143
|
}
|
|
138
144
|
},
|
|
139
145
|
data() {
|
|
@@ -201,6 +207,9 @@ export default {
|
|
|
201
207
|
if (this.tabOver === 'avg' && this.overSize) {
|
|
202
208
|
arr.push('to-tab-over-avg')
|
|
203
209
|
}
|
|
210
|
+
if (this.iconPosition === 'left') {
|
|
211
|
+
arr.push('to-tab-icon-position-left')
|
|
212
|
+
}
|
|
204
213
|
return arr;
|
|
205
214
|
},
|
|
206
215
|
setStyle() {
|
|
@@ -35,10 +35,11 @@
|
|
|
35
35
|
@click="($event) =>ToTable.handleTableHeadCellClick(item, index, $event)"
|
|
36
36
|
>
|
|
37
37
|
<template v-if="item.sortable === true">
|
|
38
|
+
<!-- <to-icon value="fold" type="fill"></to-icon> -->
|
|
38
39
|
<to-icon v-if="item.orderType == 'asc'" value="fold"></to-icon>
|
|
39
40
|
<to-icon v-if="item.orderType == 'desc'" value="unfold"></to-icon>
|
|
40
41
|
</template>
|
|
41
|
-
<span>{{ ToTable.indexColumnName || item.label }}</span>
|
|
42
|
+
<span>{{ ToTable.indexColumnName || item.label }}111</span>
|
|
42
43
|
</th>
|
|
43
44
|
<th
|
|
44
45
|
v-else-if="item.type === 'action' && configurable && ToTable.hasAction"
|
|
@@ -57,10 +58,12 @@
|
|
|
57
58
|
:class="[item.sortable === true ? 'sort':'', item.type === 'action' ? 'action':'']"
|
|
58
59
|
@click="($event) => ToTable.handleTableHeadCellClick(item, index, $event)"
|
|
59
60
|
>
|
|
60
|
-
<
|
|
61
|
-
<to-icon
|
|
62
|
-
<to-icon
|
|
63
|
-
|
|
61
|
+
<span v-if="item.sortable === true" class="to-table-sorticon" :class="`type-${item.orderType}`">
|
|
62
|
+
<to-icon value="fold" type="fill"></to-icon>
|
|
63
|
+
<to-icon value="unfold" type="fill"></to-icon>
|
|
64
|
+
<!-- <to-icon v-if="item.orderType == 'asc'" value="fold"></to-icon> -->
|
|
65
|
+
<!-- <to-icon v-if="item.orderType == 'desc'" value="unfold"></to-icon> -->
|
|
66
|
+
</span>
|
|
64
67
|
<slot :name="item.prop + '_th'" :column="item" :index="index">
|
|
65
68
|
<span>{{ item.label }}</span>
|
|
66
69
|
</slot>
|
|
@@ -719,14 +719,16 @@ export default {
|
|
|
719
719
|
},
|
|
720
720
|
methods: {
|
|
721
721
|
init() {
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
722
|
+
if (this.$refs && this.$refs.tbody) {
|
|
723
|
+
// 监听 slot 中的 DOM 变化
|
|
724
|
+
let tbody = this.$refs.tbody.$el || this.$refs.tbody
|
|
725
|
+
const observer = new MutationObserver(this.adjust)
|
|
726
|
+
observer.observe(tbody, {
|
|
727
|
+
childList: true,
|
|
728
|
+
subtree: true
|
|
729
|
+
})
|
|
730
|
+
this.observer = observer
|
|
731
|
+
}
|
|
730
732
|
window.addEventListener('resize', this.dbSetFix)
|
|
731
733
|
window.addEventListener('touchend', this.restoreClick)
|
|
732
734
|
},
|
|
@@ -1300,24 +1302,25 @@ export default {
|
|
|
1300
1302
|
}
|
|
1301
1303
|
},
|
|
1302
1304
|
handleSortClick(item, index) {
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1305
|
+
const orderType = item.orderType
|
|
1306
|
+
this.columns.map((column, columnIndex) => {
|
|
1307
|
+
if (columnIndex === index) {
|
|
1308
|
+
if (!orderType) {
|
|
1309
|
+
this.$set(column, 'orderType', 'asc')
|
|
1310
|
+
} else if (orderType === 'asc') {
|
|
1311
|
+
this.$set(column, 'orderType', 'desc')
|
|
1312
|
+
} else if (orderType === 'desc') {
|
|
1313
|
+
this.$set(column, 'orderType', '')
|
|
1314
|
+
}
|
|
1315
|
+
} else {
|
|
1316
|
+
if (column.sortable) {
|
|
1317
|
+
this.$set(column, 'orderType', '')
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
})
|
|
1310
1321
|
if (this.initData.length === 0) {
|
|
1311
1322
|
this.initData = JSON.parse(JSON.stringify(this.data))
|
|
1312
1323
|
}
|
|
1313
|
-
let that = this
|
|
1314
|
-
this.columns.forEach(function(column, columnIndex) {
|
|
1315
|
-
if (column.sortable) {
|
|
1316
|
-
if (columnIndex !== index) {
|
|
1317
|
-
that.$set(column, 'orderType', '')
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
});
|
|
1321
1324
|
if (this.sortFunction) {
|
|
1322
1325
|
this.sortFunction(index, item.orderType)
|
|
1323
1326
|
} else {
|