@vtj/materials 0.10.1-alpha.6 → 0.10.1
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/dist/assets/antdv/index.umd.js +2 -2
- package/dist/assets/charts/index.umd.js +2 -2
- package/dist/assets/element/index.umd.js +2 -2
- package/dist/assets/ui/index.umd.js +2 -2
- package/dist/assets/uni-h5/index.umd.js +2 -2
- package/dist/assets/uni-ui/index.umd.js +3 -3
- package/dist/assets/vant/index.umd.js +5 -5
- package/dist/deps/@vtj/charts/index.umd.js +2 -2
- package/dist/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/deps/@vtj/ui/index.umd.js +2 -2
- package/dist/deps/@vtj/utils/index.umd.js +2 -2
- package/dist/deps/uni-ui/index.umd.js +1 -1
- package/dist/deps/uni-ui/style.css +1 -1
- package/package.json +6 -6
- package/src/uni-ui/components/badge.ts +5 -1
- package/src/uni-ui/components/breadcrumb.ts +76 -0
- package/src/uni-ui/components/calendar.ts +63 -0
- package/src/uni-ui/components/card.ts +113 -0
- package/src/uni-ui/components/collapse.ts +118 -0
- package/src/uni-ui/components/combox.ts +51 -0
- package/src/uni-ui/components/countdown.ts +92 -0
- package/src/uni-ui/components/dataCheckbox.ts +104 -0
- package/src/uni-ui/components/dataPicker.ts +146 -0
- package/src/uni-ui/components/dataSelect.ts +68 -0
- package/src/uni-ui/components/dateformat.ts +42 -0
- package/src/uni-ui/components/datetimePicker.ts +103 -0
- package/src/uni-ui/components/drawer.ts +38 -0
- package/src/uni-ui/components/easyinput.ts +159 -0
- package/src/uni-ui/components/fab.ts +89 -0
- package/src/uni-ui/components/fav.ts +65 -0
- package/src/uni-ui/components/filePicker.ts +127 -0
- package/src/uni-ui/components/forms.ts +209 -0
- package/src/uni-ui/components/goodsNav.ts +31 -0
- package/src/uni-ui/components/grid.ts +104 -0
- package/src/uni-ui/components/group.ts +50 -0
- package/src/uni-ui/components/icons.ts +47 -0
- package/src/uni-ui/components/index.ts +89 -1
- package/src/uni-ui/components/indexedList.ts +51 -0
- package/src/uni-ui/components/link.ts +60 -0
- package/src/uni-ui/components/list.ts +259 -0
- package/src/uni-ui/components/loadMore.ts +61 -0
- package/src/uni-ui/components/navbar.ts +121 -0
- package/src/uni-ui/components/noticeBar.ts +83 -0
- package/src/uni-ui/components/numberbox.ts +49 -0
- package/src/uni-ui/components/pagination.ts +59 -0
- package/src/uni-ui/components/popup.ts +206 -0
- package/src/uni-ui/components/rate.ts +89 -0
- package/src/uni-ui/components/row.ts +126 -0
- package/src/uni-ui/components/searchBar.ts +84 -0
- package/src/uni-ui/components/section.ts +68 -0
- package/src/uni-ui/components/segmentedControl.ts +48 -0
- package/src/uni-ui/components/steps.ts +55 -0
- package/src/uni-ui/components/swipeAction.ts +133 -0
- package/src/uni-ui/components/swiperDot.ts +114 -0
- package/src/uni-ui/components/table.ts +132 -0
- package/src/uni-ui/components/tag.ts +56 -0
- package/src/uni-ui/components/title.ts +49 -0
- package/src/uni-ui/components/tooltip.ts +32 -0
- package/src/uni-ui/components/transition.ts +49 -0
- package/src/uni-ui/index.ts +30 -13
- package/src/uni-ui/lib/uni-col/uni-col.vue +324 -0
- package/src/uni-ui/lib/uni-data-select/uni-data-select.vue +590 -0
- package/src/uni-ui/lib/uni-datetime-picker/calendar-item.vue +177 -177
- package/src/uni-ui/lib/uni-datetime-picker/calendar.vue +947 -947
- package/src/uni-ui/lib/uni-datetime-picker/i18n/en.json +22 -22
- package/src/uni-ui/lib/uni-datetime-picker/i18n/index.js +7 -7
- package/src/uni-ui/lib/uni-datetime-picker/time-picker.vue +939 -939
- package/src/uni-ui/lib/uni-datetime-picker/util.js +419 -419
- package/src/uni-ui/lib/uni-easyinput/common.js +54 -0
- package/src/uni-ui/lib/uni-easyinput/uni-easyinput.vue +790 -0
- package/src/uni-ui/lib/uni-forms/uni-forms.vue +416 -416
- package/src/uni-ui/lib/uni-forms/utils.js +281 -281
- package/src/uni-ui/lib/uni-forms/validate.js +485 -485
- package/src/uni-ui/lib/uni-forms-item/uni-forms-item.vue +630 -0
- package/src/uni-ui/lib/uni-goods-nav/i18n/en.json +6 -0
- package/src/uni-ui/lib/uni-goods-nav/i18n/index.js +8 -0
- package/src/uni-ui/lib/uni-goods-nav/i18n/zh-Hans.json +6 -0
- package/src/uni-ui/lib/uni-goods-nav/i18n/zh-Hant.json +6 -0
- package/src/uni-ui/lib/uni-goods-nav/uni-goods-nav.vue +231 -0
- package/src/uni-ui/lib/uni-icons/uni-icons.uvue +91 -0
- package/src/uni-ui/lib/uni-icons/uni-icons.vue +114 -0
- package/src/uni-ui/lib/uni-icons/uniicons.css +664 -0
- package/src/uni-ui/lib/uni-icons/uniicons.ttf +0 -0
- package/src/uni-ui/lib/uni-icons/uniicons_file.ts +664 -0
- package/src/uni-ui/lib/uni-icons/uniicons_file_vue.js +649 -0
- package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list-item.vue +144 -0
- package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue +404 -0
- package/src/uni-ui/lib/uni-list/uni-list.vue +123 -0
- package/src/uni-ui/lib/uni-list/uni-refresh.vue +65 -0
- package/src/uni-ui/lib/uni-list/uni-refresh.wxs +87 -0
- package/src/uni-ui/lib/uni-popup-dialog/keypress.js +45 -0
- package/src/uni-ui/lib/uni-popup-dialog/uni-popup-dialog.vue +324 -0
- package/src/uni-ui/lib/uni-rate/uni-rate.vue +361 -0
- package/src/uni-ui/lib/uni-table/uni-table.vue +496 -0
- package/src/uni-ui/lib/uni-td/uni-td.vue +99 -0
- package/src/uni-ui/lib/uni-th/uni-th.vue +310 -283
- package/src/uni-ui/lib/uni-tr/uni-tr.vue +194 -170
- package/src/version.ts +2 -2
@@ -1,184 +1,208 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
2
|
+
<!-- #ifdef H5 -->
|
3
|
+
<!-- <tr class="uni-table-tr">
|
4
|
+
<th
|
5
|
+
v-if="selection === 'selection' && ishead"
|
6
|
+
class="checkbox"
|
7
|
+
:class="{ 'tr-table--border': border }">
|
8
|
+
<table-checkbox
|
9
|
+
:checked="checked"
|
10
|
+
:indeterminate="indeterminate"
|
11
|
+
:disabled="disabled"
|
12
|
+
@checkboxSelected="checkboxSelected"></table-checkbox>
|
13
|
+
</th>
|
14
|
+
<slot></slot> -->
|
15
|
+
<!-- <uni-th class="th-fixed">123</uni-th> -->
|
16
|
+
<!-- </tr> -->
|
17
|
+
<!-- #endif -->
|
18
|
+
<!-- #ifndef H5 -->
|
19
|
+
<view class="uni-table-tr">
|
20
|
+
<view
|
21
|
+
v-if="selection === 'selection'"
|
22
|
+
class="checkbox"
|
23
|
+
:class="{ 'tr-table--border': border }">
|
24
|
+
<table-checkbox
|
25
|
+
:checked="checked"
|
26
|
+
:indeterminate="indeterminate"
|
27
|
+
:disabled="disabled"
|
28
|
+
@checkboxSelected="checkboxSelected"></table-checkbox>
|
29
|
+
</view>
|
30
|
+
<slot></slot>
|
31
|
+
</view>
|
32
|
+
<!-- #endif -->
|
21
33
|
</template>
|
22
34
|
|
23
35
|
<script>
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
36
|
+
import tableCheckbox from './table-checkbox.vue';
|
37
|
+
/**
|
38
|
+
* Tr 表格行组件
|
39
|
+
* @description 表格行组件 仅包含 th,td 组件
|
40
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=
|
41
|
+
*/
|
42
|
+
export default {
|
43
|
+
name: 'uniTr',
|
44
|
+
components: {
|
45
|
+
tableCheckbox
|
46
|
+
},
|
47
|
+
props: {
|
48
|
+
disabled: {
|
49
|
+
type: Boolean,
|
50
|
+
default: false
|
51
|
+
},
|
52
|
+
keyValue: {
|
53
|
+
type: [String, Number],
|
54
|
+
default: ''
|
55
|
+
}
|
56
|
+
},
|
57
|
+
options: {
|
58
|
+
// #ifdef MP-TOUTIAO
|
59
|
+
virtualHost: false,
|
60
|
+
// #endif
|
61
|
+
// #ifndef MP-TOUTIAO
|
62
|
+
virtualHost: true
|
63
|
+
// #endif
|
64
|
+
},
|
65
|
+
data() {
|
66
|
+
return {
|
67
|
+
value: false,
|
68
|
+
border: false,
|
69
|
+
selection: false,
|
70
|
+
widthThArr: [],
|
71
|
+
ishead: true,
|
72
|
+
checked: false,
|
73
|
+
indeterminate: false
|
74
|
+
};
|
75
|
+
},
|
76
|
+
created() {
|
77
|
+
this.root = this.getTable();
|
78
|
+
this.head = this.getTable('uniThead');
|
79
|
+
if (this.head) {
|
80
|
+
this.ishead = false;
|
81
|
+
this.head.init(this);
|
82
|
+
}
|
83
|
+
this.border = this.root.border;
|
84
|
+
this.selection = this.root.type;
|
85
|
+
this.root.trChildren.push(this);
|
86
|
+
const rowData = this.root.data.find(
|
87
|
+
(v) => v[this.root.rowKey] === this.keyValue
|
88
|
+
);
|
89
|
+
if (rowData) {
|
90
|
+
this.rowData = rowData;
|
91
|
+
}
|
92
|
+
this.root.isNodata();
|
93
|
+
},
|
94
|
+
mounted() {
|
95
|
+
if (this.widthThArr.length > 0) {
|
96
|
+
const selectionWidth = this.selection === 'selection' ? 50 : 0;
|
97
|
+
this.root.minWidth =
|
98
|
+
Number(this.widthThArr.reduce((a, b) => Number(a) + Number(b))) +
|
99
|
+
selectionWidth;
|
100
|
+
}
|
101
|
+
},
|
102
|
+
// #ifndef VUE3
|
103
|
+
destroyed() {
|
104
|
+
const index = this.root.trChildren.findIndex((i) => i === this);
|
105
|
+
this.root.trChildren.splice(index, 1);
|
106
|
+
this.root.isNodata();
|
107
|
+
},
|
108
|
+
// #endif
|
109
|
+
// #ifdef VUE3
|
110
|
+
unmounted() {
|
111
|
+
const index = this.root.trChildren.findIndex((i) => i === this);
|
112
|
+
this.root.trChildren.splice(index, 1);
|
113
|
+
this.root.isNodata();
|
114
|
+
},
|
115
|
+
// #endif
|
116
|
+
methods: {
|
117
|
+
minWidthUpdate(width) {
|
118
|
+
this.widthThArr.push(width);
|
119
|
+
if (this.widthThArr.length > 0) {
|
120
|
+
const selectionWidth = this.selection === 'selection' ? 50 : 0;
|
121
|
+
this.root.minWidth =
|
122
|
+
Number(this.widthThArr.reduce((a, b) => Number(a) + Number(b))) +
|
123
|
+
selectionWidth;
|
124
|
+
}
|
125
|
+
},
|
126
|
+
// 选中
|
127
|
+
checkboxSelected(e) {
|
128
|
+
let rootData = this.root.data.find(
|
129
|
+
(v) => v[this.root.rowKey] === this.keyValue
|
130
|
+
);
|
131
|
+
this.checked = e.checked;
|
132
|
+
this.root.check(
|
133
|
+
rootData || this,
|
134
|
+
e.checked,
|
135
|
+
rootData ? this.keyValue : null
|
136
|
+
);
|
137
|
+
},
|
138
|
+
change(e) {
|
139
|
+
this.root.trChildren.forEach((item) => {
|
140
|
+
if (item === this) {
|
141
|
+
this.root.check(this, e.detail.value.length > 0 ? true : false);
|
142
|
+
}
|
143
|
+
});
|
144
|
+
},
|
145
|
+
/**
|
146
|
+
* 获取父元素实例
|
147
|
+
*/
|
148
|
+
getTable(name = 'uniTable') {
|
149
|
+
let parent = this.$parent;
|
150
|
+
let parentName = parent.$options.name;
|
151
|
+
while (parentName !== name) {
|
152
|
+
parent = parent.$parent;
|
153
|
+
if (!parent) return false;
|
154
|
+
parentName = parent.$options.name;
|
155
|
+
}
|
156
|
+
return parent;
|
157
|
+
}
|
158
|
+
}
|
159
|
+
};
|
136
160
|
</script>
|
137
161
|
|
138
162
|
<style lang="scss">
|
139
|
-
|
163
|
+
$border-color: #ebeef5;
|
140
164
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
165
|
+
.uni-table-tr {
|
166
|
+
/* #ifndef APP-NVUE */
|
167
|
+
display: table-row;
|
168
|
+
transition: all 0.3s;
|
169
|
+
box-sizing: border-box;
|
170
|
+
/* #endif */
|
171
|
+
}
|
148
172
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
173
|
+
.checkbox {
|
174
|
+
padding: 0 8px;
|
175
|
+
width: 26px;
|
176
|
+
padding-left: 12px;
|
177
|
+
/* #ifndef APP-NVUE */
|
178
|
+
display: table-cell;
|
179
|
+
vertical-align: middle;
|
180
|
+
/* #endif */
|
181
|
+
color: #333;
|
182
|
+
font-weight: 500;
|
183
|
+
border-bottom: 1px $border-color solid;
|
184
|
+
font-size: 14px;
|
185
|
+
// text-align: center;
|
186
|
+
}
|
163
187
|
|
164
|
-
|
165
|
-
|
166
|
-
|
188
|
+
.tr-table--border {
|
189
|
+
border-right: 1px $border-color solid;
|
190
|
+
}
|
167
191
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
192
|
+
/* #ifndef APP-NVUE */
|
193
|
+
.uni-table-tr {
|
194
|
+
::v-deep .uni-table-th {
|
195
|
+
&.table--border:last-child {
|
196
|
+
// border-right: none;
|
197
|
+
}
|
198
|
+
}
|
175
199
|
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
200
|
+
::v-deep .uni-table-td {
|
201
|
+
&.table--border:last-child {
|
202
|
+
// border-right: none;
|
203
|
+
}
|
204
|
+
}
|
205
|
+
}
|
182
206
|
|
183
|
-
|
207
|
+
/* #endif */
|
184
208
|
</style>
|
package/src/version.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
3
3
|
* @name @vtj/materials
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
5
|
-
* @version 0.10.1
|
5
|
+
* @version 0.10.1
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
7
7
|
*/
|
8
|
-
export const version = '0.10.1
|
8
|
+
export const version = '0.10.1';
|