From 21489ca4f8b03f9f03955312b39d67e050ff4e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Thu, 20 May 2021 10:41:35 +0800 Subject: [PATCH] add call method --- doric-demo/src/SimpleDemo.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doric-demo/src/SimpleDemo.ts b/doric-demo/src/SimpleDemo.ts index 6f212aa8..bc62f390 100644 --- a/doric-demo/src/SimpleDemo.ts +++ b/doric-demo/src/SimpleDemo.ts @@ -19,7 +19,10 @@ class SimpleDemo extends Panel { layoutConfig: layoutConfig().fit().configMargin({ top: 23, right: 23 - }).configAlignment(gravity().right()) + }).configAlignment(gravity().right()), + onClick: () => { + context.callNative('cp_introduce_view', 'showRule') + } }), text({ text: " 购买并开启1个誓言礼盒\r\n即可获得1个邀请组CP的道具", @@ -73,7 +76,6 @@ class SimpleDemo extends Panel { width: 400, height: 759, layoutConfig: layoutConfig().just(), - backgroundColor: Color.RED }), { layoutConfig: layoutConfig().most(), })