el-tree实现单选功能

示例

el-tree实现单选功能_第1张图片

 代码


			


    //树状图 单选
    const treeForm = ref(null)
	const treeCheck = (node, list) => {
		console.log(node)
		if (list.checkedKeys.length == 2) {
			treeForm.value.setCheckedKeys([node.id])
		}
	}

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