@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
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
</view>
|
|
9
9
|
</template>
|
|
10
10
|
<script>
|
|
11
|
-
import { uniComponent } from '../common/src/index';
|
|
12
|
-
import transition from '../mixins/transition';
|
|
13
11
|
import { prefix } from '../common/config';
|
|
12
|
+
import { uniComponent } from '../common/src/index';
|
|
14
13
|
import tools from '../common/utils.wxs';
|
|
14
|
+
import transition from '../mixins/transition';
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
const name = `${prefix}-transition`;
|
|
@@ -36,7 +36,7 @@ t-class-right-item-label | \-
|
|
|
36
36
|
### CSS Variables
|
|
37
37
|
|
|
38
38
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
39
|
-
Name | Default Value | Description
|
|
39
|
+
Name | Default Value | Description
|
|
40
40
|
-- | -- | --
|
|
41
41
|
--td-tree-bg-color | @bg-color-container | -
|
|
42
42
|
--td-tree-colum-text-color | @text-color-primary | -
|
|
@@ -105,22 +105,27 @@
|
|
|
105
105
|
</view>
|
|
106
106
|
</template>
|
|
107
107
|
<script>
|
|
108
|
-
import TRadio from '../radio/radio';
|
|
109
|
-
import TRadioGroup from '../radio-group/radio-group';
|
|
110
108
|
import TCheckbox from '../checkbox/checkbox';
|
|
111
109
|
import TCheckboxGroup from '../checkbox-group/checkbox-group';
|
|
112
|
-
import TSideBar from '../side-bar/side-bar';
|
|
113
|
-
import TSideBarItem from '../side-bar-item/side-bar-item';
|
|
114
|
-
import TScrollView from '../scroll-view/scroll-view.vue';
|
|
115
110
|
|
|
116
|
-
import { uniComponent } from '../common/src/index';
|
|
117
|
-
import { isDef } from '../common/validator';
|
|
118
111
|
import { prefix } from '../common/config';
|
|
112
|
+
import { uniComponent } from '../common/src/index';
|
|
119
113
|
import { getTreeDepth, coalesce, nextTick } from '../common/utils';
|
|
120
|
-
|
|
114
|
+
|
|
121
115
|
import tools from '../common/utils.wxs';
|
|
122
|
-
import {
|
|
116
|
+
import { isDef } from '../common/validator';
|
|
117
|
+
|
|
118
|
+
|
|
123
119
|
import { canUseVirtualHost } from '../common/version';
|
|
120
|
+
import TRadio from '../radio/radio';
|
|
121
|
+
import TRadioGroup from '../radio-group/radio-group';
|
|
122
|
+
import TScrollView from '../scroll-view/scroll-view.vue';
|
|
123
|
+
import TSideBar from '../side-bar/side-bar';
|
|
124
|
+
import TSideBarItem from '../side-bar-item/side-bar-item';
|
|
125
|
+
|
|
126
|
+
import { getTreeClass } from './computed.js';
|
|
127
|
+
|
|
128
|
+
import props from './props';
|
|
124
129
|
|
|
125
130
|
const name = `${prefix}-tree-select`;
|
|
126
131
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdActionSheetProps } from '../action-sheet/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type ActionSheetProps = ExtractNonOnProps<TdActionSheetProps>;
|
|
5
5
|
export type ActionSheetEmits = TransformEventHandlers<TdActionSheetProps, true>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdAvatarGroupProps } from '../avatar-group/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type AvatarGroupProps = ExtractNonOnProps<TdAvatarGroupProps>;
|
|
5
5
|
export type AvatarGroupEmits = TransformEventHandlers<TdAvatarGroupProps, true>;
|
package/dist/types/avatar.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdAvatarProps } from '../avatar/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type AvatarProps = ExtractNonOnProps<TdAvatarProps>;
|
|
5
5
|
export type AvatarEmits = TransformEventHandlers<TdAvatarProps, true>;
|
package/dist/types/back-top.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdBackTopProps } from '../back-top/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type BackTopProps = ExtractNonOnProps<TdBackTopProps>;
|
|
5
5
|
export type BackTopEmits = TransformEventHandlers<TdBackTopProps, true>;
|
package/dist/types/badge.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdBadgeProps } from '../badge/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type BadgeProps = ExtractNonOnProps<TdBadgeProps>;
|
|
5
5
|
export type BadgeEmits = TransformEventHandlers<TdBadgeProps, true>;
|
package/dist/types/button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdButtonProps } from '../button/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type ButtonProps = ExtractNonOnProps<TdButtonProps>;
|
|
5
5
|
export type ButtonEmits = TransformEventHandlers<TdButtonProps, true>;
|
package/dist/types/calendar.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdCalendarProps } from '../calendar/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type CalendarProps = ExtractNonOnProps<TdCalendarProps>;
|
|
5
5
|
export type CalendarEmits = TransformEventHandlers<TdCalendarProps, true>;
|
package/dist/types/cascader.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdCascaderProps } from '../cascader/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type CascaderProps = ExtractNonOnProps<TdCascaderProps>;
|
|
5
5
|
export type CascaderEmits = TransformEventHandlers<TdCascaderProps, true>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdCellGroupProps } from '../cell-group/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type CellGroupProps = ExtractNonOnProps<TdCellGroupProps>;
|
|
5
5
|
export type CellGroupEmits = TransformEventHandlers<TdCellGroupProps, true>;
|
package/dist/types/cell.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdCellProps } from '../cell/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type CellProps = ExtractNonOnProps<TdCellProps>;
|
|
5
5
|
export type CellEmits = TransformEventHandlers<TdCellProps, true>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdCheckTagProps } from '../check-tag/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type CheckTagProps = ExtractNonOnProps<TdCheckTagProps>;
|
|
5
5
|
export type CheckTagEmits = TransformEventHandlers<TdCheckTagProps, true>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdCheckboxGroupProps } from '../checkbox-group/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type CheckboxGroupProps = ExtractNonOnProps<TdCheckboxGroupProps>;
|
|
5
5
|
export type CheckboxGroupEmits = TransformEventHandlers<TdCheckboxGroupProps, true>;
|
package/dist/types/checkbox.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdCheckboxProps } from '../checkbox/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type CheckboxProps = ExtractNonOnProps<TdCheckboxProps>;
|
|
5
5
|
export type CheckboxEmits = TransformEventHandlers<TdCheckboxProps, true>;
|
package/dist/types/col.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdColProps } from '../col/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type ColProps = ExtractNonOnProps<TdColProps>;
|
|
5
5
|
export type ColEmits = TransformEventHandlers<TdColProps, true>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdCollapsePanelProps } from '../collapse-panel/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type CollapsePanelProps = ExtractNonOnProps<TdCollapsePanelProps>;
|
|
5
5
|
export type CollapsePanelEmits = TransformEventHandlers<TdCollapsePanelProps, true>;
|
package/dist/types/collapse.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdCollapseProps } from '../collapse/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type CollapseProps = ExtractNonOnProps<TdCollapseProps>;
|
|
5
5
|
export type CollapseEmits = TransformEventHandlers<TdCollapseProps, true>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
1
|
import type { TdColorPickerProps } from '../color-picker/type';
|
|
2
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
3
3
|
|
|
4
4
|
export type ColorPickerProps = ExtractNonOnProps<TdColorPickerProps>;
|
|
5
5
|
export type ColorPickerEmits = TransformEventHandlers<TdColorPickerProps, true>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export * from '../rate/type';
|
|
|
55
55
|
export * from '../result/type';
|
|
56
56
|
export * from '../row/type';
|
|
57
57
|
export * from '../search/type';
|
|
58
|
+
export * from '../segmented/type';
|
|
58
59
|
export * from '../side-bar/type';
|
|
59
60
|
export * from '../side-bar-item/type';
|
|
60
61
|
export * from '../skeleton/type';
|
|
@@ -70,6 +71,7 @@ export * from '../switch/type';
|
|
|
70
71
|
export * from '../tab-bar/type';
|
|
71
72
|
export * from '../tab-bar-item/type';
|
|
72
73
|
export * from '../tab-panel/type';
|
|
74
|
+
export * from '../table/type';
|
|
73
75
|
export * from '../tabs/type';
|
|
74
76
|
export * from '../tag/type';
|
|
75
77
|
export * from '../textarea/type';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
|
+
import type { TdSegmentedProps } from '../segmented/type';
|
|
3
|
+
|
|
4
|
+
export type SegmentedProps = ExtractNonOnProps<TdSegmentedProps>;
|
|
5
|
+
export type SegmentedEmits = TransformEventHandlers<TdSegmentedProps, true>;
|
|
6
|
+
declare const SegmentedComponent: import('vue').DefineComponent<SegmentedProps, {}, {}, {}, {}, {}, {}, SegmentedEmits, any>;
|
|
7
|
+
export default SegmentedComponent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TransformEventHandlers, ExtractNonOnProps } from '../common/common';
|
|
2
|
+
import type { TdTableProps } from '../table/type';
|
|
3
|
+
|
|
4
|
+
export type TableProps = ExtractNonOnProps<TdTableProps>;
|
|
5
|
+
export type TableEmits = TransformEventHandlers<TdTableProps, true>;
|
|
6
|
+
declare const TableComponent: import('vue').DefineComponent<TableProps, {}, {}, {}, {}, {}, {}, TableEmits, any>;
|
|
7
|
+
export default TableComponent;
|
|
@@ -48,7 +48,7 @@ add-content | \-
|
|
|
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-upload-add-bg-color | @bg-color-secondarycontainer | -
|
|
54
54
|
--td-upload-add-color | @text-color-placeholder | -
|
package/dist/upload/README.md
CHANGED
|
@@ -103,7 +103,7 @@ add-content | 自定义 `add-content` 显示内容
|
|
|
103
103
|
### CSS Variables
|
|
104
104
|
|
|
105
105
|
组件提供了下列 CSS 变量,可用于自定义样式。
|
|
106
|
-
名称 | 默认值 | 描述
|
|
106
|
+
名称 | 默认值 | 描述
|
|
107
107
|
-- | -- | --
|
|
108
108
|
--td-upload-add-bg-color | @bg-color-secondarycontainer | -
|
|
109
109
|
--td-upload-add-color | @text-color-placeholder | -
|
package/dist/upload/upload.vue
CHANGED
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
:autoplay="false"
|
|
50
50
|
objectFit="contain"
|
|
51
51
|
:data-file="file"
|
|
52
|
-
@click.stop="onFileClick"
|
|
52
|
+
@click.stop="(e) => onFileClick(e, {file, index})"
|
|
53
53
|
/>
|
|
54
54
|
<view
|
|
55
55
|
v-if="file.status && file.status != 'done'"
|
|
56
56
|
:class="classPrefix + '__progress-mask'"
|
|
57
57
|
:data-index="index"
|
|
58
58
|
:data-file="file"
|
|
59
|
-
@click.stop="onFileClick"
|
|
59
|
+
@click.stop="(e) => onFileClick(e, {file, index})"
|
|
60
60
|
>
|
|
61
61
|
<block v-if="file.status == 'loading'">
|
|
62
62
|
<t-icon
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
:data-index="index"
|
|
89
89
|
aria-role="button"
|
|
90
90
|
aria-label="删除"
|
|
91
|
-
@click.stop="onDelete"
|
|
91
|
+
@click.stop="(e) => onDelete(e, {index})"
|
|
92
92
|
>
|
|
93
93
|
<t-icon
|
|
94
94
|
name="close"
|
|
@@ -177,14 +177,14 @@
|
|
|
177
177
|
:autoplay="false"
|
|
178
178
|
objectFit="contain"
|
|
179
179
|
:data-file="file"
|
|
180
|
-
@click.stop="onFileClick"
|
|
180
|
+
@click.stop="(e) => onFileClick(e, {file, index})"
|
|
181
181
|
/>
|
|
182
182
|
<view
|
|
183
183
|
v-if="file.status && file.status != 'done'"
|
|
184
184
|
:class="classPrefix + '__progress-mask'"
|
|
185
185
|
:data-index="index"
|
|
186
186
|
:data-file="file"
|
|
187
|
-
@click.stop="onFileClick"
|
|
187
|
+
@click.stop="(e) => onFileClick(e, {file, index})"
|
|
188
188
|
>
|
|
189
189
|
<block v-if="file.status == 'loading'">
|
|
190
190
|
<t-icon
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
:data-url="file.url"
|
|
218
218
|
aria-role="button"
|
|
219
219
|
aria-label="删除"
|
|
220
|
-
@click.stop="onDelete"
|
|
220
|
+
@click.stop="(e) => onDelete(e, {index})"
|
|
221
221
|
>
|
|
222
222
|
<t-icon
|
|
223
223
|
name="close"
|
|
@@ -264,20 +264,19 @@
|
|
|
264
264
|
</view>
|
|
265
265
|
</template>
|
|
266
266
|
<script>
|
|
267
|
+
import { prefix } from '../common/config';
|
|
268
|
+
import { parseEventDynamicCode } from '../common/event/dynamic';
|
|
269
|
+
import { uniComponent } from '../common/src/index';
|
|
270
|
+
import { isOverSize, coalesce, isWxWork, isPC } from '../common/utils';
|
|
271
|
+
import tools from '../common/utils.wxs';
|
|
272
|
+
import { isObject } from '../common/validator';
|
|
267
273
|
import TGrid from '../grid/grid';
|
|
268
274
|
import TGridItem from '../grid-item/grid-item';
|
|
269
275
|
import TIcon from '../icon/icon';
|
|
270
276
|
import TImage from '../image/image';
|
|
271
|
-
|
|
272
|
-
import
|
|
273
|
-
|
|
274
|
-
import { isOverSize, coalesce, isWxWork, isPC } from '../common/utils';
|
|
275
|
-
import { isObject } from '../common/validator';
|
|
276
|
-
import tools from '../common/utils.wxs';
|
|
277
|
-
import {
|
|
278
|
-
getWrapperAriaRole,
|
|
279
|
-
getWrapperAriaLabel,
|
|
280
|
-
} from './upload.computed.js';
|
|
277
|
+
|
|
278
|
+
import usingConfig from '../mixins/using-config';
|
|
279
|
+
|
|
281
280
|
import {
|
|
282
281
|
longPress,
|
|
283
282
|
touchMove,
|
|
@@ -285,10 +284,15 @@ import {
|
|
|
285
284
|
baseDataObserver,
|
|
286
285
|
listObserver,
|
|
287
286
|
} from './drag.computed.js';
|
|
288
|
-
import
|
|
287
|
+
import props from './props';
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
import {
|
|
291
|
+
getWrapperAriaRole,
|
|
292
|
+
getWrapperAriaLabel,
|
|
293
|
+
} from './upload.computed.js';
|
|
289
294
|
|
|
290
295
|
|
|
291
|
-
import usingConfig from '../mixins/using-config';
|
|
292
296
|
const componentName = 'upload';
|
|
293
297
|
const name = `${prefix}-${componentName}`;
|
|
294
298
|
|
|
@@ -424,8 +428,7 @@ export default {
|
|
|
424
428
|
this.$emit('fail', err);
|
|
425
429
|
},
|
|
426
430
|
|
|
427
|
-
onFileClick(e) {
|
|
428
|
-
const { file, index } = e.currentTarget.dataset;
|
|
431
|
+
onFileClick(e, { file, index }) {
|
|
429
432
|
this.$emit('click', { index, file });
|
|
430
433
|
},
|
|
431
434
|
|
|
@@ -473,8 +476,7 @@ export default {
|
|
|
473
476
|
return false;
|
|
474
477
|
},
|
|
475
478
|
|
|
476
|
-
onDelete(e) {
|
|
477
|
-
const { index } = e.currentTarget.dataset;
|
|
479
|
+
onDelete(e, { index }) {
|
|
478
480
|
this.deleteHandle(index);
|
|
479
481
|
},
|
|
480
482
|
|
|
@@ -545,7 +547,7 @@ export default {
|
|
|
545
547
|
const { classPrefix, rows, column } = this;
|
|
546
548
|
|
|
547
549
|
let query;
|
|
548
|
-
// #ifdef H5 || APP
|
|
550
|
+
// #ifdef H5 || APP
|
|
549
551
|
query = uni.createSelectorQuery().in(this);
|
|
550
552
|
// #endif
|
|
551
553
|
if (!query) {
|
|
@@ -555,7 +557,7 @@ export default {
|
|
|
555
557
|
|
|
556
558
|
let selectorGridItem;
|
|
557
559
|
let selectorGrid;
|
|
558
|
-
// #ifdef H5 || APP
|
|
560
|
+
// #ifdef H5 || APP
|
|
559
561
|
selectorGridItem = '.t-grid-item';
|
|
560
562
|
selectorGrid = '.t-grid';
|
|
561
563
|
// #endif
|
|
@@ -608,22 +610,21 @@ export default {
|
|
|
608
610
|
return previewMediaSources;
|
|
609
611
|
},
|
|
610
612
|
|
|
611
|
-
onPreview(e) {
|
|
612
|
-
this.onFileClick(e);
|
|
613
|
+
onPreview(e, { file, index }) {
|
|
614
|
+
this.onFileClick(e, { file, index });
|
|
613
615
|
const { preview } = this;
|
|
614
616
|
|
|
615
617
|
if (!preview) return;
|
|
616
618
|
|
|
617
619
|
const usePreviewMedia = this.customFiles.some(file => file.type === 'video');
|
|
618
620
|
if (usePreviewMedia) {
|
|
619
|
-
this.onPreviewMedia(
|
|
621
|
+
this.onPreviewMedia({ index });
|
|
620
622
|
} else {
|
|
621
|
-
this.onPreviewImage(
|
|
623
|
+
this.onPreviewImage({ index });
|
|
622
624
|
}
|
|
623
625
|
},
|
|
624
626
|
|
|
625
|
-
onPreviewImage(
|
|
626
|
-
const { index } = e.currentTarget.dataset;
|
|
627
|
+
onPreviewImage({ index }) {
|
|
627
628
|
const urls = this.customFiles.filter(file => file.percent !== -1).map(file => file.url);
|
|
628
629
|
const current = this.customFiles[index]?.url;
|
|
629
630
|
uni.previewImage({
|
|
@@ -635,8 +636,7 @@ export default {
|
|
|
635
636
|
});
|
|
636
637
|
},
|
|
637
638
|
|
|
638
|
-
onPreviewMedia(
|
|
639
|
-
const { index: current } = e.currentTarget.dataset;
|
|
639
|
+
onPreviewMedia({ index: current }) {
|
|
640
640
|
const sources = this.getPreviewMediaSources();
|
|
641
641
|
uni.previewMedia({
|
|
642
642
|
sources,
|
|
@@ -51,7 +51,7 @@ url | String | - | \- | N
|
|
|
51
51
|
### CSS Variables
|
|
52
52
|
|
|
53
53
|
The component provides the following CSS variables, which can be used to customize styles.
|
|
54
|
-
Name | Default Value | Description
|
|
54
|
+
Name | Default Value | Description
|
|
55
55
|
-- | -- | --
|
|
56
56
|
--watermark-left-0 | --watermark-left-0 | -
|
|
57
57
|
--watermark-left-25 | --watermark-left-25 | -
|
package/dist/watermark/README.md
CHANGED
|
@@ -106,7 +106,7 @@ export default async function generateBase64Url(
|
|
|
106
106
|
ctx.globalAlpha = alpha;
|
|
107
107
|
|
|
108
108
|
// h5需要全局缩放
|
|
109
|
-
// #ifdef H5 || APP
|
|
109
|
+
// #ifdef H5 || APP
|
|
110
110
|
ctx.scale(1 / ratio, 1 / ratio);
|
|
111
111
|
// #endif
|
|
112
112
|
|
|
@@ -152,7 +152,7 @@ export default async function generateBase64Url(
|
|
|
152
152
|
|
|
153
153
|
// TODO:其他技术栈修复了「灰度效果只影响图片,不影响文字」的bug,因为小程序不能创建临时canvas,暂时没有想到比较优雅的解决方案
|
|
154
154
|
if (isGrayscale) {
|
|
155
|
-
// #ifdef APP
|
|
155
|
+
// #ifdef APP
|
|
156
156
|
ctx.drawImage(
|
|
157
157
|
img,
|
|
158
158
|
offsetX,
|
|
@@ -162,7 +162,7 @@ export default async function generateBase64Url(
|
|
|
162
162
|
);
|
|
163
163
|
// #endif
|
|
164
164
|
|
|
165
|
-
// #ifndef APP
|
|
165
|
+
// #ifndef APP
|
|
166
166
|
ctx.drawImage(
|
|
167
167
|
img,
|
|
168
168
|
offsetX,
|
|
@@ -189,7 +189,7 @@ export default async function generateBase64Url(
|
|
|
189
189
|
y: 0,
|
|
190
190
|
});
|
|
191
191
|
} else {
|
|
192
|
-
// #ifdef APP
|
|
192
|
+
// #ifdef APP
|
|
193
193
|
ctx.drawImage(
|
|
194
194
|
img,
|
|
195
195
|
offsetX,
|
|
@@ -199,7 +199,7 @@ export default async function generateBase64Url(
|
|
|
199
199
|
);
|
|
200
200
|
// #endif
|
|
201
201
|
|
|
202
|
-
// #ifndef APP
|
|
202
|
+
// #ifndef APP
|
|
203
203
|
ctx.drawImage(
|
|
204
204
|
img,
|
|
205
205
|
offsetX,
|
|
@@ -257,7 +257,7 @@ export default async function generateBase64Url(
|
|
|
257
257
|
);
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
// #ifdef APP
|
|
260
|
+
// #ifdef APP
|
|
261
261
|
ctx.draw();
|
|
262
262
|
// #endif
|
|
263
263
|
|
|
@@ -22,11 +22,12 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
import tools from '../common/utils.wxs';
|
|
26
|
-
import watermarkProps from './props';
|
|
27
25
|
import { prefix } from '../common/config';
|
|
28
26
|
import { uniComponent } from '../common/src/index';
|
|
29
27
|
import { appBaseInfo, nextTick } from '../common/utils';
|
|
28
|
+
import tools from '../common/utils.wxs';
|
|
29
|
+
|
|
30
|
+
import watermarkProps from './props';
|
|
30
31
|
import generateBase64Url from './utils/generateBase64Url';
|
|
31
32
|
import randomMovingStyle from './utils/randomMovingStyle';
|
|
32
33
|
|
|
@@ -57,7 +58,7 @@ export default {
|
|
|
57
58
|
let result = 'width: 100px; height: 100px;';
|
|
58
59
|
let shouldHide = true;
|
|
59
60
|
|
|
60
|
-
// #ifdef APP
|
|
61
|
+
// #ifdef APP || MP-ALIPAY
|
|
61
62
|
if (!this.initialed) {
|
|
62
63
|
shouldHide = false;
|
|
63
64
|
}
|
package/global.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ declare module 'vue' {
|
|
|
58
58
|
TResult: typeof import('@tdesign/uniapp/result/result.vue').default;
|
|
59
59
|
TRow: typeof import('@tdesign/uniapp/row/row.vue').default;
|
|
60
60
|
TSearch: typeof import('@tdesign/uniapp/search/search.vue').default;
|
|
61
|
+
TSegmented: typeof import('@tdesign/uniapp/segmented/segmented.vue').default;
|
|
61
62
|
TSideBar: typeof import('@tdesign/uniapp/side-bar/side-bar.vue').default;
|
|
62
63
|
TSideBarItem: typeof import('@tdesign/uniapp/side-bar-item/side-bar-item.vue').default;
|
|
63
64
|
TSkeleton: typeof import('@tdesign/uniapp/skeleton/skeleton.vue').default;
|
|
@@ -73,6 +74,7 @@ declare module 'vue' {
|
|
|
73
74
|
TTabBar: typeof import('@tdesign/uniapp/tab-bar/tab-bar.vue').default;
|
|
74
75
|
TTabBarItem: typeof import('@tdesign/uniapp/tab-bar-item/tab-bar-item.vue').default;
|
|
75
76
|
TTabPanel: typeof import('@tdesign/uniapp/tab-panel/tab-panel.vue').default;
|
|
77
|
+
TTable: typeof import('@tdesign/uniapp/table/table.vue').default;
|
|
76
78
|
TTabs: typeof import('@tdesign/uniapp/tabs/tabs.vue').default;
|
|
77
79
|
TTag: typeof import('@tdesign/uniapp/tag/tag.vue').default;
|
|
78
80
|
TTextarea: typeof import('@tdesign/uniapp/textarea/textarea.vue').default;
|