From 915d437941421c33f5a1d84af350c7b159260387 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Thu, 6 Mar 2025 17:14:41 +0800 Subject: [PATCH] =?UTF-8?q?amis=E8=B0=83=E7=94=A8vue=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/views/Home.vue | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 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() + } + } + ] + } + } + } + ] } }, )