refactor(tree): 树形组件重构优化暂存

This commit is contained in:
落小梅
2021-10-18 19:10:36 +08:00
parent f22e123be0
commit 8bb751699f
8 changed files with 109 additions and 96 deletions

View File

@@ -6,4 +6,4 @@ Component.install = (app: App) => {
app.component(Component.name || 'LayCarouselItem', Component)
}
export default Component as IDefineComponent
export default Component as IDefineComponent

View File

@@ -6,10 +6,9 @@
<script setup name="LayCarouselItem" lang="ts">
import { defineProps, inject } from 'vue'
const props =
defineProps<{
id: string
}>()
const props = defineProps<{
id: string
}>()
const active = inject('active')
</script>
</script>

View File

@@ -9,9 +9,9 @@
>
{{ ss.props.title }}
<i
@click.stop="close(ss.props.id)"
v-if="allowClose"
class="layui-icon layui-icon-close layui-unselect layui-tab-close"
@click.stop="close(ss.props.id)"
></i>
</li>
</ul>
@@ -42,7 +42,7 @@ const active = computed({
},
set(val) {
emit('update:modelValue', val)
}
},
})
const change = function (id: any) {