From 365bf989b1834721c11d230122abd89cd79fb979 Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Mon, 14 Jun 2021 11:29:37 +0800 Subject: [PATCH] docs: deprecate legacy theme document --- docs/markdown/theme.en-US.md | 4 ++++ docs/markdown/theme.zh-CN.md | 4 ++++ vant.config.js | 26 ++++++++++++++++++-------- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/docs/markdown/theme.en-US.md b/docs/markdown/theme.en-US.md index 83db9737d..ed072b274 100644 --- a/docs/markdown/theme.en-US.md +++ b/docs/markdown/theme.en-US.md @@ -1,5 +1,9 @@ # Custom Theme +### Deprecated + +This document is deprecated. Vant provides a more convenient [ConfigProvider](/#zh-CN/config-provider) component for theme configuration. Less variables **will be removed in the next major version**. + ### Intro Vant use [Less](http://lesscss.org/) as css preprocessor,you can override the default less variables to custom theme. diff --git a/docs/markdown/theme.zh-CN.md b/docs/markdown/theme.zh-CN.md index eebe4b88b..b579e097a 100644 --- a/docs/markdown/theme.zh-CN.md +++ b/docs/markdown/theme.zh-CN.md @@ -1,5 +1,9 @@ # 定制主题 +### 废弃提示 + +本文档已废弃,Vant 提供了更方便的 [ConfigProvider 全局配置](/#zh-CN/config-provider) 组件进行主题配置。基于 Less 变量进行定制的方式**将在下个大版本废弃**。 + ### 介绍 Vant 提供了一套默认主题,CSS 命名采用 BEM 的风格,方便使用者覆盖样式。如果你想完全替换主题色或者其他样式,可以按照本文档进行主题定制。 diff --git a/vant.config.js b/vant.config.js index 64c157119..bd7856bf5 100644 --- a/vant.config.js +++ b/vant.config.js @@ -86,10 +86,6 @@ module.exports = { path: 'migrate-from-v2', title: '从 v2 升级', }, - { - path: 'theme', - title: '定制主题', - }, { path: 'contribution', title: '贡献指南', @@ -459,6 +455,15 @@ module.exports = { }, ], }, + { + title: '废弃', + items: [ + { + path: 'theme', + title: '定制主题', + }, + ], + }, ], }, 'en-US': { @@ -499,10 +504,6 @@ module.exports = { path: 'changelog', title: 'Changelog', }, - { - path: 'theme', - title: 'Custom Theme', - }, { path: 'design', title: 'Design Resources', @@ -864,6 +865,15 @@ module.exports = { // }, ], }, + { + title: 'Deprecated', + items: [ + { + path: 'theme', + title: 'Custom Theme', + }, + ], + }, ], }, },