@tdesign/uniapp 0.7.3 → 0.8.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/CHANGELOG.md +23 -0
- package/README.md +1 -1
- package/dist/action-sheet/README.md +1 -1
- package/dist/action-sheet/action-sheet.vue +158 -150
- package/dist/action-sheet/props.ts +2 -2
- package/dist/action-sheet/type.ts +1 -1
- package/dist/avatar/avatar.vue +89 -87
- package/dist/avatar-group/avatar-group.vue +69 -67
- package/dist/back-top/back-top.vue +60 -58
- package/dist/badge/badge.vue +69 -59
- package/dist/button/button.vue +121 -116
- package/dist/button/props.ts +2 -2
- package/dist/button/type.ts +1 -1
- package/dist/calendar/calendar-header.vue +4 -4
- package/dist/calendar/calendar.vue +308 -297
- package/dist/calendar/template.vue +1 -1
- package/dist/cascader/README.en-US.md +2 -1
- package/dist/cascader/README.md +2 -1
- package/dist/cascader/cascader.vue +340 -328
- package/dist/cascader/props.ts +6 -1
- package/dist/cascader/type.ts +6 -0
- package/dist/cell/cell.vue +127 -121
- package/dist/cell-group/cell-group.vue +32 -30
- package/dist/check-tag/check-tag.vue +73 -71
- package/dist/checkbox/checkbox.vue +127 -127
- package/dist/checkbox/props.ts +6 -6
- package/dist/checkbox/type.ts +3 -3
- package/dist/checkbox-group/checkbox-group.vue +175 -173
- package/dist/checkbox-group/props.ts +6 -6
- package/dist/checkbox-group/type.ts +4 -4
- package/dist/col/col.vue +26 -24
- package/dist/collapse/collapse.vue +83 -81
- package/dist/collapse-panel/collapse-panel.vue +121 -119
- package/dist/collapse-panel/props.ts +4 -4
- package/dist/collapse-panel/type.ts +2 -2
- package/dist/color-picker/README.md +1 -1
- package/dist/color-picker/color-picker.vue +324 -322
- package/dist/color-picker/props.ts +2 -2
- package/dist/color-picker/template.vue +14 -10
- package/dist/common/common.ts +1 -0
- package/dist/common/style/theme/index.css +5 -5
- package/dist/common/utils.js +7 -2
- package/dist/common/validator.js +172 -0
- package/dist/config-provider/README.en-US.md +184 -0
- package/dist/config-provider/README.md +234 -0
- package/dist/config-provider/config-provider.vue +105 -0
- package/dist/config-provider/config-store.js +70 -0
- package/dist/config-provider/props.ts +16 -0
- package/dist/config-provider/reactive-state.js +39 -0
- package/dist/config-provider/type.ts +401 -0
- package/dist/config-provider/use-config.js +29 -0
- package/dist/config-provider/utils.js +29 -0
- package/dist/count-down/count-down.vue +98 -97
- package/dist/date-time-picker/date-time-picker.vue +410 -395
- package/dist/demo/demo.vue +1 -0
- package/dist/dialog/dialog.vue +175 -173
- package/dist/divider/divider.vue +38 -36
- package/dist/draggable/draggable.vue +60 -58
- package/dist/drawer/README.md +1 -1
- package/dist/drawer/drawer.vue +48 -46
- package/dist/dropdown-item/dropdown-item.vue +209 -207
- package/dist/dropdown-item/props.ts +4 -4
- package/dist/dropdown-item/type.ts +3 -3
- package/dist/dropdown-menu/dropdown-menu.vue +93 -99
- package/dist/empty/empty.vue +43 -42
- package/dist/fab/fab.vue +88 -86
- package/dist/footer/footer.vue +36 -34
- package/dist/form/README.en-US.md +17 -24
- package/dist/form/README.md +18 -25
- package/dist/form/form.css +1 -166
- package/dist/form/form.vue +251 -236
- package/dist/form/props.ts +2 -21
- package/dist/form/type.ts +7 -70
- package/dist/form-item/README.en-US.md +4 -5
- package/dist/form-item/README.md +4 -5
- package/dist/form-item/form-item.css +69 -96
- package/dist/form-item/form-item.vue +315 -336
- package/dist/form-item/form-model.ts +125 -173
- package/dist/form-item/props.ts +4 -17
- package/dist/form-item/type.ts +43 -1
- package/dist/grid/grid.vue +53 -51
- package/dist/grid-item/grid-item.vue +121 -119
- package/dist/guide/README.md +1 -1
- package/dist/guide/guide.vue +281 -277
- package/dist/icon/README.md +2 -4
- package/dist/icon/icon.vue +78 -76
- package/dist/image/README.md +1 -1
- package/dist/image/image.vue +103 -101
- package/dist/image-viewer/image-viewer.vue +160 -158
- package/dist/image-viewer/props.ts +2 -2
- package/dist/image-viewer/type.ts +1 -1
- package/dist/index.js +3 -0
- package/dist/indexes/indexes.vue +264 -267
- package/dist/indexes-anchor/indexes-anchor.vue +41 -41
- package/dist/input/input.vue +192 -192
- package/dist/input/props.ts +6 -6
- package/dist/input/type.ts +3 -3
- package/dist/link/link.vue +73 -71
- package/dist/loading/loading.vue +59 -59
- package/dist/locale/ar_KW.ts +157 -0
- package/dist/locale/en_US.ts +146 -0
- package/dist/locale/it_IT.ts +145 -0
- package/dist/locale/ja_JP.ts +132 -0
- package/dist/locale/ko_KR.ts +132 -0
- package/dist/locale/ru_RU.ts +157 -0
- package/dist/locale/zh_CN.ts +133 -0
- package/dist/locale/zh_TW.ts +132 -0
- package/dist/message/message.vue +181 -173
- package/dist/message/props.ts +2 -2
- package/dist/message/type.ts +1 -1
- package/dist/message-item/message-item.vue +192 -184
- package/dist/mixins/using-config.js +39 -0
- package/dist/navbar/navbar.vue +201 -199
- package/dist/notice-bar/notice-bar.vue +175 -171
- package/dist/notice-bar/props.ts +2 -2
- package/dist/notice-bar/type.ts +1 -1
- package/dist/npm/dayjs/esm/locale/ar.js +81 -0
- package/dist/npm/dayjs/esm/locale/it.js +39 -0
- package/dist/overlay/overlay.vue +50 -48
- package/dist/picker/picker.vue +168 -161
- package/dist/picker-item/picker-item.vue +269 -269
- package/dist/popover/README.md +1 -1
- package/dist/popover/popover.vue +262 -261
- package/dist/popover/props.ts +4 -4
- package/dist/popover/type.ts +2 -2
- package/dist/popup/popup.vue +46 -45
- package/dist/progress/README.md +1 -1
- package/dist/progress/progress.vue +76 -76
- package/dist/pull-down-refresh/props.ts +2 -2
- package/dist/pull-down-refresh/pull-down-refresh.vue +240 -234
- package/dist/pull-down-refresh/type.ts +1 -1
- package/dist/qrcode/README.md +1 -1
- package/dist/qrcode/components/qrcode-canvas/qrcode-canvas.vue +340 -338
- package/dist/qrcode/components/qrcode-status/qrcode-status.vue +6 -6
- package/dist/qrcode/qrcode.vue +93 -87
- package/dist/radio/props.ts +6 -6
- package/dist/radio/radio.vue +118 -120
- package/dist/radio/type.ts +3 -3
- package/dist/radio-group/props.ts +4 -4
- package/dist/radio-group/radio-group.vue +136 -134
- package/dist/radio-group/type.ts +4 -4
- package/dist/rate/computed.js +2 -2
- package/dist/rate/props.ts +4 -4
- package/dist/rate/rate.vue +155 -154
- package/dist/rate/type.ts +2 -2
- package/dist/result/result.vue +41 -39
- package/dist/row/row.vue +38 -36
- package/dist/scroll-view/scroll-view.vue +24 -22
- package/dist/search/props.ts +2 -2
- package/dist/search/search.vue +127 -125
- package/dist/search/type.ts +1 -1
- package/dist/side-bar/side-bar.vue +57 -55
- package/dist/side-bar-item/side-bar-item.vue +86 -86
- package/dist/skeleton/skeleton.vue +126 -124
- package/dist/slider/README.md +1 -1
- package/dist/slider/props.ts +2 -2
- package/dist/slider/slider.vue +457 -457
- package/dist/slider/type.ts +1 -1
- package/dist/step-item/step-item.vue +77 -75
- package/dist/stepper/props.ts +2 -2
- package/dist/stepper/stepper.vue +168 -149
- package/dist/stepper/type.ts +1 -1
- package/dist/steps/props.ts +2 -2
- package/dist/steps/steps.vue +83 -81
- package/dist/steps/type.ts +1 -1
- package/dist/sticky/sticky.vue +104 -102
- package/dist/swipe-cell/swipe-cell.vue +91 -89
- package/dist/swiper/README.md +1 -1
- package/dist/swiper/swiper.vue +91 -89
- package/dist/swiper-nav/swiper-nav.vue +38 -36
- package/dist/switch/props.ts +2 -2
- package/dist/switch/switch.vue +62 -62
- package/dist/switch/type.ts +1 -1
- package/dist/tab-bar/tab-bar.vue +88 -86
- package/dist/tab-bar-item/tab-bar-item.vue +85 -82
- package/dist/tab-panel/tab-panel.vue +66 -64
- package/dist/tabs/tabs.vue +294 -287
- package/dist/tag/tag.vue +79 -77
- package/dist/textarea/props.ts +6 -6
- package/dist/textarea/textarea.vue +127 -126
- package/dist/textarea/type.ts +3 -3
- package/dist/toast/toast.vue +107 -106
- package/dist/transition/transition.vue +30 -28
- package/dist/tree-select/tree-select.vue +151 -151
- package/dist/types/config-provider.d.ts +7 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/popover.d.ts +7 -0
- package/dist/upload/README.en-US.md +13 -14
- package/dist/upload/README.md +11 -12
- package/dist/upload/props.ts +2 -4
- package/dist/upload/type.ts +12 -11
- package/dist/upload/upload.css +1 -1
- package/dist/upload/upload.vue +672 -512
- package/dist/watermark/watermark.vue +151 -149
- package/global.d.ts +2 -0
- package/package.json +15 -3
- package/dist/form/form-item-props.ts +0 -56
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
3
|
:class="classPrefix + ' ' + tClass"
|
|
4
|
-
:style="tools._style([customStyle])"
|
|
4
|
+
:style="'' + tools._style([customStyle])"
|
|
5
5
|
>
|
|
6
6
|
<block v-if="content">
|
|
7
7
|
{{ content }}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
/>
|
|
17
17
|
<view
|
|
18
18
|
:class="movable ? 'watermark-move' : ''"
|
|
19
|
-
:style="tools._style(watermarkStyle)"
|
|
19
|
+
:style="'' + tools._style(watermarkStyle)"
|
|
20
20
|
/>
|
|
21
21
|
</view>
|
|
22
22
|
</template>
|
|
@@ -32,162 +32,164 @@ import randomMovingStyle from './utils/randomMovingStyle';
|
|
|
32
32
|
|
|
33
33
|
const name = `${prefix}-watermark`;
|
|
34
34
|
|
|
35
|
-
export default
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
35
|
+
export default {
|
|
36
|
+
...uniComponent({
|
|
37
|
+
name,
|
|
38
|
+
options: {
|
|
39
|
+
styleIsolation: 'shared',
|
|
40
|
+
},
|
|
41
|
+
externalClasses: [`${prefix}-class`],
|
|
42
|
+
props: {
|
|
43
|
+
...watermarkProps,
|
|
44
|
+
},
|
|
45
|
+
data() {
|
|
46
|
+
return {
|
|
47
|
+
classPrefix: name,
|
|
48
|
+
tools,
|
|
49
|
+
watermarkStyle: {},
|
|
50
|
+
initialed: false,
|
|
51
|
+
canvasId: `watermark-canvas-${Math.random().toString(36)
|
|
52
|
+
.slice(2, 11)}`,
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
computed: {
|
|
56
|
+
canvasStyle() {
|
|
57
|
+
let result = 'width: 100px; height: 100px;';
|
|
58
|
+
let shouldHide = true;
|
|
58
59
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
// #ifdef APP-PLUS || MP-ALIPAY
|
|
61
|
+
if (!this.initialed) {
|
|
62
|
+
shouldHide = false;
|
|
63
|
+
}
|
|
64
|
+
// #endif
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
if (shouldHide) {
|
|
67
|
+
result += 'display: none;';
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
},
|
|
69
71
|
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
layout: 'renderWatermark',
|
|
87
|
-
},
|
|
88
|
-
async mounted() {
|
|
89
|
-
await nextTick();
|
|
90
|
-
this.renderWatermark();
|
|
91
|
-
},
|
|
92
|
-
methods: {
|
|
93
|
-
watermarkColor() {
|
|
94
|
-
return appBaseInfo.theme === 'dark'
|
|
95
|
-
? 'rgba(238, 238, 238, 0.1)'
|
|
96
|
-
: 'rgba(0, 0, 0, 0.1)';
|
|
72
|
+
watch: {
|
|
73
|
+
watermarkContent: 'renderWatermark',
|
|
74
|
+
movable: 'renderWatermark',
|
|
75
|
+
rotate: 'renderWatermark',
|
|
76
|
+
x: 'renderWatermark',
|
|
77
|
+
y: 'renderWatermark',
|
|
78
|
+
width: 'renderWatermark',
|
|
79
|
+
height: 'renderWatermark',
|
|
80
|
+
alpha: 'renderWatermark',
|
|
81
|
+
lineSpace: 'renderWatermark',
|
|
82
|
+
moveInterval: 'renderWatermark',
|
|
83
|
+
zIndex: 'renderWatermark',
|
|
84
|
+
offset: 'renderWatermark',
|
|
85
|
+
removable: 'renderWatermark',
|
|
86
|
+
isRepeat: 'renderWatermark',
|
|
87
|
+
layout: 'renderWatermark',
|
|
97
88
|
},
|
|
98
|
-
|
|
99
|
-
|
|
89
|
+
async mounted() {
|
|
90
|
+
await nextTick();
|
|
91
|
+
this.renderWatermark();
|
|
92
|
+
},
|
|
93
|
+
methods: {
|
|
94
|
+
watermarkColor() {
|
|
95
|
+
return appBaseInfo.theme === 'dark'
|
|
96
|
+
? 'rgba(238, 238, 238, 0.1)'
|
|
97
|
+
: 'rgba(0, 0, 0, 0.1)';
|
|
98
|
+
},
|
|
99
|
+
renderWatermark() {
|
|
100
|
+
const query = uni.createSelectorQuery().in(this);
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
102
|
+
query
|
|
103
|
+
.select(`#${this.canvasId}`)
|
|
104
|
+
.fields({ node: true, size: true })
|
|
105
|
+
.exec(async (res) => {
|
|
106
|
+
if (!res[0]?.node) {
|
|
107
|
+
console.error('Canvas node not found');
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const canvas = res[0].node;
|
|
111
|
+
const gapX = this.movable ? 0 : this.x;
|
|
112
|
+
const gapY = this.movable ? 0 : this.y;
|
|
113
|
+
const offset = this.offset || [];
|
|
114
|
+
const offsetLeft = offset[0] || gapX / 2;
|
|
115
|
+
const offsetTop = offset[1] || gapY / 2;
|
|
115
116
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
117
|
+
const bgImageOptions = {
|
|
118
|
+
width: this.width,
|
|
119
|
+
height: this.height,
|
|
120
|
+
rotate: this.movable ? 0 : this.rotate,
|
|
121
|
+
lineSpace: this.lineSpace,
|
|
122
|
+
alpha: this.alpha,
|
|
123
|
+
gapX,
|
|
124
|
+
gapY,
|
|
125
|
+
watermarkContent: this.watermarkContent,
|
|
126
|
+
offsetLeft,
|
|
127
|
+
offsetTop,
|
|
128
|
+
watermarkColor: this.watermarkColor(),
|
|
129
|
+
layout: this.layout,
|
|
130
|
+
};
|
|
131
|
+
generateBase64Url.call(
|
|
132
|
+
this,
|
|
133
|
+
canvas,
|
|
134
|
+
this.canvasId,
|
|
135
|
+
bgImageOptions,
|
|
136
|
+
(base64Url, backgroundSize) => {
|
|
137
|
+
let animationVars = {};
|
|
138
|
+
if (this.movable) {
|
|
139
|
+
const {
|
|
140
|
+
left0,
|
|
141
|
+
left25,
|
|
142
|
+
left50,
|
|
143
|
+
left75,
|
|
144
|
+
top0,
|
|
145
|
+
top25,
|
|
146
|
+
top50,
|
|
147
|
+
top75,
|
|
148
|
+
} = randomMovingStyle();
|
|
149
|
+
animationVars = {
|
|
150
|
+
'--watermark-left-0': left0,
|
|
151
|
+
'--watermark-left-25': left25,
|
|
152
|
+
'--watermark-left-50': left50,
|
|
153
|
+
'--watermark-left-75': left75,
|
|
154
|
+
'--watermark-top-0': top0,
|
|
155
|
+
'--watermark-top-25': top25,
|
|
156
|
+
'--watermark-top-50': top50,
|
|
157
|
+
'--watermark-top-75': top75,
|
|
158
|
+
'--watermark-animation-duration': `${
|
|
159
|
+
(this.moveInterval * 4) / 60
|
|
160
|
+
}s`,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
162
163
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
164
|
+
this.watermarkStyle = {
|
|
165
|
+
zIndex: this.zIndex,
|
|
166
|
+
position: 'absolute',
|
|
167
|
+
left: 0,
|
|
168
|
+
right: 0,
|
|
169
|
+
top: 0,
|
|
170
|
+
bottom: 0,
|
|
171
|
+
width: '100%',
|
|
172
|
+
height: '100%',
|
|
173
|
+
backgroundSize: `${
|
|
174
|
+
backgroundSize?.width || gapX + this.width
|
|
175
|
+
}px`,
|
|
176
|
+
pointerEvents: 'none',
|
|
177
|
+
backgroundRepeat: this.movable ? 'no-repeat' : 'repeat',
|
|
178
|
+
backgroundImage: `url('${base64Url}')`,
|
|
179
|
+
...animationVars,
|
|
180
|
+
};
|
|
181
|
+
},
|
|
182
|
+
() => {
|
|
183
|
+
this.initialed = true;
|
|
184
|
+
},
|
|
185
|
+
).catch((err) => {
|
|
186
|
+
console.error('render watermark failed', err);
|
|
187
|
+
});
|
|
186
188
|
});
|
|
187
|
-
|
|
189
|
+
},
|
|
188
190
|
},
|
|
189
|
-
},
|
|
190
|
-
}
|
|
191
|
+
}),
|
|
192
|
+
};
|
|
191
193
|
</script>
|
|
192
194
|
|
|
193
195
|
<style scoped src="./watermark.css"></style>
|
package/global.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ declare module 'vue' {
|
|
|
17
17
|
TCollapse: typeof import('@tdesign/uniapp/collapse/collapse.vue').default;
|
|
18
18
|
TCollapsePanel: typeof import('@tdesign/uniapp/collapse-panel/collapse-panel.vue').default;
|
|
19
19
|
TColorPicker: typeof import('@tdesign/uniapp/color-picker/color-picker.vue').default;
|
|
20
|
+
TConfigProvider: typeof import('@tdesign/uniapp/config-provider/config-provider.vue').default;
|
|
20
21
|
TCountDown: typeof import('@tdesign/uniapp/count-down/count-down.vue').default;
|
|
21
22
|
TDateTimePicker: typeof import('@tdesign/uniapp/date-time-picker/date-time-picker.vue').default;
|
|
22
23
|
TDialog: typeof import('@tdesign/uniapp/dialog/dialog.vue').default;
|
|
@@ -46,6 +47,7 @@ declare module 'vue' {
|
|
|
46
47
|
TOverlay: typeof import('@tdesign/uniapp/overlay/overlay.vue').default;
|
|
47
48
|
TPicker: typeof import('@tdesign/uniapp/picker/picker.vue').default;
|
|
48
49
|
TPickerItem: typeof import('@tdesign/uniapp/picker-item/picker-item.vue').default;
|
|
50
|
+
TPopover: typeof import('@tdesign/uniapp/popover/popover.vue').default;
|
|
49
51
|
TPopup: typeof import('@tdesign/uniapp/popup/popup.vue').default;
|
|
50
52
|
TProgress: typeof import('@tdesign/uniapp/progress/progress.vue').default;
|
|
51
53
|
TPullDownRefresh: typeof import('@tdesign/uniapp/pull-down-refresh/pull-down-refresh.vue').default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tdesign/uniapp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"id": "tdesign-uniapp",
|
|
5
5
|
"title": "tdesign-uniapp",
|
|
6
6
|
"description": "TDesign Component for UniApp",
|
|
@@ -34,8 +34,14 @@
|
|
|
34
34
|
"typings": "./dist/types/index.d.ts",
|
|
35
35
|
"types": "./dist/types/index.d.ts",
|
|
36
36
|
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./dist/types/index.d.ts",
|
|
39
|
+
"default": "./dist/index.js"
|
|
40
|
+
},
|
|
37
41
|
"./*": "./dist/*",
|
|
38
|
-
"./global":
|
|
42
|
+
"./global": {
|
|
43
|
+
"types": "./global.d.ts"
|
|
44
|
+
},
|
|
39
45
|
"./action-sheet/action-sheet.vue": {
|
|
40
46
|
"types": "./dist/types/action-sheet.d.ts",
|
|
41
47
|
"import": "./dist/action-sheet/action-sheet.vue",
|
|
@@ -116,6 +122,11 @@
|
|
|
116
122
|
"import": "./dist/collapse-panel/collapse-panel.vue",
|
|
117
123
|
"default": "./dist/collapse-panel/collapse-panel.vue"
|
|
118
124
|
},
|
|
125
|
+
"./config-provider/config-provider.vue": {
|
|
126
|
+
"types": "./dist/types/config-provider.d.ts",
|
|
127
|
+
"import": "./dist/config-provider/config-provider.vue",
|
|
128
|
+
"default": "./dist/config-provider/config-provider.vue"
|
|
129
|
+
},
|
|
119
130
|
"./color-picker/color-picker.vue": {
|
|
120
131
|
"types": "./dist/types/color-picker.d.ts",
|
|
121
132
|
"import": "./dist/color-picker/color-picker.vue",
|
|
@@ -464,7 +475,7 @@
|
|
|
464
475
|
"stylelint-config-standard": "^39.0.1",
|
|
465
476
|
"stylelint-less": "^3.0.1",
|
|
466
477
|
"stylelint-scss": "6.10.0",
|
|
467
|
-
"t-comm": "^
|
|
478
|
+
"t-comm": "^3.1.14",
|
|
468
479
|
"tslib": "^2.8.1",
|
|
469
480
|
"typescript": "~4.7.4",
|
|
470
481
|
"vite": "^6.3.5",
|
|
@@ -510,6 +521,7 @@
|
|
|
510
521
|
"init": "node ./example/script/watch/init.js && node ./example/script/pages/index.js",
|
|
511
522
|
"watch": "node ./example/script/watch/watch.js",
|
|
512
523
|
"release:prepare": "node ./example/script/release/prepare.js",
|
|
524
|
+
"gen:types": "node ./example/script/types/index.js",
|
|
513
525
|
"commit": "git-cz"
|
|
514
526
|
}
|
|
515
527
|
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
|
|
5
|
-
* */
|
|
6
|
-
|
|
7
|
-
import type { TdFormItemProps } from '../form/type';
|
|
8
|
-
export default {
|
|
9
|
-
/** 是否显示右侧箭头 */
|
|
10
|
-
arrow: Boolean,
|
|
11
|
-
/** label 原生属性 */
|
|
12
|
-
for: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: '',
|
|
15
|
-
},
|
|
16
|
-
/** 表单项说明内容 */
|
|
17
|
-
help: {
|
|
18
|
-
type: String,
|
|
19
|
-
},
|
|
20
|
-
/** 字段标签名称 */
|
|
21
|
-
label: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: '' as TdFormItemProps['label'],
|
|
24
|
-
},
|
|
25
|
-
/** 表单字段标签对齐方式:左对齐、右对齐、顶部对齐。默认使用 Form 的对齐方式,优先级高于 Form.labelAlign */
|
|
26
|
-
labelAlign: {
|
|
27
|
-
type: String,
|
|
28
|
-
validator(val: TdFormItemProps['labelAlign']): boolean {
|
|
29
|
-
if (!val) return true;
|
|
30
|
-
return ['left', 'right', 'top'].includes(val);
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
/** 可以整体设置标签宽度,优先级高于 Form.labelWidth */
|
|
34
|
-
labelWidth: {
|
|
35
|
-
type: [String, Number],
|
|
36
|
-
},
|
|
37
|
-
/** 表单字段名称 */
|
|
38
|
-
name: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: '',
|
|
41
|
-
},
|
|
42
|
-
/** 是否显示必填符号(*),优先级高于 Form.requiredMark */
|
|
43
|
-
requiredMark: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: undefined,
|
|
46
|
-
},
|
|
47
|
-
/** 表单字段校验规则 */
|
|
48
|
-
rules: {
|
|
49
|
-
type: Array,
|
|
50
|
-
},
|
|
51
|
-
/** 校验不通过时,是否显示错误提示信息,优先级高于 `Form.showErrorMessage` */
|
|
52
|
-
showErrorMessage: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: undefined,
|
|
55
|
-
},
|
|
56
|
-
};
|