From 6c987e3c0e54c2fb1f05b65d80ba7a33724b943c Mon Sep 17 00:00:00 2001
From: shikong <919411476@qq.com>
Date: Wed, 31 May 2023 22:16:24 +0800
Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E5=90=88=20amis=20=E5=AE=9E=E7=8E=B0?=
=?UTF-8?q?=E5=89=8D=E7=AB=AF=E7=95=8C=E9=9D=A2=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/pages/question.json | 165 ++++++++++++++++++++++++-----------
1 file changed, 116 insertions(+), 49 deletions(-)
diff --git a/frontend/pages/question.json b/frontend/pages/question.json
index 735520b..77214bb 100644
--- a/frontend/pages/question.json
+++ b/frontend/pages/question.json
@@ -45,6 +45,9 @@
},
"columnsCount": 1,
"card": {
+ "header": {
+ "title": "
$question
"
+ },
"body": [
{
"name": "id",
@@ -61,18 +64,6 @@
"label": "关键字",
"hidden": true
},
- {
- "name": "answer",
- "label": "答案",
-
- "type": "tpl",
- "tpl": "<%= data.answerMap.filter((_,index)=>{return (data.answer).toString(2).split('').reverse()[index] == '1'}) %>"
-
- },
- {
- "name": "question",
- "label": "题目"
- },
{
"name": "media_content",
"label": "图片",
@@ -83,44 +74,119 @@
"hiddenOn": "this.media_content == 'None'"
},
{
- "name": "option_a",
- "label": "A",
- "hiddenOn": "this.option_a.length == 0"
+ "type": "wrapper",
+ "body": [
+ {
+ "type": "tag",
+ "hiddenOn": "this.option_a.length == 0",
+ "color": "active",
+ "displayMode": "rounded",
+ "style": {
+ "backgroundColor": "#2468f2",
+ "borderColor": "#2468f2",
+ "color": "#fff",
+ "font-size": "16px"
+ },
+ "label": "A. ${option_a}"
+ },
+ {
+ "type": "tag",
+ "hiddenOn": "this.option_b.length == 0",
+ "color": "active",
+ "displayMode": "rounded",
+ "style": {
+ "backgroundColor": "#2468f2",
+ "borderColor": "#2468f2",
+ "color": "#fff",
+ "font-size": "16px"
+ },
+ "label": "B. ${option_b}"
+ },
+ {
+ "type": "tag",
+ "hiddenOn": "this.option_c.length == 0",
+ "color": "active",
+ "displayMode": "rounded",
+ "style": {
+ "backgroundColor": "#2468f2",
+ "borderColor": "#2468f2",
+ "color": "#fff",
+ "font-size": "16px"
+ },
+ "label": "C. ${option_c}"
+ },
+ {
+ "type": "tag",
+ "hiddenOn": "this.option_d.length == 0",
+ "color": "active",
+ "displayMode": "rounded",
+ "style": {
+ "backgroundColor": "#2468f2",
+ "borderColor": "#2468f2",
+ "color": "#fff",
+ "font-size": "16px"
+ },
+ "label": "D. ${option_d}"
+ },
+ {
+ "type": "tag",
+ "hiddenOn": "this.option_e.length == 0",
+ "color": "active",
+ "displayMode": "rounded",
+ "style": {
+ "backgroundColor": "#2468f2",
+ "borderColor": "#2468f2",
+ "color": "#fff",
+ "font-size": "16px"
+ },
+ "label": "E. ${option_e}"
+ },
+ {
+ "type": "tag",
+ "hiddenOn": "this.option_f.length == 0",
+ "color": "active",
+ "displayMode": "rounded",
+ "style": {
+ "backgroundColor": "#2468f2",
+ "borderColor": "#2468f2",
+ "color": "#fff",
+ "font-size": "16px"
+ },
+ "label": "F. ${option_f}"
+ },
+ {
+ "type": "tag",
+ "hiddenOn": "this.option_g.length == 0",
+ "color": "active",
+ "displayMode": "rounded",
+ "style": {
+ "backgroundColor": "#2468f2",
+ "borderColor": "#2468f2",
+ "color": "#fff",
+ "font-size": "16px"
+ },
+ "label": "G. ${option_g}"
+ },
+ {
+ "type": "tag",
+ "hiddenOn": "this.option_h.length == 0",
+ "color": "active",
+ "displayMode": "rounded",
+ "style": {
+ "backgroundColor": "#2468f2",
+ "borderColor": "#2468f2",
+ "color": "#fff",
+ "font-size": "16px"
+ },
+ "label": "H. ${option_h}"
+ }
+ ]
},
{
- "name": "option_b",
- "label": "B",
- "hiddenOn": "this.option_b.length == 0"
- },
- {
- "name": "option_c",
- "label": "C",
- "hiddenOn": "this.option_c.length == 0"
- },
- {
- "name": "option_d",
- "label": "D",
- "hiddenOn": "this.option_d.length == 0"
- },
- {
- "name": "option_e",
- "label": "E",
- "hiddenOn": "this.option_e.length == 0"
- },
- {
- "name": "option_f",
- "label": "F",
- "hiddenOn": "this.option_f.length == 0"
- },
- {
- "name": "option_g",
- "label": "G",
- "hiddenOn": "this.option_g.length == 0"
- },
- {
- "name": "option_h",
- "label": "H",
- "hiddenOn": "this.option_h.length == 0"
+ "name": "answer",
+ "label": "答案",
+ "type": "tpl",
+ "tpl": "<%= data.answerMap.filter((_,index)=>{return (data.answer).toString(2).split('').reverse()[index] == '1'}) %>"
},
{
"name": "explain",
@@ -134,7 +200,8 @@
},
{
"name": "knack",
- "label": "窍门"
+ "label": "窍门",
+ "hiddenOn": "this.media_content == 'None' || this.media_content.length == 0"
},
{
"name": "concise_explain",