From f7ece9135ac58bb7d7d37f826bb0de9a995d4568 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Sat, 24 Dec 2022 12:14:30 +0800 Subject: [PATCH] refactor: add validation for post and singlePage settings form (#791) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement #### What this PR does / why we need it: 重构文章和自定义页面的设置表单,支持提交时验证表单。 > 因为之前的多选项卡设计导致无法同时验证所有表单,所以这个 PR 重构了表单的布局。 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/2859 #### Screenshots: ![2022-12-21 17 23 22](https://user-images.githubusercontent.com/21301288/208870059-5039a565-def2-4622-9a78-de30dceb4d65.gif) #### Special notes for your reviewer: 测试方式: 1. 测试在内容编辑页面和列表打开文章和自定义页面的设置表单。 2. 检查表单验证是否有效。 #### Does this PR introduce a user-facing change? ```release-note 重构 Console 端文章和自定义页面的设置表单布局,支持提交时验证表单。 ``` --- .../components/SinglePageSettingModal.vue | 343 ++++++++++-------- .../posts/components/PostSettingModal.vue | 300 ++++++++------- 2 files changed, 363 insertions(+), 280 deletions(-) diff --git a/src/modules/contents/pages/components/SinglePageSettingModal.vue b/src/modules/contents/pages/components/SinglePageSettingModal.vue index ec94f38d0..bb31dd731 100644 --- a/src/modules/contents/pages/components/SinglePageSettingModal.vue +++ b/src/modules/contents/pages/components/SinglePageSettingModal.vue @@ -1,13 +1,6 @@