@tdesign/uniapp 0.7.1 → 0.7.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/CHANGELOG.md +21 -0
- package/README.md +31 -1
- package/dist/action-sheet/action-sheet.vue +3 -5
- package/dist/avatar/avatar.vue +6 -6
- package/dist/avatar-group/avatar-group.vue +1 -3
- package/dist/back-top/back-top.vue +13 -15
- package/dist/badge/badge.vue +1 -3
- package/dist/button/button.vue +16 -15
- package/dist/calendar/README.en-US.md +1 -0
- package/dist/calendar/README.md +1 -0
- package/dist/calendar/calendar-header.vue +1 -3
- package/dist/calendar/calendar.vue +28 -19
- package/dist/calendar/props.ts +5 -0
- package/dist/calendar/template.vue +1 -3
- package/dist/calendar/type.ts +6 -0
- package/dist/cascader/cascader.vue +1 -3
- package/dist/cell/cell.vue +51 -35
- package/dist/cell-group/cell-group.vue +1 -3
- package/dist/check-tag/check-tag.vue +12 -15
- package/dist/checkbox/README.en-US.md +6 -6
- package/dist/checkbox/README.md +5 -5
- package/dist/checkbox/checkbox.vue +13 -15
- package/dist/checkbox/type.ts +3 -1
- package/dist/checkbox-group/type.ts +2 -0
- package/dist/col/col.vue +1 -3
- package/dist/collapse/collapse.vue +1 -3
- package/dist/collapse-panel/collapse-panel.vue +1 -3
- package/dist/color-picker/color-picker.vue +2 -4
- package/dist/color-picker/template.vue +1 -3
- package/dist/common/src/instantiationDecorator.js +6 -0
- package/dist/common/style/theme/index.css +52 -56
- package/dist/count-down/count-down.vue +2 -4
- package/dist/date-time-picker/date-time-picker.vue +1 -3
- package/dist/dialog/dialog.vue +72 -73
- package/dist/divider/divider.vue +1 -3
- package/dist/draggable/draggable.vue +1 -3
- package/dist/drawer/drawer.vue +1 -3
- package/dist/dropdown-item/dropdown-item.vue +1 -3
- package/dist/dropdown-menu/dropdown-menu.vue +12 -14
- package/dist/empty/empty.vue +1 -3
- package/dist/fab/fab.vue +1 -3
- package/dist/footer/footer.vue +1 -3
- package/dist/form/form.vue +1 -3
- package/dist/form-item/form-item.css +16 -11
- package/dist/form-item/form-item.vue +2 -7
- package/dist/grid/grid.vue +1 -3
- package/dist/grid-item/grid-item.vue +1 -3
- package/dist/guide/content.vue +1 -3
- package/dist/guide/guide.vue +3 -8
- package/dist/icon/icon.vue +1 -3
- package/dist/image/image.vue +1 -3
- package/dist/image-viewer/image-viewer.vue +27 -30
- package/dist/indexes/indexes.vue +5 -7
- package/dist/indexes-anchor/indexes-anchor.vue +1 -3
- package/dist/input/input.vue +31 -31
- package/dist/link/link.vue +25 -26
- package/dist/loading/loading.vue +2 -2
- package/dist/message/index.d.ts +1 -1
- package/dist/message/message.interface.ts +2 -1
- package/dist/message-item/message-item.vue +34 -36
- package/dist/mixins/page-scroll.js +1 -1
- package/dist/navbar/navbar.vue +46 -33
- package/dist/notice-bar/notice-bar.vue +24 -26
- package/dist/overlay/overlay.vue +5 -7
- package/dist/picker/picker.vue +3 -4
- package/dist/picker-item/picker-item.vue +2 -4
- package/dist/popover/popover.vue +1 -3
- package/dist/popup/popup.vue +1 -3
- package/dist/progress/progress.vue +1 -3
- package/dist/pull-down-refresh/pull-down-refresh.vue +13 -15
- package/dist/qrcode/components/qrcode-canvas/qrcode-canvas.vue +1 -3
- package/dist/qrcode/components/qrcode-status/qrcode-status.vue +1 -3
- package/dist/qrcode/qrcode.vue +1 -3
- package/dist/radio/radio.vue +17 -19
- package/dist/rate/rate.vue +1 -3
- package/dist/result/result.vue +1 -3
- package/dist/row/row.vue +1 -3
- package/dist/search/search.vue +8 -3
- package/dist/side-bar/side-bar.vue +1 -3
- package/dist/side-bar-item/side-bar-item.vue +12 -15
- package/dist/skeleton/skeleton.vue +2 -4
- package/dist/slider/slider.vue +1 -3
- package/dist/step-item/step-item.vue +1 -3
- package/dist/stepper/stepper.vue +1 -3
- package/dist/steps/steps.vue +1 -2
- package/dist/sticky/sticky.vue +1 -3
- package/dist/swipe-cell/swipe-cell.vue +2 -5
- package/dist/swiper/swiper.vue +1 -3
- package/dist/swiper-nav/swiper-nav.vue +1 -3
- package/dist/switch/switch.vue +1 -3
- package/dist/tab-bar/tab-bar.vue +2 -1
- package/dist/tab-bar-item/tab-bar-item.vue +22 -25
- package/dist/tab-panel/tab-panel.vue +1 -3
- package/dist/tabs/tabs.vue +1 -2
- package/dist/tag/tag.vue +23 -26
- package/dist/textarea/textarea.vue +1 -3
- package/dist/toast/toast.vue +12 -14
- package/dist/transition/transition.vue +1 -3
- package/dist/tree-select/tree-select.vue +6 -9
- package/dist/upload/upload.vue +1 -3
- package/dist/watermark/watermark.vue +1 -2
- package/package.json +3 -1
package/dist/dialog/dialog.vue
CHANGED
|
@@ -118,39 +118,39 @@
|
|
|
118
118
|
</t-button>
|
|
119
119
|
</template>
|
|
120
120
|
<slot name="actions" />
|
|
121
|
-
<template v-if="
|
|
121
|
+
<template v-if="innerCancel">
|
|
122
122
|
<t-button
|
|
123
|
-
:t-id="
|
|
124
|
-
:custom-style="
|
|
125
|
-
:block="
|
|
126
|
-
:t-class="
|
|
127
|
-
:class="
|
|
128
|
-
:disabled="
|
|
123
|
+
:t-id="innerCancel.tId"
|
|
124
|
+
:custom-style="innerCancel.style"
|
|
125
|
+
:block="innerCancel.block"
|
|
126
|
+
:t-class="innerCancel.tClass"
|
|
127
|
+
:class="innerCancel.class"
|
|
128
|
+
:disabled="innerCancel.disabled"
|
|
129
129
|
:data-type="'cancel'"
|
|
130
|
-
:data-extra="
|
|
131
|
-
:custom-dataset="
|
|
132
|
-
:content="
|
|
133
|
-
:icon="
|
|
134
|
-
:loading="
|
|
135
|
-
:loading-props="
|
|
136
|
-
:theme="
|
|
137
|
-
:ghost="
|
|
138
|
-
:shape="
|
|
139
|
-
:size="
|
|
140
|
-
:variant="
|
|
141
|
-
:open-type="
|
|
142
|
-
:hover-class="
|
|
143
|
-
:hover-stop-propagation="
|
|
144
|
-
:hover-start-time="
|
|
145
|
-
:hover-stay-time="
|
|
146
|
-
:lang="
|
|
147
|
-
:session-from="
|
|
148
|
-
:send-message-title="
|
|
149
|
-
:send-message-path="
|
|
150
|
-
:send-message-img="
|
|
151
|
-
:app-parameter="
|
|
152
|
-
:show-message-card="
|
|
153
|
-
:aria-label="
|
|
130
|
+
:data-extra="innerCancel.index"
|
|
131
|
+
:custom-dataset="innerCancel.customDataset"
|
|
132
|
+
:content="innerCancel.content"
|
|
133
|
+
:icon="innerCancel.icon"
|
|
134
|
+
:loading="innerCancel.loading"
|
|
135
|
+
:loading-props="innerCancel.loadingProps"
|
|
136
|
+
:theme="innerCancel.theme"
|
|
137
|
+
:ghost="innerCancel.ghost"
|
|
138
|
+
:shape="innerCancel.shape"
|
|
139
|
+
:size="innerCancel.size"
|
|
140
|
+
:variant="innerCancel.variant"
|
|
141
|
+
:open-type="innerCancel.openType"
|
|
142
|
+
:hover-class="innerCancel.hoverClass"
|
|
143
|
+
:hover-stop-propagation="innerCancel.hoverStopPropagation"
|
|
144
|
+
:hover-start-time="innerCancel.hoverStartTime"
|
|
145
|
+
:hover-stay-time="innerCancel.hoverStayTime"
|
|
146
|
+
:lang="innerCancel.lang"
|
|
147
|
+
:session-from="innerCancel.sessionFrom"
|
|
148
|
+
:send-message-title="innerCancel.sendMessageTitle"
|
|
149
|
+
:send-message-path="innerCancel.sendMessagePath"
|
|
150
|
+
:send-message-img="innerCancel.sendMessageImg"
|
|
151
|
+
:app-parameter="innerCancel.appParameter"
|
|
152
|
+
:show-message-card="innerCancel.showMessageCard"
|
|
153
|
+
:aria-label="innerCancel.ariaLabel"
|
|
154
154
|
@click="onCancel($event, { type: 'action', extra: 0 })"
|
|
155
155
|
@getuserinfo="onCancel($event, { type: 'action', extra: 0 })"
|
|
156
156
|
@contact="onCancel($event, { type: 'action', extra: 0 })"
|
|
@@ -160,43 +160,43 @@
|
|
|
160
160
|
@launchapp="onCancel($event, { type: 'action', extra: 0 })"
|
|
161
161
|
@agreeprivacyauthorization="onCancel($event, { type: 'action', extra: 0 })"
|
|
162
162
|
>
|
|
163
|
-
<slot v-if="
|
|
163
|
+
<slot v-if="innerCancel.useDefaultSlot || false" />
|
|
164
164
|
</t-button>
|
|
165
165
|
</template>
|
|
166
166
|
<slot name="cancel-btn" />
|
|
167
|
-
<template v-if="
|
|
167
|
+
<template v-if="innerConfirm">
|
|
168
168
|
<t-button
|
|
169
|
-
:t-id="
|
|
170
|
-
:custom-style="
|
|
171
|
-
:block="
|
|
172
|
-
:t-class="
|
|
173
|
-
:class="
|
|
174
|
-
:disabled="
|
|
169
|
+
:t-id="innerConfirm.tId"
|
|
170
|
+
:custom-style="innerConfirm.style"
|
|
171
|
+
:block="innerConfirm.block"
|
|
172
|
+
:t-class="innerConfirm.tClass"
|
|
173
|
+
:class="innerConfirm.class"
|
|
174
|
+
:disabled="innerConfirm.disabled"
|
|
175
175
|
:data-type="'confirm'"
|
|
176
|
-
:data-extra="
|
|
177
|
-
:custom-dataset="
|
|
178
|
-
:content="
|
|
179
|
-
:icon="
|
|
180
|
-
:loading="
|
|
181
|
-
:loading-props="
|
|
182
|
-
:theme="
|
|
183
|
-
:ghost="
|
|
184
|
-
:shape="
|
|
185
|
-
:size="
|
|
186
|
-
:variant="
|
|
187
|
-
:open-type="
|
|
188
|
-
:hover-class="
|
|
189
|
-
:hover-stop-propagation="
|
|
190
|
-
:hover-start-time="
|
|
191
|
-
:hover-stay-time="
|
|
192
|
-
:lang="
|
|
193
|
-
:session-from="
|
|
194
|
-
:send-message-title="
|
|
195
|
-
:send-message-path="
|
|
196
|
-
:send-message-img="
|
|
197
|
-
:app-parameter="
|
|
198
|
-
:show-message-card="
|
|
199
|
-
:aria-label="
|
|
176
|
+
:data-extra="innerConfirm.index"
|
|
177
|
+
:custom-dataset="innerConfirm.customDataset"
|
|
178
|
+
:content="innerConfirm.content"
|
|
179
|
+
:icon="innerConfirm.icon"
|
|
180
|
+
:loading="innerConfirm.loading"
|
|
181
|
+
:loading-props="innerConfirm.loadingProps"
|
|
182
|
+
:theme="innerConfirm.theme || 'primary'"
|
|
183
|
+
:ghost="innerConfirm.ghost"
|
|
184
|
+
:shape="innerConfirm.shape"
|
|
185
|
+
:size="innerConfirm.size"
|
|
186
|
+
:variant="innerConfirm.variant"
|
|
187
|
+
:open-type="innerConfirm.openType"
|
|
188
|
+
:hover-class="innerConfirm.hoverClass"
|
|
189
|
+
:hover-stop-propagation="innerConfirm.hoverStopPropagation"
|
|
190
|
+
:hover-start-time="innerConfirm.hoverStartTime"
|
|
191
|
+
:hover-stay-time="innerConfirm.hoverStayTime"
|
|
192
|
+
:lang="innerConfirm.lang"
|
|
193
|
+
:session-from="innerConfirm.sessionFrom"
|
|
194
|
+
:send-message-title="innerConfirm.sendMessageTitle"
|
|
195
|
+
:send-message-path="innerConfirm.sendMessagePath"
|
|
196
|
+
:send-message-img="innerConfirm.sendMessageImg"
|
|
197
|
+
:app-parameter="innerConfirm.appParameter"
|
|
198
|
+
:show-message-card="innerConfirm.showMessageCard"
|
|
199
|
+
:aria-label="innerConfirm.ariaLabel"
|
|
200
200
|
@click="onConfirm($event, { type: 'action', extra: 0 })"
|
|
201
201
|
@getuserinfo="onConfirm($event, { type: 'action', extra: 0 })"
|
|
202
202
|
@contact="onConfirm($event, { type: 'action', extra: 0 })"
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
@launchapp="onConfirm($event, { type: 'action', extra: 0 })"
|
|
207
207
|
@agreeprivacyauthorization="onConfirm($event, { type: 'action', extra: 0 })"
|
|
208
208
|
>
|
|
209
|
-
<slot v-if="
|
|
209
|
+
<slot v-if="innerConfirm.useDefaultSlot || false" />
|
|
210
210
|
</t-button>
|
|
211
211
|
</template>
|
|
212
212
|
<slot name="confirm-btn" />
|
|
@@ -222,7 +222,7 @@ import TButton from '../button/button';
|
|
|
222
222
|
import { uniComponent } from '../common/src/index';
|
|
223
223
|
import { prefix } from '../common/config';
|
|
224
224
|
import props from './props';
|
|
225
|
-
import { toCamel, coalesce } from '../common/utils';
|
|
225
|
+
import { toCamel, coalesce, toPascal } from '../common/utils';
|
|
226
226
|
import { isObject } from '../common/validator';
|
|
227
227
|
import useCustomNavbar from '../mixins/using-custom-navbar';
|
|
228
228
|
import tools from '../common/utils.wxs';
|
|
@@ -261,8 +261,8 @@ export default uniComponent({
|
|
|
261
261
|
buttonVariant: 'text',
|
|
262
262
|
tools,
|
|
263
263
|
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
innerConfirm: null,
|
|
265
|
+
innerCancel: null,
|
|
266
266
|
useVirtualHost: canUseVirtualHost(),
|
|
267
267
|
};
|
|
268
268
|
},
|
|
@@ -320,13 +320,14 @@ export default uniComponent({
|
|
|
320
320
|
if (key === 'cancel' && rect.buttonVariant === 'base') {
|
|
321
321
|
base.theme = 'light';
|
|
322
322
|
}
|
|
323
|
+
const parsedKey = `inner${toPascal(key)}`;
|
|
323
324
|
|
|
324
325
|
if (typeof btn === 'string') {
|
|
325
|
-
rect[
|
|
326
|
+
rect[`${parsedKey}`] = { ...base, content: btn };
|
|
326
327
|
} else if (btn && typeof btn === 'object') {
|
|
327
|
-
rect[
|
|
328
|
+
rect[`${parsedKey}`] = { ...base, ...btn };
|
|
328
329
|
} else {
|
|
329
|
-
rect[
|
|
330
|
+
rect[`${parsedKey}`] = null;
|
|
330
331
|
}
|
|
331
332
|
});
|
|
332
333
|
|
|
@@ -417,6 +418,4 @@ export default uniComponent({
|
|
|
417
418
|
},
|
|
418
419
|
});
|
|
419
420
|
</script>
|
|
420
|
-
<style scoped>
|
|
421
|
-
@import './dialog.css';
|
|
422
|
-
</style>
|
|
421
|
+
<style scoped src="./dialog.css"></style>
|
package/dist/divider/divider.vue
CHANGED
package/dist/drawer/drawer.vue
CHANGED
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
</view>
|
|
30
30
|
|
|
31
31
|
<block
|
|
32
|
-
v-if="
|
|
32
|
+
v-if="iArrowIcon"
|
|
33
33
|
name="icon"
|
|
34
34
|
>
|
|
35
35
|
<t-icon
|
|
36
|
-
:custom-style="
|
|
36
|
+
:custom-style="iArrowIcon.style || ''"
|
|
37
37
|
:t-class="getIconTClass(index)"
|
|
38
38
|
:class="getIconClass(index)"
|
|
39
|
-
:prefix="
|
|
40
|
-
:name="
|
|
41
|
-
:size="
|
|
42
|
-
:color="
|
|
39
|
+
:prefix="iArrowIcon.prefix"
|
|
40
|
+
:name="iArrowIcon.name"
|
|
41
|
+
:size="iArrowIcon.size"
|
|
42
|
+
:color="iArrowIcon.color"
|
|
43
43
|
:aria-hidden="true"
|
|
44
|
-
:aria-label="
|
|
45
|
-
:aria-role="
|
|
46
|
-
@click="
|
|
44
|
+
:aria-label="iArrowIcon.ariaLabel"
|
|
45
|
+
:aria-role="iArrowIcon.ariaRole"
|
|
46
|
+
@click="iArrowIcon.click || ''"
|
|
47
47
|
/>
|
|
48
48
|
</block>
|
|
49
49
|
</view>
|
|
@@ -91,7 +91,7 @@ export default uniComponent({
|
|
|
91
91
|
menus: null,
|
|
92
92
|
activeIdx: -1,
|
|
93
93
|
bottom: 0,
|
|
94
|
-
|
|
94
|
+
iArrowIcon: {
|
|
95
95
|
name: props.arrowIcon.default,
|
|
96
96
|
},
|
|
97
97
|
tools,
|
|
@@ -100,7 +100,7 @@ export default uniComponent({
|
|
|
100
100
|
watch: {
|
|
101
101
|
arrowIcon: {
|
|
102
102
|
handler(v) {
|
|
103
|
-
this.
|
|
103
|
+
this.iArrowIcon = calcIcon(v);
|
|
104
104
|
},
|
|
105
105
|
immediate: true,
|
|
106
106
|
},
|
|
@@ -169,9 +169,7 @@ export default uniComponent({
|
|
|
169
169
|
},
|
|
170
170
|
});
|
|
171
171
|
</script>
|
|
172
|
-
<style scoped>
|
|
173
|
-
@import './dropdown-menu.css';
|
|
174
|
-
</style>
|
|
172
|
+
<style scoped src="./dropdown-menu.css"></style>
|
|
175
173
|
<style scoped>
|
|
176
174
|
:deep(.t-dropdown-menu__icon) {
|
|
177
175
|
font-size: var(--td-dropdown-menu-icon-size, 20px);
|
package/dist/empty/empty.vue
CHANGED
package/dist/fab/fab.vue
CHANGED
package/dist/footer/footer.vue
CHANGED
package/dist/form/form.vue
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
align-items: flex-start;
|
|
6
6
|
justify-content: var(--td-form-item-justify-content, space-between);
|
|
7
7
|
width: 100%;
|
|
8
|
-
padding: var(--td-form-item-
|
|
9
|
-
background-color: #ffffff;
|
|
8
|
+
padding: var(--td-form-item-vertical-padding, 32rpx) var(--td-form-item-horizontal-padding, 32rpx);
|
|
9
|
+
background-color: var(--td-form-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff)));
|
|
10
10
|
--td-input-vertical-padding: 0rpx;
|
|
11
11
|
--td-textarea-vertical-padding: 0rpx;
|
|
12
12
|
--td-textarea-horizontal-padding: 0rpx;
|
|
@@ -60,13 +60,6 @@
|
|
|
60
60
|
.t-form-item__controls {
|
|
61
61
|
flex: 1;
|
|
62
62
|
width: 100%;
|
|
63
|
-
margin-top: 8rpx;
|
|
64
|
-
}
|
|
65
|
-
.t-form-item__controls--left {
|
|
66
|
-
text-align: left;
|
|
67
|
-
}
|
|
68
|
-
.t-form-item__controls--right {
|
|
69
|
-
text-align: right;
|
|
70
63
|
}
|
|
71
64
|
.t-form-item__controls-content {
|
|
72
65
|
width: 100%;
|
|
@@ -74,11 +67,23 @@
|
|
|
74
67
|
align-items: center;
|
|
75
68
|
justify-content: space-between;
|
|
76
69
|
}
|
|
70
|
+
.t-form-item__controls-content--left {
|
|
71
|
+
justify-content: flex-start;
|
|
72
|
+
}
|
|
73
|
+
.t-form-item__controls-content--right {
|
|
74
|
+
justify-content: flex-end;
|
|
75
|
+
}
|
|
77
76
|
.t-form-item__help {
|
|
78
|
-
font-size: var(--td-font-size-
|
|
79
|
-
color: var(--td-font-gray-
|
|
77
|
+
font-size: var(--td-font-size-s, 24rpx);
|
|
78
|
+
color: var(--td-text-color-disabled, var(--td-font-gray-4, rgba(0, 0, 0, 0.26)));
|
|
80
79
|
line-height: 1.4;
|
|
81
80
|
}
|
|
81
|
+
.t-form-item__help--left {
|
|
82
|
+
text-align: left;
|
|
83
|
+
}
|
|
84
|
+
.t-form-item__help--right {
|
|
85
|
+
text-align: right;
|
|
86
|
+
}
|
|
82
87
|
.t-form-item__desc-link {
|
|
83
88
|
margin-top: 8rpx;
|
|
84
89
|
color: var(--td-primary-color-7, #0052d9);
|
|
@@ -169,13 +169,10 @@ export default uniComponent({
|
|
|
169
169
|
created() {
|
|
170
170
|
// this.initFormItem();
|
|
171
171
|
},
|
|
172
|
-
|
|
172
|
+
beforeUnmount() {
|
|
173
173
|
if (this.form) {
|
|
174
174
|
this.form.unregisterChild(this.name);
|
|
175
175
|
}
|
|
176
|
-
},
|
|
177
|
-
mounted() {
|
|
178
|
-
|
|
179
176
|
},
|
|
180
177
|
methods: {
|
|
181
178
|
innerAfterLinked() {
|
|
@@ -391,6 +388,4 @@ export default uniComponent({
|
|
|
391
388
|
},
|
|
392
389
|
});
|
|
393
390
|
</script>
|
|
394
|
-
<style scoped>
|
|
395
|
-
@import './form-item.css';
|
|
396
|
-
</style>
|
|
391
|
+
<style scoped src="./form-item.css"></style>
|
package/dist/grid/grid.vue
CHANGED
package/dist/guide/content.vue
CHANGED
package/dist/guide/guide.vue
CHANGED
|
@@ -270,7 +270,6 @@ export default uniComponent({
|
|
|
270
270
|
classPrefix: name,
|
|
271
271
|
visible: false,
|
|
272
272
|
iCurrent: -1,
|
|
273
|
-
_steps: [],
|
|
274
273
|
referenceStyle: '',
|
|
275
274
|
popoverStyle: '',
|
|
276
275
|
title: '',
|
|
@@ -301,7 +300,7 @@ export default uniComponent({
|
|
|
301
300
|
},
|
|
302
301
|
created() {
|
|
303
302
|
that = this;
|
|
304
|
-
this.
|
|
303
|
+
this.getPlacementResult = this.getPlacement();
|
|
305
304
|
},
|
|
306
305
|
mounted() {
|
|
307
306
|
this.innerInit();
|
|
@@ -341,7 +340,6 @@ export default uniComponent({
|
|
|
341
340
|
width: `${referenceWidth}px`,
|
|
342
341
|
height: `${referenceHeight}px`,
|
|
343
342
|
};
|
|
344
|
-
this._steps = this.steps;
|
|
345
343
|
this.visible = true;
|
|
346
344
|
this.referenceStyle = styles(style);
|
|
347
345
|
this.title = coalesce(step.title, '');
|
|
@@ -351,7 +349,6 @@ export default uniComponent({
|
|
|
351
349
|
const popoverStyle = await this.placementOffset(step, style);
|
|
352
350
|
this.popoverStyle = popoverStyle;
|
|
353
351
|
} else {
|
|
354
|
-
this._steps = this.steps;
|
|
355
352
|
this.visible = true;
|
|
356
353
|
this.title = coalesce(step.title, '');
|
|
357
354
|
this.body = coalesce(step.body, '');
|
|
@@ -361,7 +358,7 @@ export default uniComponent({
|
|
|
361
358
|
async placementOffset({ placement, offset }, place) {
|
|
362
359
|
await nextTick();
|
|
363
360
|
const rect = await getRect(this, `.${name}__container`);
|
|
364
|
-
const style = this.
|
|
361
|
+
const style = this.getPlacementResult[placement]?.(rect, place, offset);
|
|
365
362
|
return styles({ position: 'absolute', ...style });
|
|
366
363
|
},
|
|
367
364
|
makeButtonProps(step, mode) {
|
|
@@ -520,9 +517,7 @@ export default uniComponent({
|
|
|
520
517
|
});
|
|
521
518
|
|
|
522
519
|
</script>
|
|
523
|
-
<style scoped>
|
|
524
|
-
@import './guide.css';
|
|
525
|
-
</style>
|
|
520
|
+
<style scoped src="./guide.css"></style>
|
|
526
521
|
<style scoped lang="less">
|
|
527
522
|
.t-guide__footer--dialog {
|
|
528
523
|
// 适配 QQ 小程序等
|
package/dist/icon/icon.vue
CHANGED
package/dist/image/image.vue
CHANGED
|
@@ -62,20 +62,20 @@
|
|
|
62
62
|
>
|
|
63
63
|
<slot name="close-btn" />
|
|
64
64
|
<block
|
|
65
|
-
v-if="
|
|
65
|
+
v-if="iCloseBtn"
|
|
66
66
|
name="icon"
|
|
67
67
|
>
|
|
68
68
|
<t-icon
|
|
69
|
-
:custom-style="
|
|
70
|
-
:t-class="
|
|
71
|
-
:prefix="
|
|
72
|
-
:name="
|
|
73
|
-
:size="
|
|
74
|
-
:color="
|
|
75
|
-
:aria-hidden="!!
|
|
76
|
-
:aria-label="
|
|
77
|
-
:aria-role="
|
|
78
|
-
@click="
|
|
69
|
+
:custom-style="iCloseBtn.style || ''"
|
|
70
|
+
:t-class="iCloseBtn.tClass"
|
|
71
|
+
:prefix="iCloseBtn.prefix"
|
|
72
|
+
:name="iCloseBtn.name"
|
|
73
|
+
:size="iCloseBtn.size"
|
|
74
|
+
:color="iCloseBtn.color"
|
|
75
|
+
:aria-hidden="!!iCloseBtn.ariaHidden"
|
|
76
|
+
:aria-label="iCloseBtn.ariaLabel"
|
|
77
|
+
:aria-role="iCloseBtn.ariaRole"
|
|
78
|
+
@click="iCloseBtn.click || ''"
|
|
79
79
|
/>
|
|
80
80
|
</block>
|
|
81
81
|
</view>
|
|
@@ -93,17 +93,17 @@
|
|
|
93
93
|
>
|
|
94
94
|
<slot name="delete-btn" />
|
|
95
95
|
<t-icon
|
|
96
|
-
v-if="
|
|
97
|
-
:custom-style="
|
|
98
|
-
:t-class="
|
|
99
|
-
:prefix="
|
|
100
|
-
:name="
|
|
101
|
-
:size="
|
|
102
|
-
:color="
|
|
103
|
-
:aria-hidden="!!
|
|
104
|
-
:aria-label="
|
|
105
|
-
:aria-role="
|
|
106
|
-
@click="
|
|
96
|
+
v-if="iDeleteBtn"
|
|
97
|
+
:custom-style="iDeleteBtn.style || ''"
|
|
98
|
+
:t-class="iDeleteBtn.tClass"
|
|
99
|
+
:prefix="iDeleteBtn.prefix"
|
|
100
|
+
:name="iDeleteBtn.name"
|
|
101
|
+
:size="iDeleteBtn.size"
|
|
102
|
+
:color="iDeleteBtn.color"
|
|
103
|
+
:aria-hidden="!!iDeleteBtn.ariaHidden"
|
|
104
|
+
:aria-label="iDeleteBtn.ariaLabel"
|
|
105
|
+
:aria-role="iDeleteBtn.ariaRole"
|
|
106
|
+
@click="iDeleteBtn.click || ''"
|
|
107
107
|
/>
|
|
108
108
|
</view>
|
|
109
109
|
</view>
|
|
@@ -157,8 +157,8 @@ export default uniComponent({
|
|
|
157
157
|
maskTop: 0,
|
|
158
158
|
tools,
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
iDeleteBtn: null,
|
|
161
|
+
iCloseBtn: null,
|
|
162
162
|
dataVisible: this.visible,
|
|
163
163
|
};
|
|
164
164
|
},
|
|
@@ -174,14 +174,14 @@ export default uniComponent({
|
|
|
174
174
|
|
|
175
175
|
closeBtn: {
|
|
176
176
|
handler(v) {
|
|
177
|
-
this.
|
|
177
|
+
this.iCloseBtn = calcIcon(v, 'close');
|
|
178
178
|
},
|
|
179
179
|
immediate: true,
|
|
180
180
|
},
|
|
181
181
|
|
|
182
182
|
deleteBtn: {
|
|
183
183
|
handler(v) {
|
|
184
|
-
this.
|
|
184
|
+
this.iDeleteBtn = calcIcon(v, 'delete');
|
|
185
185
|
},
|
|
186
186
|
immediate: true,
|
|
187
187
|
},
|
|
@@ -311,7 +311,4 @@ export default uniComponent({
|
|
|
311
311
|
},
|
|
312
312
|
});
|
|
313
313
|
</script>
|
|
314
|
-
<style scoped>
|
|
315
|
-
@import './image-viewer.css';
|
|
316
|
-
|
|
317
|
-
</style>
|
|
314
|
+
<style scoped src="./image-viewer.css"></style>
|
package/dist/indexes/indexes.vue
CHANGED
|
@@ -89,7 +89,7 @@ export default uniComponent({
|
|
|
89
89
|
return {
|
|
90
90
|
prefix,
|
|
91
91
|
classPrefix: name,
|
|
92
|
-
|
|
92
|
+
innerHeight: 0,
|
|
93
93
|
innerIndexList: [],
|
|
94
94
|
scrollTop: 0,
|
|
95
95
|
activeAnchor: this.current,
|
|
@@ -110,7 +110,7 @@ export default uniComponent({
|
|
|
110
110
|
handler(v, pre) {
|
|
111
111
|
const cb = () => {
|
|
112
112
|
this.setIndexList(v);
|
|
113
|
-
this.setHeight(this.
|
|
113
|
+
this.setHeight(this.innerHeight);
|
|
114
114
|
};
|
|
115
115
|
if (!pre?.length) {
|
|
116
116
|
// 防止抖音小程序报错
|
|
@@ -150,7 +150,7 @@ export default uniComponent({
|
|
|
150
150
|
this.groupTop = [];
|
|
151
151
|
this.sidebar = null;
|
|
152
152
|
|
|
153
|
-
if (this.
|
|
153
|
+
if (this.innerHeight === 0) {
|
|
154
154
|
this.setHeight();
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -165,7 +165,7 @@ export default uniComponent({
|
|
|
165
165
|
const { windowHeight } = systemInfo;
|
|
166
166
|
height = windowHeight;
|
|
167
167
|
}
|
|
168
|
-
this.
|
|
168
|
+
this.innerHeight = height;
|
|
169
169
|
|
|
170
170
|
setTimeout(() => {
|
|
171
171
|
this.getAllRect();
|
|
@@ -366,6 +366,4 @@ export default uniComponent({
|
|
|
366
366
|
},
|
|
367
367
|
});
|
|
368
368
|
</script>
|
|
369
|
-
<style scoped>
|
|
370
|
-
@import './indexes.css';
|
|
371
|
-
</style>
|
|
369
|
+
<style scoped src="./indexes.css"></style>
|