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 || 'LayMenuChildItem', Component)
|
||||
app.component(Component.name || 'LayMenuChildItem', Component)
|
||||
}
|
||||
|
||||
export default Component as IDefineComponent
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<dd :class="[selectKey === id ? 'layui-this':'']" @click="selectHandle()">
|
||||
<dd :class="[selectKey === id ? 'layui-this' : '']" @click="selectHandle()">
|
||||
<a href="javascript:void(0)">{{ title }}</a>
|
||||
</dd>
|
||||
</template>
|
||||
@@ -7,15 +7,14 @@
|
||||
<script setup name="LayMenuChildItem" lang="ts">
|
||||
import { defineProps, inject, Ref } from 'vue'
|
||||
|
||||
const props =
|
||||
defineProps<{
|
||||
id: string
|
||||
title: string
|
||||
}>()
|
||||
const props = defineProps<{
|
||||
id: string
|
||||
title: string
|
||||
}>()
|
||||
|
||||
const selectKey: Ref<String> = inject("selectKey") as Ref<String>
|
||||
const selectKey: Ref<string> = inject('selectKey') as Ref<string>
|
||||
|
||||
const selectHandle = function() {
|
||||
selectKey.value = props.id
|
||||
const selectHandle = function () {
|
||||
selectKey.value = props.id
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user