style(prettier): reset code style with prettier
This commit is contained in:
@@ -6,4 +6,4 @@ Component.install = (app: App) => {
|
||||
app.component(Component.name || 'LayCollapseItem', Component)
|
||||
}
|
||||
|
||||
export default Component as IDefineComponent
|
||||
export default Component as IDefineComponent
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title" @click="showHandle">
|
||||
{{ title }}<i class="layui-icon layui-colla-icon">{{ isShow ? "":"" }}</i>
|
||||
{{ title
|
||||
}}<i class="layui-icon layui-colla-icon">{{ isShow ? '' : '' }}</i>
|
||||
</h2>
|
||||
<div class="layui-colla-content" :class="isShow ? 'layui-show':''">
|
||||
<div class="layui-colla-content" :class="isShow ? 'layui-show' : ''">
|
||||
<p>
|
||||
<slot></slot>
|
||||
<slot />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -14,17 +15,14 @@
|
||||
<script setup name="LayCollapseItem" lang="ts">
|
||||
import { defineProps, Ref, ref } from 'vue'
|
||||
|
||||
const props =
|
||||
defineProps<{
|
||||
show?: boolean
|
||||
title?: string
|
||||
}>()
|
||||
const props = defineProps<{
|
||||
show?: boolean
|
||||
title?: string
|
||||
}>()
|
||||
|
||||
const isShow = ref(props.show) as Ref
|
||||
|
||||
const showHandle = function() {
|
||||
const showHandle = function () {
|
||||
isShow.value = !isShow.value
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user