feat(TreeSelect): add dot option (#4433)
This commit is contained in:
@@ -24,16 +24,22 @@
|
||||
</template>
|
||||
</van-tree-select>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('showInfo')">
|
||||
<van-tree-select height="55vw" :items="infoItems" :active-id.sync="activeId2" :main-active-index.sync="activeIndex4" />
|
||||
</demo-block>
|
||||
</demo-section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { zhCNData } from './data.zh-CN';
|
||||
import { enUSData } from './data.en-US';
|
||||
import { deepClone } from '../../utils/deep-clone';
|
||||
|
||||
export default {
|
||||
i18n: {
|
||||
'zh-CN': {
|
||||
showInfo: '提示信息',
|
||||
radioMode: '单选模式',
|
||||
multipleMode: '多选模式',
|
||||
customContent: '自定义内容',
|
||||
@@ -41,6 +47,7 @@ export default {
|
||||
dataSimple: [{ text: '分组 1' }, { text: '分组 2' }]
|
||||
},
|
||||
'en-US': {
|
||||
showInfo: 'Show Info',
|
||||
radioMode: 'Radio Mode',
|
||||
multipleMode: 'Multiple Mode',
|
||||
customContent: 'Custom Content',
|
||||
@@ -56,7 +63,8 @@ export default {
|
||||
activeIds: [1, 2],
|
||||
activeIndex: 0,
|
||||
activeIndex2: 0,
|
||||
activeIndex3: 0
|
||||
activeIndex3: 0,
|
||||
activeIndex4: 0
|
||||
};
|
||||
},
|
||||
|
||||
@@ -67,6 +75,15 @@ export default {
|
||||
|
||||
simpleItems() {
|
||||
return this.$t('dataSimple');
|
||||
},
|
||||
|
||||
infoItems() {
|
||||
const data = deepClone(this.$t('data')).slice(0, 2);
|
||||
|
||||
data[0].dot = true;
|
||||
data[1].info = 5;
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user