From a422e4fee1897a10559c4a79c30522e6fa89ff1d Mon Sep 17 00:00:00 2001 From: liuzhihang Date: Sun, 20 Nov 2022 14:01:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=8F=B3=E4=B8=8A=E8=A7=92=E5=85=AD=E7=AF=87=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 35 +++++++++++++++++++++++- templates/modules/widgets/top-group.html | 30 ++++++++++++++++++-- 2 files changed, 61 insertions(+), 4 deletions(-) diff --git a/settings.yaml b/settings.yaml index ab1d3d91..9fa5ab80 100644 --- a/settings.yaml +++ b/settings.yaml @@ -173,6 +173,39 @@ spec: label: 今日推荐背景图 placeholder: 请输入地址 validation: "url" + - $formkit: select + if: "$get(recentTop).value" + name: recommendPost + id: recommendPost + key: recommendPost + label: 推荐文章 + value: latest + options: + - label: 最新文章 + value: latest + - label: 自定义 + value: custom + - $formkit: repeater + if: "$get(recommendPost).value === custom" + name: recommendPostCustom + label: 自定义文章 + help: "建议设置六篇文章" + value: + - url: + title: + cover: + children: + - $formkit: url + name: url + label: 链接 + validation: "url" + - $formkit: text + name: title + label: 标题 + - $formkit: url + name: cover + label: 封面地址 + validation: "url" - group: layout label: 布局 @@ -337,7 +370,7 @@ spec: - $formkit: text name: name label: 名称 - - $formkit: text + - $formkit: url name: url label: 链接 validation: "url" diff --git a/templates/modules/widgets/top-group.html b/templates/modules/widgets/top-group.html index a0267265..a799a99f 100644 --- a/templates/modules/widgets/top-group.html +++ b/templates/modules/widgets/top-group.html @@ -1,9 +1,12 @@ - -
-
+ +