1122
This commit is contained in:
39
cdTMP/src/components/ma-form/formItem/form-link.vue
Normal file
39
cdTMP/src/components/ma-form/formItem/form-link.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
- MineAdmin is committed to providing solutions for quickly building web applications
|
||||
- Please view the LICENSE file that was distributed with this source code,
|
||||
- For the full copyright and license information.
|
||||
- Thank you very much for using MineAdmin.
|
||||
-
|
||||
- @Author X.Mo<root@imoi.cn>
|
||||
- @Link https://gitee.com/xmo/mineadmin-vue
|
||||
-->
|
||||
<template>
|
||||
<slot :name="`form-${props.component.dataIndex}`" v-bind="props.component">
|
||||
<a-link
|
||||
:status="props.component.status"
|
||||
:hoverable="props.component.hoverable"
|
||||
:disabled="props.component.disabled"
|
||||
:loading="props.component.loading"
|
||||
:href="props.component.href"
|
||||
@click="maEvent.handleCommonEvent(props.component, 'onClick')"
|
||||
>
|
||||
<template #icon v-if="props.component.icon">
|
||||
<component :is="props.component.icon" />
|
||||
</template>
|
||||
{{ props.component.title ?? "link" }}
|
||||
</a-link>
|
||||
</slot>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted } from "vue"
|
||||
import { maEvent } from "../js/formItemMixin.js"
|
||||
const props = defineProps({
|
||||
component: Object
|
||||
})
|
||||
|
||||
maEvent.handleCommonEvent(props.component, "onCreated")
|
||||
onMounted(() => {
|
||||
maEvent.handleCommonEvent(props.component, "onMounted")
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user