Files
spring-boot-server-template/client/src/views/Home.vue
2025-03-10 16:06:12 +08:00

52 lines
1.1 KiB
Vue

<script setup>
import {createApp, onMounted} from 'vue'
import {amisRender} from '@/utils.js'
import Flow from "@/components/Flow.vue";
const toastMessage = () => {
alert('click in vue')
}
onMounted(() => {
amisRender(
'#amis-home',
information => {
return {
type: 'page',
body: [
"Home",
{
type: 'action',
label: '点击',
onEvent: {
click: {
actions: [
{
actionType: 'custom',
script: (context, doAction, event) => {
toastMessage()
}
}
]
}
}
},
{
type: 'custom',
onMount: (dom, value, onChange, props) => {
createApp(Flow).mount(dom)
}
}
]
}
},
)
})
</script>
<template>
<div id="amis-home"></div>
</template>
<style scoped>
</style>