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