Skip to content

Commit c011f8d

Browse files
authored
chore(TreeSelect): support scrolling to the selected element position during initialization (#3364)
* chore(TreeSelect): support scrolling to the selected element position during initialization * chore: update grid and side-bar demo * test: update snapshots
1 parent cfddcb1 commit c011f8d

File tree

48 files changed

+812
-158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+812
-158
lines changed

src/checkbox/checkbox.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ export default class CheckBox extends SuperComponent {
5656
type: String,
5757
value: 'default',
5858
},
59+
tId: {
60+
type: String,
61+
},
5962
};
6063

6164
data = {

src/checkbox/checkbox.wxml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<wxs src="../common/utils.wxs" module="_" />
22

33
<view
4+
id="{{tId}}"
45
style="{{_._style([style, customStyle])}}"
56
class="{{_.cls(classPrefix, [placement, theme, ['checked', checked], ['block', block]])}} class {{prefix}}-class"
67
aria-role="checkbox"

src/common/version.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ export function canIUseFormFieldButton() {
4848
export function canUseVirtualHost() {
4949
return judgeByVersion('2.19.2');
5050
}
51+
52+
export function canUseProxyScrollView() {
53+
return judgeByVersion('2.19.2');
54+
}

src/dropdown-menu/__test__/__snapshots__/index.test.js.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ exports[`dropdown-menu :base 1`] = `
143143
ariaRole="radio"
144144
class="t-radio t-radio--left t-radio--block class t-class"
145145
disabled="{{null}}"
146+
id=""
146147
style=""
147148
tabindex=""
148149
mut-bind:tap="handleTap"
@@ -192,6 +193,7 @@ exports[`dropdown-menu :base 1`] = `
192193
ariaRole="radio"
193194
class="t-radio t-radio--left t-radio--block class t-class"
194195
disabled="{{null}}"
196+
id=""
195197
style=""
196198
tabindex=""
197199
mut-bind:tap="handleTap"
@@ -241,6 +243,7 @@ exports[`dropdown-menu :base 1`] = `
241243
ariaRole="radio"
242244
class="t-radio t-radio--left t-radio--block class t-class"
243245
disabled="{{null}}"
246+
id=""
244247
style=""
245248
tabindex=""
246249
mut-bind:tap="handleTap"
@@ -303,6 +306,7 @@ exports[`dropdown-menu :base 1`] = `
303306
ariaRole="radio"
304307
class="t-radio t-radio--left t-radio--block class t-class"
305308
disabled="{{null}}"
309+
id=""
306310
style=""
307311
tabindex=""
308312
mut-bind:tap="handleTap"
@@ -352,6 +356,7 @@ exports[`dropdown-menu :base 1`] = `
352356
ariaRole="radio"
353357
class="t-radio t-radio--left t-radio--block class t-class"
354358
disabled="{{null}}"
359+
id=""
355360
style=""
356361
tabindex=""
357362
mut-bind:tap="handleTap"
@@ -401,6 +406,7 @@ exports[`dropdown-menu :base 1`] = `
401406
ariaRole="radio"
402407
class="t-radio t-radio--left t-radio--block class t-class"
403408
disabled="{{null}}"
409+
id=""
404410
style=""
405411
tabindex=""
406412
mut-bind:tap="handleTap"
@@ -450,6 +456,7 @@ exports[`dropdown-menu :base 1`] = `
450456
ariaRole="radio"
451457
class="t-radio t-radio--left t-radio--block class t-class"
452458
disabled="{{null}}"
459+
id=""
453460
style=""
454461
tabindex=""
455462
mut-bind:tap="handleTap"
@@ -499,6 +506,7 @@ exports[`dropdown-menu :base 1`] = `
499506
ariaRole="radio"
500507
class="t-radio t-radio--left t-radio--block class t-class"
501508
disabled="{{null}}"
509+
id=""
502510
style=""
503511
tabindex=""
504512
mut-bind:tap="handleTap"
@@ -548,6 +556,7 @@ exports[`dropdown-menu :base 1`] = `
548556
ariaRole="radio"
549557
class="t-radio t-radio--left t-radio--block class t-class"
550558
disabled="{{true}}"
559+
id=""
551560
style=""
552561
tabindex=""
553562
mut-bind:tap="handleTap"

0 commit comments

Comments
 (0)