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

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

View File

@@ -1,31 +1,33 @@
<template>
<dd :value="value" @click="selectHandle" :class="[selectItem.value === value?'layui-this':'']">
{{label}}
</dd>
<dd
:value="value"
:class="[selectItem.value === value ? 'layui-this' : '']"
@click="selectHandle"
>
{{ label }}
</dd>
</template>
<script setup name="LaySelectOption" lang="ts">
import { SelectItem } from '../type'
import { defineProps, inject } from 'vue'
const props =
defineProps<{
value?: string
label?: string
}>()
const props = defineProps<{
value?: string
label?: string
}>()
const selectItem = inject("selectItem") as SelectItem
const selectItem = inject('selectItem') as SelectItem
const selectHandle = function(){
const selectHandle = function () {
selectItem.value = props.value
selectItem.label = props.label
}
// init selected
if(selectItem.value === props.value) {
if (selectItem.value === props.value) {
selectItem.value = props.value
selectItem.label = props.label
}
</script>