vue3.0中使用ref,并且调用elementPlus里面的tree树形组件里面的getCheckedNodes方法

<el-tree
						ref="treeRef"
						:data="nameList"
						:props="defaultProps"
						show-checkbox
						:default-expand-all="false"
						v-if="contro"
					/>
<script lang="ts">
import { defineComponent, reactive, toRefs, watch, ref, Ref } from 'vue';

	setup(props, { emit }) {
		const treeRef: Ref = ref(null);
function dataDetermination() {
			let nameListHandle: Array<any> = treeRef.value.getCheckedNodes();
return {
			treeRef,
			...toRefs(state),

你可能感兴趣的:(js,element,vue,vue.js,前端,javascript)