mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(TreeSelect): make document consistent with demo (#11136)
This commit is contained in:
parent
f595d41b3b
commit
685351799e
@ -41,15 +41,18 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{ text: 'Delaware', id: 1 },
|
{ text: 'Delaware', id: 1 },
|
||||||
{ text: 'Florida', id: 2 },
|
{ text: 'Florida', id: 2 },
|
||||||
|
{ text: 'Georqia', id: 3, disabled: true },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Group 2',
|
text: 'Group 2',
|
||||||
children: [
|
children: [
|
||||||
{ text: 'Alabama', id: 5 },
|
{ text: 'Alabama', id: 4 },
|
||||||
{ text: 'Kansas', id: 6 },
|
{ text: 'Kansas', id: 5 },
|
||||||
|
{ text: 'Louisiana', id: 6 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{ text: 'Group 3', disabled: true },
|
||||||
];
|
];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -84,15 +87,18 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{ text: 'Delaware', id: 1 },
|
{ text: 'Delaware', id: 1 },
|
||||||
{ text: 'Florida', id: 2 },
|
{ text: 'Florida', id: 2 },
|
||||||
|
{ text: 'Georqia', id: 3, disabled: true },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Group 2',
|
text: 'Group 2',
|
||||||
children: [
|
children: [
|
||||||
{ text: 'Alabama', id: 5 },
|
{ text: 'Alabama', id: 4 },
|
||||||
{ text: 'Kansas', id: 6 },
|
{ text: 'Kansas', id: 5 },
|
||||||
|
{ text: 'Louisiana', id: 6 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{ text: 'Group 3', disabled: true },
|
||||||
];
|
];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -158,8 +164,24 @@ export default {
|
|||||||
return {
|
return {
|
||||||
activeIndex,
|
activeIndex,
|
||||||
items: [
|
items: [
|
||||||
{ text: 'Group 1', children: [], dot: true },
|
{
|
||||||
{ text: 'Group 2', children: [], badge: 5 },
|
text: 'Group 1',
|
||||||
|
children: [
|
||||||
|
{ text: 'Delaware', id: 1 },
|
||||||
|
{ text: 'Florida', id: 2 },
|
||||||
|
{ text: 'Georqia', id: 3, disabled: true },
|
||||||
|
],
|
||||||
|
dot: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Group 2',
|
||||||
|
children: [
|
||||||
|
{ text: 'Alabama', id: 4 },
|
||||||
|
{ text: 'Kansas', id: 5 },
|
||||||
|
{ text: 'Louisiana', id: 6 },
|
||||||
|
],
|
||||||
|
badge: 5,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -43,15 +43,18 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{ text: '杭州', id: 1 },
|
{ text: '杭州', id: 1 },
|
||||||
{ text: '温州', id: 2 },
|
{ text: '温州', id: 2 },
|
||||||
|
{ text: '宁波', id: 3, disabled: true },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '江苏',
|
text: '江苏',
|
||||||
children: [
|
children: [
|
||||||
{ text: '南京', id: 5 },
|
{ text: '南京', id: 4 },
|
||||||
{ text: '无锡', id: 6 },
|
{ text: '无锡', id: 5 },
|
||||||
|
{ text: '徐州', id: 6 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{ text: '福建', disabled: true },
|
||||||
];
|
];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -88,15 +91,18 @@ export default {
|
|||||||
children: [
|
children: [
|
||||||
{ text: '杭州', id: 1 },
|
{ text: '杭州', id: 1 },
|
||||||
{ text: '温州', id: 2 },
|
{ text: '温州', id: 2 },
|
||||||
|
{ text: '宁波', id: 3, disabled: true },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '江苏',
|
text: '江苏',
|
||||||
children: [
|
children: [
|
||||||
{ text: '南京', id: 5 },
|
{ text: '南京', id: 4 },
|
||||||
{ text: '无锡', id: 6 },
|
{ text: '无锡', id: 5 },
|
||||||
|
{ text: '徐州', id: 6 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{ text: '福建', disabled: true },
|
||||||
];
|
];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -166,8 +172,24 @@ export default {
|
|||||||
return {
|
return {
|
||||||
activeIndex,
|
activeIndex,
|
||||||
items: [
|
items: [
|
||||||
{ text: '浙江', children: [], dot: true },
|
{
|
||||||
{ text: '江苏', children: [], badge: 5 },
|
text: '浙江',
|
||||||
|
children: [
|
||||||
|
{ text: '杭州', id: 1 },
|
||||||
|
{ text: '温州', id: 2 },
|
||||||
|
{ text: '宁波', id: 3, disabled: true },
|
||||||
|
],
|
||||||
|
dot: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '江苏',
|
||||||
|
children: [
|
||||||
|
{ text: '南京', id: 4 },
|
||||||
|
{ text: '无锡', id: 5 },
|
||||||
|
{ text: '徐州', id: 6 },
|
||||||
|
],
|
||||||
|
badge: 5,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -12,39 +12,31 @@ const group1 = [
|
|||||||
id: 3,
|
id: 3,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
text: 'Indiana',
|
|
||||||
id: 4,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const group2 = [
|
const group2 = [
|
||||||
{
|
{
|
||||||
text: 'Alabama',
|
text: 'Alabama',
|
||||||
id: 5,
|
id: 4,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Kansas',
|
text: 'Kansas',
|
||||||
id: 6,
|
id: 5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Louisiana',
|
text: 'Louisiana',
|
||||||
id: 7,
|
id: 6,
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'Texas',
|
|
||||||
id: 8,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const group3 = [
|
const group3 = [
|
||||||
{
|
{
|
||||||
text: 'Alabama',
|
text: 'Alabama',
|
||||||
id: 9,
|
id: 7,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Kansas',
|
text: 'Kansas',
|
||||||
id: 10,
|
id: 8,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -12,39 +12,31 @@ const zhejiang = [
|
|||||||
id: 3,
|
id: 3,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
text: '义乌',
|
|
||||||
id: 4,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const jiangsu = [
|
const jiangsu = [
|
||||||
{
|
{
|
||||||
text: '南京',
|
text: '南京',
|
||||||
id: 5,
|
id: 4,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '无锡',
|
text: '无锡',
|
||||||
id: 6,
|
id: 5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '徐州',
|
text: '徐州',
|
||||||
id: 7,
|
id: 6,
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '苏州',
|
|
||||||
id: 8,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const fujian = [
|
const fujian = [
|
||||||
{
|
{
|
||||||
text: '泉州',
|
text: '泉州',
|
||||||
id: 9,
|
id: 7,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '厦门',
|
text: '厦门',
|
||||||
id: 10,
|
id: 8,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -47,9 +47,6 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<div class="van-ellipsis van-tree-select__item van-tree-select__item--disabled">
|
<div class="van-ellipsis van-tree-select__item van-tree-select__item--disabled">
|
||||||
Georqia
|
Georqia
|
||||||
</div>
|
</div>
|
||||||
<div class="van-ellipsis van-tree-select__item">
|
|
||||||
Indiana
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -101,9 +98,6 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<div class="van-ellipsis van-tree-select__item van-tree-select__item--disabled">
|
<div class="van-ellipsis van-tree-select__item van-tree-select__item--disabled">
|
||||||
Georqia
|
Georqia
|
||||||
</div>
|
</div>
|
||||||
<div class="van-ellipsis van-tree-select__item">
|
|
||||||
Indiana
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -185,9 +179,6 @@ exports[`should render demo and match snapshot 1`] = `
|
|||||||
<div class="van-ellipsis van-tree-select__item van-tree-select__item--disabled">
|
<div class="van-ellipsis van-tree-select__item van-tree-select__item--disabled">
|
||||||
Georqia
|
Georqia
|
||||||
</div>
|
</div>
|
||||||
<div class="van-ellipsis van-tree-select__item">
|
|
||||||
Indiana
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user