style(prettier): reset code style with prettier
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user