style(prettier): reset code style with prettier

This commit is contained in:
落小梅
2021-10-12 11:30:07 +08:00
parent aee99c49c9
commit 2b59e008f3
148 changed files with 4296 additions and 4191 deletions

View File

@@ -3,7 +3,7 @@ import Component from './index.vue'
import type { IDefineComponent } from '../type/index'
Component.install = (app: App) => {
app.component(Component.name || 'LayTab', Component)
app.component(Component.name || 'LayTab', Component)
}
export default Component as IDefineComponent

View File

@@ -2,16 +2,16 @@
<div class="layui-tab" :class="[type ? 'layui-tab-' + type : '']">
<ul class="layui-tab-title">
<li
@click="change(ss.props.id)"
v-for="ss in slots"
:key="ss"
:class="[ss.props.id === modelValue ? 'layui-this' : '']"
@click="change(ss.props.id)"
>
{{ ss.props.title }}
</li>
</ul>
<div class="layui-tab-content">
<slot></slot>
<slot />
</div>
</div>
</template>
@@ -22,11 +22,10 @@ import { defineProps, inject, provide, ref, useSlots } from 'vue'
const slot = useSlots() as any
const slots = slot.default && slot.default()
const props =
defineProps<{
type?: string
modelValue?: string
}>()
const props = defineProps<{
type?: string
modelValue?: string
}>()
// select update 时, 通知 change 事件
const emit = defineEmits(['update:modelValue'])
@@ -38,5 +37,5 @@ const change = function (id: any) {
active.value = id
}
provide("active",active)
provide('active', active)
</script>