From 483c9123d4c5892e5b5b65fb1f943972ee8cc370 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 10 Jul 2026 21:34:18 +0800 Subject: [PATCH] fix: define missing sortOptions in page-display schema Homepage schema referenced an undeclared sortOptions constant, which threw ReferenceError during admin SPA router init and blanked the panel. Define the options list in sync with homepage_allowed_sorts(). --- .../admin/src/schema/sections/page-display/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/assets/admin/src/schema/sections/page-display/index.js b/assets/admin/src/schema/sections/page-display/index.js index b74e4f6a..8054bd6c 100644 --- a/assets/admin/src/schema/sections/page-display/index.js +++ b/assets/admin/src/schema/sections/page-display/index.js @@ -3,6 +3,18 @@ * Each key corresponds to a sub-page under the "页面&显示" section. */ +/** Homepage sort options — keep in sync with AKSRT_Settings_Home_Cms::homepage_allowed_sorts() */ +const sortOptions = [ + { label: '最近更新', value: 'modified' }, + { label: '发布时间', value: 'date' }, + { label: '浏览量', value: 'views' }, + { label: '点赞数', value: 'likes' }, + { label: '评论数', value: 'comments' }, + { label: '收藏数', value: 'favorites' }, + { label: '下载量', value: 'downloads' }, + { label: '随机', value: 'rand' }, +] + export const pageDisplaySchemas = { /** * Header navigation settings