@wot-ui/ui 2.0.0-alpha.8 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/changelog.md +4 -86
- package/components/wd-action-sheet/index.scss +5 -5
- package/components/wd-avatar/index.scss +5 -5
- package/components/wd-backtop/index.scss +2 -2
- package/components/wd-badge/index.scss +2 -2
- package/components/wd-button/index.scss +5 -5
- package/components/wd-button/types.ts +10 -1
- package/components/wd-button/wd-button.vue +2 -2
- package/components/wd-calendar/index.scss +1 -1
- package/components/wd-calendar-view/index.scss +3 -3
- package/components/wd-card/index.scss +2 -2
- package/components/wd-cascader/index.scss +3 -3
- package/components/wd-cell/index.scss +8 -8
- package/components/wd-checkbox/index.scss +3 -3
- package/components/wd-circle/index.scss +1 -1
- package/components/wd-collapse-item/index.scss +2 -2
- package/components/wd-config-provider/types.ts +1 -1
- package/components/wd-count-down/index.scss +1 -1
- package/components/wd-count-to/index.scss +2 -2
- package/components/wd-datetime-picker/index.scss +3 -3
- package/components/wd-dialog/index.scss +3 -3
- package/components/wd-divider/index.scss +1 -1
- package/components/wd-drop-menu/index.scss +1 -1
- package/components/wd-drop-menu-item/index.scss +2 -2
- package/components/wd-empty/index.scss +1 -1
- package/components/wd-form-item/index.scss +1 -1
- package/components/wd-grid-item/index.scss +1 -1
- package/components/wd-icon/types.ts +8 -5
- package/components/wd-icon/wd-icon.vue +20 -6
- package/components/wd-image-preview/index.scss +1 -1
- package/components/wd-img/index.scss +1 -1
- package/components/wd-index-bar/index.scss +3 -3
- package/components/wd-input/index.scss +1 -1
- package/components/wd-input-number/index.scss +1 -1
- package/components/wd-keyboard/key/index.scss +3 -3
- package/components/wd-loading/index.scss +5 -5
- package/components/wd-loadmore/index.scss +2 -2
- package/components/wd-notice-bar/index.scss +1 -1
- package/components/wd-notify/index.scss +1 -1
- package/components/wd-pagination/index.scss +2 -2
- package/components/wd-password-input/index.scss +2 -2
- package/components/wd-picker/index.scss +1 -1
- package/components/wd-popover/index.scss +1 -1
- package/components/wd-progress/index.scss +2 -2
- package/components/wd-radio/index.scss +3 -3
- package/components/wd-search/index.scss +4 -4
- package/components/wd-segmented/index.scss +1 -1
- package/components/wd-sidebar-item/index.scss +1 -1
- package/components/wd-skeleton/index.scss +1 -1
- package/components/wd-slide-verify/index.scss +1 -1
- package/components/wd-slider/index.scss +4 -4
- package/components/wd-sort-button/index.scss +1 -1
- package/components/wd-step/index.scss +4 -4
- package/components/wd-swiper-nav/index.scss +3 -3
- package/components/wd-switch/index.scss +2 -2
- package/components/wd-switch/types.ts +33 -5
- package/components/wd-switch/wd-switch.vue +23 -3
- package/components/wd-tabbar/index.scss +1 -1
- package/components/wd-tabbar-item/index.scss +1 -1
- package/components/wd-table/index.scss +1 -1
- package/components/wd-tabs/index.scss +4 -4
- package/components/wd-tag/index.scss +6 -6
- package/components/wd-text/index.scss +1 -1
- package/components/wd-textarea/index.scss +2 -2
- package/components/wd-toast/index.scss +1 -1
- package/components/wd-toast/types.ts +14 -4
- package/components/wd-toast/wd-toast.vue +5 -2
- package/components/wd-tooltip/index.scss +1 -1
- package/components/wd-tour/index.scss +1 -1
- package/components/wd-upload/index.scss +3 -3
- package/package.json +1 -1
- package/styles/theme/base/radius.scss +1 -1
- package/styles/theme/base/typography.scss +13 -13
- package/styles/variable.scss +14 -14
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view :class="rootClass" :style="rootStyle" @click="switchValue">
|
|
3
3
|
<view class="wd-switch__inner" :style="innerStyle">
|
|
4
|
-
<wd-icon
|
|
4
|
+
<wd-icon
|
|
5
|
+
v-if="innerIcon || innerCssIcon"
|
|
6
|
+
custom-class="wd-switch__inner-icon"
|
|
7
|
+
:name="innerIcon"
|
|
8
|
+
:class-prefix="classPrefix"
|
|
9
|
+
:css-icon="innerCssIcon"
|
|
10
|
+
></wd-icon>
|
|
5
11
|
<text v-else class="wd-switch__inner-text">{{ isActive ? activeText : inactiveText }}</text>
|
|
6
12
|
</view>
|
|
7
13
|
<view class="wd-switch__action">
|
|
8
|
-
<wd-loading v-
|
|
9
|
-
<wd-icon
|
|
14
|
+
<wd-loading v-if="loading" v-bind="customLoadingProps"></wd-loading>
|
|
15
|
+
<wd-icon
|
|
16
|
+
v-else-if="actionIcon || actionCssIcon"
|
|
17
|
+
custom-class="wd-switch__action-icon"
|
|
18
|
+
:name="actionIcon"
|
|
19
|
+
:class-prefix="classPrefix"
|
|
20
|
+
:css-icon="actionCssIcon"
|
|
21
|
+
></wd-icon>
|
|
10
22
|
</view>
|
|
11
23
|
</view>
|
|
12
24
|
</template>
|
|
@@ -62,10 +74,18 @@ const innerIcon = computed(() => {
|
|
|
62
74
|
return isActive.value ? props.activeIcon : props.inactiveIcon
|
|
63
75
|
})
|
|
64
76
|
|
|
77
|
+
const innerCssIcon = computed(() => {
|
|
78
|
+
return isActive.value ? props.activeCssIcon : props.inactiveCssIcon
|
|
79
|
+
})
|
|
80
|
+
|
|
65
81
|
const actionIcon = computed(() => {
|
|
66
82
|
return isActive.value ? props.activeActionIcon : props.inactiveActionIcon
|
|
67
83
|
})
|
|
68
84
|
|
|
85
|
+
const actionCssIcon = computed(() => {
|
|
86
|
+
return isActive.value ? props.activeActionCssIcon : props.inactiveActionCssIcon
|
|
87
|
+
})
|
|
88
|
+
|
|
69
89
|
const customLoadingProps = computed<Partial<LoadingProps>>(() => {
|
|
70
90
|
const overrides: Partial<LoadingProps> = isDef(props.loadingProps) ? omitBy(props.loadingProps, isUndefined) : {}
|
|
71
91
|
const customSpinnerClass = [isDef(overrides.customSpinnerClass) ? overrides.customSpinnerClass : '', 'wd-switch__action-loading']
|
|
@@ -10,7 +10,7 @@ $tabbar-z-index: var(--wot-tabbar-z-index, 10) !default;
|
|
|
10
10
|
// round 变体水平外边距
|
|
11
11
|
$tabbar-round-margin-horizontal: var(--wot-tabbar-round-margin-horizontal, $spacing-extra-loose) !default;
|
|
12
12
|
// round 变体圆角
|
|
13
|
-
$tabbar-round-radius: var(--wot-tabbar-round-radius, $radius-
|
|
13
|
+
$tabbar-round-radius: var(--wot-tabbar-round-radius, $radius-full) !default;
|
|
14
14
|
// round 变体阴影
|
|
15
15
|
$tabbar-round-shadow: var(
|
|
16
16
|
--wot-tabbar-round-shadow,
|
|
@@ -7,7 +7,7 @@ $tabbar-item-color-inactive: var(--wot-tabbar-item-color-inactive, $text-main) !
|
|
|
7
7
|
// 标题文字大小
|
|
8
8
|
$tabbar-item-title-font-size: var(--wot-tabbar-item-title-font-size, $typography-label-size-extra-small) !default;
|
|
9
9
|
// 标题文字行高
|
|
10
|
-
$tabbar-item-title-line-height: var(--wot-tabbar-item-title-line-height, $typography-label-line
|
|
10
|
+
$tabbar-item-title-line-height: var(--wot-tabbar-item-title-line-height, $typography-label-line-height-size-extra-small) !default;
|
|
11
11
|
// 图标大小
|
|
12
12
|
$tabbar-item-icon-size: var(--wot-tabbar-item-icon-size, $n-24) !default;
|
|
13
13
|
|
|
@@ -14,7 +14,7 @@ $table-border-width: var(--wot-table-border-width, $stroke-main) !default;
|
|
|
14
14
|
// 单元格字号
|
|
15
15
|
$table-cell-font-size: var(--wot-table-cell-font-size, $typography-body-size-main) !default;
|
|
16
16
|
// 单元格行高
|
|
17
|
-
$table-cell-line-height: var(--wot-table-cell-line-height, $typography-body-line
|
|
17
|
+
$table-cell-line-height: var(--wot-table-cell-line-height, $typography-body-line-height-size-main) !default;
|
|
18
18
|
// 单元格内边距
|
|
19
19
|
$table-cell-padding: var(--wot-table-cell-padding, $padding-loose $padding-extra-loose) !default;
|
|
20
20
|
// 固定列阴影渐变背景
|
|
@@ -14,7 +14,7 @@ $tabs-nav-font-weight-active: var(--wot-tabs-nav-font-weight-active, $font-weigh
|
|
|
14
14
|
// 导航项字号
|
|
15
15
|
$tabs-nav-item-font-size: var(--wot-tabs-nav-item-font-size, $typography-body-size-extra-large) !default;
|
|
16
16
|
// 导航项行高
|
|
17
|
-
$tabs-nav-item-line-height: var(--wot-tabs-nav-item-line-height, $typography-body-line
|
|
17
|
+
$tabs-nav-item-line-height: var(--wot-tabs-nav-item-line-height, $typography-body-line-height-size-extra-large) !default;
|
|
18
18
|
// 导航项内边距
|
|
19
19
|
$tabs-nav-item-padding: var(--wot-tabs-nav-item-padding, $padding-main $padding-extra-loose) !default;
|
|
20
20
|
// 导航禁用文字颜色
|
|
@@ -46,7 +46,7 @@ $tabs-map-color: var(--wot-tabs-map-color, $text-main) !default;
|
|
|
46
46
|
// 地图模式头部字号
|
|
47
47
|
$tabs-map-header-font-size: var(--wot-tabs-map-header-font-size, $typography-body-size-extra-large) !default;
|
|
48
48
|
// 地图模式头部行高
|
|
49
|
-
$tabs-map-header-line-height: var(--wot-tabs-map-header-line-height, $typography-body-line
|
|
49
|
+
$tabs-map-header-line-height: var(--wot-tabs-map-header-line-height, $typography-body-line-height-size-extra-large) !default;
|
|
50
50
|
// 地图模式头部内边距
|
|
51
51
|
$tabs-map-header-padding: var(--wot-tabs-map-header-padding, $padding-main $padding-extra-loose) !default;
|
|
52
52
|
// 地图模式导航按钮间距
|
|
@@ -62,7 +62,7 @@ $tabs-map-nav-btn-radius: var(--wot-tabs-map-nav-btn-radius, $radius-main) !defa
|
|
|
62
62
|
// 地图模式导航按钮字号
|
|
63
63
|
$tabs-map-nav-btn-font-size: var(--wot-tabs-map-nav-btn-font-size, $typography-body-size-ultra-large) !default;
|
|
64
64
|
// 地图模式导航按钮行高
|
|
65
|
-
$tabs-map-nav-btn-line-height: var(--wot-tabs-map-nav-btn-line-height, $typography-body-line
|
|
65
|
+
$tabs-map-nav-btn-line-height: var(--wot-tabs-map-nav-btn-line-height, $typography-body-line-height-size-ultra-large) !default;
|
|
66
66
|
// 地图模式导航按钮内边距
|
|
67
67
|
$tabs-map-nav-btn-padding: var(--wot-tabs-map-nav-btn-padding, $padding-tight $padding-extra-loose) !default;
|
|
68
68
|
// 地图模式内容内边距
|
|
@@ -170,7 +170,7 @@ $tabs-map-body-bg: var(--wot-tabs-map-body-bg, $filled-oppo) !default;
|
|
|
170
170
|
bottom: 0;
|
|
171
171
|
width: $n-6;
|
|
172
172
|
height: $n-6;
|
|
173
|
-
border-radius: $radius-
|
|
173
|
+
border-radius: $radius-full;
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
|
|
@@ -9,7 +9,7 @@ $tag-font-size: var(--wot-tag-font-size, $typography-label-size-main) !default;
|
|
|
9
9
|
// 默认圆角
|
|
10
10
|
$tag-radius: var(--wot-tag-radius, $radius-small) !default;
|
|
11
11
|
// 圆角标签圆角
|
|
12
|
-
$tag-round-radius: var(--wot-tag-round-radius, $radius-
|
|
12
|
+
$tag-round-radius: var(--wot-tag-round-radius, $radius-full) !default;
|
|
13
13
|
// 标记标签圆角
|
|
14
14
|
$tag-mark-radius: var(--wot-tag-mark-radius, $radius-large $radius-main) !default;
|
|
15
15
|
// 图标间距
|
|
@@ -79,7 +79,7 @@ $tag-purple-color: var(--wot-tag-purple-color, $purple-6) !default;
|
|
|
79
79
|
// 小尺寸字号
|
|
80
80
|
$tag-small-font-size: var(--wot-tag-small-font-size, $typography-label-size-small) !default;
|
|
81
81
|
// 小尺寸行高
|
|
82
|
-
$tag-small-line-height: var(--wot-tag-small-line-height, $typography-label-line
|
|
82
|
+
$tag-small-line-height: var(--wot-tag-small-line-height, $typography-label-line-height-size-small) !default;
|
|
83
83
|
// 小尺寸内边距
|
|
84
84
|
$tag-small-padding: var(--wot-tag-small-padding, $padding-zero $padding-super-tight) !default;
|
|
85
85
|
// 小尺寸圆角态内边距
|
|
@@ -89,7 +89,7 @@ $tag-small-icon-size: var(--wot-tag-small-icon-size, $n-10) !default;
|
|
|
89
89
|
// 中尺寸字号
|
|
90
90
|
$tag-medium-font-size: var(--wot-tag-medium-font-size, $typography-label-size-main) !default;
|
|
91
91
|
// 中尺寸行高
|
|
92
|
-
$tag-medium-line-height: var(--wot-tag-medium-line-height, $typography-label-line
|
|
92
|
+
$tag-medium-line-height: var(--wot-tag-medium-line-height, $typography-label-line-height-size-main) !default;
|
|
93
93
|
// 中尺寸内边距
|
|
94
94
|
$tag-medium-padding: var(--wot-tag-medium-padding, $n-1 $padding-super-tight) !default;
|
|
95
95
|
// 中尺寸圆角态内边距
|
|
@@ -99,7 +99,7 @@ $tag-medium-icon-size: var(--wot-tag-medium-icon-size, $n-10) !default;
|
|
|
99
99
|
// 默认尺寸字号
|
|
100
100
|
$tag-default-font-size: var(--wot-tag-default-font-size, $typography-label-size-main) !default;
|
|
101
101
|
// 默认尺寸行高
|
|
102
|
-
$tag-default-line-height: var(--wot-tag-default-line-height, $typography-label-line
|
|
102
|
+
$tag-default-line-height: var(--wot-tag-default-line-height, $typography-label-line-height-size-main) !default;
|
|
103
103
|
// 默认尺寸内边距
|
|
104
104
|
$tag-default-padding: var(--wot-tag-default-padding, $n-3 $padding-extra-tight) !default;
|
|
105
105
|
// 默认尺寸圆角态内边距
|
|
@@ -109,7 +109,7 @@ $tag-default-icon-size: var(--wot-tag-default-icon-size, $n-12) !default;
|
|
|
109
109
|
// 大尺寸字号
|
|
110
110
|
$tag-large-font-size: var(--wot-tag-large-font-size, $typography-label-size-large) !default;
|
|
111
111
|
// 大尺寸行高
|
|
112
|
-
$tag-large-line-height: var(--wot-tag-large-line-height, $typography-label-line
|
|
112
|
+
$tag-large-line-height: var(--wot-tag-large-line-height, $typography-label-line-height-size-large) !default;
|
|
113
113
|
// 大尺寸内边距
|
|
114
114
|
$tag-large-padding: var(--wot-tag-large-padding, $n-3 $padding-extra-tight) !default;
|
|
115
115
|
// 大尺寸圆角态内边距
|
|
@@ -119,7 +119,7 @@ $tag-large-icon-size: var(--wot-tag-large-icon-size, $n-12) !default;
|
|
|
119
119
|
// 超大尺寸字号
|
|
120
120
|
$tag-extra-large-font-size: var(--wot-tag-extra-large-font-size, $typography-body-size-main) !default;
|
|
121
121
|
// 超大尺寸行高
|
|
122
|
-
$tag-extra-large-line-height: var(--wot-tag-extra-large-line-height, $typography-body-line
|
|
122
|
+
$tag-extra-large-line-height: var(--wot-tag-extra-large-line-height, $typography-body-line-height-size-main) !default;
|
|
123
123
|
// 超大尺寸内边距
|
|
124
124
|
$tag-extra-large-padding: var(--wot-tag-extra-large-padding, $n-3 $padding-extra-tight) !default;
|
|
125
125
|
// 超大尺寸圆角态内边距
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// 默认文字字号
|
|
5
5
|
$text-font-size: var(--wot-text-font-size, $typography-body-size-main) !default;
|
|
6
6
|
// 默认文字行高
|
|
7
|
-
$text-line-height: var(--wot-text-line-height, $typography-body-line
|
|
7
|
+
$text-line-height: var(--wot-text-line-height, $typography-body-line-height-size-main) !default;
|
|
8
8
|
// 主色文字颜色
|
|
9
9
|
$text-primary-color: var(--wot-text-primary-color, $primary-6) !default;
|
|
10
10
|
// 成功文字颜色
|
|
@@ -10,7 +10,7 @@ $textarea-inner-min-height: var(--wot-textarea-inner-min-height, $n-20) !default
|
|
|
10
10
|
// 文本域字号
|
|
11
11
|
$textarea-inner-font-size: var(--wot-textarea-inner-font-size, $typography-body-size-main) !default;
|
|
12
12
|
// 文本域行高
|
|
13
|
-
$textarea-inner-line-height: var(--wot-textarea-inner-line-height, $typography-body-line
|
|
13
|
+
$textarea-inner-line-height: var(--wot-textarea-inner-line-height, $typography-body-line-height-size-main) !default;
|
|
14
14
|
// 文本域文字颜色
|
|
15
15
|
$textarea-inner-color: var(--wot-textarea-inner-color, $text-main) !default;
|
|
16
16
|
// 占位符颜色
|
|
@@ -28,7 +28,7 @@ $textarea-count-color: var(--wot-textarea-count-color, $text-auxiliary) !default
|
|
|
28
28
|
// 字数统计字号
|
|
29
29
|
$textarea-count-font-size: var(--wot-textarea-count-font-size, $typography-body-size-main) !default;
|
|
30
30
|
// 字数统计行高
|
|
31
|
-
$textarea-count-line-height: var(--wot-textarea-count-line-height, $typography-body-line
|
|
31
|
+
$textarea-count-line-height: var(--wot-textarea-count-line-height, $typography-body-line-height-size-main) !default;
|
|
32
32
|
// 错误颜色
|
|
33
33
|
$textarea-error-color: var(--wot-textarea-error-color, $danger-main) !default;
|
|
34
34
|
|
|
@@ -16,7 +16,7 @@ $toast-bg: var(--wot-toast-bg, $opacfilled-tooltip-toast-cover) !default;
|
|
|
16
16
|
// 字号
|
|
17
17
|
$toast-font-size: var(--wot-toast-font-size, $typography-body-size-extra-large) !default;
|
|
18
18
|
// 行高
|
|
19
|
-
$toast-line-height: var(--wot-toast-line-height, $typography-body-line
|
|
19
|
+
$toast-line-height: var(--wot-toast-line-height, $typography-body-line-height-size-extra-large) !default;
|
|
20
20
|
// 图标大小
|
|
21
21
|
$toast-icon-size: var(--wot-toast-icon-size, $n-24) !default;
|
|
22
22
|
// 消息内容左边距
|
|
@@ -44,6 +44,10 @@ export type ToastOptions = {
|
|
|
44
44
|
* 类名前缀,用于使用自定义图标
|
|
45
45
|
*/
|
|
46
46
|
classPrefix?: string
|
|
47
|
+
/**
|
|
48
|
+
* CSS 图标
|
|
49
|
+
*/
|
|
50
|
+
cssIcon?: boolean | string
|
|
47
51
|
/**
|
|
48
52
|
* 完全展示后的回调函数
|
|
49
53
|
*/
|
|
@@ -167,13 +171,19 @@ export const toastProps = {
|
|
|
167
171
|
default: ''
|
|
168
172
|
},
|
|
169
173
|
/**
|
|
170
|
-
*
|
|
174
|
+
* 类名前缀,用于使用自定义图标,用法参考 Icon 组件
|
|
171
175
|
* @type {string}
|
|
172
176
|
* @default 'wd-icon'
|
|
173
177
|
*/
|
|
174
|
-
classPrefix:
|
|
175
|
-
|
|
176
|
-
|
|
178
|
+
classPrefix: makeStringProp('wd-icon'),
|
|
179
|
+
/**
|
|
180
|
+
* CSS 图标,用法参考 Icon 组件
|
|
181
|
+
* @type {boolean | string}
|
|
182
|
+
* @default false
|
|
183
|
+
*/
|
|
184
|
+
cssIcon: {
|
|
185
|
+
type: [Boolean, String],
|
|
186
|
+
default: false
|
|
177
187
|
},
|
|
178
188
|
/**
|
|
179
189
|
* 完全展示后的回调函数
|
|
@@ -19,11 +19,12 @@
|
|
|
19
19
|
:name="toastIcon[iconName]"
|
|
20
20
|
></wd-icon>
|
|
21
21
|
<wd-icon
|
|
22
|
-
v-else-if="iconClass"
|
|
22
|
+
v-else-if="iconClass || cssIcon"
|
|
23
23
|
:custom-class="`wd-toast__icon ${direction === 'vertical' ? 'is-vertical' : ''}`"
|
|
24
24
|
:size="iconSize"
|
|
25
25
|
:class-prefix="classPrefix"
|
|
26
26
|
:name="iconClass"
|
|
27
|
+
:css-icon="cssIcon"
|
|
27
28
|
></wd-icon>
|
|
28
29
|
<!--文本-->
|
|
29
30
|
<view v-if="msg" :class="`wd-toast__msg ${direction === 'vertical' ? 'is-vertical' : ''}`">{{ msg }}</view>
|
|
@@ -68,6 +69,7 @@ const loadingSize = ref<string>() // loading大小
|
|
|
68
69
|
const cover = ref<boolean>(false) // 是否存在遮罩层
|
|
69
70
|
const classPrefix = ref<string>('wd-icon') // 图标前缀
|
|
70
71
|
const iconClass = ref<string>('') // 图标类名
|
|
72
|
+
const cssIcon = ref<boolean | string>(false) // CSS 图标
|
|
71
73
|
const direction = ref<ToastDirection>('horizontal') // toast布局方向
|
|
72
74
|
|
|
73
75
|
let opened: (() => void) | null = null
|
|
@@ -108,7 +110,7 @@ const transitionStyle = computed(() => {
|
|
|
108
110
|
|
|
109
111
|
const rootClass = computed(() => {
|
|
110
112
|
return `wd-toast ${props.customClass} wd-toast--${position.value} ${
|
|
111
|
-
(iconName.value !== 'loading' || msg.value) && (iconName.value || iconClass.value) ? 'wd-toast--with-icon' : ''
|
|
113
|
+
(iconName.value !== 'loading' || msg.value) && (iconName.value || iconClass.value || cssIcon.value) ? 'wd-toast--with-icon' : ''
|
|
112
114
|
} ${iconName.value === 'loading' && !msg.value ? 'wd-toast--loading' : ''} ${direction.value === 'vertical' ? 'is-vertical' : ''}`
|
|
113
115
|
})
|
|
114
116
|
|
|
@@ -139,6 +141,7 @@ function reset(option: ToastOptions) {
|
|
|
139
141
|
function mergeOptionsWithProps(option: ToastOptions, props: ToastProps) {
|
|
140
142
|
iconName.value = isDef(option.iconName!) ? option.iconName! : props.iconName
|
|
141
143
|
iconClass.value = isDef(option.iconClass!) ? option.iconClass! : props.iconClass
|
|
144
|
+
cssIcon.value = isDef(option.cssIcon!) ? option.cssIcon! : props.cssIcon
|
|
142
145
|
msg.value = isDef(option.msg!) ? option.msg! : props.msg
|
|
143
146
|
position.value = isDef(option.position!) ? option.position! : props.position
|
|
144
147
|
zIndex.value = isDef(option.zIndex!) ? option.zIndex! : props.zIndex
|
|
@@ -26,7 +26,7 @@ $tooltip-close-icon-padding: var(--wot-tooltip-close-icon-padding, $padding-supe
|
|
|
26
26
|
// 层级
|
|
27
27
|
$tooltip-z-index: var(--wot-tooltip-z-index, 500) !default;
|
|
28
28
|
// 行高
|
|
29
|
-
$tooltip-line-height: var(--wot-tooltip-line-height, $typography-body-line
|
|
29
|
+
$tooltip-line-height: var(--wot-tooltip-line-height, $typography-body-line-height-size-main) !default;
|
|
30
30
|
|
|
31
31
|
@include b(tooltip) {
|
|
32
32
|
position: relative;
|
|
@@ -24,7 +24,7 @@ $tour-popover-radius: var(--wot-tour-popover-radius, $radius-main) !default;
|
|
|
24
24
|
// 信息框字号
|
|
25
25
|
$tour-info-font-size: var(--wot-tour-info-font-size, $typography-body-size-main) !default;
|
|
26
26
|
// 信息框行高
|
|
27
|
-
$tour-info-line-height: var(--wot-tour-info-line-height, $typography-body-line
|
|
27
|
+
$tour-info-line-height: var(--wot-tour-info-line-height, $typography-body-line-height-size-main) !default;
|
|
28
28
|
// 信息框文字颜色
|
|
29
29
|
$tour-info-color: var(--wot-tour-info-color, $text-main) !default;
|
|
30
30
|
// 操作区域上边距
|
|
@@ -17,7 +17,7 @@ $upload-evoke-color: var(--wot-upload-evoke-color, $text-auxiliary) !default;
|
|
|
17
17
|
// 唤起项文字大小
|
|
18
18
|
$upload-evoke-font-size: var(--wot-upload-evoke-font-size, $typography-body-size-main) !default;
|
|
19
19
|
// 唤起项文字行高
|
|
20
|
-
$upload-evoke-line-height: var(--wot-upload-evoke-line-height, $typography-body-line
|
|
20
|
+
$upload-evoke-line-height: var(--wot-upload-evoke-line-height, $typography-body-line-height-size-main) !default;
|
|
21
21
|
// 唤起项禁用文字颜色
|
|
22
22
|
$upload-evoke-color-disabled: var(--wot-upload-evoke-color-disabled, $text-disabled) !default;
|
|
23
23
|
// 唤起项图标颜色
|
|
@@ -37,13 +37,13 @@ $upload-close-icon-color: var(--wot-upload-close-icon-color, $icon-white) !defau
|
|
|
37
37
|
// 进度文字字号
|
|
38
38
|
$upload-progress-font-size: var(--wot-upload-progress-font-size, $typography-body-size-main) !default;
|
|
39
39
|
// 进度文字行高
|
|
40
|
-
$upload-progress-line-height: var(--wot-upload-progress-line-height, $typography-body-line
|
|
40
|
+
$upload-progress-line-height: var(--wot-upload-progress-line-height, $typography-body-line-height-size-main) !default;
|
|
41
41
|
// 进度文字颜色
|
|
42
42
|
$upload-progress-color: var(--wot-upload-progress-color, $text-white) !default;
|
|
43
43
|
// 文件名文字字号
|
|
44
44
|
$upload-file-font-size: var(--wot-upload-file-font-size, $typography-label-size-main) !default;
|
|
45
45
|
// 文件名文字行高
|
|
46
|
-
$upload-file-line-height: var(--wot-upload-file-line-height, $typography-label-line
|
|
46
|
+
$upload-file-line-height: var(--wot-upload-file-line-height, $typography-label-line-height-size-main) !default;
|
|
47
47
|
// 文件名文字颜色
|
|
48
48
|
$upload-file-color: var(--wot-upload-file-color, $text-secondary) !default;
|
|
49
49
|
// 文件/视频名称内边距
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"wot-ui","name":"@wot-ui/ui","displayName":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库","version":"2.0.0
|
|
1
|
+
{"id":"wot-ui","name":"@wot-ui/ui","displayName":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库","version":"2.0.0","license":"MIT","description":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库。","keywords":["wot-ui","国际化","组件库","vue3","暗黑模式"],"main":"index.ts","repository":{"type":"git","url":"https://github.com/wot-ui/wot-ui.git"},"engines":{"HBuilderX":"^3.8.7"},"dcloudext":{"type":"component-vue","sale":{"regular":{"price":"0.00"},"sourcecode":{"price":"0.00"}},"contact":{"qq":""},"declaration":{"ads":"无","data":"插件不采集任何数据","permissions":"无"},"npmurl":"https://www.npmjs.com/package/@wot-ui/ui"},"vetur":{"tags":"tags.json","attributes":"attributes.json"},"web-types":"web-types.json","uni_modules":{"dependencies":[],"encrypt":[],"platforms":{"cloud":{"tcb":"y","aliyun":"y","alipay":"n"},"client":{"Vue":{"vue2":"n","vue3":"y"},"App":{"app-vue":"y","app-nvue":"n","app-uvue":"n"},"H5-mobile":{"Safari":"y","Android Browser":"y","微信浏览器(Android)":"y","QQ浏览器(Android)":"y"},"H5-pc":{"Chrome":"y","IE":"u","Edge":"y","Firefox":"y","Safari":"y"},"小程序":{"微信":"y","阿里":"y","百度":"u","字节跳动":"u","QQ":"y","钉钉":"y","快手":"u","飞书":"u","京东":"u"},"快应用":{"华为":"u","联盟":"u"}}}},"peerDependencies":{"vue":">=3.2.47"}}
|
|
@@ -9,9 +9,9 @@ page,
|
|
|
9
9
|
--wot-typography-title-font-weight-light: var(--wot-font-weight-regular);
|
|
10
10
|
--wot-typography-title-font-weight-main: var(--wot-font-weight-medium);
|
|
11
11
|
--wot-typography-title-font-weight-strong: var(--wot-font-weight-semibold);
|
|
12
|
-
--wot-typography-title-line
|
|
13
|
-
--wot-typography-title-line
|
|
14
|
-
--wot-typography-title-line
|
|
12
|
+
--wot-typography-title-line-height-size-main: var(--wot-n-26);
|
|
13
|
+
--wot-typography-title-line-height-size-large: var(--wot-n-28);
|
|
14
|
+
--wot-typography-title-line-height-size-extra-large: var(--wot-n-34);
|
|
15
15
|
/* body */
|
|
16
16
|
--wot-typography-body-font-family: PingFang SC;
|
|
17
17
|
--wot-typography-body-size-main: var(--wot-n-14);
|
|
@@ -22,11 +22,11 @@ page,
|
|
|
22
22
|
--wot-typography-body-font-weight-main: var(--wot-font-weight-regular);
|
|
23
23
|
--wot-typography-body-font-weight-strong: var(--wot-font-weight-medium);
|
|
24
24
|
--wot-typography-body-font-weight-extra-strong: var(--wot-font-weight-semibold);
|
|
25
|
-
--wot-typography-body-line
|
|
26
|
-
--wot-typography-body-line
|
|
27
|
-
--wot-typography-body-line
|
|
28
|
-
--wot-typography-body-line
|
|
29
|
-
--wot-typography-body-line
|
|
25
|
+
--wot-typography-body-line-height-size-main: var(--wot-n-20);
|
|
26
|
+
--wot-typography-body-line-height-size-large: var(--wot-n-22);
|
|
27
|
+
--wot-typography-body-line-height-size-extra-large: var(--wot-n-24);
|
|
28
|
+
--wot-typography-body-line-height-size-super-large: var(--wot-n-24);
|
|
29
|
+
--wot-typography-body-line-height-size-ultra-large: var(--wot-n-26);
|
|
30
30
|
/* label */
|
|
31
31
|
--wot-typography-label-font-family: PingFang SC;
|
|
32
32
|
--wot-typography-label-size-super-small: var(--wot-n-9);
|
|
@@ -36,9 +36,9 @@ page,
|
|
|
36
36
|
--wot-typography-label-size-large: var(--wot-n-14);
|
|
37
37
|
--wot-typography-label-font-weight-main: var(--wot-font-weight-regular);
|
|
38
38
|
--wot-typography-label-font-weight-strong: var(--wot-font-weight-medium);
|
|
39
|
-
--wot-typography-label-line
|
|
40
|
-
--wot-typography-label-line
|
|
41
|
-
--wot-typography-label-line
|
|
42
|
-
--wot-typography-label-line
|
|
43
|
-
--wot-typography-label-line
|
|
39
|
+
--wot-typography-label-line-height-size-super-small: var(--wot-n-14);
|
|
40
|
+
--wot-typography-label-line-height-size-extra-small: var(--wot-n-16);
|
|
41
|
+
--wot-typography-label-line-height-size-small: var(--wot-n-16);
|
|
42
|
+
--wot-typography-label-line-height-size-main: var(--wot-n-18);
|
|
43
|
+
--wot-typography-label-line-height-size-large: var(--wot-n-18);
|
|
44
44
|
}
|
package/styles/variable.scss
CHANGED
|
@@ -274,11 +274,11 @@ $typography-label-size-main: var(--wot-typography-label-size-main, $n-12) !defau
|
|
|
274
274
|
$typography-label-size-large: var(--wot-typography-label-size-large, $n-14) !default;
|
|
275
275
|
$typography-label-font-weight-main: var(--wot-typography-label-font-weight-main, $font-weight-regular) !default;
|
|
276
276
|
$typography-label-font-weight-strong: var(--wot-typography-label-font-weight-strong, $font-weight-medium) !default;
|
|
277
|
-
$typography-label-line
|
|
278
|
-
$typography-label-line
|
|
279
|
-
$typography-label-line
|
|
280
|
-
$typography-label-line
|
|
281
|
-
$typography-label-line
|
|
277
|
+
$typography-label-line-height-size-extra-small: var(--wot-typography-label-line-height-size-extra-small, $n-16) !default;
|
|
278
|
+
$typography-label-line-height-size-large: var(--wot-typography-label-line-height-size-large, $n-18) !default;
|
|
279
|
+
$typography-label-line-height-size-main: var(--wot-typography-label-line-height-size-main, $n-18) !default;
|
|
280
|
+
$typography-label-line-height-size-small: var(--wot-typography-label-line-height-size-small, $n-16) !default;
|
|
281
|
+
$typography-label-line-height-size-super-small: var(--wot-typography-label-line-height-size-super-small, $n-14) !default;
|
|
282
282
|
$typography-label-size-extra-small: var(--wot-typography-label-size-extra-small, $n-10) !default;
|
|
283
283
|
$typography-label-size-super-small: var(--wot-typography-label-size-super-small, $n-9) !default;
|
|
284
284
|
|
|
@@ -289,11 +289,11 @@ $typography-body-size-large: var(--wot-typography-body-size-large, $n-15) !defau
|
|
|
289
289
|
$typography-body-font-weight-main: var(--wot-typography-body-font-weight-main, $font-weight-regular) !default;
|
|
290
290
|
$typography-body-font-weight-strong: var(--wot-typography-body-font-weight-strong, $font-weight-medium) !default;
|
|
291
291
|
$typography-body-font-weight-extra-strong: var(--wot-typography-body-font-weight-extra-strong, $font-weight-semibold) !default;
|
|
292
|
-
$typography-body-line
|
|
293
|
-
$typography-body-line
|
|
294
|
-
$typography-body-line
|
|
295
|
-
$typography-body-line
|
|
296
|
-
$typography-body-line
|
|
292
|
+
$typography-body-line-height-size-extra-large: var(--wot-typography-body-line-height-size-extra-large, $n-24) !default;
|
|
293
|
+
$typography-body-line-height-size-large: var(--wot-typography-body-line-height-size-large, $n-22) !default;
|
|
294
|
+
$typography-body-line-height-size-main: var(--wot-typography-body-line-height-size-main, $n-20) !default;
|
|
295
|
+
$typography-body-line-height-size-super-large: var(--wot-typography-body-line-height-size-super-large, $n-24) !default;
|
|
296
|
+
$typography-body-line-height-size-ultra-large: var(--wot-typography-body-line-height-size-ultra-large, $n-26) !default;
|
|
297
297
|
$typography-body-size-extra-large: var(--wot-typography-body-size-extra-large, $n-16) !default;
|
|
298
298
|
$typography-body-size-super-large: var(--wot-typography-body-size-super-large, $n-17) !default;
|
|
299
299
|
$typography-body-size-ultra-large: var(--wot-typography-body-size-ultra-large, $n-18) !default;
|
|
@@ -306,9 +306,9 @@ $typography-title-size-extra-large: var(--wot-typography-title-size-extra-large,
|
|
|
306
306
|
$typography-title-font-weight-light: var(--wot-typography-title-font-weight-light, $font-weight-regular) !default;
|
|
307
307
|
$typography-title-font-weight-main: var(--wot-typography-title-font-weight-main, $font-weight-medium) !default;
|
|
308
308
|
$typography-title-font-weight-strong: var(--wot-typography-title-font-weight-strong, $font-weight-semibold) !default;
|
|
309
|
-
$typography-title-line
|
|
310
|
-
$typography-title-line
|
|
311
|
-
$typography-title-line
|
|
309
|
+
$typography-title-line-height-size-main: var(--wot-typography-title-line-height-size-main, $n-26) !default;
|
|
310
|
+
$typography-title-line-height-size-large: var(--wot-typography-title-line-height-size-large, $n-28) !default;
|
|
311
|
+
$typography-title-line-height-size-extra-large: var(--wot-typography-title-line-height-size-extra-large, $n-34) !default;
|
|
312
312
|
|
|
313
313
|
/* 圆角系列 */
|
|
314
314
|
$radius-zero: var(--wot-radius-zero, $n-0) !default;
|
|
@@ -318,7 +318,7 @@ $radius-large: var(--wot-radius-large, $n-8) !default;
|
|
|
318
318
|
$radius-extra-large: var(--wot-radius-extra-large, $n-12) !default;
|
|
319
319
|
$radius-super-large: var(--wot-radius-super-large, $n-16) !default;
|
|
320
320
|
$radius-ultra-large: var(--wot-radius-ultra-large, $n-20) !default;
|
|
321
|
-
$radius-
|
|
321
|
+
$radius-full: var(--wot-radius-full, $n-full) !default;
|
|
322
322
|
|
|
323
323
|
/* 内边距系列 */
|
|
324
324
|
$padding-zero: var(--wot-padding-zero, $n-0) !default;
|