Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/mobile-vue/disabled #311

Merged
merged 14 commits into from
Jun 27, 2024
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on v
allow-half | Boolean | false | \- | N
color | String / Array | '#ED7B2F' | `0.30.0`。Typescript:`string \| Array<string>` | N
count | Number | 5 | \- | N
disabled | Boolean | - | \- | N
disabled | Boolean | undefined | \- | N
gap | Number | 8 | \- | N
icon | String / Array | - | `0.30.0`。Typescript:`string \| string[]` | N
icon-prefix | String | undefined | \- | N
Expand Down
2 changes: 1 addition & 1 deletion packages/products/tdesign-miniprogram/src/rate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场
allow-half | Boolean | false | 是否允许半选 | N
color | String / Array | '#ED7B2F' | `0.30.0`。评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']。TS 类型:`string \| Array<string>` | N
count | Number | 5 | 评分的数量 | N
disabled | Boolean | - | 是否禁用评分 | N
disabled | Boolean | undefined | 是否禁用评分 | N
gap | Number | 8 | 评分图标的间距 | N
icon | String / Array | - | `0.30.0`。自定义评分图标,[选中图标,未选中图标]。TS 类型:`string \| string[]` | N
icon-prefix | String | undefined | 定义图标前缀 | N
Expand Down
23 changes: 19 additions & 4 deletions packages/products/tdesign-miniprogram/src/rate/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,34 @@ const props: TdRateProps = {
},
/** 是否禁用评分 */
disabled: {
type: Boolean,
type: null,
value: undefined,
},
/** 评分图标的间距 */
gap: {
type: Number,
value: 4,
value: 8,
},
/** 自定义评分图标,[选中图标,未选中图标] */
icon: {
type: null,
},
/** 定义图标前缀 */
iconPrefix: {
type: String,
value: undefined,
},
/** 选择评分弹框的位置 */
placement: {
type: String,
value: 'top',
},
/** 是否显示对应的辅助文字 */
showText: {
type: Boolean,
value: false,
},
/** 评分图标的大小,示例:`20px` */
/** 评分图标的大小 */
size: {
type: String,
value: '24px',
Expand All @@ -60,7 +75,7 @@ const props: TdRateProps = {
type: Number,
value: 0,
},
/** 形状类型,有描边类型和填充类型两种 */
/** 已废弃。形状类型,有描边类型和填充类型两种 */
variant: {
type: String,
value: 'outline',
Expand Down
29 changes: 21 additions & 8 deletions packages/products/tdesign-miniprogram/src/rate/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { TNode } from '../common/common';

export interface TdRateProps {
/**
* 是否允许半选
Expand Down Expand Up @@ -40,18 +38,33 @@ export interface TdRateProps {
};
/**
* 评分图标的间距
* @default 4
* @default 8
*/
gap?: {
type: NumberConstructor;
value?: number;
};
/**
* 自定义评分图标,插槽参数:{ type: 'grey' | 'highlight' | 'half' },分别表示 灰色图标、高亮图标 和 半分图标
* 自定义评分图标,[选中图标,未选中图标]
*/
icon?: {
type: undefined;
value?: TNode<{ type: 'grey' | 'highlight' | 'half' }>;
type: null;
value?: string | string[];
};
/**
* 定义图标前缀
*/
iconPrefix?: {
type: StringConstructor;
value?: string;
};
/**
* 选择评分弹框的位置
* @default top
*/
placement?: {
type: StringConstructor;
value?: 'top' | 'bottom';
};
/**
* 是否显示对应的辅助文字
Expand All @@ -62,7 +75,7 @@ export interface TdRateProps {
value?: boolean;
};
/**
* 评分图标的大小,示例:`20px`
* 评分图标的大小
* @default 24px
*/
size?: {
Expand Down Expand Up @@ -102,7 +115,7 @@ export interface TdRateProps {
value?: number;
};
/**
* 形状类型,有描边类型和填充类型两种
* 已废弃。形状类型,有描边类型和填充类型两种
* @default outline
*/
variant?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name | type | default | description | required
style | Object | - | CSS(Cascading Style Sheets) | N
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
colors | Array | [] | `deprecated`。Typescript:`Array<string>` | N
disabled | Boolean | false | \- | N
disabled | Boolean | undefined | \- | N
disabled-color | Array | [] | `deprecated`。Typescript:`Array<string>` | N
label | String / Boolean | false | Typescript:`string \| boolean` | N
marks | Object / Array | {} | Typescript:`Record<number, string> \| Array<number>` | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
colors | Array | [] | 已废弃。颜色,[已选择, 未选择]。TS 类型:`Array<string>` | N
disabled | Boolean | false | 是否禁用组件 | N
disabled | Boolean | undefined | 是否禁用组件 | N
disabled-color | Array | [] | 已废弃。禁用状态滑动条的颜色,[已选, 未选]。TS 类型:`Array<string>` | N
label | String / Boolean | false | 滑块当前值文本。<br />值为 true 显示默认文案;值为 false 不显示滑块当前值文本;<br />值为 `${value}%` 则表示组件会根据占位符渲染文案;<br />值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值。TS 类型:`string \| boolean` | N
marks | Object / Array | {} | 刻度标记,示例:`[0, 10, 40, 200]` 或者 `{ 5: '5¥', 10: '10%' }`。TS 类型:`Record<number, string> \| Array<number>` | N
Expand Down
24 changes: 12 additions & 12 deletions packages/products/tdesign-miniprogram/src/slider/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,10 @@

import { TdSliderProps } from './type';
const props: TdSliderProps = {
/** 颜色,[已选择, 未选择] */
colors: {
type: Array,
value: ['#0052D9', 'rgba(220, 220, 220, 1)'],
},
/** 是否禁用组件 */
disabled: {
type: Boolean,
value: false,
},
/** 禁用状态滑动条的颜色,[已选, 未选] */
disabledColor: {
type: Array,
value: ['#bbd3fb', '#dcdcdc'],
type: null,
value: undefined,
},
/** 组件类名,分别用于设置 组件外层元素、滑道底部、滑道激活态、滑道禁用态、游标 等元素类名 */
externalClasses: {
Expand Down Expand Up @@ -65,6 +55,11 @@ const props: TdSliderProps = {
type: String,
value: '',
},
/** 滑块风格 */
theme: {
type: String,
value: 'default',
},
/** 滑块值 */
value: {
type: null,
Expand All @@ -75,6 +70,11 @@ const props: TdSliderProps = {
type: null,
value: 0,
},
/** 是否是垂直的滑块(渲染垂直滑块时,默认高度为400rpx,可通过修改`--td-slider-bar-height`来自定义高度) */
vertical: {
type: Boolean,
value: false,
},
};

export default props;
37 changes: 17 additions & 20 deletions packages/products/tdesign-miniprogram/src/slider/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,14 @@
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { TNode } from '../common/common';

export interface TdSliderProps {
/**
* 颜色,[已选择, 未选择]
* @default ['#0052D9', 'rgba(220, 220, 220, 1)']
*/
colors?: {
type: ArrayConstructor;
value?: Array<string>;
};
/**
* 是否禁用组件
* @default false
*/
disabled?: {
type: BooleanConstructor;
value?: boolean;
};
/**
* 禁用状态滑动条的颜色,[已选, 未选]
* @default ['#bbd3fb', '#dcdcdc']
*/
disabledColor?: {
type: ArrayConstructor;
value?: Array<string>;
};
/**
* 组件类名,分别用于设置 组件外层元素、滑道底部、滑道激活态、滑道禁用态、游标 等元素类名
*/
Expand All @@ -44,7 +25,7 @@ export interface TdSliderProps {
*/
label?: {
type: null;
value?: string | boolean | TNode<{ value: SliderValue; position?: 'start' | 'end' }>;
value?: string | boolean;
};
/**
* 刻度标记,示例:`[0, 10, 40, 200]` 或者 `{ 5: '5¥', 10: '10%' }`
Expand Down Expand Up @@ -102,6 +83,14 @@ export interface TdSliderProps {
type: StringConstructor;
value?: string;
};
/**
* 滑块风格
* @default default
*/
theme?: {
type: StringConstructor;
value?: 'default' | 'capsule';
};
/**
* 滑块值
* @default 0
Expand All @@ -118,6 +107,14 @@ export interface TdSliderProps {
type: null;
value?: SliderValue;
};
/**
* 是否是垂直的滑块(渲染垂直滑块时,默认高度为400rpx,可通过修改`--td-slider-bar-height`来自定义高度)
* @default false
*/
vertical?: {
type: BooleanConstructor;
value?: boolean;
};
}

export type SliderValue = number | Array<number>;
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name | type | default | description | required
style | Object | - | CSS(Cascading Style Sheets) | N
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
disable-input | Boolean | false | \- | N
disabled | Boolean | false | \- | N
disabled | Boolean | undefined | \- | N
input-width | Number | - | \- | N
max | Number | 100 | \- | N
min | Number | 0 | \- | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
disable-input | Boolean | false | 禁用输入框 | N
disabled | Boolean | false | 禁用全部操作 | N
disabled | Boolean | undefined | 禁用全部操作 | N
input-width | Number | - | 输入框宽度,默认单位 `px` | N
max | Number | 100 | 最大值 | N
min | Number | 0 | 最小值 | N
Expand Down
11 changes: 8 additions & 3 deletions packages/products/tdesign-miniprogram/src/stepper/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ const props: TdStepperProps = {
},
/** 禁用全部操作 */
disabled: {
type: Boolean,
value: false,
type: null,
value: undefined,
},
/** 组件类名,分别用于表示组件外层元素、输入框、右侧递增号、左侧递减号等元素类名 */
externalClasses: {
type: Array,
},
/** 输入框宽度 */
/** 输入框宽度,默认单位 `px` */
inputWidth: {
type: Number,
},
Expand All @@ -34,6 +34,11 @@ const props: TdStepperProps = {
type: Number,
value: 0,
},
/** 组件尺寸 */
size: {
type: String,
value: 'medium',
},
/** 步长 */
step: {
type: Number,
Expand Down
15 changes: 12 additions & 3 deletions packages/products/tdesign-miniprogram/src/stepper/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */

import { SizeEnum } from '../common/common';

export interface TdStepperProps {
/**
* 禁用输入框
Expand All @@ -15,7 +17,6 @@ export interface TdStepperProps {
};
/**
* 禁用全部操作
* @default false
*/
disabled?: {
type: BooleanConstructor;
Expand All @@ -29,7 +30,7 @@ export interface TdStepperProps {
value?: ['t-class', 't-class-input', 't-class-add', 't-class-minus'];
};
/**
* 输入框宽度
* 输入框宽度,默认单位 `px`
*/
inputWidth?: {
type: NumberConstructor;
Expand All @@ -51,6 +52,14 @@ export interface TdStepperProps {
type: NumberConstructor;
value?: number;
};
/**
* 组件尺寸
* @default medium
*/
size?: {
type: StringConstructor;
value?: SizeEnum;
};
/**
* 步长
* @default 1
Expand All @@ -73,7 +82,7 @@ export interface TdStepperProps {
*/
theme?: {
type: StringConstructor;
value?: 'normal' | 'grey';
value?: 'normal' | 'filled' | 'outline';
};
/**
* 值
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name | type | default | description | required
-- | -- | -- | -- | --
block | Boolean | false | make button to be a block-level element | N
content | String / Slot / Function | - | button's children elements。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
disabled | Boolean | false | disable the button, make it can not be clicked | N
disabled | Boolean | undefined | disable the button, make it can not be clicked | N
ghost | Boolean | false | make background-color to be transparent | N
icon | Slot / Function | - | use it to set left icon in button。Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
loading | Boolean | false | set button to be loading state | N
Expand All @@ -18,7 +18,7 @@ size | String | medium | a button has four size。options: extra-small/small/med
suffix | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
theme | String | default | button theme。options: default/primary/danger/light | N
type | String | button | type of button element in html。options: submit/reset/button | N
variant | String | base | button variant。options: base/outline/text | N
variant | String | base | button variant。options: base/outline/dashed/text | N
onClick | Function | | Typescript:`(e: MouseEvent) => void`<br/>trigger on click | N

### Button Events
Expand Down
Loading
Loading