perf(table): 新增 size 配置, 支持不同尺寸

This commit is contained in:
就眠仪式
2021-10-20 14:07:03 +08:00
parent e04b53988a
commit ba6de34bdb
5 changed files with 103 additions and 21 deletions

View File

@@ -15,19 +15,20 @@
<script setup name="LayCollapseItem" lang="ts">
import { defineProps, inject, ref } from 'vue'
const props = defineProps<{
id: string
title: string
}>()
const props =
defineProps<{
id: string
title: string
}>()
const openKeys = inject("openKeys") as String[]
const openKeys = inject('openKeys') as String[]
const isShow = ref(openKeys.includes(props.id))
const showHandle = function () {
isShow.value = !isShow.value
if(openKeys.indexOf(props.id) != -1) {
openKeys.splice(openKeys.indexOf(props.id),1)
if (openKeys.indexOf(props.id) != -1) {
openKeys.splice(openKeys.indexOf(props.id), 1)
} else {
openKeys.push(props.id)
}