111
This commit is contained in:
26
Web/src/components/Base/Acheak.vue
Normal file
26
Web/src/components/Base/Acheak.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<Abutton @click="handleClick" v-if="onValue != onCheak">
|
||||
<slot></slot>
|
||||
</Abutton>
|
||||
|
||||
<span v-if="onValue == onCheak">
|
||||
<slot></slot>
|
||||
</span>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
// 1. 定义接收父组件传来的参数 props
|
||||
const props = defineProps({
|
||||
// 字段名、类型、默认值
|
||||
href: String,
|
||||
onValue: String,
|
||||
onCheak: String
|
||||
|
||||
})
|
||||
|
||||
const emit = defineEmits(['click'])
|
||||
// 定义 click 事件
|
||||
const handleClick = (): any => {
|
||||
emit('click')
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user