@tdesign/uniapp 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +31 -1
- package/dist/button/button.vue +1 -1
- package/dist/checkbox/README.en-US.md +6 -6
- package/dist/checkbox/README.md +5 -5
- package/dist/checkbox/type.ts +3 -1
- package/dist/checkbox-group/type.ts +2 -0
- package/dist/common/style/theme/index.css +52 -56
- package/dist/dialog/dialog.vue +5 -4
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ toc: false
|
|
|
5
5
|
docClass: timeline
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## 🌈 0.7.3 `2026-03-04`
|
|
9
|
+
|
|
10
|
+
### 🐞 Bug Fixes
|
|
11
|
+
|
|
12
|
+
- `Button`: 去除多余动画效果 @novlan1 ([#4305](https://github.com/Tencent/tdesign-miniprogram/pull/4305))
|
|
13
|
+
- `Dialog`: 修复确认/取消按钮不显示问题 @novlan1 ([#4305](https://github.com/Tencent/tdesign-miniprogram/pull/4305))
|
|
14
|
+
- `Theme`: 修复 `index.css` 尺寸值错误的问题 @liweijie0812 ([#4290](https://github.com/Tencent/tdesign-miniprogram/pull/4290))
|
|
15
|
+
|
|
8
16
|
## 🌈 0.7.2 `2026-02-26`
|
|
9
17
|
|
|
10
18
|
### 🚀 Features
|
package/README.md
CHANGED
|
@@ -54,13 +54,21 @@ npm i @tdesign/uniapp
|
|
|
54
54
|
1. 在 `main.ts` 中引入样式文件
|
|
55
55
|
|
|
56
56
|
```js
|
|
57
|
+
// CLI 模式
|
|
57
58
|
import '@tdesign/uniapp/common/style/theme/index.css';
|
|
59
|
+
|
|
60
|
+
// HBuilderX 模式
|
|
61
|
+
// import './uni_modules/tdesign-uniapp/components/common/style/theme/index.css';
|
|
58
62
|
```
|
|
59
63
|
|
|
60
64
|
也可以引入 `rpx` 单位的 `less` 文件,该文件与 `tdesign-miniprogram` 完全一致。
|
|
61
65
|
|
|
62
66
|
```js
|
|
67
|
+
// CLI 模式
|
|
63
68
|
import '@tdesign/uniapp/common/style/theme/index.less';
|
|
69
|
+
|
|
70
|
+
// HBuilderX 模式
|
|
71
|
+
// import './uni_modules/tdesign-uniapp/components/common/style/theme/index.less';
|
|
64
72
|
```
|
|
65
73
|
|
|
66
74
|
2. 在文件中使用
|
|
@@ -113,7 +121,17 @@ import TLoading from '@tdesign/uniapp/loading/loading.vue';
|
|
|
113
121
|
|
|
114
122
|
安装注册 TDesign 之后,在开发项目时,可以配合插件在VSCode等主流编辑器中达到提示组件名及API的效果。
|
|
115
123
|
|
|
116
|
-
推荐安装
|
|
124
|
+
推荐安装 [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) 插件,并在项目的 `tsconfig.json` 的 `compilerOptions.types` 属性中增加 `@tdesign/uniapp/global`,即可实现提示效果。
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"compilerOptions": {
|
|
129
|
+
"types": [
|
|
130
|
+
"@tdesign/uniapp/global",
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
```
|
|
117
135
|
|
|
118
136
|
## 平台兼容性
|
|
119
137
|
|
|
@@ -133,6 +151,18 @@ import TLoading from '@tdesign/uniapp/loading/loading.vue';
|
|
|
133
151
|
|
|
134
152
|
详情参见[移动端组件库浏览器兼容性说明](https://github.com/Tencent/tdesign/wiki/Browser-Compatibility)
|
|
135
153
|
|
|
154
|
+
## 模板项目
|
|
155
|
+
|
|
156
|
+
我们提供了多种开箱即用的模板项目,帮助你快速开始开发。
|
|
157
|
+
|
|
158
|
+
| 模板 | 描述 | 预览 |
|
|
159
|
+
| --- | --- | --- |
|
|
160
|
+
| [TDesign UniApp Starter](https://github.com/TDesignOteam/tdesign-uniapp-starter/) | Vue3 + CLI 模式模板 - 通用类 | <img src="https://cdn.uwayfly.com/tdesign-uniapp/image/tdesign-uniapp-starter-h5.png" height="100" /> |
|
|
161
|
+
| [TDesign UniApp Starter Apply](https://github.com/TDesignOteam/tdesign-uniapp-starter-apply/) | Vue3 + CLI 模式模板 - 活动报名 | <img src="https://cdn.uwayfly.com/tdesign-uniapp/image/tdesign-uniapp-starter-apply-h5.png" height="100" /> |
|
|
162
|
+
| [TDesign UniApp Starter Vue3 HX](https://github.com/TDesignOteam/tdesign-uniapp-starter-vue3-hx/) | Vue3 + HBuilderX 模式模板 | <img src="https://cdn.uwayfly.com/tdesign-uniapp/image/tdesign-uniapp-starter-vue3-hx-h5.png" height="100" /> |
|
|
163
|
+
| [TDesign UniApp Starter Vue2 CLI](https://github.com/TDesignOteam/tdesign-uniapp-starter-vue2-cli/) | Vue2 + CLI 模式模板 | <img src="https://cdn.uwayfly.com/tdesign-uniapp/image/tdesign-uniapp-starter-vue2-cli-h5.png" height="100" /> |
|
|
164
|
+
| [TDesign UniApp Starter Vue2 HX](https://github.com/TDesignOteam/tdesign-uniapp-starter-vue2-hx/) | Vue2 + HBuilderX 模式模板 |<img src="https://cdn.uwayfly.com/tdesign-uniapp/image/tdesign-uniapp-starter-vue2-hx-h5.png" height="100" /> |
|
|
165
|
+
|
|
136
166
|
## 反馈
|
|
137
167
|
|
|
138
168
|
有任何问题,建议通过 [Github issues](https://github.com/Tencent/tdesign-miniprogram/issues) 反馈或扫码加入用户微信群。
|
package/dist/button/button.vue
CHANGED
|
@@ -15,7 +15,7 @@ default-checked | Boolean | - | uncontrolled property | N
|
|
|
15
15
|
content | String | - | \- | N
|
|
16
16
|
content-disabled | Boolean | - | \- | N
|
|
17
17
|
disabled | Boolean | undefined | \- | N
|
|
18
|
-
icon | String / Array | 'circle' | Typescript
|
|
18
|
+
icon | String / Array | 'circle' | Typescript: `CheckboxIconType` `type CheckboxIconType = 'circle' \| 'line' \| 'rectangle' \| string[];`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox/type.ts) | N
|
|
19
19
|
indeterminate | Boolean | false | \- | N
|
|
20
20
|
label | String | - | \- | N
|
|
21
21
|
max-content-row | Number | 5 | \- | N
|
|
@@ -24,7 +24,7 @@ name | String | - | \- | N
|
|
|
24
24
|
placement | String | left | options: left/right | N
|
|
25
25
|
readonly | Boolean | undefined | \- | N
|
|
26
26
|
relation-key | String | - | \- | N
|
|
27
|
-
value | String / Number / Boolean | - | value of checkbox。Typescript
|
|
27
|
+
value | String / Number / Boolean | - | value of checkbox。Typescript: `string \| number \| boolean` | N
|
|
28
28
|
|
|
29
29
|
### Checkbox Events
|
|
30
30
|
|
|
@@ -58,14 +58,14 @@ name | type | default | description | required
|
|
|
58
58
|
custom-style | Object | - | CSS(Cascading Style Sheets) | N
|
|
59
59
|
borderless | Boolean | false | \- | N
|
|
60
60
|
disabled | Boolean | undefined | \- | N
|
|
61
|
-
keys | Object | - | Typescript
|
|
61
|
+
keys | Object | - | Typescript: `KeysType`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/common/common.ts) | N
|
|
62
62
|
max | Number | undefined | \- | N
|
|
63
63
|
name | String | - | \- | N
|
|
64
|
-
options | Array | [] | Typescript
|
|
64
|
+
options | Array | [] | Typescript: `Array<CheckboxOption>` `type CheckboxOption = string \| number \| CheckboxOptionObj` `interface CheckboxOptionObj { label?: string; value?: string \| number; disabled?: boolean;icon?:CheckboxIconType; checkAll?: true }`,[Checkbox API Documents](./checkbox?tab=api)。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
|
|
65
65
|
readonly | Boolean | undefined | \- | N
|
|
66
66
|
relation-key | String | - | \- | N
|
|
67
|
-
value | Array | - | `v-model:value` is supported。Typescript
|
|
68
|
-
default-value | Array | - | uncontrolled property。Typescript
|
|
67
|
+
value | Array | - | `v-model:value` is supported。Typescript: `T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
|
|
68
|
+
default-value | Array | - | uncontrolled property。Typescript: `T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[see more ts definition](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
|
|
69
69
|
|
|
70
70
|
### CheckboxGroup Events
|
|
71
71
|
|
package/dist/checkbox/README.md
CHANGED
|
@@ -70,7 +70,7 @@ default-checked | Boolean | - | 是否选中。非受控属性 | N
|
|
|
70
70
|
content | String | - | 多选框内容 | N
|
|
71
71
|
content-disabled | Boolean | - | 是否禁用组件内容(content)触发选中 | N
|
|
72
72
|
disabled | Boolean | undefined | 是否禁用组件。如果父组件存在 CheckboxGroup,默认值由 CheckboxGroup.disabled 控制。优先级:Checkbox.disabled > CheckboxGroup.disabled > Form.disabled | N
|
|
73
|
-
icon | String / Array | 'circle' | 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标,半选中态图标]`。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标。TS 类型:`'circle' \| 'line' \| 'rectangle' \| string[]
|
|
73
|
+
icon | String / Array | 'circle' | 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标,半选中态图标]`。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标。TS 类型:`CheckboxIconType` `type CheckboxIconType = 'circle' \| 'line' \| 'rectangle' \| string[];`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox/type.ts) | N
|
|
74
74
|
indeterminate | Boolean | false | 是否为半选 | N
|
|
75
75
|
label | String | - | 主文案 | N
|
|
76
76
|
max-content-row | Number | 5 | 内容最大行数限制 | N
|
|
@@ -113,14 +113,14 @@ t-class-label | 标签样式类
|
|
|
113
113
|
custom-style | Object | - | 自定义样式 | N
|
|
114
114
|
borderless | Boolean | false | 是否开启无边框模式。优先级低于 Checkbox.borderless | N
|
|
115
115
|
disabled | Boolean | undefined | 是否禁用组件。优先级:Form.disabled < CheckboxGroup.disabled < Checkbox.disabled | N
|
|
116
|
-
keys | Object | - | 用来定义 value / label / disabled 在 `options` 中对应的字段别名。TS 类型:`KeysType`。[通用类型定义](https://github.com/
|
|
116
|
+
keys | Object | - | 用来定义 value / label / disabled 在 `options` 中对应的字段别名。TS 类型:`KeysType`。[通用类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/common/common.ts) | N
|
|
117
117
|
max | Number | undefined | 支持最多选中的数量 | N
|
|
118
118
|
name | String | - | 统一设置内部复选框 HTML 属性 | N
|
|
119
|
-
options | Array | [] | 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」。TS 类型:`Array<CheckboxOption>` `type CheckboxOption = string \| number \| CheckboxOptionObj` `interface CheckboxOptionObj { label?: string; value?: string \| number; disabled?: boolean; checkAll?: true }
|
|
119
|
+
options | Array | [] | 以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」。TS 类型:`Array<CheckboxOption>` `type CheckboxOption = string \| number \| CheckboxOptionObj` `interface CheckboxOptionObj { label?: string; value?: string \| number; disabled?: boolean;icon?:CheckboxIconType; checkAll?: true }`,[Checkbox API Documents](./checkbox?tab=api)。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
|
|
120
120
|
readonly | Boolean | undefined | 只读状态 | N
|
|
121
121
|
relation-key | String | - | -1 时代表独立,不再寻找 parent,用于头条小程序 | N
|
|
122
|
-
value | Array | - | 选中值。支持语法糖 `v-model:value`。TS 类型:`T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[详细类型定义](https://github.com/
|
|
123
|
-
default-value | Array | - | 选中值。非受控属性。TS 类型:`T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[详细类型定义](https://github.com/
|
|
122
|
+
value | Array | - | 选中值。支持语法糖 `v-model:value`。TS 类型:`T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
|
|
123
|
+
default-value | Array | - | 选中值。非受控属性。TS 类型:`T` `type CheckboxGroupValue = Array<string \| number \| boolean>`。[详细类型定义](https://github.com/tencent/tdesign-miniprogram/blob/develop/packages/uniapp-components/checkbox-group/type.ts) | N
|
|
124
124
|
|
|
125
125
|
### CheckboxGroup Events
|
|
126
126
|
|
package/dist/checkbox/type.ts
CHANGED
|
@@ -43,7 +43,7 @@ export interface TdCheckboxProps {
|
|
|
43
43
|
* 自定义选中图标和非选中图标。使用 Array 时表示:`[选中态图标,非选中态图标,半选中态图标]`。使用 String 时,值为 circle 表示填充圆形图标、值为 line 表示描边型图标、值为 rectangle 表示填充矩形图标
|
|
44
44
|
* @default 'circle'
|
|
45
45
|
*/
|
|
46
|
-
icon?:
|
|
46
|
+
icon?: CheckboxIconType;
|
|
47
47
|
/**
|
|
48
48
|
* 是否为半选
|
|
49
49
|
* @default false
|
|
@@ -94,3 +94,5 @@ export interface TdCheckboxProps {
|
|
|
94
94
|
context: { value: boolean | number | string; label: boolean | number | string };
|
|
95
95
|
}) => void;
|
|
96
96
|
}
|
|
97
|
+
|
|
98
|
+
export type CheckboxIconType = 'circle' | 'line' | 'rectangle' | string[];
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
|
|
5
5
|
* */
|
|
6
6
|
|
|
7
|
+
import type { CheckboxIconType } from '../checkbox/type';
|
|
7
8
|
import type { KeysType } from '../common/common';
|
|
8
9
|
|
|
9
10
|
export interface TdCheckboxGroupProps<T = CheckboxGroupValue> {
|
|
@@ -66,6 +67,7 @@ export interface CheckboxOptionObj {
|
|
|
66
67
|
label?: string;
|
|
67
68
|
value?: string | number;
|
|
68
69
|
disabled?: boolean;
|
|
70
|
+
icon?: CheckboxIconType;
|
|
69
71
|
checkAll?: true;
|
|
70
72
|
}
|
|
71
73
|
|
|
@@ -144,9 +144,10 @@
|
|
|
144
144
|
--td-component-border: var(--td-gray-color-4);
|
|
145
145
|
|
|
146
146
|
--td-shadow-1: 0 1px 10px rgba(0, 0, 0, 5%), 0 4px 5px rgba(0, 0, 0, 8%), 0 2px 4px -1px rgba(0, 0, 0, 12%);
|
|
147
|
-
--td-shadow-2:
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
--td-shadow-2:
|
|
148
|
+
0 3px 14px 2px rgba(0, 0, 0, 5%), 0 8px 10px 1px rgba(0, 0, 0, 6%), 0 5px 5px -3px rgba(0, 0, 0, 10%);
|
|
149
|
+
--td-shadow-3:
|
|
150
|
+
0 6px 30px 5px rgba(0, 0, 0, 5%), 0 16px 24px 2px rgba(0, 0, 0, 4%), 0 8px 10px -5px rgba(0, 0, 0, 8%);
|
|
150
151
|
--td-shadow-4: 0 2px 8px 0 rgba(0, 0, 0, 0.06);
|
|
151
152
|
|
|
152
153
|
--td-shadow-inset-top: inset 0 0.5px 0 #dcdcdc;
|
|
@@ -162,7 +163,6 @@
|
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
|
|
165
|
-
|
|
166
166
|
/* ./raw/_dark.less */
|
|
167
167
|
@media (prefers-color-scheme: dark) {
|
|
168
168
|
/* #ifdef H5 */
|
|
@@ -324,7 +324,6 @@
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
|
|
328
327
|
/* ./raw/_radius.less */
|
|
329
328
|
page,
|
|
330
329
|
.page {
|
|
@@ -336,54 +335,53 @@ page,
|
|
|
336
335
|
--td-radius-circle: 50%;
|
|
337
336
|
}
|
|
338
337
|
|
|
339
|
-
|
|
340
338
|
/* ./raw/_font.less */
|
|
341
339
|
page,
|
|
342
340
|
.page {
|
|
343
341
|
--td-font-family: PingFang SC, Microsoft YaHei, Arial Regular;
|
|
344
342
|
--td-font-family-medium: PingFang SC, Microsoft YaHei, Arial Medium;
|
|
345
343
|
|
|
346
|
-
--td-font-size-link-small:
|
|
347
|
-
--td-font-size-link-medium:
|
|
348
|
-
--td-font-size-link-large:
|
|
349
|
-
--td-font-size-mark-extraSmall:
|
|
350
|
-
--td-font-size-mark-small:
|
|
351
|
-
--td-font-size-mark-medium:
|
|
352
|
-
--td-font-size-mark-large:
|
|
353
|
-
--td-font-size-body-extraSmall:
|
|
354
|
-
--td-font-size-body-small:
|
|
355
|
-
--td-font-size-body-medium:
|
|
356
|
-
--td-font-size-body-large:
|
|
357
|
-
--td-font-size-title-small:
|
|
358
|
-
--td-font-size-title-medium:
|
|
359
|
-
--td-font-size-title-large:
|
|
360
|
-
--td-font-size-title-extraLarge:
|
|
361
|
-
--td-font-size-headline-small:
|
|
362
|
-
--td-font-size-headline-medium:
|
|
363
|
-
--td-font-size-headline-large:
|
|
364
|
-
--td-font-size-display-medium:
|
|
365
|
-
--td-font-size-display-large:
|
|
366
|
-
|
|
367
|
-
--td-line-height-link-small:
|
|
368
|
-
--td-line-height-link-medium:
|
|
369
|
-
--td-line-height-link-large:
|
|
370
|
-
--td-line-height-mark-extraSmall:
|
|
371
|
-
--td-line-height-mark-small:
|
|
372
|
-
--td-line-height-mark-medium:
|
|
373
|
-
--td-line-height-mark-large:
|
|
374
|
-
--td-line-height-body-extraSmall:
|
|
375
|
-
--td-line-height-body-small:
|
|
376
|
-
--td-line-height-body-medium:
|
|
377
|
-
--td-line-height-body-large:
|
|
378
|
-
--td-line-height-title-small:
|
|
379
|
-
--td-line-height-title-medium:
|
|
380
|
-
--td-line-height-title-large:
|
|
381
|
-
--td-line-height-title-extraLarge:
|
|
382
|
-
--td-line-height-headline-small:
|
|
383
|
-
--td-line-height-headline-medium:
|
|
384
|
-
--td-line-height-headline-large:
|
|
385
|
-
--td-line-height-display-medium:
|
|
386
|
-
--td-line-height-display-large:
|
|
344
|
+
--td-font-size-link-small: 12px;
|
|
345
|
+
--td-font-size-link-medium: 14px;
|
|
346
|
+
--td-font-size-link-large: 16px;
|
|
347
|
+
--td-font-size-mark-extraSmall: 10px;
|
|
348
|
+
--td-font-size-mark-small: 12px;
|
|
349
|
+
--td-font-size-mark-medium: 14px;
|
|
350
|
+
--td-font-size-mark-large: 16px;
|
|
351
|
+
--td-font-size-body-extraSmall: 10px;
|
|
352
|
+
--td-font-size-body-small: 12px;
|
|
353
|
+
--td-font-size-body-medium: 14px;
|
|
354
|
+
--td-font-size-body-large: 16px;
|
|
355
|
+
--td-font-size-title-small: 14px;
|
|
356
|
+
--td-font-size-title-medium: 16px;
|
|
357
|
+
--td-font-size-title-large: 18px;
|
|
358
|
+
--td-font-size-title-extraLarge: 20px;
|
|
359
|
+
--td-font-size-headline-small: 24px;
|
|
360
|
+
--td-font-size-headline-medium: 28px;
|
|
361
|
+
--td-font-size-headline-large: 36px;
|
|
362
|
+
--td-font-size-display-medium: 48px;
|
|
363
|
+
--td-font-size-display-large: 64px;
|
|
364
|
+
|
|
365
|
+
--td-line-height-link-small: 20px;
|
|
366
|
+
--td-line-height-link-medium: 22px;
|
|
367
|
+
--td-line-height-link-large: 24px;
|
|
368
|
+
--td-line-height-mark-extraSmall: 16px;
|
|
369
|
+
--td-line-height-mark-small: 20px;
|
|
370
|
+
--td-line-height-mark-medium: 22px;
|
|
371
|
+
--td-line-height-mark-large: 24px;
|
|
372
|
+
--td-line-height-body-extraSmall: 16px;
|
|
373
|
+
--td-line-height-body-small: 20px;
|
|
374
|
+
--td-line-height-body-medium: 22px;
|
|
375
|
+
--td-line-height-body-large: 24px;
|
|
376
|
+
--td-line-height-title-small: 22px;
|
|
377
|
+
--td-line-height-title-medium: 24px;
|
|
378
|
+
--td-line-height-title-large: 26px;
|
|
379
|
+
--td-line-height-title-extraLarge: 28px;
|
|
380
|
+
--td-line-height-headline-small: 32px;
|
|
381
|
+
--td-line-height-headline-medium: 36px;
|
|
382
|
+
--td-line-height-headline-large: 44px;
|
|
383
|
+
--td-line-height-display-medium: 56px;
|
|
384
|
+
--td-line-height-display-large: 72px;
|
|
387
385
|
|
|
388
386
|
--td-font-link-small: var(--td-font-size-link-small) / var(--td-line-height-link-small) var(--td-font-family);
|
|
389
387
|
--td-font-link-medium: var(--td-font-size-link-medium) / var(--td-line-height-link-medium) var(--td-font-family);
|
|
@@ -425,20 +423,18 @@ page,
|
|
|
425
423
|
--td-font-size-xxl: var(--td-font-size-headline-large);
|
|
426
424
|
}
|
|
427
425
|
|
|
428
|
-
|
|
429
426
|
/* ./raw/_spacer.less */
|
|
430
427
|
page,
|
|
431
428
|
.page {
|
|
432
|
-
--td-spacer:
|
|
433
|
-
--td-spacer-1:
|
|
434
|
-
--td-spacer-2:
|
|
435
|
-
--td-spacer-3:
|
|
436
|
-
--td-spacer-4:
|
|
437
|
-
--td-spacer-5:
|
|
438
|
-
--td-spacer-6:
|
|
429
|
+
--td-spacer: 8px;
|
|
430
|
+
--td-spacer-1: 12px;
|
|
431
|
+
--td-spacer-2: 16px;
|
|
432
|
+
--td-spacer-3: 24px;
|
|
433
|
+
--td-spacer-4: 32px;
|
|
434
|
+
--td-spacer-5: 48px;
|
|
435
|
+
--td-spacer-6: 80px;
|
|
439
436
|
}
|
|
440
437
|
|
|
441
|
-
|
|
442
438
|
/* ./raw/_components.less */
|
|
443
439
|
@media (prefers-color-scheme: light) {
|
|
444
440
|
page,
|
package/dist/dialog/dialog.vue
CHANGED
|
@@ -222,7 +222,7 @@ import TButton from '../button/button';
|
|
|
222
222
|
import { uniComponent } from '../common/src/index';
|
|
223
223
|
import { prefix } from '../common/config';
|
|
224
224
|
import props from './props';
|
|
225
|
-
import { toCamel, coalesce } from '../common/utils';
|
|
225
|
+
import { toCamel, coalesce, toPascal } from '../common/utils';
|
|
226
226
|
import { isObject } from '../common/validator';
|
|
227
227
|
import useCustomNavbar from '../mixins/using-custom-navbar';
|
|
228
228
|
import tools from '../common/utils.wxs';
|
|
@@ -320,13 +320,14 @@ export default uniComponent({
|
|
|
320
320
|
if (key === 'cancel' && rect.buttonVariant === 'base') {
|
|
321
321
|
base.theme = 'light';
|
|
322
322
|
}
|
|
323
|
+
const parsedKey = `inner${toPascal(key)}`;
|
|
323
324
|
|
|
324
325
|
if (typeof btn === 'string') {
|
|
325
|
-
rect[
|
|
326
|
+
rect[`${parsedKey}`] = { ...base, content: btn };
|
|
326
327
|
} else if (btn && typeof btn === 'object') {
|
|
327
|
-
rect[
|
|
328
|
+
rect[`${parsedKey}`] = { ...base, ...btn };
|
|
328
329
|
} else {
|
|
329
|
-
rect[
|
|
330
|
+
rect[`${parsedKey}`] = null;
|
|
330
331
|
}
|
|
331
332
|
});
|
|
332
333
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tdesign/uniapp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"id": "tdesign-uniapp",
|
|
5
5
|
"title": "tdesign-uniapp",
|
|
6
6
|
"description": "TDesign Component for UniApp",
|
|
@@ -32,8 +32,10 @@
|
|
|
32
32
|
"registry": "https://registry.npmjs.org/"
|
|
33
33
|
},
|
|
34
34
|
"typings": "./dist/types/index.d.ts",
|
|
35
|
+
"types": "./dist/types/index.d.ts",
|
|
35
36
|
"exports": {
|
|
36
37
|
"./*": "./dist/*",
|
|
38
|
+
"./global": "./global.d.ts",
|
|
37
39
|
"./action-sheet/action-sheet.vue": {
|
|
38
40
|
"types": "./dist/types/action-sheet.d.ts",
|
|
39
41
|
"import": "./dist/action-sheet/action-sheet.vue",
|