Skip to content

Commit

Permalink
1.1.6 (#2005)
Browse files Browse the repository at this point in the history
* fix(loading): resolve style error (#1873)

* fix(loading): resolve style error

* test: update unit test

* feat: empty的文案添加换行 (#1870)

* fix(button): 修复[button] type="submit"时,disabled未生效 (#1878)

* fix(button): 修复[button] type="submit"时,disabled未生效

修复[button] type="submit"时,disabled未生效

* fix(button): 修复[button] type="submit"时,disabled未生效

修复[button] type="submit"时,disabled未生效

* test: update snap

---------

Co-authored-by: zjianzzhang <zjianzzhang@tencent.com>

* style(row): row垂直居中样式 (#1866)

添加row的flex布局,垂直居中

* fix(progress): 安卓机朗读异常 & 动态朗读 (#1354)

* fix: 安卓机朗读异常

* fix: fix code

* fix: 安卓不发音

* fix: fix code

* fix: wip 优化中

* fix: 优化

* chore: update snap

* fix: fix code

* fix: fix code

* fix: 错误使用iOS变量

* fix(补充注释): 补充注释

* fix: 优化

* test: update snap

* fix: 补充注释

* fix: 优化部分注释, remove code

* fix: 优化注释

---------

Co-authored-by: leejimqiu <leejimqiu@gmail.com>

* feature/swiper aria v2 (#1598)

* feat(swiper): support aria

* feat(swiper): support custom ariaLabel

* feat(swiper): image name

* chore(swiper): update snap

---------

Co-authored-by: leejimqiu <leejimqiu@gmail.com>

* docs: update custom theme

* fix(radio): resolve style (#1889)

* feat: 支持分割线组件的线条使用变量控制属性 (#1890)

* fix(action-sheet): resolve ts error of show method (#1907)

* fix(grid): 修复column>=4个时,--td-grid-item-image-width和--td-grid-item-text-font-size是无效的 (#1903)

* chore: update _common (#1902)

* feat: 支持radio的内容字体大小使用变量。 (#1895)

* feat: 支持radio的内容字体大小使用变量。

* style: 修改css变量名称

* Bitjian fix/radio icon size (#1909)

* fix: 修复--td-radio-icon-size对未选中的图标未生效

* fix: fix radio 未选择的图标未生效

* fix(radio): support css variables to change circle icon size

---------

Co-authored-by: bitjian <1183048003@qq.com>

* chore: publish v1.1.2 (#1910)

* chore: publish v1.1.2

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(rate): 评分组件支持无障碍滑动 (#1574)

* fix(rate): 评分组件支持滑动无障碍操作(#1050)

* fix(rate): 评分组件样式问题修复.(#1050)

* fix(rate): 评分组件单测问题.(#1050)

* fix(rate): 抽象样式, 冗余代码.(#1050)

* fix(rate): 删除冗余节点.(#1050)

* fix(rate): 优化读取.(#1050)

* fix(rate): 新增额外的读取.(#1050)

* fix(rate): 修复警告旁白导致的滑动卡顿.(#1050)

* fix(rate): sr-only注释(#1050)

* fix(rate): update test snapshots. (#1050)

* build: remove preview workflow tentatively

* fix(upload): resolve max (#1914)

* fix(navbar): resolve capsule zindex (#1920)

* chore: update site

* fix(button): 修复variant=outline等状态下loading不展示 (#1922)

* fix(button): 修复variant=outline等状态下loading不展示

* fix(button): loading inheritColor 字段错误

* fix(navbar): resolve vertical align (#1926)

* fix(navbar): resolve vertical align

* test(navbar): update snapshot

* fix(dropdown-menu): support multiple column radio (#1927)

* fix(Link): resolve disabled problem (#1928)

* fix(calendar): resolve error (#1930)

* fix(calendar): resolve error

* fix(calendar): make observer robust

* fix(tabs): resolve content overflow (#1931)

* fix(tabs): resolve content overflow

* test(tabs): update snapshot

* chore: update issue template

* fix(Input): resolve vertical layout style error (#1934)

* feat(collapse): add header-left-icon property (#1933)

* feat(tabs): add middle slot (#1936)

* chore: publish v1.1.3 (#1937)

* chore: publish v1.1.3

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(slider): enable dragstart and dragend event (#1940)

* fix(image-viewer): add using-custom-navation property (#1944)

* feat(Swiper): update api docs (#1945)

* feat(Swiper): update api docs

* Update CHANGELOG.md

* fix(picker): enable to using falsy value (#1948)

* fix(toast): auto hide when page is hide (#1947)

* feat(swiper): add image-load event (#1949)

* feat(swiper): add image-load event

* fix: resolve fallback value

* test: update snapshot

* chore: publish v1.1.4 (#1950)

* chore: publish v1.1.4

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* docs(picker): enrich api detail (#1956)

* fix(tabs): resolve track position (#1958)

* feat(pulldown-refresh): add some properties from scroll-view (#1959)

* feat(pulldown-refresh): add some properties from scroll-view

* refactor(pulldown-refresh): using px to calculate

* feat(loading): support indicator slot

* test: update snapshot

* fix(pulldown-refresh): resolve value (#1960)

* feat(datetime-picker): support steps property (#1961)

* feat(steps): add sequence property (#1962)

* feat(dropdown-menu): add css variable for border width (#1967)

* feat(Stepper): allow input to be empty (#1971)

* fix(calendar): enable scroll into view when use-popup is false (#1969)

* chore(image-viewer): update demo (#1968)

* chore(image-viewer): update demo

* chore(image-viewer): update demo

* fix(action-sheet): enable close when click cancel

* chore: recover demo

* chore: publish v1.1.5 (#1975)

* chore: publish v1.1.5

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* docs(badge): update api

* fix(navbar): Fix invalid fixed attribute of Navbar component (#1982)

* feat(Icon): update icon from 0.1.2 to 0.1.4 (#1979)

* feat(Icon): update iconform 0.1.2 to 0.1.4

* test: update snapshots

* chore: update _common

* Feat/picker-zindex (#1985)

* feat: picker添加层级控制

* refactor: 修改popupProps的处理逻辑

* refactor: fix template error

* fix: picker compile error

* fix(DropdownMenu): auto scroll to current (#1788) (#1981)

* fix(DropdownMenu): auto scroll to current (#1788)

* fix(DropdownMenu): resolve auto scroll wrong height (#1788)

* fix(DropdownMenu): auto multi scroll to current (#1788)

* feat: 添加支持date-picker的蒙层属性透 (#1991)

* feat(Slider): the step attribute supports decimals (#1990)

* feat(Slider): the step attribute supports decimals

* fix(slider): resolve emit same value

---------

Co-authored-by: leejimqiu <leejimqiu@gmail.com>

* chore: publish v1.1.5-beta

* fix(pulldown-refresh): resolve refresh event

* fix: 修复variant动态修改无效

* feat(Grid): enrich demo (#1993)

* feat(Input): resolve label content wraps (#1994)

* docs(Steps): remove invalid attributes (#1995)

* fix(pulldown-refresh): resolve refresh event (#1998)

* fix(pulldown-refresh): resolve refresh event

* fix(pulldown-refresh): resolve change event

* fix: fix [下拉菜单] 单选选项行高不一致 #1980 (#1992)

* feat: action-sheet支持层级 (#2002)

* fix: 修复多余 row 的样式导致 col 不换行问题 (#1996)

* fix: 修复row样式问题

fix #1964, fix #1851

* fix: 修复多余 row 的样式导致 col 不换行问题

"fix #1964", "fix #1851"

---------

Co-authored-by: pingwu <pingwu@tencent.com>

* fix(dialog): display of cancel and confirm button when calling a command. (#1986)

* fix(dialog): Display problem of cancel and confirm button when calling a command.

* revert(dialog): Revert changes to ` dialog.wxml`

* fix(dialog): Button issue when invoking commands.

---------

Co-authored-by: yuchumian <yuchumian@163.com>

* fix(calendar): enable calendar type (#2003)

* chore: publish v1.1.6 (#2004)

* chore: publish v1.1.6

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: Cyrus <liuxingran97@qq.com>
Co-authored-by: favouredddd <40692560+favouredddd@users.noreply.github.com>
Co-authored-by: 孜孜 <1183048003@qq.com>
Co-authored-by: zjianzzhang <zjianzzhang@tencent.com>
Co-authored-by: tomcat-hz <59186135+tomcat-hz@users.noreply.github.com>
Co-authored-by: 龙风 <455947455@qq.com>
Co-authored-by: zhangpaopao <zhangpaopao0609@gmail.com>
Co-authored-by: Guan9 <mllz79@163.com>
Co-authored-by: Y <anly_yaw@163.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: byqbai <byq1213@qq.com>
Co-authored-by: betavs <34408516+betavs@users.noreply.github.com>
Co-authored-by: jarmywang <awangjianjun9@gmail.com>
Co-authored-by: jurrychen <534747442@qq.com>
Co-authored-by: pingwu <58472278+wuping97@users.noreply.github.com>
Co-authored-by: pingwu <pingwu@tencent.com>
Co-authored-by: yuchumian <26185330+yuchumian@users.noreply.github.com>
Co-authored-by: yuchumian <yuchumian@163.com>
  • Loading branch information
19 people authored May 15, 2023
1 parent ae1a158 commit 431a2dd
Show file tree
Hide file tree
Showing 63 changed files with 825 additions and 613 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ toc: false
docClass: timeline
---

## 🌈 1.1.6 `2023-05-15`
### 🚀 Features
- `Icon`: 更新版本至 v0.1.4 @anlyyao ([#1979](https://github.com/Tencent/tdesign-miniprogram/pull/1979))
- `DropdownMenu`: 选项过多时自动滚动到已选项 @jarmywang ([#1981](https://github.com/Tencent/tdesign-miniprogram/pull/1981))
- `Slider`: 属性 `step` 支持传入小数 @anlyyao ([#1990](https://github.com/Tencent/tdesign-miniprogram/pull/1990))
- `GridItem`: 新增 click 事件 @anlyyao ([#1993](https://github.com/Tencent/tdesign-miniprogram/pull/1993))
- `Picker`: 新增 popupProps 属性,透传至 Popup @favouredddd ([#1985](https://github.com/Tencent/tdesign-miniprogram/pull/1985))
- `DateTimePikcer`: 新增支持 popupProps 属性,透传至 Popup @favouredddd ([#1991](https://github.com/Tencent/tdesign-miniprogram/pull/1991))
- `ActionSheet`: 新增 PopupProps 属性,透传至 Popup @favouredddd ([#2002](https://github.com/Tencent/tdesign-miniprogram/pull/2002))

### 🐞 Bug Fixes
- `NavBar`: 修复 fixed 定位 @betavs ([#1982](https://github.com/Tencent/tdesign-miniprogram/pull/1982))
- `Slider`: 修复 change 事件重复触发相同值的问题 @anlyyao ([#1990](https://github.com/Tencent/tdesign-miniprogram/pull/1990))
- `Input`: 修复 label 为英文时无法换行 @anlyyao ([#1994](https://github.com/Tencent/tdesign-miniprogram/pull/1994))
- `PullDownRefresh`: 解决 refresh 事件触发时机错误的问题 @LeeJim ([#1998](https://github.com/Tencent/tdesign-miniprogram/pull/1998))
- `PullDownRefresh`: 修复 value 不可控的问题 @LeeJim ([#1998](https://github.com/Tencent/tdesign-miniprogram/pull/1998))
- `Button`: 修复 variant 无法动态响应的问题 @favouredddd ([#2000](https://github.com/Tencent/tdesign-miniprogram/pull/2000))
- `DropdownMenu`: 单选选项行高不一致 @bitjian ([#1992](https://github.com/Tencent/tdesign-miniprogram/pull/1992))
- `Layout`: 修复 col 组件不换行的问题,移除 flex 布局 @wuping97 ([#1996](https://github.com/Tencent/tdesign-miniprogram/pull/1996))
- `Dialog`: 修复无法动态移除按钮的问题 @yuchumian ([#1986](https://github.com/Tencent/tdesign-miniprogram/pull/1986))
- `Calendar`: 修复 type 属性失效的问题 @LeeJim ([#2003](https://github.com/Tencent/tdesign-miniprogram/pull/2003))

### 🚧 Others
- `Steps`: 移除文档中无效的 API @anlyyao ([#1995](https://github.com/Tencent/tdesign-miniprogram/pull/1995))

## 🌈 1.1.5 `2023-05-08`
### 🚀 Features
- `PulldownRefresh`: 支持透传更多属性至 scroll-view 组件 @LeeJim ([#1959](https://github.com/Tencent/tdesign-miniprogram/pull/1959))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tdesign-miniprogram",
"purename": "tdesign",
"version": "1.1.5",
"version": "1.1.6",
"description": "tdesign-miniprogram",
"title": "tdesign-ßminiprogram",
"main": "miniprogram_dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/_common
Submodule _common updated 410 files
2 changes: 2 additions & 0 deletions src/action-sheet/action-sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export default class ActionSheet extends SuperComponent {
classPrefix: name,
gridThemeItems: [],
currentSwiperIndex: 0,
defaultPopUpProps: {},
defaultPopUpzIndex: 11500,
};

controlledProps = [
Expand Down
8 changes: 7 additions & 1 deletion src/action-sheet/action-sheet.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
<import src="./template/grid.wxml" />

<view id="{{classPrefix}}" style="{{_._style([style, customStyle])}}" class="{{classPrefix}} class {{prefix}}-class">
<t-popup visible="{{visible}}" placement="bottom" bind:visible-change="onPopupVisibleChange">
<t-popup
visible="{{visible}}"
placement="bottom"
bind:visible-change="onPopupVisibleChange"
z-index="{{ popupProps.zIndex || defaultPopUpzIndex }}"
overlay-props="{{ popupProps.overlayProps || defaultPopUpProps }}"
>
<view
class="{{_.cls(classPrefix + '__content', [['grid', gridThemeItems.length]])}} {{prefix}}-class-content"
tabindex="0"
Expand Down
5 changes: 5 additions & 0 deletions src/action-sheet/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ const props: TdActionSheetProps = {
type: Boolean,
value: false,
},
/** popupProps透传 */
popupProps: {
type: Object,
value: {},
},
};

export default props;
4 changes: 4 additions & 0 deletions src/action-sheet/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ export interface TdActionSheetProps {
type: BooleanConstructor;
value?: boolean;
};
popupProps: {
type: ObjectConstructor;
value?: object;
};
}

export interface ActionSheetItem {
Expand Down
6 changes: 3 additions & 3 deletions src/badge/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ name | type | default | description | required
-- | -- | -- | -- | --
color | String | - | \- | N
content | String | - | \- | N
count | String / Number / Slot | 0 | \- | N
count | String / Number / Slot | 0 | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
dot | Boolean | false | \- | N
external-classes | Array | - | `['t-class', 't-class-content', 't-class-count']` | N
max-count | Number | 99 | \- | N
offset | Array | - | Typescript:`Array<string \| number>` | N
shape | String | circle | options:circle/round/ribbon/bubble | N
shape | String | circle | options:circle/square/bubble/ribbon | N
show-zero | Boolean | false | \- | N
size | String | medium | options:small/medium | N
size | String | medium | options:medium/large | N
6 changes: 3 additions & 3 deletions src/badge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ isComponent: true
-- | -- | -- | -- | --
color | String | - | 颜色 | N
content | String | - | 徽标内容,示例:`content='自定义内容'`。也可以使用默认插槽定义 | N
count | String / Number / Slot | 0 | 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染 | N
count | String / Number / Slot | 0 | 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
dot | Boolean | false | 是否为红点 | N
external-classes | Array | - | 组件类名,分别用于设置外层元素、默认内容、右上角内容等元素类名。`['t-class', 't-class-content', 't-class-count']` | N
max-count | Number | 99 | 封顶的数字值 | N
offset | Array | - | 设置状态点的位置偏移,示例:[-10, 20]['10em', '8rem']。TS 类型:`Array<string \| number>` | N
shape | String | circle | 形状。可选项:circle/round/ribbon/bubble | N
shape | String | circle | 形状。可选项:circle/square/bubble/ribbon | N
show-zero | Boolean | false | 当数值为 0 时,是否展示徽标 | N
size | String | medium | 尺寸。可选项:small/medium | N
size | String | medium | 尺寸。可选项:medium/large | N
2 changes: 1 addition & 1 deletion src/badge/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */
import { TdBadgeProps } from './type';

import { TdBadgeProps } from './type';
const props: TdBadgeProps = {
/** 颜色 */
color: {
Expand Down
12 changes: 2 additions & 10 deletions src/badge/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ export interface TdBadgeProps {
type: null;
value?: string | number;
};
/**
* 自定义组件样式
* @default ''
*/
style?: {
type: StringConstructor;
value?: string;
};
/**
* 是否为红点
* @default false
Expand Down Expand Up @@ -73,7 +65,7 @@ export interface TdBadgeProps {
*/
shape?: {
type: StringConstructor;
value?: 'circle' | 'round' | 'ribbon' | 'bubble';
value?: 'circle' | 'square' | 'bubble' | 'ribbon';
};
/**
* 当数值为 0 时,是否展示徽标
Expand All @@ -89,6 +81,6 @@ export interface TdBadgeProps {
*/
size?: {
type: StringConstructor;
value?: 'small' | 'medium';
value?: 'medium' | 'large';
};
}
2 changes: 1 addition & 1 deletion src/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class Button extends SuperComponent {
};

observers = {
'theme, size, plain, block, shape, disabled, loading'() {
'theme, size, plain, block, shape, disabled, loading, variant'() {
this.setClass();
},

Expand Down
3 changes: 3 additions & 0 deletions src/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export default class Calendar extends SuperComponent {
};

observers = {
type(v) {
this.base.type = v;
},
confirmBtn(v) {
if (typeof v === 'string') {
this.setData({ innerConfirmBtn: v === 'slot' ? 'slot' : { content: v } });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,39 @@ exports[`DateTimePicker DateTimePicker date-all demo works fine 1`] = `
</date-all>
`;

exports[`DateTimePicker DateTimePicker steps demo works fine 1`] = `
<steps>
<t-cell
arrow="{{true}}"
hover="{{true}}"
note=""
tClass="pannel-item"
title="选择时间"
bind:tap="showPicker"
/>
<t-date-time-picker
format="HH:mm:ss"
mode="{{
Array [
"null",
"second",
]
}}"
steps="{{
Object {
"minute": 5,
}
}}"
title="选择时间"
value="10:00:00"
visible="{{false}}"
bind:cancel="hidePicker"
bind:change="onConfirm"
bind:pick="onColumnChange"
/>
</steps>
`;

exports[`DateTimePicker DateTimePicker time demo works fine 1`] = `
<time>
<wx-view
Expand Down
3 changes: 1 addition & 2 deletions src/date-time-picker/date-time-picker.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<wxs src="../common/utils.wxs" module="_" />

<t-picker
style="{{_._style([style, customStyle])}}"
class="class {{prefix}}-class {{classPrefix}}"
Expand All @@ -14,9 +13,9 @@
title="{{title}}"
confirmBtn="{{confirmBtn || locale.confirm}}"
cancelBtn="{{cancelBtn || locale.cancel}}"
popupProps="{{ popupProps }}"
>
<slot slot="header" name="header" />

<t-picker-item
wx:for="{{columns}}"
wx:key="index"
Expand Down
6 changes: 6 additions & 0 deletions src/date-time-picker/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ const props: TdDateTimePickerProps = {
type: Boolean,
value: false,
},

/** popupProps */
popupProps: {
type: Object,
value: {},
},
};

export default props;
9 changes: 9 additions & 0 deletions src/date-time-picker/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ export interface TdDateTimePickerProps {
type: BooleanConstructor;
value?: boolean;
};

/**
* 透传给picker内部的pop组件
* @default {}
*/
popupProps: {
type: Object;
value: {};
};
}

export type DateTimePickerMode = TimeModeValues | Array<TimeModeValues>;
Expand Down
2 changes: 2 additions & 0 deletions src/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export default class Dialog extends SuperComponent {
rect[`_${key}`] = { ...base, content: btn };
} else if (btn && typeof btn === 'object') {
rect[`_${key}`] = { ...base, ...btn };
} else {
rect[`_${key}`] = null;
}
});

Expand Down
11 changes: 11 additions & 0 deletions src/dropdown-item/dropdown-item.less
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
}
}

&__scroll {
max-height: @dropdown-body-max-height;
}

&__footer {
display: flex;
background: @dropdown-menu-bg-color;
Expand Down Expand Up @@ -84,6 +88,13 @@
}
}

&__radio {
&-group {
display: grid;
grid-gap: 0rpx;
}
}

&__checkbox {
&-group {
padding: 32rpx;
Expand Down
8 changes: 8 additions & 0 deletions src/dropdown-item/dropdown-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default class DropdownMenuItem extends SuperComponent {
labelAlias: 'label',
valueAlias: 'value',
computedLabel: '',
firstCheckedValue: '', // 用于多选再次打开自动定位到首个选项
};

relations: RelationsOptions = {
Expand Down Expand Up @@ -133,6 +134,11 @@ export default class DropdownMenuItem extends SuperComponent {

if (!this.data.multiple) {
this.closeDropdown();
} else {
const firstChecked = this.data.options.find((item) => value.includes(item.value));
if (firstChecked) {
this.data.firstCheckedValue = firstChecked.value;
}
}
},

Expand All @@ -150,6 +156,8 @@ export default class DropdownMenuItem extends SuperComponent {
handleConfirm() {
this._trigger('confirm', { value: this.data.value });
this.closeDropdown();
// 在关闭popup后才自动滚动到首个选项
this.setData({ firstCheckedValue: this.data.firstCheckedValue });
},

onLeaved() {
Expand Down
Loading

0 comments on commit 431a2dd

Please sign in to comment.