From 15b70f1916447b09507195ea76e8934b9c228d96 Mon Sep 17 00:00:00 2001 From: zhangkang <57750083+zhangkang1314@users.noreply.github.com> Date: Mon, 18 Sep 2023 19:45:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8A=A8=E6=80=81=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E8=A1=A8=E8=84=9A=E6=9C=AC=E7=BC=96=E5=86=99=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/template/script.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/template/script.md b/docs/template/script.md index af1b393..8f89d3c 100644 --- a/docs/template/script.md +++ b/docs/template/script.md @@ -63,3 +63,24 @@ if (data.state === 3) { util.message.info('选中数据标识: ' + data.srfkey); } ``` + +## 动态样式表脚本编写示例 + +1、字符串 + +```javascript +data.showbg ? "bg-sky-blue" : "" +``` + +2、对象 + +```javascript +{"bg-sky-blue":data.showbg} +``` + +3、数组 + +```javascript +[{"bg-sky-blue":data.showbg}] +``` + -- Gitee