Skip to content

Commit

Permalink
chore: release 1.9.4-naruto (#3180)
Browse files Browse the repository at this point in the history
* fix(upload): fix options method (#3155)

* chore: update common

* fix(upload): fix options method

* chore: update common

---------

Co-authored-by: Uyarn <uyarnchen@gmail.com>

* chore: fix docs (#3161)

* chore: fix docs

* chore: fix lint

* fix(color-picker): 修复切换预览颜色时,通道按钮位置不变的问题 (#3163)

* feat(input): add borderless mode (#3162)

* feat: add label prop API for date pickers and range input (#3169)

---------

Signed-off-by: Siubeng <fython@163.com>
Co-authored-by: Uyarn <uyarnchen@gmail.com>

* fix(range-input): 修复 prefix/suffix 内容未应用居中样式的问题 (#3175)

* fix(range-input): add missing classes to fix unexpected align of prefix/suffix in component

* test(range-input): update snapshots for range-input and related components

* fix(select): fix default value missing (#3177)

* fix(select): fix default value missing

* chore: update snapshot

* chore: update common to synchronize style and docs fix (#3178)

* chore: release 1.9.4-naruto

---------

Signed-off-by: Siubeng <fython@163.com>
Co-authored-by: Yunfei Shen <shenyf0608@163.com>
Co-authored-by: fennghuang <89014758+fennghuang@users.noreply.github.com>
Co-authored-by: Siubeng <fython@163.com>
  • Loading branch information
4 people committed May 16, 2024
1 parent 917dc5b commit e36d1b8
Show file tree
Hide file tree
Showing 38 changed files with 174 additions and 83 deletions.
6 changes: 3 additions & 3 deletions helper/attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@
},
"t-checkbox/click": {
"type": "event",
"description": "trigger on click\n\n点击时出发,一般用于外层阻止冒泡场景\n\n[docs](https://tdesign.tencent.com/vue/components/checkbox?tab=api#checkbox-events)"
"description": "trigger on click\n\n点击时触发,一般用于外层阻止冒泡场景\n\n[docs](https://tdesign.tencent.com/vue/components/checkbox?tab=api#checkbox-events)"
},
"t-checkbox-group/max": {
"type": "Number",
Expand Down Expand Up @@ -4572,11 +4572,11 @@
},
"t-radio/click": {
"type": "event",
"description": "trigger on click\n\n点击时出发,一般用于外层阻止冒泡场景\n\n[docs](https://tdesign.tencent.com/vue/components/radio?tab=api#radio-events)"
"description": "trigger on click\n\n点击时触发,一般用于外层阻止冒泡场景\n\n[docs](https://tdesign.tencent.com/vue/components/radio?tab=api#radio-events)"
},
"t-radio-button/click": {
"type": "event",
"description": "trigger on click\n\n点击时出发,一般用于外层阻止冒泡场景\n\n[docs](https://tdesign.tencent.com/vue/components/radio?tab=api#radio-events)"
"description": "trigger on click\n\n点击时触发,一般用于外层阻止冒泡场景\n\n[docs](https://tdesign.tencent.com/vue/components/radio?tab=api#radio-events)"
},
"t-radio-group/allow-uncheck": {
"type": "Boolean",
Expand Down
6 changes: 3 additions & 3 deletions helper/web-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -4030,7 +4030,7 @@
},
{
"name": "click",
"description": "trigger on click\n\n点击时出发,一般用于外层阻止冒泡场景",
"description": "trigger on click\n\n点击时触发,一般用于外层阻止冒泡场景",
"doc-url": "https://tdesign.tencent.com/vue/components/checkbox?tab=api#checkbox-events"
}
]
Expand Down Expand Up @@ -12143,7 +12143,7 @@
},
{
"name": "click",
"description": "trigger on click\n\n点击时出发,一般用于外层阻止冒泡场景",
"description": "trigger on click\n\n点击时触发,一般用于外层阻止冒泡场景",
"doc-url": "https://tdesign.tencent.com/vue/components/radio?tab=api#radio-events"
}
]
Expand Down Expand Up @@ -12243,7 +12243,7 @@
},
{
"name": "click",
"description": "trigger on click\n\n点击时出发,一般用于外层阻止冒泡场景",
"description": "trigger on click\n\n点击时触发,一般用于外层阻止冒泡场景",
"doc-url": "https://tdesign.tencent.com/vue/components/radio?tab=api#radio-events"
}
]
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tdesign-vue",
"purename": "tdesign",
"version": "1.9.3-naruto",
"version": "1.9.4-naruto",
"description": "tdesign-vue",
"title": "tdesign-vue",
"keywords": [
Expand Down Expand Up @@ -91,7 +91,7 @@
"@types/tinycolor2": "^1.4.3",
"@types/validator": "^13.1.3",
"clipboard": "^2.0.8",
"dayjs": "^1.9.7",
"dayjs": "1.11.10",
"lodash": "^4.17.21",
"mitt": "^3.0.0",
"raf": "^3.4.1",
Expand Down
2 changes: 1 addition & 1 deletion src/_common
Submodule _common updated 76 files
+4 −0 docs/mobile/api_v2/count-down.en-US.md
+3 −0 docs/mobile/api_v2/count-down.md
+25 −0 docs/mobile/api_v2/tree-select.en-US.md
+25 −0 docs/mobile/api_v2/tree-select.md
+1 −1 docs/mobile/design/dialog.md
+73 −0 docs/mobile/flutter_design/action-sheet.md
+61 −0 docs/mobile/flutter_design/avatar.md
+33 −0 docs/mobile/flutter_design/back-top.md
+68 −0 docs/mobile/flutter_design/badge.md
+79 −0 docs/mobile/flutter_design/button.md
+51 −0 docs/mobile/flutter_design/calendar.md
+59 −0 docs/mobile/flutter_design/cascader.md
+55 −0 docs/mobile/flutter_design/cell.md
+50 −0 docs/mobile/flutter_design/checkbox.md
+63 −0 docs/mobile/flutter_design/collapse.md
+50 −0 docs/mobile/flutter_design/count-down.md
+36 −0 docs/mobile/flutter_design/date-time-picker.md
+71 −0 docs/mobile/flutter_design/dialog.md
+53 −0 docs/mobile/flutter_design/divider.md
+55 −0 docs/mobile/flutter_design/drawer.md
+40 −0 docs/mobile/flutter_design/dropdown-menu.md
+38 −0 docs/mobile/flutter_design/empty.md
+80 −0 docs/mobile/flutter_design/fab.md
+59 −0 docs/mobile/flutter_design/footer.md
+88 −0 docs/mobile/flutter_design/grid.md
+36 −0 docs/mobile/flutter_design/image-viewer.md
+45 −0 docs/mobile/flutter_design/image.md
+53 −0 docs/mobile/flutter_design/indexes.md
+71 −0 docs/mobile/flutter_design/input.md
+44 −0 docs/mobile/flutter_design/link.md
+57 −0 docs/mobile/flutter_design/loading.md
+50 −0 docs/mobile/flutter_design/message.md
+51 −0 docs/mobile/flutter_design/navbar.md
+81 −0 docs/mobile/flutter_design/notice-bar.md
+39 −0 docs/mobile/flutter_design/picker.md
+53 −0 docs/mobile/flutter_design/popup.md
+62 −0 docs/mobile/flutter_design/progress.md
+60 −0 docs/mobile/flutter_design/pull-down-refresh.md
+57 −0 docs/mobile/flutter_design/radio.md
+51 −0 docs/mobile/flutter_design/rate.md
+54 −0 docs/mobile/flutter_design/result.md
+51 −0 docs/mobile/flutter_design/search.md
+50 −0 docs/mobile/flutter_design/side-bar.md
+27 −0 docs/mobile/flutter_design/skeleton.md
+59 −0 docs/mobile/flutter_design/slider.md
+50 −0 docs/mobile/flutter_design/stepper.md
+74 −0 docs/mobile/flutter_design/steps.md
+75 −0 docs/mobile/flutter_design/swipe-cell.md
+40 −0 docs/mobile/flutter_design/swiper.md
+31 −0 docs/mobile/flutter_design/switch.md
+77 −0 docs/mobile/flutter_design/tab-bar.md
+106 −0 docs/mobile/flutter_design/tabs.md
+86 −0 docs/mobile/flutter_design/tag.md
+59 −0 docs/mobile/flutter_design/textarea.md
+43 −0 docs/mobile/flutter_design/toast.md
+27 −0 docs/mobile/flutter_design/tree-select.md
+43 −0 docs/mobile/flutter_design/upload.md
+4 −4 docs/web/api/upload.en-US.md
+5 −5 docs/web/api/upload.md
+5 −0 js/time-picker/utils.ts
+2 −2 js/upload/types.ts
+1 −1 style/mobile/components/count-down/v2/_index.less
+17 −3 style/mobile/components/count-down/v2/_var.less
+17 −0 style/mobile/components/swiper-nav/v2/_index.less
+2 −0 style/mobile/components/swiper-nav/v2/_var.less
+8 −0 style/mobile/components/swiper/v2/_index.less
+5 −0 style/mobile/components/swiper/v2/_var.less
+3 −2 style/mobile/components/table/mixins/_scrollbar.less
+1 −0 style/mobile/components/tree-select/_index.less
+0 −1 style/web/components/input/_mixin.less
+4 −1 style/web/components/menu/_index.less
+5 −0 style/web/components/range-input/_index.less
+1 −1 style/web/components/range-input/_var.less
+1 −1 style/web/components/select/_index.less
+7 −2 style/web/components/upload/_index.less
+2 −2 style/web/mixins/_scrollbar.less
4 changes: 2 additions & 2 deletions src/color-picker/panel/slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export default defineComponent({
if (!width) {
return;
}
const left = Math.round((props.value / props.maxValue) * width);
const left = Math.round((props.value / props.maxValue) * 100);
return {
left: `${left}px`,
left: `${left}%`,
color: props.color.rgb,
};
});
Expand Down
1 change: 1 addition & 0 deletions src/date-picker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ export default defineComponent({
<TSelectInput
disabled={isDisabled}
value={inputValue}
label={this.label}
status={this.status}
tips={this.tips}
popupProps={datePickerPopupProps}
Expand Down
1 change: 1 addition & 0 deletions src/date-picker/DateRangePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ export default defineComponent({
<div class={COMPONENT_NAME}>
<TRangeInputPopup
disabled={this.isDisabled}
label={this.label}
status={this.status}
tips={this.tips || this.$scopedSlots.tips}
inputValue={inputValue as string[]}
Expand Down
2 changes: 2 additions & 0 deletions src/date-picker/date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ enableTimePicker | Boolean | false | 是否显示时间选择 | N
firstDayOfWeek | Number | 7 | 第一天从星期几开始。可选项:1/2/3/4/5/6/7 | N
format | String | 'YYYY-MM-DD' | 仅用于格式化日期显示的格式,不影响日期值。注意和 `valueType` 的区别,`valueType`会直接决定日期值 `value` 的格式。全局配置默认为:'YYYY-MM-DD',[详细文档](https://day.js.org/docs/en/display/format) | N
inputProps | Object | - | 透传给输入框(Input)组件的参数。TS 类型:`InputProps`[Input API Documents](./input?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N
label | String / Slot / Function | - | 左侧文本。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
mode | String | date | 选择器模式。可选项:year/quarter/month/week/date | N
placeholder | String / Array | undefined | 占位符。TS 类型:`string` | N
popupProps | Object | - | 透传给 popup 组件的参数。TS 类型:`PopupProps`[Popup API Documents](./popup?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/date-picker/type.ts) | N
Expand Down Expand Up @@ -58,6 +59,7 @@ disabled | Boolean | - | 是否禁用组件 | N
enableTimePicker | Boolean | false | 是否显示时间选择 | N
firstDayOfWeek | Number | - | 第一天从星期几开始。可选项:1/2/3/4/5/6/7 | N
format | String | - | 用于格式化日期,[详细文档](https://day.js.org/docs/en/display/format) | N
label | String / Slot / Function | - | 左侧文本。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
mode | String | date | 选择器模式。可选项:year/quarter/month/week/date | N
panelPreselection | Boolean | true | 在开始日期选中之前,面板是否显示预选状态,即是否高亮预选日期 | N
placeholder | String / Array | - | 占位符,值为数组表示可分别为开始日期和结束日期设置占位符。TS 类型:`string \| Array<string>` | N
Expand Down
4 changes: 4 additions & 0 deletions src/date-picker/date-range-picker-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export default {
type: String,
default: '',
},
/** 左侧文本 */
label: {
type: [String, Function] as PropType<TdDateRangePickerProps['label']>,
},
/** 选择器模式 */
mode: {
type: String as PropType<TdDateRangePickerProps['mode']>,
Expand Down
4 changes: 4 additions & 0 deletions src/date-picker/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export default {
inputProps: {
type: Object as PropType<TdDatePickerProps['inputProps']>,
},
/** 左侧文本 */
label: {
type: [String, Function] as PropType<TdDatePickerProps['label']>,
},
/** 选择器模式 */
mode: {
type: String as PropType<TdDatePickerProps['mode']>,
Expand Down
8 changes: 8 additions & 0 deletions src/date-picker/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export interface TdDatePickerProps {
* 透传给输入框(Input)组件的参数
*/
inputProps?: InputProps;
/**
* 左侧内容
*/
label?: string | TNode;
/**
* 选择器模式
* @default date
Expand Down Expand Up @@ -179,6 +183,10 @@ export interface TdDateRangePickerProps {
* @default ''
*/
format?: string;
/**
* 左侧文本
*/
label?: string | TNode;
/**
* 选择器模式
* @default date
Expand Down
2 changes: 1 addition & 1 deletion src/dialog/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export default mixins(ActionMixin, getConfigReceiverMixins<Vue, DialogConfig>('d
}
}
},
// 回车出发确认事件
// 回车触发确认事件
keyboardEnterEvent(e: KeyboardEvent) {
const { code } = e;
if ((code === 'Enter' || code === 'NumpadEnter') && stack.top === this.uid) {
Expand Down
7 changes: 7 additions & 0 deletions src/input/_example/borderless.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<t-space direction="vertical" style="max-width: 500px">
<t-input placeholder="please input" clearable />
<t-input placeholder="borderless input" borderless clearable />
</t-space>
</template>
<script></script>
2 changes: 1 addition & 1 deletion src/input/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ allowInputOverMax | Boolean | false | 超出 `maxlength` 或 `maxcharacter` 之
autoWidth | Boolean | false | 宽度随内容自适应 | N
autocomplete | String | undefined | 是否开启自动填充功能,HTML5 原生属性,[点击查看详情](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) | N
autofocus | Boolean | false | 自动聚焦 | N
borderless | Boolean | false | 【开发中】无边框模式 | N
borderless | Boolean | false | 无边框模式 | N
clearable | Boolean | false | 是否可清空 | N
disabled | Boolean | - | 是否禁用输入框 | N
format | Function | - | 指定输入框展示值的格式。注意 `type=number` 时请勿使用,此功能建议更为使用 `InputNumber` 组件。TS 类型:`InputFormatType` `type InputFormatType = (value: string) => string`[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/input/type.ts) | N
Expand Down
1 change: 1 addition & 0 deletions src/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export default mixins(
[`${this.classPrefix}-align-${this.align}`]: this.align !== 'left',
[`${this.classPrefix}-is-disabled`]: this.tDisabled,
[`${this.classPrefix}-is-readonly`]: this.readonly,
[`${this.componentName}--borderless`]: this.borderless,
[`${this.componentName}--focused`]: this.focused,
},
];
Expand Down
2 changes: 1 addition & 1 deletion src/radio/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ export default {
},
/** 选中状态变化时触发 */
onChange: Function as PropType<TdRadioProps['onChange']>,
/** 点击时出发,一般用于外层阻止冒泡场景 */
/** 点击时触发,一般用于外层阻止冒泡场景 */
onClick: Function as PropType<TdRadioProps['onClick']>,
};
4 changes: 2 additions & 2 deletions src/radio/radio.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ label | String / Slot / Function | - | 主文案。TS 类型:`string \| TNode`
name | String | - | HTML 元素原生属性 | N
value | String / Number / Boolean | undefined | 单选按钮的值。TS 类型:`T` | N
onChange | Function | | TS 类型:`(checked: boolean, context: { e: Event }) => void`<br/>选中状态变化时触发 | N
onClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>点击时出发,一般用于外层阻止冒泡场景 | N
onClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>点击时触发,一般用于外层阻止冒泡场景 | N

### Radio Events

名称 | 参数 | 描述
-- | -- | --
change | `(checked: boolean, context: { e: Event })` | 选中状态变化时触发
click | `(context: { e: MouseEvent })` | 点击时出发,一般用于外层阻止冒泡场景
click | `(context: { e: MouseEvent })` | 点击时触发,一般用于外层阻止冒泡场景

### RadioGroup Props

Expand Down
2 changes: 1 addition & 1 deletion src/radio/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export interface TdRadioProps<T = RadioValue> {
*/
onChange?: (checked: boolean, context: { e: Event }) => void;
/**
* 点击时出发,一般用于外层阻止冒泡场景
* 点击时触发,一般用于外层阻止冒泡场景
*/
onClick?: (context: { e: MouseEvent }) => void;
}
Expand Down
4 changes: 4 additions & 0 deletions src/range-input/range-input-popup-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export default {
},
/** 只读状态,值为真会隐藏输入框,且无法打开下拉框 */
readonly: Boolean,
/** 左侧文本 */
label: {
type: [String, Function] as PropType<TdRangeInputPopupProps['label']>,
},
/** 输入框状态 */
status: {
type: String as PropType<TdRangeInputPopupProps['status']>,
Expand Down
1 change: 1 addition & 0 deletions src/range-input/range-input-popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default defineComponent({
value: this.inputValue,
onChange: this.onInputChange,
disabled: this.disabled,
label: this.label,
status: this.status,
tips: this.tips,
...(this.rangeInputProps as Object),
Expand Down
2 changes: 2 additions & 0 deletions src/range-input/range-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ export default defineComponent({
[STATUS.success]: this.status === 'success',
[STATUS.warning]: this.status === 'warning',
[STATUS.error]: this.status === 'error',
[`${COMPONENT_NAME}--prefix`]: prefixIconContent || labelContent,
[`${COMPONENT_NAME}--suffix`]: suffixIconContent || suffixContent,
},
]}
onMouseenter={handleMouseEnter}
Expand Down
4 changes: 4 additions & 0 deletions src/range-input/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ export interface TdRangeInputPopupProps {
* 输入框的值
*/
inputValue?: RangeInputValue;
/**
* 左侧文本
*/
label?: string | TNode;
/**
* 输入框的值,非受控属性
*/
Expand Down
21 changes: 10 additions & 11 deletions src/select/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`Select > :props > :bordered 1`] = `
class="t-select__wrap"
>
<div
class="t-select-input t-select"
class="t-select-input t-select-input--empty t-select"
>
<div
class="t-input__wrap"
Expand Down Expand Up @@ -55,7 +55,7 @@ exports[`Select > :props > :clearable 1`] = `
class="t-select__wrap"
>
<div
class="t-select-input t-select"
class="t-select-input t-select-input--empty t-select"
>
<div
class="t-input__wrap"
Expand Down Expand Up @@ -104,7 +104,7 @@ exports[`Select > :props > :creatable 1`] = `
class="t-select__wrap"
>
<div
class="t-select-input t-select"
class="t-select-input t-select-input--empty t-select"
>
<div
class="t-input__wrap"
Expand Down Expand Up @@ -153,7 +153,7 @@ exports[`Select > :props > :disabled 1`] = `
class="t-select__wrap"
>
<div
class="t-select-input t-select"
class="t-select-input t-select-input--empty t-select"
>
<div
class="t-input__wrap"
Expand All @@ -170,7 +170,6 @@ exports[`Select > :props > :disabled 1`] = `
disabled="disabled"
placeholder="请选择"
readonly="readonly"
title="false"
type="text"
unselectable="on"
/>
Expand Down Expand Up @@ -204,7 +203,7 @@ exports[`Select > :props > :labelInValue 1`] = `
class="t-select__wrap"
>
<div
class="t-select-input t-select"
class="t-select-input t-select-input--empty t-select"
>
<div
class="t-input__wrap"
Expand Down Expand Up @@ -253,7 +252,7 @@ exports[`Select > :props > :loading 1`] = `
class="t-select__wrap"
>
<div
class="t-select-input t-select"
class="t-select-input t-select-input--empty t-select"
>
<div
class="t-input__wrap"
Expand Down Expand Up @@ -365,7 +364,7 @@ exports[`Select > :props > :placeholder 1`] = `
class="t-select__wrap"
>
<div
class="t-select-input t-select"
class="t-select-input t-select-input--empty t-select"
>
<div
class="t-input__wrap"
Expand Down Expand Up @@ -415,7 +414,7 @@ exports[`Select > :props > :remote 1`] = `
remote="true"
>
<div
class="t-select-input t-select"
class="t-select-input t-select-input--empty t-select"
>
<div
class="t-input__wrap"
Expand Down Expand Up @@ -464,7 +463,7 @@ exports[`Select > :props > :reserveKeyword 1`] = `
class="t-select__wrap"
>
<div
class="t-select-input t-select"
class="t-select-input t-select-input--empty t-select"
>
<div
class="t-input__wrap"
Expand Down Expand Up @@ -513,7 +512,7 @@ exports[`Select > :props > :size 1`] = `
class="t-select__wrap"
>
<div
class="t-select-input t-select"
class="t-select-input t-select-input--empty t-select"
>
<div
class="t-input__wrap"
Expand Down
7 changes: 6 additions & 1 deletion src/select/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ export default {
type: Object as PropType<TdSelectProps['popupProps']>,
},
/** 是否显示下拉框 */
popupVisible: Boolean,
popupVisible: {
type: Boolean,
default: undefined,
},
/** 是否显示下拉框,非受控属性 */
defaultPopupVisible: Boolean,
/** 组件前置图标 */
Expand Down Expand Up @@ -159,10 +162,12 @@ export default {
/** 选中值 */
value: {
type: [String, Number, Boolean, Object, Array] as PropType<TdSelectProps['value']>,
default: undefined,
},
/** 选中值,非受控属性 */
defaultValue: {
type: [String, Number, Boolean, Object, Array] as PropType<TdSelectProps['defaultValue']>,
default: undefined,
},
/** 自定义选中项呈现的内容 */
valueDisplay: {
Expand Down
2 changes: 1 addition & 1 deletion src/select/select-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export default defineComponent({
}
const target = (e.target || e.srcElement) as HTMLElement;
const top = target.scrollTop;
// 排除横向滚动出发的纵向虚拟滚动计算
// 排除横向滚动触发的纵向虚拟滚动计算
if (Math.abs(lastScrollY - top) > 5) {
handleVirtualScroll();
lastScrollY = top;
Expand Down
Loading

0 comments on commit e36d1b8

Please sign in to comment.