签入版本
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
// import type { DefaultTheme, LocaleSpecificConfig } from "vitepress";
|
||||
|
||||
// export const META_URL = "https://www.rxthink.cn";
|
||||
// export const META_TITLE = "RXThinkCMF";
|
||||
// export const META_DESCRIPTION = "Enterprise Admin Framework";
|
||||
|
||||
// export const enConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
|
||||
// description: META_DESCRIPTION,
|
||||
// head: [
|
||||
// ["meta", { property: "og:url", content: META_URL }],
|
||||
// ["meta", { property: "og:description", content: META_DESCRIPTION }],
|
||||
// ["meta", { property: "twitter:url", content: META_URL }],
|
||||
// ["meta", { property: "twitter:title", content: META_TITLE }],
|
||||
// ["meta", { property: "twitter:description", content: META_DESCRIPTION }],
|
||||
// [
|
||||
// "script",
|
||||
// {},
|
||||
// `
|
||||
// var _hmt = _hmt || [];
|
||||
// (function() {
|
||||
// var hm = document.createElement("script");
|
||||
// hm.src = "https://hm.baidu.com/hm.js?f2662051bbed33ef4673edf8bfe609fe";
|
||||
// var s = document.getElementsByTagName("script")[0];
|
||||
// s.parentNode.insertBefore(hm, s);
|
||||
// })();
|
||||
// `,
|
||||
// ],
|
||||
// ],
|
||||
//
|
||||
// themeConfig: {
|
||||
// editLink: {
|
||||
// pattern: "https://gitee.com/rxthinkcmf/RXThinkCMF_ThinkPhp6_EleVue",
|
||||
// text: "Suggest changes to this page",
|
||||
// },
|
||||
//
|
||||
// nav: [
|
||||
// { text: "Guide", link: "/en/introduction.html" },
|
||||
// ],
|
||||
//
|
||||
// sidebar: {
|
||||
// "/en/": [
|
||||
// {
|
||||
// text: "Introduction",
|
||||
// items: [
|
||||
// { text: "About", link: "/en/introduction.html" },
|
||||
// ],
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
@@ -0,0 +1,42 @@
|
||||
import { defineConfig } from "vitepress";
|
||||
import { enConfig } from "./en";
|
||||
import { sharedConfig } from "./shared";
|
||||
import { zhConfig } from "./zh";
|
||||
|
||||
export default defineConfig({
|
||||
...sharedConfig,
|
||||
ignoreDeadLinks: [
|
||||
(link) => link.includes('localhost'),
|
||||
],
|
||||
|
||||
locales: {
|
||||
root: { label: "简体中文", lang: "zh-CN", link: "/", ...zhConfig },
|
||||
// root: { label: "English", lang: "en-US", link: "/", ...enConfig },
|
||||
// zh: { label: "简体中文", lang: "zh-CN", link: "/zh/", ...zhConfig },
|
||||
// es: {
|
||||
// label: "Español",
|
||||
// lang: "es-ES",
|
||||
// link: "https://es-pinia.vercel.app/",
|
||||
// },
|
||||
// ko: {
|
||||
// label: "한국어",
|
||||
// lang: "ko-KR",
|
||||
// link: "https://pinia.vuejs.kr/",
|
||||
// },
|
||||
// pt: {
|
||||
// label: "Português",
|
||||
// lang: "pt-PT",
|
||||
// link: "https://pinia-docs-pt.netlify.app/",
|
||||
// },
|
||||
// uk: {
|
||||
// label: "Українська",
|
||||
// lang: "uk-UA",
|
||||
// link: "https://pinia-ua.netlify.app",
|
||||
// },
|
||||
// ru: {
|
||||
// label: "Русский",
|
||||
// lang: "ru-RU",
|
||||
// link: "https://pinia-ru.netlify.app",
|
||||
// },
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,109 @@
|
||||
import { defineConfig, HeadConfig } from "vitepress";
|
||||
|
||||
export const META_IMAGE = "/social.png";
|
||||
|
||||
const rControl = /[\u0000-\u001f]/g;
|
||||
const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g;
|
||||
const rCombining = /[\u0300-\u036F]/g;
|
||||
|
||||
/**
|
||||
* Default slugification function
|
||||
*/
|
||||
export const slugify = (str: string): string =>
|
||||
str
|
||||
.normalize("NFKD")
|
||||
// Remove accents
|
||||
.replace(rCombining, "")
|
||||
// Remove control characters
|
||||
.replace(rControl, "")
|
||||
// Replace special characters
|
||||
.replace(rSpecial, "-")
|
||||
// ensure it doesn't start with a number
|
||||
.replace(/^(\d)/, "_$1");
|
||||
|
||||
export const sharedConfig = defineConfig({
|
||||
title: "小蚂蚁云",
|
||||
appearance: "light",
|
||||
|
||||
markdown: {
|
||||
theme: {
|
||||
dark: "dracula-soft",
|
||||
light: "vitesse-light",
|
||||
},
|
||||
|
||||
attrs: {
|
||||
leftDelimiter: "%{",
|
||||
rightDelimiter: "}%",
|
||||
},
|
||||
|
||||
anchor: {
|
||||
slugify,
|
||||
},
|
||||
},
|
||||
|
||||
head: [
|
||||
["link", { rel: "icon", type: "image/svg+xml", href: "/logo.svg" }],
|
||||
["link", { rel: "icon", type: "image/png", href: "/logo.png" }],
|
||||
|
||||
[
|
||||
"meta",
|
||||
{
|
||||
property: "og:type",
|
||||
content: "website",
|
||||
},
|
||||
],
|
||||
|
||||
[
|
||||
"meta",
|
||||
{
|
||||
property: "twitter:card",
|
||||
content: "summary_large_image",
|
||||
},
|
||||
],
|
||||
[
|
||||
"meta",
|
||||
{
|
||||
property: "twitter:image",
|
||||
content: META_IMAGE,
|
||||
},
|
||||
],
|
||||
|
||||
// Top banner
|
||||
[
|
||||
"script",
|
||||
{
|
||||
src: "/banner.js",
|
||||
// @ts-expect-error: vitepress bug
|
||||
async: true,
|
||||
type: "text/javascript",
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig: {
|
||||
logo: "/logo.svg",
|
||||
outline: [2, 3],
|
||||
|
||||
socialLinks: [
|
||||
{
|
||||
icon: "github",
|
||||
link: "https://gitee.com/rxthinkcmf/RXThinkCMF_ThinkPhp6_EleVue",
|
||||
},
|
||||
],
|
||||
|
||||
footer: {
|
||||
copyright:
|
||||
"Copyright © 2018~2026 www.rxthink.cn. All rights reserved.",
|
||||
message: "小蚂蚁云团队 · 提供技术支持",
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: "https://gitee.com/rxthinkcmf/RXThinkCMF_ThinkPhp6_EleVue",
|
||||
text: "对本页提出修改建议",
|
||||
},
|
||||
|
||||
search: {
|
||||
provider: "local",
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,542 @@
|
||||
import type { DefaultTheme, LocaleSpecificConfig } from "vitepress";
|
||||
|
||||
export const META_URL = "https://www.rxthink.cn";
|
||||
export const META_TITLE = "RXThinkCMF ThinkPHP6+ElementPlus 开发文档";
|
||||
export const META_DESCRIPTION =
|
||||
"RXThinkCMF 企业级前后端分离后台管理系统 - ThinkPHP6.1 + Vue3 + ElementPlus";
|
||||
|
||||
export const zhConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
|
||||
description: META_DESCRIPTION,
|
||||
head: [
|
||||
["meta", { property: "og:url", content: META_URL }],
|
||||
["meta", { property: "og:description", content: META_DESCRIPTION }],
|
||||
["meta", { property: "twitter:url", content: META_URL }],
|
||||
["meta", { property: "twitter:title", content: META_TITLE }],
|
||||
["meta", { property: "twitter:description", content: META_DESCRIPTION }],
|
||||
],
|
||||
|
||||
themeConfig: {
|
||||
editLink: {
|
||||
pattern: "https://gitee.com/rxthink/thinkphp6",
|
||||
text: "对本页提出修改建议",
|
||||
},
|
||||
|
||||
outline: {
|
||||
label: "本页内容",
|
||||
},
|
||||
|
||||
docFooter: {
|
||||
prev: "上一页",
|
||||
next: "下一页",
|
||||
},
|
||||
|
||||
nav: [
|
||||
{ text: "官网", link: "https://www.rxthink.cn" },
|
||||
{ text: "授权", link: "https://www.rxthink.cn/goods/detail/2" },
|
||||
{
|
||||
text: "部署文档",
|
||||
items: [
|
||||
{
|
||||
text: "RXThinkCMF混编版ThinkPHP6+Layui版本",
|
||||
link: "http://docs.thinkphp6.layui.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP6+ElementPlus版本",
|
||||
link: "http://docs.thinkphp6.elevue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP6+AntDesign版本",
|
||||
link: "http://docs.thinkphp6.antdvue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP6+NaiveUI版本",
|
||||
link: "http://docs.thinkphp6.naivevue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF混编版ThinkPHP8+Layui版本",
|
||||
link: "http://docs.thinkphp8.layui.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP8+ElementPlus版本",
|
||||
link: "http://docs.thinkphp8.elevue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP8+AntDesign版本",
|
||||
link: "http://docs.thinkphp8.antdvue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP8+NaiveUI版本",
|
||||
link: "http://docs.thinkphp8.naivevue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF混编版Laravel13+Layui版本",
|
||||
link: "http://docs.laravel13.layui.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离Laravel13+ElementPlus版本",
|
||||
link: "http://docs.laravel13.elevue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离Laravel13+AntDesign版本",
|
||||
link: "http://docs.laravel13.antdvue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离Laravel13+NaiveUI版本",
|
||||
link: "http://docs.laravel13.naivevue.rxthink.cn",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "在线演示",
|
||||
items: [
|
||||
{
|
||||
text: "RXThinkCMF混编版ThinkPHP6+Layui版本",
|
||||
link: "http://manage.thinkphp6.layui.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP6+ElementPlus版本",
|
||||
link: "http://manage.thinkphp6.elevue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP6+AntDesign版本",
|
||||
link: "http://manage.thinkphp6.antdvue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP6+NaiveUI版本",
|
||||
link: "http://manage.thinkphp6.naivevue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF混编版ThinkPHP8+Layui版本",
|
||||
link: "http://manage.thinkphp8.layui.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP8+ElementPlus版本",
|
||||
link: "http://manage.thinkphp8.elevue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP8+AntDesign版本",
|
||||
link: "http://manage.thinkphp8.antdvue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离ThinkPHP8+NaiveUI版本",
|
||||
link: "http://manage.thinkphp8.naivevue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF混编版Laravel13+Layui版本",
|
||||
link: "http://manage.laravel13.layui.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离Laravel13+ElementPlus版本",
|
||||
link: "http://manage.laravel13.elevue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离Laravel13+AntDesign版本",
|
||||
link: "http://manage.laravel13.antdvue.rxthink.cn",
|
||||
},
|
||||
{
|
||||
text: "RXThinkCMF前后端分离Laravel13+NaiveUI版本",
|
||||
link: "http://manage.laravel13.naivevue.rxthink.cn",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "广告赞助",
|
||||
link: "/zh/other/sponsor.html",
|
||||
},
|
||||
{
|
||||
text: "相关链接",
|
||||
items: [
|
||||
{ text: "官方网站", link: "https://www.rxthink.cn" },
|
||||
{ text: "Gitee 仓库", link: "https://gitee.com/rxthinkcmf/RXThinkCMF_ThinkPhp6_EleVue" },
|
||||
{ text: "ThinkPHP 官网", link: "https://www.thinkphp.cn/" },
|
||||
{ text: "Vue3 文档", link: "https://cn.vuejs.org/" },
|
||||
{ text: "ElementPlus", link: "https://element-plus.org/zh-CN/" },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
sidebar: {
|
||||
"/zh/": [
|
||||
// ================================================================
|
||||
// 第 1 章:了解项目
|
||||
// ================================================================
|
||||
{
|
||||
text: "📖 1. 了解项目",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "1.1 项目介绍", link: "/zh/introduction.html" },
|
||||
{ text: "1.2 为什么选择我们", link: "/zh/why.html" },
|
||||
{ text: "1.3 项目目录结构", link: "/zh/directory.html" },
|
||||
{ text: "1.4 新手入门指南", link: "/zh/course.html" },
|
||||
{ text: "1.5 技术栈说明", link: "/zh/tech-stack.html" },
|
||||
{ text: "1.6 更新日志", link: "/zh/changelog.html" },
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 第 2 章:快速入门
|
||||
// ================================================================
|
||||
{
|
||||
text: "🚀 2. 快速入门",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "2.1 开发环境准备", link: "/zh/quickstart/environment.html" },
|
||||
{ text: "2.2 后端服务启动", link: "/zh/quickstart/backend-start.html" },
|
||||
{ text: "2.3 前端服务启动", link: "/zh/quickstart/frontend-start.html" },
|
||||
{ text: "2.4 数据库初始化", link: "/zh/quickstart/database-init.html" },
|
||||
{ text: "2.5 环境变量配置", link: "/zh/quickstart/env-vars.html" },
|
||||
{ text: "2.6 第一个接口调试", link: "/zh/quickstart/first-api.html" },
|
||||
{ text: "2.7 Docker 快速体验", link: "/zh/quickstart/docker.html" },
|
||||
{ text: "2.8 常见问题 FAQ", link: "/zh/quickstart/faq.html" },
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 第 3 章:模块开发实战
|
||||
// ================================================================
|
||||
{
|
||||
text: "🧪 3. 模块开发实战",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "3.1 概述与目标", link: "/zh/guide/overview.html" },
|
||||
{ text: "3.2 数据库建表", link: "/zh/guide/database.html" },
|
||||
{ text: "3.3 模型层开发", link: "/zh/guide/model.html" },
|
||||
{ text: "3.4 验证器开发", link: "/zh/guide/validator.html" },
|
||||
{ text: "3.5 逻辑层开发", link: "/zh/guide/logic.html" },
|
||||
{ text: "3.6 控制器开发", link: "/zh/guide/controller.html" },
|
||||
{ text: "3.7 路由注册", link: "/zh/guide/route.html" },
|
||||
{ text: "3.8 权限节点配置", link: "/zh/guide/permission.html" },
|
||||
{ text: "3.9 前端联调指引", link: "/zh/guide/frontend-integration.html" },
|
||||
{ text: "3.10 完整代码清单", link: "/zh/guide/code-list.html" },
|
||||
{ text: "3.11 常见问题与排错", link: "/zh/guide/faq.html" },
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 第 4 章:架构设计
|
||||
// ================================================================
|
||||
{
|
||||
text: "🏛️ 4. 架构设计",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "4.1 整体架构概览", link: "/zh/architecture/overview.html" },
|
||||
{ text: "4.2 请求处理链路", link: "/zh/architecture/request-flow.html" },
|
||||
{ text: "4.3 后端分层架构", link: "/zh/architecture/backend-layer.html" },
|
||||
{ text: "4.4 前端分层架构", link: "/zh/architecture/frontend-layer.html" },
|
||||
{ text: "4.5 目录结构设计", link: "/zh/architecture/directory-design.html" },
|
||||
{ text: "4.6 核心基类体系", link: "/zh/architecture/base-classes.html" },
|
||||
{ text: "4.7 横切机制", link: "/zh/architecture/cross-cutting.html" },
|
||||
{ text: "4.8 缓存架构设计", link: "/zh/architecture/cache.html" },
|
||||
{ text: "4.9 数据库设计", link: "/zh/architecture/database-design.html" },
|
||||
{ text: "4.10 安全架构设计", link: "/zh/architecture/security.html" },
|
||||
{ text: "4.11 扩展性设计", link: "/zh/architecture/extensibility.html" },
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 第 5 章:核心功能
|
||||
// ================================================================
|
||||
{
|
||||
text: "🔐 5. 核心功能",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{
|
||||
text: "认证与安全",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "5.1 用户认证(JWT)", link: "/zh/core/jwt.html" },
|
||||
{ text: "5.2 认证流程实战", link: "/zh/core/auth-flow.html" },
|
||||
{ text: "5.3 验证码机制", link: "/zh/core/captcha.html" },
|
||||
{ text: "5.4 权限管理(RBAC)", link: "/zh/core/rbac.html" },
|
||||
{ text: "5.5 跨域资源共享", link: "/zh/core/cors.html" },
|
||||
{ text: "5.6 密码加密服务", link: "/zh/core/password.html" },
|
||||
{ text: "5.7 演示模式", link: "/zh/core/demo-mode.html" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "数据与配置",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "5.8 多租户隔离", link: "/zh/core/tenant.html" },
|
||||
{ text: "5.9 数据权限", link: "/zh/core/data-scope.html" },
|
||||
{ text: "5.10 字典模块", link: "/zh/core/dict.html" },
|
||||
{ text: "5.11 字典配置与使用", link: "/zh/core/dict-guide.html" },
|
||||
{ text: "5.12 系统配置管理", link: "/zh/core/config.html" },
|
||||
{ text: "5.13 系统参数管理", link: "/zh/core/param.html" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "日志与监控",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "5.14 操作日志", link: "/zh/core/operation-log.html" },
|
||||
{ text: "5.15 登录日志", link: "/zh/core/login-log.html" },
|
||||
{ text: "5.16 异常与响应处理", link: "/zh/core/exception.html" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "防护与治理",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "5.17 防重复提交", link: "/zh/core/idempotent.html" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "注解系统",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "5.18 注解系统总览", link: "/zh/core/attributes.html" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 第 6 章:业务模块
|
||||
// ================================================================
|
||||
{
|
||||
text: "📦 6. 业务模块",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "6.1 用户管理", link: "/zh/modules/user.html" },
|
||||
{ text: "6.2 角色管理", link: "/zh/modules/role.html" },
|
||||
{ text: "6.3 菜单管理", link: "/zh/modules/menu.html" },
|
||||
{ text: "6.4 部门管理", link: "/zh/modules/dept.html" },
|
||||
{ text: "6.5 职级管理", link: "/zh/modules/level.html" },
|
||||
{ text: "6.6 岗位管理", link: "/zh/modules/position.html" },
|
||||
{ text: "6.7 文章管理", link: "/zh/modules/article.html" },
|
||||
{ text: "6.8 公告与链接管理", link: "/zh/modules/content.html" },
|
||||
{ text: "6.9 行政区划管理", link: "/zh/modules/city.html" },
|
||||
{ text: "6.10 分类管理", link: "/zh/modules/category.html" },
|
||||
{ text: "6.11 定时任务", link: "/zh/modules/job.html" },
|
||||
{ text: "6.12 参数管理", link: "/zh/modules/param.html" },
|
||||
{ text: "6.13 租户管理", link: "/zh/modules/tenant.html" },
|
||||
{ text: "6.14 文件模板管理", link: "/zh/modules/filetemplate.html" },
|
||||
{ text: "6.15 首页与个人中心", link: "/zh/modules/index.html" },
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 第 7 章:文件处理
|
||||
// ================================================================
|
||||
{
|
||||
text: "🧰 7. 文件处理",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "7.1 文件上传全流程", link: "/zh/tools/upload.html" },
|
||||
{ text: "7.2 上传配置详解", link: "/zh/tools/upload-config.html" },
|
||||
{ text: "7.3 富文本处理", link: "/zh/tools/rich-text.html" },
|
||||
{ text: "7.4 数据导入导出", link: "/zh/tools/excel.html" },
|
||||
{ text: "7.5 前端文件组件", link: "/zh/tools/file-components.html" },
|
||||
{ text: "7.6 数据库迁移工具", link: "/zh/tools/db-migrate.html" },
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 第 8 章:接口规范与对接
|
||||
// ================================================================
|
||||
{
|
||||
text: "🔗 8. 接口规范与对接",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "8.1 统一响应格式", link: "/zh/api-spec/response.html" },
|
||||
{ text: "8.2 错误码对照表", link: "/zh/api-spec/error-code.html" },
|
||||
{ text: "8.3 分页查询规范", link: "/zh/api-spec/pagination.html" },
|
||||
{ text: "8.4 文件上传接口", link: "/zh/api-spec/upload.html" },
|
||||
{ text: "8.5 字典数据接口", link: "/zh/api-spec/dict-api.html" },
|
||||
{ text: "8.6 Token 使用说明", link: "/zh/api-spec/token.html" },
|
||||
{ text: "8.7 API 接口总览", link: "/zh/api-spec/overview.html" },
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 第 9 章:前端开发
|
||||
// ================================================================
|
||||
{
|
||||
text: "🖥️ 9. 前端开发",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{
|
||||
text: "工程基础",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "9.1 前端工程概述", link: "/zh/frontend/overview.html" },
|
||||
{ text: "9.2 目录结构详解", link: "/zh/frontend/directory.html" },
|
||||
{ text: "9.3 环境与构建配置", link: "/zh/frontend/env-config.html" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "核心机制",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "9.4 HTTP 请求封装", link: "/zh/frontend/http.html" },
|
||||
{ text: "9.5 路由与动态菜单", link: "/zh/frontend/router.html" },
|
||||
{ text: "9.6 状态管理(Pinia)", link: "/zh/frontend/store.html" },
|
||||
{ text: "9.7 权限控制", link: "/zh/frontend/permission.html" },
|
||||
{ text: "9.8 登录流程", link: "/zh/frontend/login.html" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "公共组件",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "9.9 数据展示组件", link: "/zh/frontend/display-components.html" },
|
||||
{ text: "9.10 数据录入组件", link: "/zh/frontend/form-components.html" },
|
||||
{ text: "9.11 Excel 导入导出组件", link: "/zh/frontend/excel-components.html" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "开发实践",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "9.12 新增页面开发步骤", link: "/zh/frontend/new-page.html" },
|
||||
{ text: "9.13 API 模块编写规范", link: "/zh/frontend/api-module.html" },
|
||||
{ text: "9.14 样式与主题定制", link: "/zh/frontend/style.html" },
|
||||
{ text: "9.15 布局系统", link: "/zh/frontend/layout.html" },
|
||||
{ text: "9.16 工具函数", link: "/zh/frontend/utils.html" },
|
||||
{ text: "9.17 国际化(i18n)", link: "/zh/frontend/i18n.html" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 第 10 章:代码生成器
|
||||
// ================================================================
|
||||
{
|
||||
text: "🔧 10. 代码生成器",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "10.1 概述与架构", link: "/zh/generator/overview.html" },
|
||||
{ text: "10.2 CLI 命令行使用", link: "/zh/generator/cli.html" },
|
||||
{ text: "10.3 Web 管理界面", link: "/zh/generator/web-ui.html" },
|
||||
{ text: "10.4 表结构解析引擎", link: "/zh/generator/parser.html" },
|
||||
{ text: "10.5 代码生成引擎", link: "/zh/generator/code-engine.html" },
|
||||
{ text: "10.6 自定义模板开发", link: "/zh/generator/templates.html" },
|
||||
{ text: "10.7 配置文件详解", link: "/zh/generator/config.html" },
|
||||
{ text: "10.8 实战案例", link: "/zh/generator/demo.html" },
|
||||
{ text: "10.9 常见问题", link: "/zh/generator/faq.html" },
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 第 11 章:运维部署
|
||||
// ================================================================
|
||||
{
|
||||
text: "⚙️ 11. 运维部署",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "11.1 部署 Checklist", link: "/zh/deploy/checklist.html" },
|
||||
{ text: "11.2 环境规划", link: "/zh/deploy/env-plan.html" },
|
||||
{ text: "11.3 数据库迁移", link: "/zh/deploy/db-migrate.html" },
|
||||
{ text: "11.4 后端部署", link: "/zh/deploy/backend.html" },
|
||||
{ text: "11.5 前端部署", link: "/zh/deploy/frontend.html" },
|
||||
{ text: "11.6 Docker 生产部署", link: "/zh/deploy/docker.html" },
|
||||
{ text: "11.7 性能调优", link: "/zh/deploy/performance.html" },
|
||||
{ text: "11.8 安全加固清单", link: "/zh/deploy/security.html" },
|
||||
{ text: "11.9 备份与恢复", link: "/zh/deploy/backup.html" },
|
||||
{ text: "11.10 故障排查手册", link: "/zh/deploy/troubleshooting.html" },
|
||||
{ text: "11.11 CI/CD 流水线", link: "/zh/deploy/ci-cd.html" },
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 第 12 章:规范标准
|
||||
// ================================================================
|
||||
{
|
||||
text: "📋 12. 规范标准",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{
|
||||
text: "⭐ 必须遵守",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "12.1 API 响应规范", link: "/zh/standards/api-response.html" },
|
||||
{ text: "12.2 分页查询规范", link: "/zh/standards/pagination.html" },
|
||||
{ text: "12.3 Git 提交规范", link: "/zh/standards/git.html" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "📌 建议遵守",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "12.4 数据删除规范", link: "/zh/standards/deletion.html" },
|
||||
{ text: "12.5 代码审查清单", link: "/zh/standards/code-review.html" },
|
||||
{ text: "12.6 后端编码规范", link: "/zh/standards/backend-code.html" },
|
||||
{ text: "12.7 前端编码规范", link: "/zh/standards/frontend-code.html" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// ================================================================
|
||||
// 附录
|
||||
// ================================================================
|
||||
{
|
||||
text: "📄 附录",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "A. 常见问题汇总", link: "/zh/appendix/faq.html" },
|
||||
{ text: "B. 数据库表结构速查", link: "/zh/appendix/database-tables.html" },
|
||||
{ text: "C. 配置项速查", link: "/zh/appendix/config-reference.html" },
|
||||
{ text: "D. 公共函数速查", link: "/zh/appendix/functions.html" },
|
||||
{ text: "E. API 接口速查表", link: "/zh/appendix/api-cheatsheet.html" },
|
||||
{ text: "F. 中间件执行顺序", link: "/zh/appendix/middleware.html" },
|
||||
{ text: "G. 前端组件速查", link: "/zh/appendix/components.html" },
|
||||
{ text: "H. 前端 Store 速查", link: "/zh/appendix/stores.html" },
|
||||
{ text: "I. 前端 Enums 速查", link: "/zh/appendix/enums.html" },
|
||||
{ text: "J. 术语表", link: "/zh/appendix/glossary.html" },
|
||||
{ text: "K. 贡献指南", link: "/zh/other/contributing.html" },
|
||||
{ text: "L. 免责声明", link: "/zh/other/declare.html" },
|
||||
{ text: "M. 广告赞助", link: "/zh/other/sponsor.html" },
|
||||
{ text: "N. 开源协议", link: "https://gitee.com/rxthinkcmf/RXThinkCMF_ThinkPhp6_EleVue" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const zhSearch: DefaultTheme.AlgoliaSearchOptions["locales"] = {
|
||||
zh: {
|
||||
placeholder: "搜索文档",
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: "搜索文档",
|
||||
buttonAriaLabel: "搜索文档",
|
||||
},
|
||||
modal: {
|
||||
searchBox: {
|
||||
resetButtonTitle: "清除查询条件",
|
||||
resetButtonAriaLabel: "清除查询条件",
|
||||
cancelButtonText: "取消",
|
||||
cancelButtonAriaLabel: "取消",
|
||||
},
|
||||
startScreen: {
|
||||
recentSearchesTitle: "搜索历史",
|
||||
noRecentSearchesText: "没有搜索历史",
|
||||
saveRecentSearchButtonTitle: "保存至搜索历史",
|
||||
removeRecentSearchButtonTitle: "从搜索历史中移除",
|
||||
favoriteSearchesTitle: "收藏",
|
||||
removeFavoriteSearchButtonTitle: "从收藏中移除",
|
||||
},
|
||||
errorScreen: {
|
||||
titleText: "无法获取结果",
|
||||
helpText: "你可能需要检查你的网络连接",
|
||||
},
|
||||
footer: {
|
||||
selectText: "选择",
|
||||
navigateText: "切换",
|
||||
closeText: "关闭",
|
||||
searchByText: "搜索供应商",
|
||||
},
|
||||
noResultsScreen: {
|
||||
noResultsText: "无法找到相关结果",
|
||||
suggestedQueryText: "你可以尝试查询",
|
||||
reportMissingResultsText: "你认为该查询应该有结果?",
|
||||
reportMissingResultsLinkText: "点击反馈",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,151 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { VPDocAsideSponsors } from "vitepress/theme";
|
||||
import sponsors from "./sponsors.json";
|
||||
|
||||
// to avoid the never[] type in json
|
||||
interface Sponsor {
|
||||
alt: string;
|
||||
href: string;
|
||||
imgSrcDark: string;
|
||||
imgSrcLight: string;
|
||||
}
|
||||
|
||||
const asideSponsors = computed(() => {
|
||||
return [
|
||||
{
|
||||
size: "mini",
|
||||
items: sponsors.platinum.length
|
||||
? sponsors.platinum.map((sponsor: Sponsor) => ({
|
||||
name: sponsor.alt,
|
||||
url: sponsor.href,
|
||||
img: sponsor.imgSrcLight,
|
||||
}))
|
||||
: [
|
||||
{
|
||||
name: "Become a sponsor",
|
||||
url: "https://www.rxthink.cn",
|
||||
img: "/sponsor/rxthinkcmf.png",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
size: "xmini",
|
||||
// TODO: use gold instead once I have some
|
||||
items: sponsors.silver.map((sponsor: Sponsor) => ({
|
||||
name: sponsor.alt,
|
||||
url: sponsor.href,
|
||||
img: sponsor.imgSrcLight,
|
||||
})),
|
||||
},
|
||||
];
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VPDocAsideSponsors :data="asideSponsors" />
|
||||
|
||||
<a class="banner mp" href="https://www.rxthink.cn" target="_blank">
|
||||
<img width="22" height="22" src="/sponsor/rxthinkcmf.png" />
|
||||
<span>
|
||||
<p class="extra-info">赋能开发者</p>
|
||||
<p class="heading">企业级中台解决方案</p>
|
||||
<p class="extra-info">助力企业发展</p>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a class="banner cert" href="https://www.rxthink.cn" target="_blank">
|
||||
<img width="22" height="22" src="/sponsor/rxthinkcmf.png" />
|
||||
<span>
|
||||
<p class="extra-info">赋能开发者</p>
|
||||
<p class="heading">企业级中台解决方案</p>
|
||||
<p class="extra-info">助力企业发展</p>
|
||||
</span>
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.VPDocAsideSponsors {
|
||||
margin-top: 8px !important;
|
||||
}
|
||||
|
||||
:deep(.vp-sponsor-grid.mini .vp-sponsor-grid-image) {
|
||||
max-width: 158px;
|
||||
max-height: 48px;
|
||||
}
|
||||
:deep(.vp-sponsor-grid.xmini .vp-sponsor-grid-image) {
|
||||
max-width: 80px;
|
||||
max-height: 32px;
|
||||
}
|
||||
|
||||
.banner {
|
||||
margin: 0.25rem 0;
|
||||
padding: 0.4rem 0;
|
||||
border-radius: 14px;
|
||||
position: relative;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
gap: 1rem;
|
||||
background-color: var(--vp-c-bg-alt);
|
||||
border: 2px solid var(--vp-c-bg-alt);
|
||||
transition: border-color 0.5s;
|
||||
}
|
||||
|
||||
.banner:last-of-type {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.banner:hover {
|
||||
border: 2px solid var(--vp-c-brand-1);
|
||||
}
|
||||
|
||||
.banner.cert:hover {
|
||||
border: 2px solid var(--vp-c-green-1);
|
||||
}
|
||||
|
||||
.banner img {
|
||||
transition: transform 0.5s;
|
||||
transform: scale(1.25);
|
||||
}
|
||||
.banner:hover img {
|
||||
transform: scale(1.75);
|
||||
}
|
||||
|
||||
.banner .extra-info {
|
||||
color: var(--vp-c-text-1);
|
||||
opacity: 0;
|
||||
font-size: 0.7rem;
|
||||
padding-left: 0.1rem;
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
|
||||
.banner .heading {
|
||||
background-image: linear-gradient(
|
||||
120deg,
|
||||
var(--vp-c-brand-3) 16%,
|
||||
var(--vp-c-brand-2),
|
||||
var(--vp-c-brand-1)
|
||||
);
|
||||
background-clip: text;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
.banner.cert .heading {
|
||||
background-image: linear-gradient(
|
||||
120deg,
|
||||
var(--vp-c-green-3) 16%,
|
||||
var(--vp-c-green-2),
|
||||
var(--vp-c-green-1)
|
||||
);
|
||||
}
|
||||
|
||||
.banner:hover .extra-info {
|
||||
opacity: 0.9;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,59 @@
|
||||
<script setup lang="ts">
|
||||
import HomeSponsorsGroup from "./HomeSponsorsGroup.vue";
|
||||
import sponsors from "./sponsors.json";
|
||||
import { useData } from "vitepress";
|
||||
|
||||
const { site } = useData();
|
||||
const translations = {
|
||||
en: "Become a sponsor",
|
||||
"en-US": "Become a Sponsor!",
|
||||
"zh-CN": "成为赞助商!",
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="sponsors_outer">
|
||||
<div>
|
||||
<HomeSponsorsGroup
|
||||
v-if="sponsors.platinum.length"
|
||||
name="Platinum"
|
||||
size="96"
|
||||
/>
|
||||
|
||||
<HomeSponsorsGroup
|
||||
v-if="sponsors.bronze.length"
|
||||
name="Bronze"
|
||||
size="38"
|
||||
/>
|
||||
|
||||
<HomeSponsorsGroup
|
||||
v-if="sponsors.silver.length"
|
||||
name="Silver"
|
||||
size="24"
|
||||
/>
|
||||
|
||||
<div class="cta">
|
||||
<a
|
||||
class="become-sponsor"
|
||||
href="/zh/other/sponsor.html"
|
||||
target="_self"
|
||||
>{{ translations[site.lang] || translations.en }}</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.sponsors_outer {
|
||||
text-align: center;
|
||||
padding: 35px 40px 45px;
|
||||
background-color: var(--vp-c-bg-accent);
|
||||
/* transition when toggling dark mode */
|
||||
transition: background-color 300ms ease-in-out, color 300ms ease-in-out;
|
||||
}
|
||||
|
||||
.cta {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<h3>{{ getNameText() }} 赞助商</h3>
|
||||
|
||||
<p>
|
||||
<a
|
||||
v-for="sponsor in list"
|
||||
:key="sponsor.href"
|
||||
:href="sponsor.href"
|
||||
:title="sponsor.alt"
|
||||
target="_blank"
|
||||
rel="sponsored noopener"
|
||||
class="sponsor_wrapper"
|
||||
:class="
|
||||
isDark && sponsor.imgSrcLight === sponsor.imgSrcDark && 'apply-bg'
|
||||
"
|
||||
>
|
||||
<img
|
||||
:src="sponsor.imgSrc"
|
||||
:class="
|
||||
isDark &&
|
||||
sponsor.imgSrcLight === sponsor.imgSrcDark &&
|
||||
'invert-colors'
|
||||
"
|
||||
:alt="sponsor.alt"
|
||||
:style="{ height: size + 'px' }"
|
||||
/>
|
||||
</a>
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import sponsors from "./sponsors.json";
|
||||
import { computed } from "vue";
|
||||
import { useData } from "vitepress";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
name: "Gold" | "Platinum" | "Silver" | "Bronze";
|
||||
size?: number | string;
|
||||
}>(),
|
||||
{
|
||||
size: 140,
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取赞助商等级
|
||||
*/
|
||||
const getNameText = () => {
|
||||
switch (props.name) {
|
||||
case "Gold":
|
||||
return "黄金";
|
||||
break;
|
||||
case "Platinum":
|
||||
return "铂金";
|
||||
break;
|
||||
case "Silver":
|
||||
return "白金";
|
||||
break;
|
||||
case "Bronze":
|
||||
return "青铜";
|
||||
break;
|
||||
default:
|
||||
return "白金";
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
const { isDark } = useData();
|
||||
|
||||
const list = computed(() =>
|
||||
sponsors[props.name.toLowerCase()].map((sponsor) => ({
|
||||
...sponsor,
|
||||
imgSrc: isDark.value ? sponsor.imgSrcDark : sponsor.imgSrcLight,
|
||||
}))
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.sponsor_wrapper {
|
||||
padding: 5px;
|
||||
margin: 0 3px;
|
||||
|
||||
border-radius: 5px;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
|
||||
transition: background-color 300ms ease-in-out;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.35rem;
|
||||
font-weight: 600;
|
||||
margin: 0.75em 0;
|
||||
}
|
||||
|
||||
img {
|
||||
transition: all 0.3s ease;
|
||||
filter: grayscale(100%);
|
||||
opacity: 0.66;
|
||||
}
|
||||
|
||||
html:not(.light) img.invert-colors {
|
||||
filter: invert(1) grayscale(100%);
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.sponsor_wrapper.apply-bg:hover {
|
||||
background-color: var(--c-text);
|
||||
}
|
||||
|
||||
.sponsor_wrapper:hover img {
|
||||
filter: none !important;
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,176 @@
|
||||
<script setup lang="ts">
|
||||
import { useData } from "vitepress";
|
||||
import { computed, ref } from "vue";
|
||||
|
||||
// TODO: split into 2 components
|
||||
|
||||
const { site } = useData();
|
||||
const translations = {
|
||||
videoLink: {
|
||||
"en-US":
|
||||
"Master this and much more with the official video course by the author of Pinia",
|
||||
"zh-CN": "通过 Pinia 作者的官方视频课程掌握更多内容",
|
||||
},
|
||||
videoEmbed: {
|
||||
"en-US": "Master this and much more with a free video from Mastering Pinia",
|
||||
"zh-CN": "通过 VideoModule 的免费视频掌握更多内容",
|
||||
},
|
||||
watchMoreA: {
|
||||
"en-US": "Watch more on ",
|
||||
"zh-CN": "获取 ",
|
||||
},
|
||||
watchMoreB: {
|
||||
"en-US": "",
|
||||
"zh-CN": " 官方授权",
|
||||
},
|
||||
};
|
||||
const props = defineProps<{ href: string; title: string; mpLink?: string }>();
|
||||
const isVideo = computed(() => props.href.startsWith("/"));
|
||||
const isVideoOpen = ref(false);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mp">
|
||||
<template v-if="isVideo">
|
||||
<div class="video-embed" v-if="isVideoOpen">
|
||||
<div style="padding: 56.25% 0 0 0; position: relative">
|
||||
<iframe
|
||||
loading="lazy"
|
||||
title="Gumlet video player"
|
||||
false
|
||||
:src="
|
||||
href +
|
||||
'?preload=false&autoplay=true&loop=false&disable_player_controls=false'
|
||||
"
|
||||
style="
|
||||
border: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
"
|
||||
allow="
|
||||
accelerometer;
|
||||
gyroscope;
|
||||
autoplay;
|
||||
encrypted-media;
|
||||
picture-in-picture;
|
||||
fullscreen;
|
||||
"
|
||||
frameborder="0"
|
||||
allowfullscreen
|
||||
>
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="watch-more">
|
||||
{{ translations.watchMoreA[site.lang] }}
|
||||
<a
|
||||
:href="mpLink || 'https://www.rxthink.cn'"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
小蚂蚁云
|
||||
<img src="../../../public/logo.svg" alt="小蚂蚁云" />
|
||||
</a>
|
||||
{{ translations.watchMoreB[site.lang] }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="cta" :title v-else @click="isVideoOpen = true">
|
||||
<div class="text">
|
||||
<slot>{{ translations.videoEmbed[site.lang] }}</slot>
|
||||
</div>
|
||||
</button>
|
||||
</template>
|
||||
<a
|
||||
v-else
|
||||
:href="href"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
:title="title"
|
||||
class="no-icon cta"
|
||||
>
|
||||
<div class="text">
|
||||
<slot>{{ translations.videoLink[site.lang] }}</slot>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.mp {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.mp:has(.cta) {
|
||||
position: relative;
|
||||
transition: border-color 0.5s;
|
||||
padding: 1em 1.25em;
|
||||
background-color: var(--vp-code-block-bg);
|
||||
border-radius: 1em;
|
||||
border: 2px solid var(--vp-c-bg-alt);
|
||||
}
|
||||
.mp:has(.cta):hover {
|
||||
border: 2px solid var(--vp-c-brand-1);
|
||||
}
|
||||
.cta:hover {
|
||||
color: var(--vp-c-brand-1);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.watch-more {
|
||||
text-align: end;
|
||||
font-size: 0.8em;
|
||||
background-color: var(--vp-code-block-bg);
|
||||
border-radius: 0 0 1em 1em;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
.watch-more img {
|
||||
height: 1em;
|
||||
display: inline-block;
|
||||
/* vertical-align: middle; */
|
||||
}
|
||||
|
||||
.cta {
|
||||
font-size: inherit;
|
||||
color: var(--c-text);
|
||||
position: relative;
|
||||
display: flex;
|
||||
gap: 1em;
|
||||
grid-template-columns: 1fr auto;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-left: 36px;
|
||||
}
|
||||
.cta .content {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.cta:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
top: calc(50% - 15px);
|
||||
left: -4px;
|
||||
border-radius: 50%;
|
||||
background-color: var(--vp-c-brand-1);
|
||||
}
|
||||
html.dark .cta:after {
|
||||
--play-icon-color: #000;
|
||||
}
|
||||
.cta:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
top: calc(50% - 5px);
|
||||
left: 8px;
|
||||
border-top: 5px solid transparent;
|
||||
border-bottom: 5px solid transparent;
|
||||
border-left: 9px solid var(--play-icon-color, #fff);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"platinum": [],
|
||||
"gold": [],
|
||||
"silver": [
|
||||
{
|
||||
"alt": "企业级中台解决方案",
|
||||
"href": "https://www.rxthink.cn",
|
||||
"imgSrcDark": "/sponsor/rxthinkcmf.png",
|
||||
"imgSrcLight": "/sponsor/rxthinkcmf.png"
|
||||
},
|
||||
{
|
||||
"alt": "企业级中台解决方案",
|
||||
"href": "https://www.rxthink.cn",
|
||||
"imgSrcDark": "/sponsor/rxthinkcmf.png",
|
||||
"imgSrcLight": "/sponsor/rxthinkcmf.png"
|
||||
}
|
||||
],
|
||||
"bronze": [
|
||||
{
|
||||
"alt": "企业级中台解决方案",
|
||||
"href": "https://www.rxthink.cn",
|
||||
"imgSrcDark": "/sponsor/rxthinkcmf.png",
|
||||
"imgSrcLight": "/sponsor/rxthinkcmf.png"
|
||||
},
|
||||
{
|
||||
"alt": "企业级中台解决方案",
|
||||
"href": "https://www.rxthink.cn",
|
||||
"imgSrcDark": "/sponsor/rxthinkcmf.png",
|
||||
"imgSrcLight": "/sponsor/rxthinkcmf.png"
|
||||
},
|
||||
{
|
||||
"alt": "企业级中台解决方案",
|
||||
"href": "https://www.rxthink.cn",
|
||||
"imgSrcDark": "/sponsor/rxthinkcmf.png",
|
||||
"imgSrcLight": "/sponsor/rxthinkcmf.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import { h } from "vue";
|
||||
import { type Theme, useRoute } from "vitepress";
|
||||
import DefaultTheme from "vitepress/theme";
|
||||
import AsideSponsors from "./components/AsideSponsors.vue";
|
||||
import VideoModuleLink from "./components/VideoModuleLink.vue";
|
||||
import "./styles/vars.css";
|
||||
import imageViewer from "vitepress-plugin-image-viewer";
|
||||
import vImageViewer from "vitepress-plugin-image-viewer/lib/vImageViewer.vue";
|
||||
|
||||
const theme: Theme = {
|
||||
...DefaultTheme,
|
||||
Layout() {
|
||||
return h(DefaultTheme.Layout, null, {
|
||||
"home-hero-image": () =>
|
||||
h(
|
||||
"div",
|
||||
{ class: "image-src" },
|
||||
h("img", {
|
||||
src: "/logo.png",
|
||||
alt: "小蚂蚁云",
|
||||
}),
|
||||
),
|
||||
"aside-ads-before": () => h(AsideSponsors),
|
||||
});
|
||||
},
|
||||
setup() {
|
||||
const route = useRoute();
|
||||
imageViewer(route);
|
||||
},
|
||||
enhanceApp({ app }) {
|
||||
app.component("VideoModuleLink", VideoModuleLink);
|
||||
app.component("vImageViewer", vImageViewer);
|
||||
},
|
||||
};
|
||||
|
||||
export default theme;
|
||||
@@ -0,0 +1,11 @@
|
||||
/* CTA link styles for the home page */
|
||||
|
||||
a.cta {
|
||||
text-align: center;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
a.cta:hover {
|
||||
border-color: var(--vp-c-brand);
|
||||
background-color: var(--c-bg-accent);
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
/**
|
||||
* Colors
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--c-yellow-1: #165DFF;
|
||||
--c-yellow-2: #165DFF;
|
||||
--c-yellow-3: #165DFF;
|
||||
--c-yellow-soft-1: #165DFF;
|
||||
--c-yellow-soft-2: #165DFF;
|
||||
|
||||
--c-teal: #086367;
|
||||
--c-teal-light: #33898d;
|
||||
|
||||
--c-white-dark: #f8f8f8;
|
||||
--c-black-darker: #0d121b;
|
||||
--c-black: #111827;
|
||||
--c-black-light: #161f32;
|
||||
--c-black-lighter: #262a44;
|
||||
|
||||
--c-green-1: #165DFF;
|
||||
--c-green-2: #8ae99c;
|
||||
--c-green-3: #165DFF;
|
||||
--c-green-soft: #316334;
|
||||
|
||||
/* light theme is a bit different */
|
||||
--vp-c-brand-1: var(--vp-c-green-1);
|
||||
--vp-c-brand-2: var(--vp-c-green-2);
|
||||
--vp-c-brand-3: var(--vp-c-green-3);
|
||||
--vp-c-brand-soft: var(--vp-c-green-soft);
|
||||
|
||||
--c-text-dark-1: #d9e6eb;
|
||||
--c-text-dark-2: #c4dde6;
|
||||
--c-text-dark-3: #abc4cc;
|
||||
--c-text-light-1: #2c3e50;
|
||||
--c-text-light-2: #476582;
|
||||
--c-text-light-3: #90a4b7;
|
||||
|
||||
--vp-c-brand-dark: var(--c-green-soft);
|
||||
--vp-c-brand-darker: var(--c-green-soft);
|
||||
--vp-c-brand-dimm: rgba(100, 108, 255, 0.08);
|
||||
--vp-c-brand-text: var(--c-text-light-1);
|
||||
--c-bg-accent: var(--c-white-dark);
|
||||
--code-bg-color: var(--c-white-dark);
|
||||
--code-inline-bg-color: var(--c-white-dark);
|
||||
--code-font-family: 'dm', source-code-pro, Menlo, Monaco, Consolas,
|
||||
'Courier New', monospace;
|
||||
--code-font-size: 16px;
|
||||
|
||||
--vp-code-block-bg: var(--vp-c-bg-alt);
|
||||
--vp-code-line-highlight-color: rgba(0, 0, 0, 0.075);
|
||||
--vp-code-color: var(--vp-text-color);
|
||||
}
|
||||
|
||||
html.dark:root {
|
||||
/* --c-black: #ffffff;
|
||||
--c-white: #000000; */
|
||||
/* --c-divider-light: rgba(60, 60, 67, 0.12);
|
||||
--c-divider-dark: rgba(84, 84, 88, 0.48); */
|
||||
/* --c-brand-light: var(--c-yellow-light); */
|
||||
|
||||
--vp-c-brand-1: var(--c-yellow-1);
|
||||
--vp-c-brand-2: var(--c-yellow-2);
|
||||
--vp-c-brand-3: var(--c-yellow-3);
|
||||
|
||||
--vp-c-bg-alpha-with-backdrop: rgba(20, 25, 36, 0.7);
|
||||
--vp-c-bg-alpha-without-backdrop: rgba(20, 25, 36, 0.9);
|
||||
|
||||
--vp-code-line-highlight-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
--vp-c-text-1: var(--c-text-dark-1);
|
||||
--vp-c-brand-text: var(--c-text-light-1);
|
||||
--c-text-light: var(--c-text-dark-2);
|
||||
--c-text-lighter: var(--c-text-dark-3);
|
||||
--c-divider: var(--c-divider-dark);
|
||||
--c-bg-accent: var(--c-black-light);
|
||||
/* --vp-code-inline-bg: var(--vp-c-black-light); */
|
||||
|
||||
--vp-c-bg: var(--c-black);
|
||||
--vp-c-bg-soft: var(--c-black-light);
|
||||
--vp-c-bg-soft-up: var(--c-black-lighter);
|
||||
--vp-c-bg-mute: var(--c-black-light);
|
||||
--vp-c-bg-soft-mute: var(--c-black-lighter);
|
||||
--vp-c-bg-alt: #0d121b;
|
||||
--vp-c-bg-elv: var(--vp-c-bg-soft);
|
||||
--vp-c-bg-elv-mute: var(--vp-c-bg-soft-mute);
|
||||
--vp-c-mute: var(--vp-c-bg-mute);
|
||||
--vp-c-mute-dark: var(--c-black-lighter);
|
||||
--vp-c-mute-darker: var(--c-black-darker);
|
||||
|
||||
--vp-home-hero-name-background: -webkit-linear-gradient(
|
||||
78deg,
|
||||
var(--c-yellow-2) 30%,
|
||||
var(--c-green-2)
|
||||
);
|
||||
}
|
||||
|
||||
html.dark .DocSearch {
|
||||
--docsearch-hit-active-color: var(--c-text-light-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Button
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-button-brand-border: var(--c-yellow-soft-1);
|
||||
--vp-button-brand-text: var(--c-black);
|
||||
--vp-button-brand-bg: var(--c-yellow-1);
|
||||
--vp-button-brand-hover-border: var(--c-yellow-2);
|
||||
--vp-button-brand-hover-text: var(--c-black-darker);
|
||||
--vp-button-brand-hover-bg: var(--c-yellow-2);
|
||||
--vp-button-brand-active-border: var(--c-yellow-soft-1);
|
||||
--vp-button-brand-active-text: var(--c-black-darker);
|
||||
--vp-button-brand-active-bg: var(--vp-button-brand-bg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Home
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-home-hero-name-color: transparent;
|
||||
--vp-home-hero-name-background: linear-gradient(
|
||||
292deg,
|
||||
var(--c-green-1) 50%,
|
||||
var(--c-green-2)
|
||||
);
|
||||
--vp-home-hero-image-background-image: linear-gradient(
|
||||
15deg,
|
||||
var(--c-yellow-2) 65%,
|
||||
var(--c-green-1) 30%
|
||||
);
|
||||
--vp-home-hero-image-filter: blur(40px);
|
||||
}
|
||||
|
||||
.VPHero .VPImage.image-src {
|
||||
max-height: 192px;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(56px);
|
||||
}
|
||||
.VPHero .VPImage.image-src {
|
||||
max-height: 256px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(72px);
|
||||
}
|
||||
.VPHero .VPImage.image-src {
|
||||
max-height: 320px;
|
||||
}
|
||||
}
|
||||
|
||||
.become-sponsor {
|
||||
font-size: 0.9em;
|
||||
font-weight: 700;
|
||||
width: auto;
|
||||
text-align: center;
|
||||
background-color: transparent;
|
||||
padding: 0.75em 2em;
|
||||
border-radius: 2em;
|
||||
transition: all 0.15s ease;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid var(--c-yellow-2);
|
||||
}
|
||||
|
||||
.become-sponsor.become-sponsor:hover {
|
||||
background-color: var(--c-yellow-1);
|
||||
text-decoration: none;
|
||||
border-color: var(--c-yellow-1);
|
||||
color: var(--c-text-light-1);
|
||||
}
|
||||
|
||||
.vp-doc a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.vp-doc a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.sponsors-top .become-sponsor {
|
||||
font-size: 0.75em;
|
||||
padding: 0.2em;
|
||||
width: auto;
|
||||
max-width: 150px;
|
||||
}
|
||||
|
||||
kbd {
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
font-size: 0.65em;
|
||||
color: var(--vp-c-text-1);
|
||||
vertical-align: middle;
|
||||
background-color: var(--vp-c-bg-mute);
|
||||
border: solid 1px var(--vp-c-bg-soft-mute);
|
||||
border-radius: 6px;
|
||||
box-shadow: inset 0 -1px 0 var(--vp-c-bg-soft-mute);
|
||||
line-height: 0.95em;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"zh": {
|
||||
"hash": "3.0.0",
|
||||
"date": "2026-09-07"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user