diff --git a/client/src/views/Home.vue b/client/src/views/Home.vue index aa42520..9422c1c 100644 --- a/client/src/views/Home.vue +++ b/client/src/views/Home.vue @@ -2,13 +2,35 @@ import {onMounted} from 'vue' import {amisRender} from '../utils.js' +const toastMessage = () => { + alert('click in vue') +} + onMounted(() => { amisRender( '#amis-home', information => { return { type: 'page', - body: 'Home' + body: [ + "Home", + { + type: 'action', + label: '点击', + onEvent: { + click: { + actions: [ + { + actionType: 'custom', + script: (context, doAction, event) => { + toastMessage() + } + } + ] + } + } + } + ] } }, )