集成 prettier 插件, 新增 npm run lint:prettier 命令
This commit is contained in:
@@ -2,25 +2,24 @@
|
||||
<dd :class="[selectedKey === id ? 'layui-this' : '']" @click="selectHandle()">
|
||||
<slot v-if="slots.title" name="title"></slot>
|
||||
<a v-else href="javascript:void(0)">
|
||||
{{title}}
|
||||
{{ title }}
|
||||
</a>
|
||||
</dd>
|
||||
</template>
|
||||
|
||||
<script setup name="LayMenuChildItem" lang="ts">
|
||||
import { defineProps, inject, Ref, useSlots } from 'vue'
|
||||
import { defineProps, inject, Ref, useSlots } from "vue";
|
||||
|
||||
const slots = useSlots()
|
||||
const slots = useSlots();
|
||||
|
||||
const props =
|
||||
defineProps<{
|
||||
id: string
|
||||
title: string
|
||||
}>()
|
||||
const props = defineProps<{
|
||||
id: string;
|
||||
title: string;
|
||||
}>();
|
||||
|
||||
const selectedKey: Ref<string> = inject('selectedKey') as Ref<string>
|
||||
const selectedKey: Ref<string> = inject("selectedKey") as Ref<string>;
|
||||
|
||||
const selectHandle = function () {
|
||||
selectedKey.value = props.id
|
||||
}
|
||||
selectedKey.value = props.id;
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user