@wot-ui/ui 2.0.0 → 2.0.2
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/README.md +17 -14
- package/changelog.md +24 -2
- package/components/wd-button/index.scss +29 -40
- package/components/wd-config-provider/types.ts +8 -12
- package/package.json +1 -1
- package/web-types.json +1 -1
package/README.md
CHANGED
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
<img src="https://v2.wot-ui.cn/wx.jpg" width="200" height="200"/>
|
|
58
58
|
<img src="https://v2.wot-ui.cn/alipay.png" width="200" height="200" />
|
|
59
59
|
<img src="https://v2.wot-ui.cn/h5.png" width="200" height="200" />
|
|
60
|
-
<img src="https://v2.wot-ui.cn/android.png" width="200" height="200" />
|
|
61
60
|
|
|
62
61
|
</p>
|
|
63
62
|
|
|
@@ -71,19 +70,23 @@
|
|
|
71
70
|
|
|
72
71
|
我们也非常欢迎大家一起贡献优秀的 Demo 与案例,欢迎在此 [issue](https://github.com/wot-ui/wot-ui/issues/16) 提交案例。
|
|
73
72
|
|
|
74
|
-
##
|
|
75
|
-
|
|
76
|
-
| 项目
|
|
77
|
-
|
|
|
78
|
-
| [wot-starter](https://
|
|
79
|
-
| [wot-ui
|
|
80
|
-
| [
|
|
81
|
-
| [
|
|
82
|
-
| [
|
|
83
|
-
| [
|
|
84
|
-
| [
|
|
85
|
-
| [
|
|
86
|
-
| [uni
|
|
73
|
+
## 生态
|
|
74
|
+
|
|
75
|
+
| 分类 | 项目 | 描述 |
|
|
76
|
+
| --- | --- | --- |
|
|
77
|
+
| 官方生态 | [wot-starter](https://starter.wot-ui.cn/) | Wot UI 官方快速起手项目 |
|
|
78
|
+
| 官方生态 | [@wot-ui/router](https://my-uni.wot-ui.cn/) | Wot UI 官方路由与工程能力扩展 |
|
|
79
|
+
| 官方生态 | [@wot-ui/cli](https://github.com/wot-ui/open-wot) | Wot UI 官方 AI 工具链与 CLI |
|
|
80
|
+
| 官方生态 | [@wot-ui/unocss-preset](https://github.com/wot-ui/unocss-preset) | Wot UI 官方 UnoCSS 预设 |
|
|
81
|
+
| 官方生态 | [VS Code 插件](https://marketplace.visualstudio.com/items?itemName=wot-ui.wot-ui-intellisense) | Wot UI 官方 VS Code 代码提示插件 |
|
|
82
|
+
| 官方生态 | [小程序 CI 工具](https://github.com/Moonofweisheng/uni-mini-ci) | Wot UI 官方推荐的小程序 CI 工具 |
|
|
83
|
+
| 官方生态 | [wot-starter-retail](https://github.com/wot-ui/wot-starter-retail) | Wot UI 官方零售行业模板方案 |
|
|
84
|
+
| 开发资源 | [awesome-uni-app](https://github.com/uni-helper/awesome-uni-app) | 多端统一开发框架 uni-app 优秀开发资源汇总 |
|
|
85
|
+
| 开发资源 | [create-uni](https://github.com/uni-helper/create-uni) | 快速创建 uni-app 项目 |
|
|
86
|
+
| 开发资源 | [uni-ku](https://github.com/uni-ku) | uni-app 生态扩展与工具集合 |
|
|
87
|
+
| 开发资源 | [uni-echarts](https://uni-echarts.xiaohe.ink/) | uni-app 图表组件与接入方案 |
|
|
88
|
+
| 模板方案 | [vitesse-uni-app](https://vitesse-docs.netlify.app/) | 现代化 uni-app 基础模板 |
|
|
89
|
+
| 模板方案 | [unibest](https://unibest.tech/) | 功能完善的 uni-app 开发模板 |
|
|
87
90
|
|
|
88
91
|
## 贡献指南
|
|
89
92
|
|
package/changelog.md
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
### [2.0.2](https://github.com/wot-ui/wot-ui/compare/v2.0.1...v2.0.2) (2026-04-22)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### 🐛 Bug Fixes | Bug 修复
|
|
8
|
+
|
|
9
|
+
* 🐛 移除按钮组件的 flex-shrink 属性 ([a6d6068](https://github.com/wot-ui/wot-ui/commit/a6d6068402fb39778e68d0280e45d7894daca386))
|
|
10
|
+
|
|
11
|
+
### [2.0.1](https://github.com/wot-ui/wot-ui/compare/v2.0.0...v2.0.1) (2026-04-22)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ✏️ Documentation | 文档
|
|
15
|
+
|
|
16
|
+
* ✏️ 完善 form 组件文档示例 ([53df04a](https://github.com/wot-ui/wot-ui/commit/53df04a63076506b9de3896fcf04f5178f99c893))
|
|
17
|
+
* ✏️ 修正 v1 链接至正确的子域名 ([558cd94](https://github.com/wot-ui/wot-ui/commit/558cd9414829b694a6c605087d57805cccef769e))
|
|
18
|
+
* ✏️ update miniprogram qrcode ([091fc30](https://github.com/wot-ui/wot-ui/commit/091fc308a2981ba9c4b7bdb295889544ef908c1f))
|
|
19
|
+
* ✏️ 更新表单组件示例 ([b439d8a](https://github.com/wot-ui/wot-ui/commit/b439d8af0a7560ba54a7fbc77700f71b9b859267))
|
|
20
|
+
* ✏️ 更新脚手架命令,使用 wot-starter-v2 模板 ([d7d846a](https://github.com/wot-ui/wot-ui/commit/d7d846a81a869fbb70d570eb2df33dc69b5e441b))
|
|
21
|
+
* ✏️ 更新文档和生态系统链接,移除无用内容 ([60a0cc8](https://github.com/wot-ui/wot-ui/commit/60a0cc81c293c096bcf727db5e867cdb269006e7))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### ✨ Features | 新功能
|
|
25
|
+
|
|
26
|
+
* ✨ 调整 button 组件高度由 padding 撑开转为固定高度 ([#4](https://github.com/wot-ui/wot-ui/issues/4)) ([b26b134](https://github.com/wot-ui/wot-ui/commit/b26b134471d78bb4ff09ba34f86852193ebc902d))
|
|
27
|
+
|
|
4
28
|
## [2.0.0](https://github.com/wot-ui/wot-ui/compare/v2.0.0-alpha.21...v2.0.0) (2026-04-21)
|
|
5
29
|
|
|
6
30
|
|
|
@@ -12,5 +36,3 @@
|
|
|
12
36
|
### ✨ Features | 新功能
|
|
13
37
|
|
|
14
38
|
* ✨ wot-ui v2 发布 ([2e96ba1](https://github.com/wot-ui/wot-ui/commit/2e96ba168360672521df51aa120ce03a1cf31ca0))
|
|
15
|
-
|
|
16
|
-
# 更新日志
|
|
@@ -124,30 +124,22 @@ $button-font-size-small: var(--wot-button-font-size-small, $typography-body-size
|
|
|
124
124
|
$button-font-size-medium: var(--wot-button-font-size-medium, $typography-body-size-extra-large) !default;
|
|
125
125
|
// large 尺寸文字字号
|
|
126
126
|
$button-font-size-large: var(--wot-button-font-size-large, $typography-body-size-extra-large) !default;
|
|
127
|
-
// mini
|
|
128
|
-
$button-
|
|
129
|
-
// small
|
|
130
|
-
$button-
|
|
131
|
-
// medium
|
|
132
|
-
$button-
|
|
133
|
-
// large
|
|
134
|
-
$button-
|
|
135
|
-
// mini
|
|
136
|
-
$button-
|
|
137
|
-
// small
|
|
138
|
-
$button-
|
|
139
|
-
// medium
|
|
140
|
-
$button-
|
|
141
|
-
// large
|
|
142
|
-
$button-
|
|
143
|
-
// mini 尺寸上下内边距
|
|
144
|
-
$button-up-down-padding-mini: var(--wot-button-up-down-padding-mini, $padding-super-tight) !default;
|
|
145
|
-
// small 尺寸上下内边距
|
|
146
|
-
$button-up-down-padding-small: var(--wot-button-up-down-padding-small, $padding-extra-tight) !default;
|
|
147
|
-
// medium 尺寸上下内边距
|
|
148
|
-
$button-up-down-padding-medium: var(--wot-button-up-down-padding-medium, $padding-tight) !default;
|
|
149
|
-
// large 尺寸上下内边距
|
|
150
|
-
$button-up-down-padding-large: var(--wot-button-up-down-padding-large, $padding-main) !default;
|
|
127
|
+
// mini 尺寸内边距
|
|
128
|
+
$button-padding-mini: var(--wot-button-padding-mini, $padding-zero $padding-loose) !default;
|
|
129
|
+
// small 尺寸内边距
|
|
130
|
+
$button-padding-small: var(--wot-button-padding-small, $padding-zero $padding-loose) !default;
|
|
131
|
+
// medium 尺寸内边距
|
|
132
|
+
$button-padding-medium: var(--wot-button-padding-medium, $padding-zero $padding-extra-loose) !default;
|
|
133
|
+
// large 尺寸内边距
|
|
134
|
+
$button-padding-large: var(--wot-button-padding-large, $padding-zero $padding-super-loose) !default;
|
|
135
|
+
// mini 尺寸高度
|
|
136
|
+
$button-height-mini: var(--wot-button-height-mini, $n-28) !default;
|
|
137
|
+
// small 尺寸高度
|
|
138
|
+
$button-height-small: var(--wot-button-height-small, $n-32) !default;
|
|
139
|
+
// medium 尺寸高度
|
|
140
|
+
$button-height-medium: var(--wot-button-height-medium, $n-40) !default;
|
|
141
|
+
// large 尺寸高度
|
|
142
|
+
$button-height-large: var(--wot-button-height-large, $n-44) !default;
|
|
151
143
|
// mini 尺寸仅图标按钮内边距
|
|
152
144
|
$button-only-icon-padding-mini: var(--wot-button-only-icon-padding-mini, $padding-super-tight) !default;
|
|
153
145
|
// small 尺寸仅图标按钮内边距
|
|
@@ -155,7 +147,7 @@ $button-only-icon-padding-small: var(--wot-button-only-icon-padding-small, $padd
|
|
|
155
147
|
// medium 尺寸仅图标按钮内边距
|
|
156
148
|
$button-only-icon-padding-medium: var(--wot-button-only-icon-padding-medium, $padding-tight) !default;
|
|
157
149
|
// large 尺寸仅图标按钮内边距
|
|
158
|
-
$button-only-icon-padding-large: var(--wot-button-only-icon-padding-large, $padding-
|
|
150
|
+
$button-only-icon-padding-large: var(--wot-button-only-icon-padding-large, $padding-main) !default;
|
|
159
151
|
// mini 尺寸图标与文字间距
|
|
160
152
|
$button-spacing-mini: var(--wot-button-spacing-mini, $spacing-super-tight) !default;
|
|
161
153
|
// small 尺寸图标与文字间距
|
|
@@ -245,37 +237,33 @@ $button-types: (
|
|
|
245
237
|
// 按钮尺寸配置映射
|
|
246
238
|
$button-sizes: (
|
|
247
239
|
"mini": (
|
|
248
|
-
"
|
|
249
|
-
"padding
|
|
240
|
+
"height": $button-height-mini,
|
|
241
|
+
"padding": $button-padding-mini,
|
|
250
242
|
"font-size": $button-font-size-mini,
|
|
251
|
-
"line-height": $button-line-height-mini,
|
|
252
243
|
"icon-font-size": $button-size-icon-mini,
|
|
253
244
|
"spacing": $button-spacing-mini,
|
|
254
245
|
"icon-padding": $button-only-icon-padding-mini
|
|
255
246
|
),
|
|
256
247
|
"small": (
|
|
257
|
-
"
|
|
258
|
-
"padding
|
|
248
|
+
"height": $button-height-small,
|
|
249
|
+
"padding": $button-padding-small,
|
|
259
250
|
"font-size": $button-font-size-small,
|
|
260
|
-
"line-height": $button-line-height-small,
|
|
261
251
|
"icon-font-size": $button-size-icon-small,
|
|
262
252
|
"spacing": $button-spacing-small,
|
|
263
253
|
"icon-padding": $button-only-icon-padding-small
|
|
264
254
|
),
|
|
265
255
|
"medium": (
|
|
266
|
-
"
|
|
267
|
-
"padding
|
|
256
|
+
"height": $button-height-medium,
|
|
257
|
+
"padding": $button-padding-medium,
|
|
268
258
|
"font-size": $button-font-size-medium,
|
|
269
|
-
"line-height": $button-line-height-medium,
|
|
270
259
|
"icon-font-size": $button-size-icon-medium,
|
|
271
260
|
"spacing": $button-spacing-medium,
|
|
272
261
|
"icon-padding": $button-only-icon-padding-medium
|
|
273
262
|
),
|
|
274
263
|
"large": (
|
|
275
|
-
"
|
|
276
|
-
"padding
|
|
264
|
+
"height": $button-height-large,
|
|
265
|
+
"padding": $button-padding-large,
|
|
277
266
|
"font-size": $button-font-size-large,
|
|
278
|
-
"line-height": $button-line-height-large,
|
|
279
267
|
"icon-font-size": $button-size-icon-large,
|
|
280
268
|
"spacing": $button-spacing-large,
|
|
281
269
|
"icon-padding": $button-only-icon-padding-large
|
|
@@ -455,14 +443,14 @@ $button-variants: (
|
|
|
455
443
|
@each $size,
|
|
456
444
|
$conf in $button-sizes {
|
|
457
445
|
@include when($size) {
|
|
458
|
-
|
|
446
|
+
height: map.get($conf, "height");
|
|
447
|
+
padding: map.get($conf, "padding");
|
|
459
448
|
font-size: map.get($conf, "font-size");
|
|
460
|
-
line-height: map.get($conf, "
|
|
449
|
+
line-height: map.get($conf, "height");
|
|
461
450
|
font-weight: normal;
|
|
462
451
|
|
|
463
452
|
:deep(.wd-button__icon) {
|
|
464
453
|
font-size: map.get($conf, "icon-font-size");
|
|
465
|
-
line-height: 1;
|
|
466
454
|
|
|
467
455
|
+ .wd-button__text {
|
|
468
456
|
margin-left: map.get($conf, "spacing");
|
|
@@ -470,6 +458,7 @@ $button-variants: (
|
|
|
470
458
|
}
|
|
471
459
|
|
|
472
460
|
@include when(icon) {
|
|
461
|
+
min-width: map.get($conf, "height");
|
|
473
462
|
padding: map.get($conf, "icon-padding");
|
|
474
463
|
}
|
|
475
464
|
}
|
|
@@ -527,6 +527,10 @@ export type buttonThemeVars = {
|
|
|
527
527
|
buttonFontSizeMedium?: string // medium 尺寸文字字号
|
|
528
528
|
buttonFontSizeMini?: string // mini 尺寸文字字号
|
|
529
529
|
buttonFontSizeSmall?: string // small 尺寸文字字号
|
|
530
|
+
buttonHeightLarge?: string // large 尺寸高度
|
|
531
|
+
buttonHeightMedium?: string // medium 尺寸高度
|
|
532
|
+
buttonHeightMini?: string // mini 尺寸高度
|
|
533
|
+
buttonHeightSmall?: string // small 尺寸高度
|
|
530
534
|
buttonInfoBg?: string // 信息类型背景色
|
|
531
535
|
buttonInfoBgActive?: string // 信息类型背景激活色
|
|
532
536
|
buttonInfoColor?: string // 信息类型文本色
|
|
@@ -537,14 +541,6 @@ export type buttonThemeVars = {
|
|
|
537
541
|
buttonInfoPlainBorderActive?: string // 信息类型 plain 边框激活色
|
|
538
542
|
buttonInfoSoftBg?: string // 信息类型 soft 背景色
|
|
539
543
|
buttonInfoSoftBgActive?: string // 信息类型 soft 背景激活色
|
|
540
|
-
buttonLeftRightPaddingLarge?: string // large 尺寸左右内边距
|
|
541
|
-
buttonLeftRightPaddingMedium?: string // medium 尺寸左右内边距
|
|
542
|
-
buttonLeftRightPaddingMini?: string // mini 尺寸左右内边距
|
|
543
|
-
buttonLeftRightPaddingSmall?: string // small 尺寸左右内边距
|
|
544
|
-
buttonLineHeightLarge?: string // large 尺寸文字行高
|
|
545
|
-
buttonLineHeightMedium?: string // medium 尺寸文字行高
|
|
546
|
-
buttonLineHeightMini?: string // mini 尺寸文字行高
|
|
547
|
-
buttonLineHeightSmall?: string // small 尺寸文字行高
|
|
548
544
|
buttonLoadingSize?: string // 加载图标尺寸
|
|
549
545
|
buttonLoadingSpacing?: string // 加载图标与文字间距
|
|
550
546
|
buttonMainColor?: string // 实心按钮默认文本色
|
|
@@ -552,6 +548,10 @@ export type buttonThemeVars = {
|
|
|
552
548
|
buttonOnlyIconPaddingMedium?: string // medium 尺寸仅图标按钮内边距
|
|
553
549
|
buttonOnlyIconPaddingMini?: string // mini 尺寸仅图标按钮内边距
|
|
554
550
|
buttonOnlyIconPaddingSmall?: string // small 尺寸仅图标按钮内边距
|
|
551
|
+
buttonPaddingLarge?: string // large 尺寸内边距
|
|
552
|
+
buttonPaddingMedium?: string // medium 尺寸内边距
|
|
553
|
+
buttonPaddingMini?: string // mini 尺寸内边距
|
|
554
|
+
buttonPaddingSmall?: string // small 尺寸内边距
|
|
555
555
|
buttonPrimaryBg?: string // 主类型背景色
|
|
556
556
|
buttonPrimaryBgActive?: string // 主类型背景激活色
|
|
557
557
|
buttonPrimaryColor?: string // 主类型文本色
|
|
@@ -583,10 +583,6 @@ export type buttonThemeVars = {
|
|
|
583
583
|
buttonSuccessPlainBorderActive?: string // 成功类型 plain 边框激活色
|
|
584
584
|
buttonSuccessSoftBg?: string // 成功类型 soft 背景色
|
|
585
585
|
buttonSuccessSoftBgActive?: string // 成功类型 soft 背景激活色
|
|
586
|
-
buttonUpDownPaddingLarge?: string // large 尺寸上下内边距
|
|
587
|
-
buttonUpDownPaddingMedium?: string // medium 尺寸上下内边距
|
|
588
|
-
buttonUpDownPaddingMini?: string // mini 尺寸上下内边距
|
|
589
|
-
buttonUpDownPaddingSmall?: string // small 尺寸上下内边距
|
|
590
586
|
buttonWarningBg?: string // 警告类型背景色
|
|
591
587
|
buttonWarningBgActive?: string // 警告类型背景激活色
|
|
592
588
|
buttonWarningColor?: string // 警告类型文本色
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"wot-ui","name":"@wot-ui/ui","displayName":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库","version":"2.0.
|
|
1
|
+
{"id":"wot-ui","name":"@wot-ui/ui","displayName":"wot-ui 一个轻量、美观、AI友好的 uni-app 组件库","version":"2.0.2","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"}}
|