@tdesign/uniapp 0.8.1 → 0.9.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/CHANGELOG.md +31 -0
- package/dist/action-sheet/README.en-US.md +4 -3
- package/dist/action-sheet/README.md +4 -3
- package/dist/action-sheet/action-sheet.vue +16 -12
- package/dist/action-sheet/computed.js +1 -1
- package/dist/action-sheet/props.ts +5 -0
- package/dist/action-sheet/type.ts +6 -1
- package/dist/avatar/README.en-US.md +1 -1
- package/dist/avatar/README.md +1 -1
- package/dist/avatar/avatar.vue +10 -9
- package/dist/avatar-group/avatar-group.vue +4 -4
- package/dist/back-top/README.en-US.md +1 -1
- package/dist/back-top/README.md +1 -1
- package/dist/back-top/back-top.vue +5 -4
- package/dist/badge/README.en-US.md +2 -1
- package/dist/badge/README.md +2 -1
- package/dist/badge/badge.css +1 -1
- package/dist/badge/badge.vue +4 -2
- package/dist/button/README.en-US.md +1 -1
- package/dist/button/README.md +1 -1
- package/dist/button/button.vue +17 -11
- package/dist/calendar/README.en-US.md +1 -1
- package/dist/calendar/README.md +1 -1
- package/dist/calendar/calendar-header.vue +2 -1
- package/dist/calendar/calendar.vue +15 -9
- package/dist/calendar/template.vue +12 -9
- package/dist/cascader/README.en-US.md +1 -1
- package/dist/cascader/README.md +1 -1
- package/dist/cascader/cascader.vue +8 -8
- package/dist/cell/README.en-US.md +1 -1
- package/dist/cell/README.md +1 -1
- package/dist/cell/cell.vue +34 -36
- package/dist/cell-group/cell-group.vue +5 -3
- package/dist/check-tag/check-tag.vue +6 -3
- package/dist/checkbox/README.en-US.md +1 -1
- package/dist/checkbox/README.md +1 -1
- package/dist/checkbox/checkbox.vue +5 -4
- package/dist/checkbox-group/checkbox-group.vue +5 -3
- package/dist/col/col.vue +7 -3
- package/dist/collapse/README.en-US.md +1 -1
- package/dist/collapse/README.md +1 -1
- package/dist/collapse/collapse.vue +6 -4
- package/dist/collapse-panel/collapse-panel.vue +15 -6
- package/dist/color-picker/README.en-US.md +1 -1
- package/dist/color-picker/README.md +1 -1
- package/dist/color-picker/color-picker.vue +9 -7
- package/dist/color-picker/template.vue +2 -1
- package/dist/common/canvas/index.js +1 -1
- package/dist/common/shared/color-picker/color.js +1 -0
- package/dist/common/src/instantiationDecorator.js +1 -1
- package/dist/common/style/theme/index-light.css +282 -0
- package/dist/common/style/theme/index-light.less +9 -0
- package/dist/common/style/theme/raw/_components-light.less +8 -0
- package/dist/common/style/theme/raw/_light-only.less +181 -0
- package/dist/common/version.js +1 -1
- package/dist/config-provider/config-provider.vue +3 -1
- package/dist/count-down/README.en-US.md +1 -1
- package/dist/count-down/README.md +1 -1
- package/dist/count-down/count-down.vue +5 -3
- package/dist/date-time-picker/README.en-US.md +1 -1
- package/dist/date-time-picker/README.md +1 -1
- package/dist/date-time-picker/date-time-picker.vue +8 -6
- package/dist/date-time-picker/locale/dayjs.js +6 -6
- package/dist/demo-navbar/demo-navbar.vue +1 -1
- package/dist/dialog/README.en-US.md +1 -1
- package/dist/dialog/README.md +1 -1
- package/dist/dialog/dialog.vue +10 -7
- package/dist/dialog/index.js +2 -1
- package/dist/divider/README.en-US.md +1 -1
- package/dist/divider/README.md +1 -1
- package/dist/divider/divider.vue +4 -2
- package/dist/draggable/draggable.vue +5 -2
- package/dist/drawer/README.en-US.md +1 -1
- package/dist/drawer/README.md +1 -1
- package/dist/drawer/drawer.vue +7 -5
- package/dist/dropdown-item/dropdown-item.vue +16 -11
- package/dist/dropdown-menu/README.en-US.md +1 -1
- package/dist/dropdown-menu/README.md +1 -1
- package/dist/dropdown-menu/dropdown-menu.vue +11 -9
- package/dist/empty/README.en-US.md +1 -1
- package/dist/empty/README.md +1 -1
- package/dist/empty/empty.vue +5 -4
- package/dist/fab/README.en-US.md +1 -1
- package/dist/fab/README.md +1 -1
- package/dist/fab/fab.vue +9 -6
- package/dist/fab/props.ts +1 -1
- package/dist/fab/type.ts +1 -1
- package/dist/footer/README.en-US.md +1 -1
- package/dist/footer/README.md +1 -1
- package/dist/footer/footer.vue +8 -7
- package/dist/form/README.en-US.md +3 -1
- package/dist/form/README.md +3 -1
- package/dist/form/form.vue +4 -2
- package/dist/form/props.ts +9 -0
- package/dist/form/type.ts +5 -0
- package/dist/form-item/README.en-US.md +2 -1
- package/dist/form-item/README.md +2 -1
- package/dist/form-item/form-item.css +2 -2
- package/dist/form-item/form-item.vue +36 -27
- package/dist/form-item/props.ts +8 -0
- package/dist/form-item/type.ts +4 -0
- package/dist/grid/README.en-US.md +1 -1
- package/dist/grid/README.md +1 -1
- package/dist/grid/grid.vue +4 -3
- package/dist/grid-item/README.en-US.md +1 -1
- package/dist/grid-item/README.md +1 -1
- package/dist/grid-item/grid-item.vue +8 -6
- package/dist/guide/README.en-US.md +1 -1
- package/dist/guide/README.md +1 -1
- package/dist/guide/guide.vue +8 -7
- package/dist/icon/icon.vue +5 -2
- package/dist/image/README.en-US.md +1 -1
- package/dist/image/README.md +1 -1
- package/dist/image/image.vue +6 -5
- package/dist/image-viewer/README.en-US.md +4 -3
- package/dist/image-viewer/README.md +4 -3
- package/dist/image-viewer/image-viewer.css +12 -0
- package/dist/image-viewer/image-viewer.vue +84 -21
- package/dist/image-viewer/props.ts +5 -0
- package/dist/image-viewer/type.ts +6 -1
- package/dist/indexes/README.en-US.md +1 -1
- package/dist/indexes/README.md +1 -1
- package/dist/indexes/computed.js +6 -2
- package/dist/indexes/indexes.css +7 -2
- package/dist/indexes/indexes.vue +8 -5
- package/dist/indexes/props.ts +5 -0
- package/dist/indexes/type.ts +5 -0
- package/dist/indexes-anchor/README.en-US.md +1 -1
- package/dist/indexes-anchor/README.md +1 -1
- package/dist/indexes-anchor/indexes-anchor.vue +5 -3
- package/dist/input/README.en-US.md +1 -1
- package/dist/input/README.md +1 -1
- package/dist/input/input.vue +9 -7
- package/dist/link/README.en-US.md +1 -1
- package/dist/link/README.md +1 -1
- package/dist/link/link.vue +6 -3
- package/dist/loading/README.en-US.md +1 -1
- package/dist/loading/README.md +1 -1
- package/dist/loading/loading.vue +4 -2
- package/dist/message/index.js +2 -1
- package/dist/message/message.vue +4 -3
- package/dist/message-item/index.js +1 -1
- package/dist/message-item/message-item.vue +7 -5
- package/dist/mixins/page-scroll.js +1 -1
- package/dist/mixins/using-config.js +1 -1
- package/dist/mixins/using-custom-navbar.js +1 -1
- package/dist/navbar/README.en-US.md +1 -1
- package/dist/navbar/README.md +2 -2
- package/dist/navbar/navbar.vue +5 -4
- package/dist/notice-bar/README.en-US.md +1 -1
- package/dist/notice-bar/README.md +1 -1
- package/dist/notice-bar/notice-bar.vue +4 -3
- package/dist/overlay/README.en-US.md +1 -1
- package/dist/overlay/README.md +1 -1
- package/dist/overlay/overlay.vue +6 -3
- package/dist/picker/README.en-US.md +1 -1
- package/dist/picker/README.md +1 -1
- package/dist/picker/picker.vue +11 -9
- package/dist/picker-item/README.en-US.md +1 -1
- package/dist/picker-item/README.md +1 -1
- package/dist/picker-item/picker-item.vue +6 -5
- package/dist/popover/README.en-US.md +1 -1
- package/dist/popover/README.md +1 -1
- package/dist/popover/popover.vue +8 -5
- package/dist/popup/README.en-US.md +1 -1
- package/dist/popup/README.md +1 -1
- package/dist/popup/popup.vue +8 -5
- package/dist/progress/README.en-US.md +1 -1
- package/dist/progress/README.md +1 -1
- package/dist/progress/progress.vue +5 -4
- package/dist/pull-down-refresh/README.en-US.md +1 -1
- package/dist/pull-down-refresh/README.md +1 -1
- package/dist/pull-down-refresh/pull-down-refresh.vue +7 -5
- package/dist/qrcode/components/qrcode-canvas/qrcode-canvas.vue +8 -7
- package/dist/qrcode/components/qrcode-status/qrcode-status.vue +2 -1
- package/dist/qrcode/qrcode.vue +5 -3
- package/dist/radio/README.en-US.md +1 -1
- package/dist/radio/README.md +1 -1
- package/dist/radio/radio.vue +5 -4
- package/dist/radio-group/radio-group.vue +5 -4
- package/dist/rate/README.en-US.md +1 -1
- package/dist/rate/README.md +1 -1
- package/dist/rate/rate.vue +8 -5
- package/dist/result/README.en-US.md +1 -1
- package/dist/result/README.md +1 -1
- package/dist/result/result.vue +5 -4
- package/dist/row/row.vue +7 -3
- package/dist/scroll-view/scroll-view.vue +1 -1
- package/dist/search/README.en-US.md +1 -1
- package/dist/search/README.md +1 -1
- package/dist/search/search.css +5 -0
- package/dist/search/search.vue +21 -21
- package/dist/segmented/README.en-US.md +42 -0
- package/dist/segmented/README.md +75 -0
- package/dist/segmented/props.ts +31 -0
- package/dist/segmented/segmented.css +66 -0
- package/dist/segmented/segmented.vue +177 -0
- package/dist/segmented/type.ts +41 -0
- package/dist/side-bar/README.en-US.md +1 -1
- package/dist/side-bar/README.md +1 -1
- package/dist/side-bar/side-bar.vue +5 -3
- package/dist/side-bar-item/side-bar-item.vue +7 -6
- package/dist/skeleton/README.en-US.md +1 -1
- package/dist/skeleton/README.md +1 -1
- package/dist/skeleton/skeleton.vue +6 -3
- package/dist/slider/README.en-US.md +1 -1
- package/dist/slider/README.md +1 -1
- package/dist/slider/slider.vue +7 -5
- package/dist/step-item/step-item.vue +5 -4
- package/dist/stepper/README.en-US.md +1 -1
- package/dist/stepper/README.md +1 -1
- package/dist/stepper/stepper.vue +5 -3
- package/dist/steps/README.en-US.md +1 -1
- package/dist/steps/README.md +1 -1
- package/dist/steps/steps.vue +5 -3
- package/dist/sticky/sticky.vue +4 -3
- package/dist/swipe-cell/swipe-cell.vue +7 -5
- package/dist/swiper/README.en-US.md +1 -1
- package/dist/swiper/README.md +1 -1
- package/dist/swiper/swiper.vue +7 -5
- package/dist/swiper-nav/swiper-nav.vue +6 -3
- package/dist/switch/README.en-US.md +1 -1
- package/dist/switch/README.md +1 -1
- package/dist/switch/switch.vue +5 -4
- package/dist/tab-bar/README.en-US.md +1 -1
- package/dist/tab-bar/README.md +1 -1
- package/dist/tab-bar/tab-bar.vue +5 -3
- package/dist/tab-bar-item/tab-bar-item.vue +10 -10
- package/dist/tab-panel/tab-panel.vue +5 -3
- package/dist/table/README.en-US.md +72 -0
- package/dist/table/README.md +117 -0
- package/dist/table/base-table-props.ts +105 -0
- package/dist/table/props.ts +94 -0
- package/dist/table/table.css +251 -0
- package/dist/table/table.vue +582 -0
- package/dist/table/type.ts +180 -0
- package/dist/tabs/README.en-US.md +1 -1
- package/dist/tabs/README.md +1 -1
- package/dist/tabs/tabs.css +4 -0
- package/dist/tabs/tabs.vue +11 -9
- package/dist/tag/README.en-US.md +1 -1
- package/dist/tag/README.md +1 -1
- package/dist/tag/tag.vue +6 -3
- package/dist/textarea/README.en-US.md +1 -1
- package/dist/textarea/README.md +1 -1
- package/dist/textarea/textarea.vue +6 -3
- package/dist/theme-light.css +282 -0
- package/dist/theme-light.css.d.ts +2 -0
- package/dist/theme-light.less +1 -0
- package/dist/theme-light.less.d.ts +2 -0
- package/dist/toast/README.en-US.md +1 -1
- package/dist/toast/README.md +1 -1
- package/dist/toast/toast.vue +8 -7
- package/dist/transition/transition.vue +2 -2
- package/dist/tree-select/README.en-US.md +1 -1
- package/dist/tree-select/README.md +1 -1
- package/dist/tree-select/tree-select.vue +14 -9
- package/dist/types/action-sheet.d.ts +1 -1
- package/dist/types/avatar-group.d.ts +1 -1
- package/dist/types/avatar.d.ts +1 -1
- package/dist/types/back-top.d.ts +1 -1
- package/dist/types/badge.d.ts +1 -1
- package/dist/types/button.d.ts +1 -1
- package/dist/types/calendar.d.ts +1 -1
- package/dist/types/cascader.d.ts +1 -1
- package/dist/types/cell-group.d.ts +1 -1
- package/dist/types/cell.d.ts +1 -1
- package/dist/types/check-tag.d.ts +1 -1
- package/dist/types/checkbox-group.d.ts +1 -1
- package/dist/types/checkbox.d.ts +1 -1
- package/dist/types/col.d.ts +1 -1
- package/dist/types/collapse-panel.d.ts +1 -1
- package/dist/types/collapse.d.ts +1 -1
- package/dist/types/color-picker.d.ts +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/segmented.d.ts +7 -0
- package/dist/types/table.d.ts +7 -0
- package/dist/upload/README.en-US.md +1 -1
- package/dist/upload/README.md +1 -1
- package/dist/upload/upload.vue +32 -32
- package/dist/watermark/README.en-US.md +1 -1
- package/dist/watermark/README.md +1 -1
- package/dist/watermark/utils/generateBase64Url.js +6 -6
- package/dist/watermark/watermark.vue +4 -3
- package/global.d.ts +2 -0
- package/package.json +33 -9
- package/{dist/script → script}/postinstall.js +18 -2
package/dist/indexes/indexes.vue
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
aria-role="button"
|
|
23
23
|
:aria-label="dataCurrent === item ? '已选中' + item : ''"
|
|
24
24
|
>
|
|
25
|
-
{{ getFirstCharacter(item) }}
|
|
25
|
+
{{ getFirstCharacter(item, showFullIndex) }}
|
|
26
26
|
</view>
|
|
27
27
|
|
|
28
28
|
<view
|
|
@@ -38,14 +38,17 @@
|
|
|
38
38
|
</template>
|
|
39
39
|
<script>
|
|
40
40
|
|
|
41
|
-
import { uniComponent } from '../common/src/index';
|
|
42
41
|
import { prefix } from '../common/config';
|
|
43
|
-
import
|
|
42
|
+
import { ParentMixin, RELATION_MAP } from '../common/relation';
|
|
43
|
+
import { uniComponent } from '../common/src/index';
|
|
44
|
+
|
|
45
|
+
|
|
44
46
|
import { getRect, throttle, systemInfo } from '../common/utils';
|
|
45
|
-
import pageScrollMixin from '../mixins/page-scroll';
|
|
46
47
|
import tools from '../common/utils.wxs';
|
|
48
|
+
import pageScrollMixin from '../mixins/page-scroll';
|
|
49
|
+
|
|
47
50
|
import { getFirstCharacter } from './computed.js';
|
|
48
|
-
import
|
|
51
|
+
import props from './props';
|
|
49
52
|
|
|
50
53
|
|
|
51
54
|
const name = `${prefix}-indexes`;
|
package/dist/indexes/props.ts
CHANGED
package/dist/indexes/type.ts
CHANGED
|
@@ -11,7 +11,7 @@ index | String / Number | - | \- | N
|
|
|
11
11
|
### CSS Variables
|
|
12
12
|
|
|
13
13
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
14
|
-
Name | Default Value | Description
|
|
14
|
+
Name | Default Value | Description
|
|
15
15
|
-- | -- | --
|
|
16
16
|
--td-indexes-anchor-active-bg-color | @bg-color-container | -
|
|
17
17
|
--td-indexes-anchor-active-color | @brand-color | -
|
|
@@ -20,11 +20,13 @@
|
|
|
20
20
|
</view>
|
|
21
21
|
</template>
|
|
22
22
|
<script>
|
|
23
|
-
import { uniComponent } from '../common/src/index';
|
|
24
23
|
import { prefix } from '../common/config';
|
|
25
|
-
import props from './props';
|
|
26
|
-
import tools from '../common/utils.wxs';
|
|
27
24
|
import { ChildrenMixin, RELATION_MAP } from '../common/relation';
|
|
25
|
+
import { uniComponent } from '../common/src/index';
|
|
26
|
+
|
|
27
|
+
import tools from '../common/utils.wxs';
|
|
28
|
+
|
|
29
|
+
import props from './props';
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
const name = `${prefix}-indexes-anchor`;
|
|
@@ -93,7 +93,7 @@ t-class-tips | \-
|
|
|
93
93
|
### CSS Variables
|
|
94
94
|
|
|
95
95
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
96
|
-
Name | Default Value | Description
|
|
96
|
+
Name | Default Value | Description
|
|
97
97
|
-- | -- | --
|
|
98
98
|
--td-input-align-items | center | -
|
|
99
99
|
--td-input-bg-color | @bg-color-container | -
|
package/dist/input/README.md
CHANGED
package/dist/input/input.vue
CHANGED
|
@@ -143,15 +143,16 @@
|
|
|
143
143
|
</view>
|
|
144
144
|
</template>
|
|
145
145
|
<script>
|
|
146
|
-
import TIcon from '../icon/icon';
|
|
147
|
-
import { uniComponent } from '../common/src/index';
|
|
148
146
|
import { prefix } from '../common/config';
|
|
149
|
-
import
|
|
147
|
+
import { RELATION_MAP } from '../common/relation/parent-map';
|
|
148
|
+
import { uniComponent } from '../common/src/index';
|
|
150
149
|
import { getCharacterLength, calcIcon, coalesce, nextTick } from '../common/utils';
|
|
150
|
+
import tools from '../common/utils.wxs';
|
|
151
151
|
import { isDef } from '../common/validator';
|
|
152
|
+
import TIcon from '../icon/icon';
|
|
153
|
+
|
|
152
154
|
import { getInputClass } from './computed.js';
|
|
153
|
-
import
|
|
154
|
-
import { RELATION_MAP } from '../common/relation/parent-map';
|
|
155
|
+
import props from './props';
|
|
155
156
|
|
|
156
157
|
|
|
157
158
|
const name = `${prefix}-input`;
|
|
@@ -304,8 +305,8 @@ export default {
|
|
|
304
305
|
},
|
|
305
306
|
|
|
306
307
|
emitChange(data) {
|
|
307
|
-
this.$emit('change', data);
|
|
308
308
|
this.$emit('update:value', data.value);
|
|
309
|
+
this.$emit('change', data);
|
|
309
310
|
},
|
|
310
311
|
|
|
311
312
|
onFocus(e) {
|
|
@@ -344,8 +345,9 @@ export default {
|
|
|
344
345
|
},
|
|
345
346
|
|
|
346
347
|
clearInput(e) {
|
|
348
|
+
this.updateValue('');
|
|
349
|
+
this.emitChange({ value: this.dataValue });
|
|
347
350
|
this.$emit('clear', e.detail);
|
|
348
|
-
this.dataValue = '';
|
|
349
351
|
},
|
|
350
352
|
|
|
351
353
|
onKeyboardHeightChange(e) {
|
|
@@ -48,7 +48,7 @@ t-class-suffix-icon | \-
|
|
|
48
48
|
### CSS Variables
|
|
49
49
|
|
|
50
50
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
51
|
-
Name | Default Value | Description
|
|
51
|
+
Name | Default Value | Description
|
|
52
52
|
-- | -- | --
|
|
53
53
|
--td-link-danger-active-color | @error-color-active | -
|
|
54
54
|
--td-link-danger-color | @error-color | -
|
package/dist/link/README.md
CHANGED
package/dist/link/link.vue
CHANGED
|
@@ -72,12 +72,15 @@
|
|
|
72
72
|
</view>
|
|
73
73
|
</template>
|
|
74
74
|
<script>
|
|
75
|
-
import TIcon from '../icon/icon';
|
|
76
|
-
import { uniComponent } from '../common/src/index';
|
|
77
75
|
import { prefix } from '../common/config';
|
|
78
|
-
import
|
|
76
|
+
import { uniComponent } from '../common/src/index';
|
|
77
|
+
|
|
78
|
+
|
|
79
79
|
import { calcIcon, coalesce } from '../common/utils';
|
|
80
80
|
import tools from '../common/utils.wxs';
|
|
81
|
+
import TIcon from '../icon/icon';
|
|
82
|
+
|
|
83
|
+
import props from './props';
|
|
81
84
|
|
|
82
85
|
|
|
83
86
|
const name = `${prefix}-link`;
|
|
@@ -40,7 +40,7 @@ t-class-text | \-
|
|
|
40
40
|
### CSS Variables
|
|
41
41
|
|
|
42
42
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
43
|
-
Name | Default Value | Description
|
|
43
|
+
Name | Default Value | Description
|
|
44
44
|
-- | -- | --
|
|
45
45
|
--td-loading-color | @brand-color | -
|
|
46
46
|
--td-loading-full-bg-color | rgba(255, 255, 255, 0.6) | -
|
package/dist/loading/README.md
CHANGED
package/dist/loading/loading.vue
CHANGED
|
@@ -88,11 +88,13 @@
|
|
|
88
88
|
</view>
|
|
89
89
|
</template>
|
|
90
90
|
<script>
|
|
91
|
-
import { uniComponent } from '../common/src/index';
|
|
92
91
|
import { prefix } from '../common/config';
|
|
93
|
-
import
|
|
92
|
+
import { uniComponent } from '../common/src/index';
|
|
93
|
+
|
|
94
94
|
import tools from '../common/utils.wxs';
|
|
95
95
|
|
|
96
|
+
import props from './props';
|
|
97
|
+
|
|
96
98
|
|
|
97
99
|
const name = `${prefix}-loading`;
|
|
98
100
|
|
package/dist/message/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { MessageType } from './message.interface';
|
|
2
1
|
import { getInstance } from '../common/utils';
|
|
3
2
|
|
|
3
|
+
import { MessageType } from './message.interface';
|
|
4
|
+
|
|
4
5
|
|
|
5
6
|
const showMessage = function (options, theme = MessageType.info) {
|
|
6
7
|
const { context, selector = '#t-message', ...otherOptions } = options;
|
package/dist/message/message.vue
CHANGED
|
@@ -34,12 +34,13 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script>
|
|
37
|
-
import TMessageItem from '../message-item/message-item.vue';
|
|
38
|
-
import { uniComponent } from '../common/src/index';
|
|
39
37
|
import { prefix } from '../common/config';
|
|
38
|
+
import { uniComponent } from '../common/src/index';
|
|
39
|
+
import { unitConvert } from '../common/utils';
|
|
40
|
+
import TMessageItem from '../message-item/message-item.vue';
|
|
41
|
+
|
|
40
42
|
import { MessageType } from './message.interface';
|
|
41
43
|
import props from './props';
|
|
42
|
-
import { unitConvert } from '../common/utils';
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
const SHOW_DURATION = 400;
|
|
@@ -89,16 +89,18 @@
|
|
|
89
89
|
</view>
|
|
90
90
|
</template>
|
|
91
91
|
<script>
|
|
92
|
-
import TIcon from '../icon/icon';
|
|
93
|
-
import TLink from '../link/link';
|
|
94
|
-
import { uniComponent } from '../common/src/index';
|
|
95
92
|
import { prefix } from '../common/config';
|
|
93
|
+
import { uniComponent } from '../common/src/index';
|
|
96
94
|
import { getRect, unitConvert, calcIcon } from '../common/utils';
|
|
97
|
-
import { isObject } from '../common/validator';
|
|
98
95
|
import tools from '../common/utils.wxs';
|
|
99
|
-
import {
|
|
96
|
+
import { isObject } from '../common/validator';
|
|
97
|
+
import TIcon from '../icon/icon';
|
|
98
|
+
import TLink from '../link/link';
|
|
99
|
+
|
|
100
100
|
import { messageDefaultData } from '../message/config';
|
|
101
101
|
|
|
102
|
+
import { getMessageStyles } from './computed.js';
|
|
103
|
+
|
|
102
104
|
|
|
103
105
|
const SHOW_DURATION = 400;
|
|
104
106
|
const name = `${prefix}-message`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 提供子组件从 config-provider 获取全局配置的能力
|
|
3
3
|
*/
|
|
4
|
-
import { getComponentLocale, useConfig } from '../config-provider/use-config';
|
|
5
4
|
import { toCamel } from '../common/utils';
|
|
5
|
+
import { getComponentLocale, useConfig } from '../config-provider/use-config';
|
|
6
6
|
import defaultLocale from '../locale/zh_CN';
|
|
7
7
|
|
|
8
8
|
export default function usingConfig(options) {
|
|
@@ -25,7 +25,7 @@ const useCustomNavbarBehavior = {
|
|
|
25
25
|
const { statusBarHeight } = systemInfo;
|
|
26
26
|
let distance = 0;
|
|
27
27
|
// #ifndef H5
|
|
28
|
-
// #ifndef APP
|
|
28
|
+
// #ifndef APP
|
|
29
29
|
const menuButton = uni.getMenuButtonBoundingClientRect();
|
|
30
30
|
distance = menuButton.top + menuButton.bottom - statusBarHeight;
|
|
31
31
|
// #endif
|
|
@@ -57,7 +57,7 @@ t-class-title | \-
|
|
|
57
57
|
### CSS Variables
|
|
58
58
|
|
|
59
59
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
60
|
-
Name | Default Value | Description
|
|
60
|
+
Name | Default Value | Description
|
|
61
61
|
-- | -- | --
|
|
62
62
|
--td-navbar-padding-top | 20px | -
|
|
63
63
|
--td-navbar-right | 95px | -
|
package/dist/navbar/README.md
CHANGED
|
@@ -45,7 +45,7 @@ import TNavbar from '@tdesign/uniapp/navbar/navbar.vue';
|
|
|
45
45
|
|
|
46
46
|
#### 高度说明
|
|
47
47
|
|
|
48
|
-
`navbar` 组件可由 `--td-navbar-height` 控制。在 H5 或 APP
|
|
48
|
+
`navbar` 组件可由 `--td-navbar-height` 控制。在 H5 或 APP 平台下,`--td-navbar-height` 变量需要业务自己设置,小程序平台则会根据 `statusBarHeight` 等变量计算得到。
|
|
49
49
|
|
|
50
50
|
## API
|
|
51
51
|
|
|
@@ -104,7 +104,7 @@ t-class-title | 标题样式类
|
|
|
104
104
|
### CSS Variables
|
|
105
105
|
|
|
106
106
|
组件提供了下列 CSS 变量,可用于自定义样式。
|
|
107
|
-
名称 | 默认值 | 描述
|
|
107
|
+
名称 | 默认值 | 描述
|
|
108
108
|
-- | -- | --
|
|
109
109
|
--td-navbar-padding-top | 20px | -
|
|
110
110
|
--td-navbar-right | 95px | -
|
package/dist/navbar/navbar.vue
CHANGED
|
@@ -47,12 +47,13 @@
|
|
|
47
47
|
</view>
|
|
48
48
|
</template>
|
|
49
49
|
<script>
|
|
50
|
-
import
|
|
50
|
+
import { prefix } from '../common/config';
|
|
51
51
|
import { uniComponent } from '../common/src/index';
|
|
52
52
|
import { getRect, getWindowInfo } from '../common/utils';
|
|
53
|
-
import { prefix } from '../common/config';
|
|
54
|
-
import props from './props';
|
|
55
53
|
import tools from '../common/utils.wxs';
|
|
54
|
+
import TIcon from '../icon/icon';
|
|
55
|
+
|
|
56
|
+
import props from './props';
|
|
56
57
|
|
|
57
58
|
|
|
58
59
|
const name = `${prefix}-navbar`;
|
|
@@ -176,7 +177,7 @@ export default {
|
|
|
176
177
|
'--td-navbar-capsule-width': `${iMenuRect.width}px`, // 胶囊宽度
|
|
177
178
|
'--td-navbar-height': `${(iMenuRect.top - windowInfo.statusBarHeight) * 2 + iMenuRect.height}px`,
|
|
178
179
|
};
|
|
179
|
-
// #ifdef H5 || APP
|
|
180
|
+
// #ifdef H5 || APP
|
|
180
181
|
delete iBoxStyle['--td-navbar-height'];
|
|
181
182
|
// #endif
|
|
182
183
|
|
|
@@ -47,7 +47,7 @@ t-class-suffix-icon | \-
|
|
|
47
47
|
### CSS Variables
|
|
48
48
|
|
|
49
49
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
50
|
-
Name | Default Value | Description
|
|
50
|
+
Name | Default Value | Description
|
|
51
51
|
-- | -- | --
|
|
52
52
|
--td-notice-bar-error-bg-color | @error-color-1 | -
|
|
53
53
|
--td-notice-bar-error-color | @error-color | -
|
|
@@ -102,12 +102,13 @@
|
|
|
102
102
|
</view>
|
|
103
103
|
</template>
|
|
104
104
|
<script>
|
|
105
|
-
import
|
|
105
|
+
import { prefix } from '../common/config';
|
|
106
106
|
import { uniComponent } from '../common/src/index';
|
|
107
107
|
import { getRect, getAnimationFrame, calcIcon } from '../common/utils';
|
|
108
|
-
import props from './props';
|
|
109
|
-
import { prefix } from '../common/config';
|
|
110
108
|
import tools from '../common/utils.wxs';
|
|
109
|
+
import TIcon from '../icon/icon.vue';
|
|
110
|
+
|
|
111
|
+
import props from './props';
|
|
111
112
|
|
|
112
113
|
|
|
113
114
|
const name = `${prefix}-notice-bar`;
|
|
@@ -28,7 +28,7 @@ name | Description
|
|
|
28
28
|
### CSS Variables
|
|
29
29
|
|
|
30
30
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
31
|
-
Name | Default Value | Description
|
|
31
|
+
Name | Default Value | Description
|
|
32
32
|
-- | -- | --
|
|
33
33
|
--td-overlay-bg-color | @mask-active | -
|
|
34
34
|
--td-overlay-transition-duration | 300ms | -
|
package/dist/overlay/README.md
CHANGED
package/dist/overlay/overlay.vue
CHANGED
|
@@ -37,12 +37,15 @@
|
|
|
37
37
|
</view>
|
|
38
38
|
</template>
|
|
39
39
|
<script>
|
|
40
|
-
import { uniComponent } from '../common/src/index';
|
|
41
40
|
import { prefix } from '../common/config';
|
|
42
|
-
import
|
|
41
|
+
import { uniComponent } from '../common/src/index';
|
|
42
|
+
|
|
43
|
+
import tools from '../common/utils.wxs';
|
|
43
44
|
import transition from '../mixins/transition';
|
|
45
|
+
|
|
44
46
|
import useCustomNavbar from '../mixins/using-custom-navbar';
|
|
45
|
-
|
|
47
|
+
|
|
48
|
+
import props from './props';
|
|
46
49
|
|
|
47
50
|
|
|
48
51
|
const name = `${prefix}-overlay`;
|
|
@@ -59,7 +59,7 @@ label-suffix-index | \-
|
|
|
59
59
|
### CSS Variables
|
|
60
60
|
|
|
61
61
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
62
|
-
Name | Default Value | Description
|
|
62
|
+
Name | Default Value | Description
|
|
63
63
|
-- | -- | --
|
|
64
64
|
--td-picker-bg-color | @bg-color-container | -
|
|
65
65
|
--td-picker-border-radius | 24rpx | -
|
package/dist/picker/README.md
CHANGED
package/dist/picker/picker.vue
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
:class="classPrefix + '__cancel ' + tClassCancel"
|
|
27
27
|
@click="onCancel"
|
|
28
28
|
>
|
|
29
|
-
{{ globalConfig.cancel }}
|
|
29
|
+
{{ cancelBtn === true ? globalConfig.cancel : cancelBtn }}
|
|
30
30
|
</view>
|
|
31
31
|
<view :class="classPrefix + '__title ' + tClassTitle">
|
|
32
32
|
{{ title }}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
:class="classPrefix + '__confirm ' + tClassConfirm"
|
|
37
37
|
@click="onConfirm"
|
|
38
38
|
>
|
|
39
|
-
{{ globalConfig.confirm }}
|
|
39
|
+
{{ confirmBtn === true ? globalConfig.confirm : confirmBtn }}
|
|
40
40
|
</view>
|
|
41
41
|
</view>
|
|
42
42
|
<slot name="header" />
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
:class="classPrefix + '__cancel ' + tClassCancel"
|
|
73
73
|
@click="onCancel"
|
|
74
74
|
>
|
|
75
|
-
{{ globalConfig.cancel }}
|
|
75
|
+
{{ cancelBtn === true ? globalConfig.cancel : cancelBtn }}
|
|
76
76
|
</view>
|
|
77
77
|
<view :class="classPrefix + '__title ' + tClassTitle">
|
|
78
78
|
{{ title }}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
:class="classPrefix + '__confirm ' + tClassConfirm"
|
|
83
83
|
@click="onConfirm"
|
|
84
84
|
>
|
|
85
|
-
{{ globalConfig.confirm }}
|
|
85
|
+
{{ confirmBtn === true ? globalConfig.confirm : confirmBtn }}
|
|
86
86
|
</view>
|
|
87
87
|
</view>
|
|
88
88
|
<slot name="header" />
|
|
@@ -105,16 +105,18 @@
|
|
|
105
105
|
</view>
|
|
106
106
|
</template>
|
|
107
107
|
<script>
|
|
108
|
-
import
|
|
108
|
+
import { prefix } from '../common/config';
|
|
109
|
+
|
|
110
|
+
import { ParentMixin, RELATION_MAP } from '../common/relation';
|
|
109
111
|
import { uniComponent } from '../common/src/index';
|
|
110
112
|
import { coalesce } from '../common/utils';
|
|
111
|
-
import { prefix } from '../common/config';
|
|
112
|
-
import props from './props';
|
|
113
|
-
import useCustomNavbar from '../mixins/using-custom-navbar';
|
|
114
113
|
import tools from '../common/utils.wxs';
|
|
115
|
-
import { ParentMixin, RELATION_MAP } from '../common/relation';
|
|
116
114
|
|
|
117
115
|
import usingConfig from '../mixins/using-config';
|
|
116
|
+
import useCustomNavbar from '../mixins/using-custom-navbar';
|
|
117
|
+
import TPopup from '../popup/popup';
|
|
118
|
+
|
|
119
|
+
import props from './props';
|
|
118
120
|
const componentName = 'picker';
|
|
119
121
|
const name = `${prefix}-${componentName}`;
|
|
120
122
|
|
|
@@ -18,7 +18,7 @@ label-suffix--[index] | \-
|
|
|
18
18
|
### CSS Variables
|
|
19
19
|
|
|
20
20
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
21
|
-
Name | Default Value | Description
|
|
21
|
+
Name | Default Value | Description
|
|
22
22
|
-- | -- | --
|
|
23
23
|
--td-picker-item-active-color | @text-color-primary | -
|
|
24
24
|
--td-picker-item-color | @text-color-secondary | -
|
|
@@ -71,13 +71,14 @@
|
|
|
71
71
|
</template>
|
|
72
72
|
|
|
73
73
|
<script>
|
|
74
|
-
import TIcon from '../icon/icon.vue';
|
|
75
|
-
import { uniComponent } from '../common/src/index';
|
|
76
74
|
import { prefix } from '../common/config';
|
|
77
|
-
import props from './props';
|
|
78
|
-
import tools from '../common/utils.wxs';
|
|
79
|
-
import { nextTick } from '../common/utils';
|
|
80
75
|
import { ChildrenMixin, RELATION_MAP } from '../common/relation';
|
|
76
|
+
import { uniComponent } from '../common/src/index';
|
|
77
|
+
import { nextTick } from '../common/utils';
|
|
78
|
+
import tools from '../common/utils.wxs';
|
|
79
|
+
import TIcon from '../icon/icon.vue';
|
|
80
|
+
|
|
81
|
+
import props from './props';
|
|
81
82
|
|
|
82
83
|
|
|
83
84
|
const name = `${prefix}-picker-item`;
|
|
@@ -38,7 +38,7 @@ t-class-content | \-
|
|
|
38
38
|
### CSS Variables
|
|
39
39
|
|
|
40
40
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
41
|
-
Name | Default Value | Description
|
|
41
|
+
Name | Default Value | Description
|
|
42
42
|
-- | -- | --
|
|
43
43
|
--td-popover-brand-bg-color | @primary-color-1 | -
|
|
44
44
|
--td-popover-brand-color | @primary-color-7 | -
|
package/dist/popover/README.md
CHANGED
package/dist/popover/popover.vue
CHANGED
|
@@ -37,14 +37,17 @@
|
|
|
37
37
|
</template>
|
|
38
38
|
|
|
39
39
|
<script>
|
|
40
|
-
import TOverlay from '../overlay/overlay';
|
|
41
|
-
import { getWindowInfo } from '../common/wechat';
|
|
42
|
-
import { uniComponent } from '../common/src/index';
|
|
43
40
|
import { prefix } from '../common/config';
|
|
44
|
-
import
|
|
41
|
+
import { uniComponent } from '../common/src/index';
|
|
42
|
+
|
|
43
|
+
|
|
45
44
|
import { debounce, nextTick, coalesce } from '../common/utils';
|
|
46
|
-
import {
|
|
45
|
+
import { getWindowInfo } from '../common/wechat';
|
|
47
46
|
import pageScrollMixin from '../mixins/page-scroll';
|
|
47
|
+
import { transitionMixins } from '../mixins/transition';
|
|
48
|
+
import TOverlay from '../overlay/overlay';
|
|
49
|
+
|
|
50
|
+
import props from './props';
|
|
48
51
|
|
|
49
52
|
delete props.visible;
|
|
50
53
|
|
|
@@ -44,7 +44,7 @@ t-class-content | \-
|
|
|
44
44
|
### CSS Variables
|
|
45
45
|
|
|
46
46
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
47
|
-
Name | Default Value | Description
|
|
47
|
+
Name | Default Value | Description
|
|
48
48
|
-- | -- | --
|
|
49
49
|
--td-popup-bg-color | @bg-color-container | -
|
|
50
50
|
--td-popup-border-radius | @radius-extraLarge | -
|
package/dist/popup/README.md
CHANGED