vue3+ts+elementui-plus secondary encapsulation tree form

Just copy and paste:

1. Define the table component

<template>
	<div class='main'>
		<div>
			<el-table ref="multipleTableRef" :height="height" :default-expand-all="isExpend" :data="treeTableData"
				style="width: 100%; margin-bottom: 20px" row-key="id" border>
				<el-table-column :width="item.width" :fixed="item.fixed" show-overflow-tooltip align="center"
					v-for="(item, i) in treeTableProps" :key="i" :label="item.label">
					<template #default="scope">
						<!-- 自定义插槽展示 -->
						<slot v-if="item.slot" :name="item.prop" :scope="scope"></slot>
						<!-- 非自定义处理(判空) -->
						<span v-else-if="scope.ro

Guess you like

Origin blog.csdn.net/qq_41579104/article/details/131917667