mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-25 02:58:43 +08:00
chore(demo): basicTree组件增加icon 和 switcherIcon示例
This commit is contained in:
parent
a0b2a9e949
commit
e4bcf8c899
@ -4,6 +4,7 @@ export const treeData: TreeItem[] = [
|
|||||||
{
|
{
|
||||||
title: 'parent ',
|
title: 'parent ',
|
||||||
key: '0-0',
|
key: '0-0',
|
||||||
|
icon: 'ion:settings-outline',
|
||||||
children: [
|
children: [
|
||||||
{ title: 'leaf', key: '0-0-0' },
|
{ title: 'leaf', key: '0-0-0' },
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
<Row :gutter="[16, 16]">
|
<Row :gutter="[16, 16]">
|
||||||
<Col :span="8">
|
<Col :span="8">
|
||||||
<BasicTree title="基础示例,默认展开第一层" :treeData="treeData" defaultExpandLevel="1">
|
<BasicTree title="基础示例,默认展开第一层" :treeData="treeData" defaultExpandLevel="1">
|
||||||
<template #title> 123123 </template>
|
<template #icon><SmileTwoTone /></template>
|
||||||
|
<template #title>666</template>
|
||||||
|
<template #switcherIcon> <CarryOutOutlined /></template>
|
||||||
</BasicTree>
|
</BasicTree>
|
||||||
</Col>
|
</Col>
|
||||||
<Col :span="8">
|
<Col :span="8">
|
||||||
@ -62,6 +64,7 @@
|
|||||||
import { cloneDeep, uniq } from 'lodash-es';
|
import { cloneDeep, uniq } from 'lodash-es';
|
||||||
import { isArray } from '/@/utils/is';
|
import { isArray } from '/@/utils/is';
|
||||||
import { type Nullable } from '@vben/types';
|
import { type Nullable } from '@vben/types';
|
||||||
|
import { SmileTwoTone, CarryOutOutlined } from '@ant-design/icons-vue';
|
||||||
|
|
||||||
const asyncTreeRef = ref<Nullable<TreeActionType>>(null);
|
const asyncTreeRef = ref<Nullable<TreeActionType>>(null);
|
||||||
const asyncExpandTreeRef = ref<Nullable<TreeActionType>>(null);
|
const asyncExpandTreeRef = ref<Nullable<TreeActionType>>(null);
|
||||||
|
Loading…
Reference in New Issue
Block a user