feat(tree): 完成树形组件复选框功能

This commit is contained in:
落小梅
2021-10-14 16:39:06 +08:00
parent eef31c72af
commit 377171ab94
7 changed files with 82 additions and 71 deletions

View File

@@ -21,14 +21,13 @@
<script setup name="LayCheckbox" lang="ts">
import { defineProps, ref } from 'vue'
const props =
defineProps<{
modelValue: string[]
label: string
disabled?: boolean
name?: string
skin?: string
}>()
const props = defineProps<{
modelValue: string[]
label: string
disabled?: boolean
name?: string
skin?: string
}>()
const hasValue = ref(false)
@@ -45,4 +44,4 @@ const handleClick = function () {
emit('update:modelValue', props.modelValue)
}
}
</script>
</script>

View File

@@ -14,7 +14,12 @@
<div class="layui-inline" title="筛选列" lay-event="LAYTABLE_COLS">
<i class="layui-icon layui-icon-cols" />
</div>
<div class="layui-inline" title="打印" lay-event="LAYTABLE_PRINT" @click="print()">
<div
class="layui-inline"
title="打印"
lay-event="LAYTABLE_PRINT"
@click="print()"
>
<i class="layui-icon layui-icon-print" />
</div>
</div>
@@ -54,9 +59,9 @@
<td v-if="checkbox" class="layui-table-col-special">
<div class="layui-table-cell laytable-cell-checkbox">
<table-item-checkbox
v-model="tableSelectedKeys"
skin="primary"
:label="data[id]"
v-model="tableSelectedKeys"
>
</table-item-checkbox>
</div>