Skip to content

Commit

Permalink
chore(TreeSelect): support scrolling to the selected element position…
Browse files Browse the repository at this point in the history
… during initialization (#3364)

* chore(TreeSelect): support scrolling to the selected element position during initialization

* chore: update grid and side-bar demo

* test: update snapshots
  • Loading branch information
anlyyao authored Dec 17, 2024
1 parent cfddcb1 commit c011f8d
Show file tree
Hide file tree
Showing 48 changed files with 812 additions and 158 deletions.
3 changes: 3 additions & 0 deletions src/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export default class CheckBox extends SuperComponent {
type: String,
value: 'default',
},
tId: {
type: String,
},
};

data = {
Expand Down
1 change: 1 addition & 0 deletions src/checkbox/checkbox.wxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<wxs src="../common/utils.wxs" module="_" />

<view
id="{{tId}}"
style="{{_._style([style, customStyle])}}"
class="{{_.cls(classPrefix, [placement, theme, ['checked', checked], ['block', block]])}} class {{prefix}}-class"
aria-role="checkbox"
Expand Down
4 changes: 4 additions & 0 deletions src/common/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ export function canIUseFormFieldButton() {
export function canUseVirtualHost() {
return judgeByVersion('2.19.2');
}

export function canUseProxyScrollView() {
return judgeByVersion('2.19.2');
}
9 changes: 9 additions & 0 deletions src/dropdown-menu/__test__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ exports[`dropdown-menu :base 1`] = `
ariaRole="radio"
class="t-radio t-radio--left t-radio--block class t-class"
disabled="{{null}}"
id=""
style=""
tabindex=""
mut-bind:tap="handleTap"
Expand Down Expand Up @@ -192,6 +193,7 @@ exports[`dropdown-menu :base 1`] = `
ariaRole="radio"
class="t-radio t-radio--left t-radio--block class t-class"
disabled="{{null}}"
id=""
style=""
tabindex=""
mut-bind:tap="handleTap"
Expand Down Expand Up @@ -241,6 +243,7 @@ exports[`dropdown-menu :base 1`] = `
ariaRole="radio"
class="t-radio t-radio--left t-radio--block class t-class"
disabled="{{null}}"
id=""
style=""
tabindex=""
mut-bind:tap="handleTap"
Expand Down Expand Up @@ -303,6 +306,7 @@ exports[`dropdown-menu :base 1`] = `
ariaRole="radio"
class="t-radio t-radio--left t-radio--block class t-class"
disabled="{{null}}"
id=""
style=""
tabindex=""
mut-bind:tap="handleTap"
Expand Down Expand Up @@ -352,6 +356,7 @@ exports[`dropdown-menu :base 1`] = `
ariaRole="radio"
class="t-radio t-radio--left t-radio--block class t-class"
disabled="{{null}}"
id=""
style=""
tabindex=""
mut-bind:tap="handleTap"
Expand Down Expand Up @@ -401,6 +406,7 @@ exports[`dropdown-menu :base 1`] = `
ariaRole="radio"
class="t-radio t-radio--left t-radio--block class t-class"
disabled="{{null}}"
id=""
style=""
tabindex=""
mut-bind:tap="handleTap"
Expand Down Expand Up @@ -450,6 +456,7 @@ exports[`dropdown-menu :base 1`] = `
ariaRole="radio"
class="t-radio t-radio--left t-radio--block class t-class"
disabled="{{null}}"
id=""
style=""
tabindex=""
mut-bind:tap="handleTap"
Expand Down Expand Up @@ -499,6 +506,7 @@ exports[`dropdown-menu :base 1`] = `
ariaRole="radio"
class="t-radio t-radio--left t-radio--block class t-class"
disabled="{{null}}"
id=""
style=""
tabindex=""
mut-bind:tap="handleTap"
Expand Down Expand Up @@ -548,6 +556,7 @@ exports[`dropdown-menu :base 1`] = `
ariaRole="radio"
class="t-radio t-radio--left t-radio--block class t-class"
disabled="{{true}}"
id=""
style=""
tabindex=""
mut-bind:tap="handleTap"
Expand Down
Loading

0 comments on commit c011f8d

Please sign in to comment.