Compare commits

..
118 Commits
Author SHA1 Message Date
Hooray 6b6aee7604 chore: release v2.9.0 2023-03-10 23:58:31 +08:00
Hooray 9bc81c1427 chore: 更新依赖 2023-03-10 23:56:02 +08:00
Hooray f24153c95a refactor: 代码微调 2023-03-08 20:46:23 +08:00
hooray 4ba5ea2db2 fix: 修复 axios baseURL 配置,解决构建后 baseURL 不生效的问题 2023-03-06 16:27:41 +08:00
hooray 86d05f4cfc chore: 移除响应性语法糖功能,该实验性功能已被废弃 2023-03-06 14:56:08 +08:00
Hooray df9fd2ae65 feat: 用户权限变更后,自动更新导航菜单和页面权限,无需刷新页面或者重新登录
重构了路由注册的逻辑,无权限的路由也会被注册,在访问页面时候进行权限控制
2023-03-05 18:05:44 +08:00
Hooray d12e9794f3 chore: 更新依赖 2023-03-05 15:30:44 +08:00
Hooray 0ef3af7914 chore: release v2.8.0 2023-02-25 20:46:43 +08:00
Hooray f3cc0b0ecb refactor: 优化无权限路由的过滤函数 2023-02-25 19:07:15 +08:00
Hooray 3eb65f6da4 chore: 更新依赖 2023-02-25 12:16:19 +08:00
Hooray 1e2b21f841 feat: 自动生成页面模板增加基于文件系统路由的配置项 2023-02-25 12:08:06 +08:00
Hooray e1db00ce95 chore: 调整eslint规则 2023-02-25 12:05:58 +08:00
Hooray 1359cafa08 chore: 压缩svg文件 2023-02-25 11:02:05 +08:00
Hooray 2c1dfe3a80 feat: 增加403无权限页面
区分404和403页面,访问无权限的路由会展示403页面
2023-02-25 11:01:12 +08:00
Hooray 027b4f07d7 docs: 更新readme.md 2023-02-24 23:49:40 +08:00
Hooray e889f38bb1 fix: 修复登录页标题未正常显示 2023-02-23 22:32:45 +08:00
hooray 6a0b659750 fix: 修复路由meta.auth设置为''/[]时,权限判断为无权限的问题
后端返回路由数据时,auth字段通常会以空字符串或者空数组用来表示不需要权限校验
2023-02-22 21:02:18 +08:00
hooray b3a590d92d refactor!: 移除 vite-plugin-html 插件 2023-02-22 19:22:21 +08:00
Hooray 9feab1ebdb chore: 更新依赖 2023-02-20 01:58:33 +08:00
Hooray 4c0bc769c3 refactor: 优化mac系统下快捷键键位展示 2023-02-18 22:20:01 +08:00
hooray 5747a35913 chore: 更新依赖,移除 stylelint 废弃规则 2023-02-13 17:39:00 +08:00
hooray 31c3a28c3d chore: release v2.7.0 2023-02-11 21:37:55 +08:00
hooray 9893b905db chore: 更新依赖 2023-02-11 21:35:57 +08:00
hooray 9d858bbe22 style: 解决eslint警告 2023-02-02 14:53:08 +08:00
hooray 474aaa7bb1 chore: 更新依赖 2023-02-02 14:52:46 +08:00
hooray 04d358878e chore: 更新依赖 2023-01-31 15:24:01 +08:00
hooray eeed2d9ded chore: release v2.6.2 2023-01-15 12:21:00 +08:00
hooray 89d17930d6 chore: 更新依赖 2023-01-15 12:19:34 +08:00
hooray 25569b1d35 fix: 修复面包屑导航显示bug
未设置`meta.breadcrumb`的路由无法在面包屑导航中显示的bug
2023-01-15 12:17:58 +08:00
hooray cefe0c6d78 chore: release v2.6.1 2023-01-09 11:00:52 +08:00
hooray 1187a29ca4 chore: 更新依赖 2023-01-09 10:20:07 +08:00
hooray 4cdfd7210e chore: 更新默认 copyright 信息 2023-01-03 11:26:15 +08:00
hooray 3d84d73e20 chore: release v2.6.0 2022-12-28 12:57:19 +08:00
hooray abbbd74e91 chore: 更新依赖 2022-12-28 12:57:01 +08:00
hooray 4c3512a13c fix: 修复次导航收起时图标不居中 2022-12-22 12:02:22 +08:00
hooray 7387cea6ce chore: 更新依赖 2022-12-22 11:56:37 +08:00
hooray 2e4610aec3 fix: 修复预览图片无法完整覆盖 el-table 固定列
涉及组件 image-preview / image-upload / images-upload
2022-12-19 22:13:32 +08:00
hooray b7b949c160 feat: 引入 vite-plugin-vue-inspector 插件 2022-12-19 20:43:46 +08:00
hooray 7ee5bcb935 fix: 修复应用配置中复制配置按钮,复制内容过多的问题 2022-12-18 18:52:23 +08:00
hooray c239f2fa0f chore: 移除环境配置文件里无效配置 2022-12-15 22:35:12 +08:00
hooray dcdba0d310 chore: 更新依赖 2022-12-13 22:29:41 +08:00
hooray 800e729c71 refactor!: pinia store 改为 setup 写法 2022-12-13 22:27:34 +08:00
hooray 77f62626de chore: release v2.5.0 2022-12-10 17:00:23 +08:00
hooray d1fc70175e chore: 更新依赖 2022-12-10 16:59:51 +08:00
hooray 55f7e0b9d2 refactor: 优化搜索界面布局样式 2022-12-10 16:58:20 +08:00
hooray 7960d9c6a2 refactor: 给 /src/types/ 路径增加 # alias 2022-12-09 01:01:19 +08:00
hooray 6f88513a5f refactor!: 将类型定义 d.ts 文件统一存放到 /src/types/ 目录下 2022-12-08 02:32:08 +08:00
hooray b9e48842ab fix: 修复导航栏a标签href异常 2022-12-07 12:02:44 +08:00
hooray 135dc85fa8 chore: 调整全局搜索快捷键说明文字因背景导致显示不清晰 2022-12-06 21:27:50 +08:00
hooray 87ac51726f refactor: 优化遮罩层样式 2022-12-05 00:36:57 +08:00
hooray 7882cd8f22 feat!: 顶栏增加粘性模式
设置粘性模式时,页面往下滚动隐藏,往上滚动显示

BREAKING CHANGE: 移除`topbar.fixed`属性,新增`topbar.mode`属性
2022-12-04 23:11:03 +08:00
hooray 5644268411 refactor: 改用 element plus 原生 api 实现密码输入框显示密码功能 2022-12-04 03:57:51 +08:00
hooray 989453a644 chore: 更新依赖 2022-12-03 16:04:20 +08:00
hooray 18285821d9 chore: 修改 readme 2022-12-03 16:02:54 +08:00
hooray 9c3085367b chore: readme 增加部分 badge 2022-12-02 17:51:11 +08:00
hooray 52f5a76ca4 chore: 更新readme 2022-12-02 10:45:16 +08:00
hooray 12c268d18d chore: release v2.4.0 2022-12-01 22:53:50 +08:00
hooray 0c43078d32 feat!: 增加外链路由跳转提示页面,重构外链路由的配置方式
BREAKING CHANGE: 原先在路由`path`上设置外链,现在在路由`meta.link`上设置外链
2022-12-01 20:12:53 +08:00
hooray c534577feb chore: 代码微调 2022-11-30 04:09:55 +08:00
hooray 7474a19af2 fix: 修复 eslint 警告 2022-11-30 03:59:14 +08:00
hooray ae1f81762f chore: 更新依赖 2022-11-30 02:11:47 +08:00
hooray ffb3c85b83 chore: release v2.3.0 2022-11-28 00:35:20 +08:00
hooray ca1ea48dc6 refactor: 修改 Menu.recordRaw 和 Menu.recordMainRaw 类型里的 meta 为可选参数 2022-11-27 23:40:16 +08:00
hooray 5c6494931b fix: 修复标题显示异常 2022-11-27 23:37:03 +08:00
hooray e24431c38a refactor!: 移除自定义 Route.recordRaw 类型,改用 RouteRecordRaw 类型 2022-11-27 17:50:31 +08:00
hooray f85a911b8e fix: 修复文件系统路由模式下,全局搜索列表 icon 显示不全 2022-11-27 04:09:30 +08:00
hooray 776fe7a944 feat: 路由meta.title修改为非必须 2022-11-27 03:52:22 +08:00
hooray ce099b3bea chore: release v2.2.0 2022-11-26 15:37:52 +08:00
hooray eff431a09d chore: 更新依赖 2022-11-26 09:42:50 +08:00
hooray 501a8955c3 chore: 更新依赖 2022-11-19 21:37:54 +08:00
hooray f0a523f505 fix: 修复文件系统路由下,次导航无法按层级依次展开 2022-11-19 09:11:03 +08:00
hooray b2e33ca05f refactor!: 控制台修改为主页,路由调整为根路由
从原有 /dashboard 路由调整为 / 根路由
2022-11-19 09:10:30 +08:00
hooray a401b1f5bf refactor: 优化 PageHeader 组件在移动端下的展示 2022-11-13 00:51:02 +08:00
hooray 07a13b004e chore: release v2.1.3 2022-11-11 10:09:02 +08:00
hooray defd87869e ci: 优化 release 产物 2022-11-11 10:06:45 +08:00
hooray 051e6a99e1 chore: release v2.1.1 2022-11-10 19:54:08 +08:00
hooray 5f3855cc82 chore: 更新依赖 2022-11-10 19:49:23 +08:00
hooray 6489e8b94a ci: 优化 release 发布工作流 2022-11-10 19:30:30 +08:00
hooray 98ca00326a chore: husky 替换为 simple-git-hooks 2022-11-09 16:05:52 +08:00
hooray fc033c8693 chore: 更新依赖 2022-11-08 00:38:40 +08:00
hooray 57b18c2710 feat: logo 支持非正方形图片 2022-11-04 17:24:16 +08:00
hooray d667088c89 chore: release v2.1.0 2022-10-30 04:14:59 +08:00
hooray 41b3cd7a8e chore: 更新依赖 2022-10-29 18:46:32 +08:00
hooray 8e9a1e5683 chore: 更新依赖 2022-10-25 08:33:13 +08:00
hooray 05939a99ee chore: 调整 copyright 信息和展示逻辑 2022-10-25 08:27:07 +08:00
hooray 84e1581dcf chore: 移除 vite-plugin-restart 2022-10-25 08:25:12 +08:00
hooray 4a2538cfe3 refactor: 优化配置项合并 2022-10-25 08:23:20 +08:00
hooray c091c685e8 refactor!: useCurrentInstance() 重命名为 useGlobalProperties() 2022-10-23 14:25:18 +08:00
hooray 613972f4a1 refactor: 将 element plus 反馈组件改为手动引入 2022-10-23 14:18:17 +08:00
hooray d860fe74c3 chore: 给 eslint 和 stylelint 命令增加 --cache 设置 2022-10-23 14:04:53 +08:00
hooray ffa8943267 chore: 重建 pnpm-lock.yaml 文件 2022-10-23 14:03:08 +08:00
hooray babd6c9c2a chore: 更新依赖 2022-10-23 13:59:59 +08:00
hooray 7250872ac0 chore: 增加 vscode 推荐扩展 2022-10-22 00:50:57 +08:00
hooray 7f42710a55 ci: 增加 vue-tsc 校验脚本 2022-10-21 03:59:06 +08:00
hooray fe6d81c08d fix: 修复类型报错 2022-10-16 07:11:04 +08:00
hooray 1842f10172 ci: 调整 commit 配置 2022-10-16 07:10:12 +08:00
hooray 5bbde8d102 refactor: 优化拦截器 2022-10-16 06:48:53 +08:00
hooray 8771b33834 chore: 更新依赖 2022-10-16 06:00:43 +08:00
hooray 842519768e chore: 更新 tinymce 主题样式和汉化文件 2022-10-16 05:59:19 +08:00
hooray 25458835e9 chore: release v2.0.2 2022-10-15 04:05:54 +08:00
hooray abc0ac8e4c chore: 更新依赖 2022-10-14 18:42:59 +08:00
hooray 0e222b986d revert: 回退部分定位组件的 z-index 设置,强制重写 v-loading 的 z-index 样式 2022-10-13 19:19:11 +08:00
hooray 925ee00287 fix: 调整部分定位组件的z-index层级
element plus 的 v-loading 遮罩层默认 z-index 为 2000
导致会遮挡住框架部分组件
2022-10-13 14:21:47 +08:00
hooray d9291175b9 docs: 路由导航守卫代码注释调整 2022-10-13 14:19:13 +08:00
hooray c2e9b16917 refactor: 优化代码逻辑 2022-10-13 14:15:23 +08:00
hooray c0881951d3 chore: 更新依赖 2022-10-13 14:12:48 +08:00
hooray f0c6ddd221 chore: 调整文件忽略 2022-10-12 01:35:34 +08:00
hooray 07b9e31b22 fix: 修复获取侧边栏导航最深一级路由可能返回为空的问题 2022-10-12 01:30:40 +08:00
hooray a0708253af refactor: 简化导航守卫里的逻辑 2022-10-12 01:29:32 +08:00
hooray a1e1f2e4db chore: 更新依赖 2022-10-10 23:43:55 +08:00
Hooray b93c86aa44 chore: 更新依赖 2022-10-09 02:41:17 +08:00
Hooray 49e78d5c20 style: 更新 stylelint 规则 2022-10-03 22:12:09 +08:00
Hooray 33ea08fa4b style: 控制语句代码风格调整 2022-10-02 03:29:37 +08:00
Hooray 0e89630b54 docs: 更新 readme 链接 2022-09-30 14:27:31 +08:00
Hooray d6d67d357d style: 优化文件生成模版 2022-09-29 22:04:29 +08:00
Hooray 848e107388 chore: 更新依赖 2022-09-29 21:59:19 +08:00
hooray cc54fc07e4 chore: release v2.0.1 2022-09-26 00:31:14 +08:00
hooray 5a75e566e7 fix: 修改 mock 文件引入后缀 2022-09-26 00:30:00 +08:00
131 changed files with 4843 additions and 3115 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ module.exports = {
{ value: 'fix', name: 'fix: 🐛 修复缺陷 | A bug fix', emoji: ':bug:' },
{ value: 'docs', name: 'docs: 📝 文档更新 | Documentation only changes', emoji: ':memo:' },
{ value: 'style', name: 'style: 💄 代码格式 | Changes that do not affect the meaning of the code', emoji: ':lipstick:' },
{ value: 'refactor', name: 'refactor: ♻️ 代码重构 | A code change that neither fixes a bug nor adds a feature', emoji: ':recycle:' },
{ value: 'refactor', name: 'refactor: ♻️ 代码重构 | A code change that neither fixes a bug nor adds a feature', emoji: ':recycle:' },
{ value: 'perf', name: 'perf: ⚡️ 性能提升 | A code change that improves performance', emoji: ':zap:' },
{ value: 'test', name: 'test: ✅ 测试相关 | Adding missing tests or correcting existing tests', emoji: ':white_check_mark:' },
{ value: 'build', name: 'build: 📦️ 构建相关 | Changes that affect the build system or external dependencies', emoji: ':package:' },
-2
View File
@@ -1,5 +1,3 @@
NODE_ENV = production
# 页面标题
VITE_APP_TITLE = 页面标题
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-2
View File
@@ -1,5 +1,3 @@
NODE_ENV = production
# 页面标题
VITE_APP_TITLE = 页面标题(test)
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-2
View File
@@ -1,2 +0,0 @@
dist/
node_modules/
+7 -1
View File
@@ -1,3 +1,9 @@
{
"extends": "@antfu"
"extends": "@antfu",
"rules": {
"curly": ["error", "all"],
"vue/component-tags-order": ["error", {
"order": ["route", "script", "template", "style"]
}]
}
}
+66 -1
View File
@@ -19,4 +19,69 @@ jobs:
- run: npx changelogithub # or changelogithub@0.12 if ensure the stable result
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
upload-archive:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Release
id: last_release
uses: joutvhu/get-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
latest: true
- name: Create Archive
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: fantastic-admin.${{ steps.last_release.outputs.tag_name }}.zip
exclusions: '/.git/* /.github/*'
- name: Upload Archive To Release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.last_release.outputs.id }}
draft: false
file: fantastic-admin.${{ steps.last_release.outputs.tag_name }}.zip
upload-archive-example:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: example
- name: Get Release
id: last_release
uses: joutvhu/get-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
latest: true
- name: Create Archive
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: fantastic-admin.example.${{ steps.last_release.outputs.tag_name }}.zip
exclusions: '/.git/* /.github/*'
- name: Upload Archive To Release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.last_release.outputs.id }}
draft: false
file: fantastic-admin.example.${{ steps.last_release.outputs.tag_name }}.zip
+3
View File
@@ -3,5 +3,8 @@ node_modules
dist*
dist-ssr
*.local
.eslintcache
.stylelintcache
src/assets/sprites/*.*
!src/assets/sprites/.gitkeep
public/icons
-4
View File
@@ -1,4 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
pnpm lint-staged
+3 -3
View File
@@ -1,5 +1,5 @@
{
"src/**/*.{js,jsx,ts,tsx}": "eslint --fix",
"src/**/*.{css,scss}": "stylelint --fix --allow-empty-input",
"src/**/*.vue": ["eslint --fix", "stylelint --fix --allow-empty-input"]
"src/**/*.{js,jsx,ts,tsx}": "eslint --cache --fix",
"src/**/*.{css,scss}": "stylelint --cache --fix --allow-empty-input",
"src/**/*.vue": ["eslint --cache --fix", "stylelint --cache --fix --allow-empty-input"]
}
+3 -7
View File
@@ -1,14 +1,9 @@
{
"extends": [
"stylelint-config-standard",
"stylelint-config-standard-scss",
"stylelint-config-standard-vue/scss"
],
"overrides": [
{
"files": ["**/*.scss"],
"customSyntax": "postcss-scss"
}
],
"plugins": [
"stylelint-scss"
],
@@ -18,6 +13,7 @@
"property-no-unknown": null,
"font-family-no-missing-generic-family-keyword": null,
"selector-class-pattern": null,
"max-line-length": null
"scss/double-slash-comment-empty-line-before": null,
"scss/no-global-function-names": null
}
}
+2 -1
View File
@@ -4,6 +4,7 @@
"mikestead.dotenv",
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
"vue.volar"
"Vue.volar",
"Vue.vscode-typescript-vue-plugin",
]
}
+58 -51
View File
@@ -1,5 +1,5 @@
<p align="center">
<img src="https://hooray.gitee.io/fantastic-admin/logo.png" width="200" height="200" />
<img src="https://hooray.gitee.io/fantastic-admin/logo.png" width="200" height="200" />
</p>
<h1 align="center">Fantastic-admin</h1>
@@ -7,18 +7,23 @@
<p align="center">一款<b>开箱即用</b>的 Vue 中后台管理系统框架</p>
<p align="center">
<a href="https://hooray.gitee.io/fantastic-admin/" target="_blank">官网</a>
( <a href="https://hooray.github.io/fantastic-admin" target="_blank">备用</a> )
<span>&nbsp;|&nbsp;</span>
演示
( <a href="https://hooray.gitee.io/fantastic-admin/vue3/basic" target="_blank">基础版</a>
<a href="https://hooray.gitee.io/fantastic-admin/vue3/pro" target="_blank">专业版</a> )
<span>&nbsp;|&nbsp;</span>
<a href="https://hooray.gitee.io/fantastic-admin/support.html" target="_blank">技术支持</a>
<span>&nbsp;|&nbsp;</span>
<a href="https://hooray.gitee.io/fantastic-admin/buy.html" target="_blank">购买</a>
<a href="https://hooray.gitee.io/fantastic-admin" target="_blank">官网</a>
( <a href="https://hooray.github.io/fantastic-admin" target="_blank">备用</a> )
<span>&nbsp;|&nbsp;</span>
演示
( <a href="https://hooray.gitee.io/fantastic-admin-example" target="_blank">基础版</a>
<a href="https://hooray.gitee.io/fantastic-admin-pro-example" target="_blank">专业版</a> )
<span>&nbsp;|&nbsp;</span>
<a href="https://hooray.gitee.io/fantastic-admin/support.html" target="_blank">技术支持</a>
<span>&nbsp;|&nbsp;</span>
<a href="https://hooray.gitee.io/fantastic-admin/buy.html" target="_blank">购买</a>
<p>
<p align="center">
<a href="###"><img src="https://img.shields.io/github/license/hooray/fantastic-admin?label=%E5%BC%80%E6%BA%90%E5%8D%8F%E8%AE%AE&style=flat-square" /></a>
<a href="https://github.com/hooray/fantastic-admin/releases" target="_blank"><img src="https://img.shields.io/github/v/release/hooray/fantastic-admin?label=%E5%BD%93%E5%89%8D%E7%89%88%E6%9C%AC&style=flat-square" /></a>
</p>
## 特点
- 丰富的布局与主题,覆盖市面上各种中后台应用场景,兼容PC、平板和移动端
@@ -38,21 +43,23 @@
- `vue2` Vue2 版本框架源码分支,不含示例代码,可直接用于实际开发(停止维护)
- `vue2-example` Vue2 版本演示源码分支,包含大量示例,可用于参考学习(停止维护)
如果你更注重使用时的稳定性,推荐去 [Github Releases](https://github.com/hooray/fantastic-admin/releases) 页面下载最新稳定版本的压缩包。
## 预览
> 预览截图为 Vue3 专业版
<table>
<tr>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview1.png" /></td>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview2.png" /></td>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview3.png" /></td>
</tr>
<tr>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview4.png" /></td>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview5.png" /></td>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview6.png" /></td>
</tr>
<tr>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview1.png" /></td>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview2.png" /></td>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview3.png" /></td>
</tr>
<tr>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview4.png" /></td>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview5.png" /></td>
<td><img src="https://hooray.gitee.io/fantastic-admin/preview6.png" /></td>
</tr>
</table>
## 支持
@@ -66,37 +73,37 @@
## 生态
<table>
<tr>
<th colspan="3" align="center">
<a href="https://hooray.gitee.io/fantastic-startkit/" target="_blank">Fantastic-startkit</a>
</th>
</tr>
<tr>
<th colspan="3" align="center">
一款开箱即用的 Vue 项目启动套件
</th>
</tr>
<tr>
<th colspan="3" align="center">
<a href="https://hooray.gitee.io/fantastic-startkit/" target="_blank">Fantastic-startkit</a>
</th>
</tr>
<tr>
<th colspan="3" align="center">
一款开箱即用的 Vue 项目启动套件
</th>
</tr>
</table>
<table>
<tr>
<th colspan="3" align="center">
<a href="https://hooray.gitee.io/one-step-admin/" target="_blank">One-step-admin</a>
</th>
</tr>
<tr>
<th colspan="3" align="center">
一款干啥都快人一步的 Vue 中后台管理系统框架
</th>
</tr>
<tr>
<td><img src="https://hooray.gitee.io/one-step-admin/preview1.png" /></td>
<td><img src="https://hooray.gitee.io/one-step-admin/preview2.png" /></td>
<td><img src="https://hooray.gitee.io/one-step-admin/preview3.png" /></td>
</tr>
<tr>
<td><img src="https://hooray.gitee.io/one-step-admin/preview4.png" /></td>
<td><img src="https://hooray.gitee.io/one-step-admin/preview5.png" /></td>
<td><img src="https://hooray.gitee.io/one-step-admin/preview6.png" /></td>
</tr>
<tr>
<th colspan="3" align="center">
<a href="https://hooray.gitee.io/one-step-admin/" target="_blank">One-step-admin</a>
</th>
</tr>
<tr>
<th colspan="3" align="center">
一款干啥都快人一步的 Vue 中后台管理系统框架
</th>
</tr>
<tr>
<td><img src="https://hooray.gitee.io/one-step-admin/preview1.png" /></td>
<td><img src="https://hooray.gitee.io/one-step-admin/preview2.png" /></td>
<td><img src="https://hooray.gitee.io/one-step-admin/preview3.png" /></td>
</tr>
<tr>
<td><img src="https://hooray.gitee.io/one-step-admin/preview4.png" /></td>
<td><img src="https://hooray.gitee.io/one-step-admin/preview5.png" /></td>
<td><img src="https://hooray.gitee.io/one-step-admin/preview6.png" /></td>
</tr>
</table>
+8 -5
View File
@@ -3,10 +3,10 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" href="/loading.css" />
<link rel="stylesheet" href="/browser_upgrade/index.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%= title %></title>
<%- copyrightScript %>
<title>载入中…</title>
</head>
<body>
<div id="app">
@@ -17,7 +17,7 @@
<div class="square"></div>
<div class="square"></div>
</div>
<div class="text"><%= title %>载入中…</div>
<div class="text">载入中</div>
</div>
<div id="browser-upgrade">
<div class="title">为了您的体验,推荐使用以下浏览器</div>
@@ -33,8 +33,11 @@
</div>
</div>
</div>
<%- loadingScript %>
<script>
if (!!window.ActiveXObject || 'ActiveXObject' in window) {
document.getElementById('browser-upgrade').style.display = 'block'
}
</script>
<script type="module" src="/src/main.ts"></script>
<%- devtoolScript %>
</body>
</html>
+54 -47
View File
@@ -1,5 +1,5 @@
{
"version": "2.0.0",
"version": "2.9.0",
"scripts": {
"dev": "vite",
"build:test": "vue-tsc --noEmit && vite build --mode test",
@@ -8,77 +8,84 @@
"serve": "http-server ./dist -o",
"svgo": "svgo -f src/assets/icons",
"new": "plop",
"lint:eslint": "eslint src/**/*.{ts,tsx,vue} --fix",
"lint:stylelint": "stylelint src/**/*.{css,scss,vue} --fix",
"prepare": "husky install",
"postinstall": "esno scripts/prepare.js",
"lint": "npm-run-all -s lint:tsc lint:eslint lint:stylelint",
"lint:tsc": "vue-tsc --noEmit",
"lint:eslint": "eslint src/**/*.{ts,tsx,vue} --cache --fix",
"lint:stylelint": "stylelint src/**/*.{css,scss,vue} --cache --fix",
"postinstall": "simple-git-hooks && esno scripts/prepare.js",
"preinstall": "npx only-allow pnpm",
"commit": "git cz",
"release": "bumpp"
},
"dependencies": {
"@tinymce/tinymce-vue": "^5.0.0",
"@vueuse/core": "^9.2.0",
"@vueuse/integrations": "^9.2.0",
"axios": "^0.27.2",
"dayjs": "^1.11.5",
"element-plus": "^2.2.17",
"hotkeys-js": "^3.10.0",
"@tinymce/tinymce-vue": "^5.0.1",
"@vueuse/core": "^9.13.0",
"@vueuse/integrations": "^9.13.0",
"axios": "^1.3.4",
"dayjs": "^1.11.7",
"element-plus": "^2.2.36",
"eruda": "^2.11.3",
"hotkeys-js": "^3.10.1",
"lodash-es": "^4.17.21",
"mitt": "^3.0.0",
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"path-browserify": "^1.0.1",
"path-to-regexp": "^6.2.1",
"pinia": "^2.0.22",
"qs": "^6.11.0",
"tinymce": "^6.2.0",
"vue": "^3.2.39",
"vue-router": "^4.1.5"
"pinia": "^2.0.33",
"qs": "^6.11.1",
"tinymce": "^6.3.2",
"vconsole": "^3.15.0",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
},
"devDependencies": {
"@antfu/eslint-config": "^0.27.0",
"@iconify-json/ep": "^1.1.7",
"@iconify/vue": "^4.0.0",
"@antfu/eslint-config": "^0.36.0",
"@iconify-json/ep": "^1.1.10",
"@iconify/vue": "^4.1.0",
"@types/nprogress": "^0.2.0",
"@types/path-browserify": "^1.0.0",
"@types/qs": "^6.9.7",
"@vitejs/plugin-vue": "^3.1.0",
"@vitejs/plugin-vue-jsx": "^2.0.1",
"autoprefixer": "^10.4.12",
"bumpp": "^8.2.1",
"cz-git": "^1.3.11",
"eslint": "^8.24.0",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"autoprefixer": "^10.4.14",
"bumpp": "^9.0.0",
"cz-git": "^1.5.3",
"eslint": "^8.35.0",
"esno": "^0.16.3",
"fs-extra": "^10.1.0",
"fs-extra": "^11.1.0",
"http-server": "^14.1.1",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"plop": "^3.1.1",
"lint-staged": "^13.2.0",
"npm-run-all": "^4.1.5",
"plop": "^3.1.2",
"postcss-html": "^1.5.0",
"postcss-scss": "^4.0.5",
"sass": "^1.55.0",
"stylelint": "^14.12.1",
"stylelint-config-standard": "^28.0.0",
"stylelint-config-standard-scss": "^5.0.0",
"sass": "^1.58.3",
"simple-git-hooks": "^2.8.1",
"stylelint": "^15.2.0",
"stylelint-config-standard": "^30.0.1",
"stylelint-config-standard-scss": "^7.0.1",
"stylelint-config-standard-vue": "^1.0.0",
"stylelint-scss": "^4.3.0",
"svgo": "^2.8.0",
"typescript": "^4.8.3",
"unplugin-auto-import": "^0.11.2",
"unplugin-vue-components": "^0.22.7",
"vite": "^3.1.3",
"vite-plugin-banner": "^0.5.0",
"stylelint-scss": "^4.4.0",
"svgo": "^3.0.2",
"terser": "^5.16.6",
"typescript": "^4.9.5",
"unplugin-auto-import": "^0.15.1",
"unplugin-vue-components": "^0.24.1",
"vite": "^4.1.4",
"vite-plugin-banner": "^0.7.0",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.0",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-pages": "^0.26.0",
"vite-plugin-restart": "^0.2.0",
"vite-plugin-pages": "^0.28.0",
"vite-plugin-spritesmith": "^0.1.1",
"vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-vue-layouts": "^0.6.0",
"vite-plugin-vue-inspector": "^3.3.2",
"vite-plugin-vue-layouts": "^0.8.0",
"vite-plugin-vue-setup-extend": "^0.4.0",
"vue-tsc": "^0.40.13"
"vue-tsc": "^1.2.0"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged",
"preserveUnused": true
},
"config": {
"commitizen": {
+3 -3
View File
@@ -1,13 +1,13 @@
<script lang="ts" setup{{#if isGlobal}} name="{{ properCase name }}"{{/if}}>
// const proxy = useCurrentInstance()
// 逻辑代码
</script>
<template>
<div>
<!-- 内容区 -->
<!-- 布局 -->
</div>
</template>
<style lang="scss" scoped>
// scss
// 样式
</style>
+8 -7
View File
@@ -36,22 +36,23 @@ module.exports = {
name: 'name',
message: '请输入组件名称',
validate: (v) => {
if (!v || v.trim === '')
if (!v || v.trim === '') {
return '组件名称不能为空'
else
}
else {
return true
}
},
},
],
actions: (data) => {
let path = ''
if (data.isGlobal)
if (data.isGlobal) {
path = 'src/components/{{properCase name}}/index.vue'
else
}
else {
path = `${data.path}/components/{{properCase name}}/index.vue`
}
const actions = [
{
type: 'add',
+10 -5
View File
@@ -1,15 +1,20 @@
{{#if isFilesystem}}
<route lang="yaml">
meta:
title: 页面标题
</route>
{{/if}}
<script lang="ts" setup name="{{ properCase componentName }}">
// const proxy = useCurrentInstance()
// const router = useRouter()
// const route = useRoute()
// 逻辑代码
</script>
<template>
<div>
页面内容区域
<!-- 布局 -->
</div>
</template>
<style lang="scss" scoped>
// scss
// 样式
</style>
+10 -3
View File
@@ -28,13 +28,20 @@ module.exports = {
name: 'name',
message: '请输入文件名',
validate: (v) => {
if (!v || v.trim === '')
if (!v || v.trim === '') {
return '文件名不能为空'
else
}
else {
return true
}
},
},
{
type: 'confirm',
name: 'isFilesystem',
message: '是否为基于文件系统的路由页面',
default: false,
},
],
actions: (data) => {
const relativePath = path.relative('src/views', data.path)
+2 -2
View File
@@ -4,8 +4,8 @@ const use{{ properCase name }}Store = defineStore(
{
state: () => ({}),
getters: {},
actions: {}
}
actions: {},
},
)
export default use{{ properCase name }}Store
+5 -4
View File
@@ -6,11 +6,12 @@ module.exports = {
name: 'name',
message: '请输入模块名称',
validate: (v) => {
if (!v || v.trim === '')
if (!v || v.trim === '') {
return '模块名称不能为空'
else
}
else {
return true
}
},
},
],
@@ -18,7 +19,7 @@ module.exports = {
const actions = [
{
type: 'add',
path: 'src/store/modules/{{camelCase name}}.js',
path: 'src/store/modules/{{camelCase name}}.ts',
templateFile: 'plop-templates/store/index.hbs',
},
]
+2226 -1417
View File
File diff suppressed because it is too large Load Diff
+35 -105
View File
@@ -1,119 +1,49 @@
#app {
height: 100%;
}
.fantastic-admin-home {
position: absolute;
z-index: 10000;
top: 0;
left: 0;
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
user-select: none;
color: #736477;
background-color: snow;
}
.fantastic-admin-home .loading {
height: 40px;
width: 40px;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
.fantastic-admin-home .square {
display: flex;
align-items: center;
justify-content: center;
height: 20px;
width: 20px;
}
.fantastic-admin-home .square::before {
content: "";
width: 10px;
height: 10px;
border-radius: 15%;
border: 3px solid #8c858f;
}
.fantastic-admin-home .loading.animate .square::before {
animation: square-to-dot-animation 1.2s linear;
}
.fantastic-admin-home .loading.animate .square:nth-child(1)::before {
animation-delay: calc(100ms * 1);
}
.fantastic-admin-home .loading.animate .square:nth-child(2)::before {
animation-delay: calc(100ms * 2);
}
.fantastic-admin-home .loading.animate .square:nth-child(3)::before {
animation-delay: calc(100ms * 3);
}
.fantastic-admin-home .loading.animate .square:nth-child(4)::before {
animation-delay: calc(100ms * 4);
}
@keyframes square-to-dot-animation {
15%,
55% {
border-radius: 100%;
width: 0;
height: 0;
margin: 5px;
border-width: 5px;
}
70% {
border-radius: 15%;
width: 10px;
height: 10px;
margin: initial;
border-width: 3px;
}
}
.fantastic-admin-home .text {
font-size: 24px;
margin-top: 20px;
}
#browser-upgrade {
position: absolute;
z-index: 10001;
top: 0;
left: 0;
height: 100%;
width: 100%;
display: none;
user-select: none;
color: #736477;
background-color: snow;
position: absolute;
z-index: 10001;
top: 0;
left: 0;
height: 100%;
width: 100%;
display: none;
user-select: none;
color: #736477;
background-color: snow;
}
#browser-upgrade .title {
margin: 40px 0;
text-align: center;
font-size: 24px;
margin: 40px 0;
text-align: center;
font-size: 24px;
}
#browser-upgrade .browsers {
text-align: center;
text-align: center;
}
#browser-upgrade .browsers .browser {
display: inline-block;
margin: 0 20px;
cursor: pointer;
text-decoration: none;
display: inline-block;
margin: 0 20px;
cursor: pointer;
text-decoration: none;
}
#browser-upgrade .browsers .browser .browser-icon {
display: block;
width: 50px;
height: 50px;
margin: 0 auto;
border: none;
display: block;
width: 50px;
height: 50px;
margin: 0 auto;
border: none;
}
#browser-upgrade .browsers .browser .browser-name {
text-align: center;
margin-top: 10px;
padding-bottom: 2px;
color: #736477;
border-bottom: 1px solid transparent;
text-align: center;
margin-top: 10px;
padding-bottom: 2px;
color: #736477;
border-bottom: 1px solid transparent;
}
#browser-upgrade .browsers .browser:hover .browser-name {
border-bottom: 1px solid #736477;
border-bottom: 1px solid #736477;
}
File diff suppressed because one or more lines are too long
+92
View File
@@ -0,0 +1,92 @@
#app {
height: 100%;
}
.fantastic-admin-home {
position: absolute;
z-index: 10000;
top: 0;
left: 0;
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
user-select: none;
color: #736477;
background-color: snow;
}
.fantastic-admin-home .loading {
height: 40px;
width: 40px;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}
.fantastic-admin-home .loading .square {
display: flex;
align-items: center;
justify-content: center;
height: 20px;
width: 20px;
}
.fantastic-admin-home .loading .square::before {
content: "";
width: 10px;
height: 10px;
border-radius: 15%;
border: 3px solid #8c858f;
animation: square-to-dot-animation 2s linear infinite;
}
.fantastic-admin-home .loading .square:nth-child(1)::before {
animation-delay: calc(150ms * 1);
}
.fantastic-admin-home .loading .square:nth-child(2)::before {
animation-delay: calc(150ms * 2);
}
.fantastic-admin-home .loading .square:nth-child(3)::before {
animation-delay: calc(150ms * 3);
}
.fantastic-admin-home .loading .square:nth-child(4)::before {
animation-delay: calc(150ms * 4);
}
@keyframes square-to-dot-animation {
15%,
25% {
border-radius: 100%;
width: 0;
height: 0;
margin: 5px;
border-width: 5px;
}
40% {
border-radius: 15%;
width: 10px;
height: 10px;
margin: initial;
border-width: 3px;
}
}
.fantastic-admin-home .text {
position: relative;
font-size: 24px;
margin-top: 20px;
}
.fantastic-admin-home .text::after {
content: '…';
position: absolute;
padding-left: 5px;
}
File diff suppressed because one or more lines are too long
+51 -6
View File
@@ -21,11 +21,28 @@
.mce-content-body .mce-item-anchor[data-mce-selected] {
outline-offset: 1px;
}
.tox-comments-visible .tox-comment {
background-color: #fff0b7;
.tox-comments-visible .tox-comment[contenteditable="false"]:not([data-mce-selected]),
.tox-comments-visible span.tox-comment img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #ffe89d;
}
.tox-comments-visible .tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #ffe168;
.tox-comments-visible .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment:not([data-mce-selected]) {
background-color: #ffe89d;
outline: none;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #fed635;
}
.tox-checklist > li:not(.tox-checklist--hidden) {
list-style: none;
@@ -186,6 +203,27 @@ pre[class*="language-"] {
.tox-cursor-format-painter {
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
}
div.mce-footnotes hr {
margin-inline-end: auto;
margin-inline-start: 0;
width: 25%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
text-decoration: none;
}
@media print {
sup.mce-footnote a {
color: black;
text-decoration: none;
}
div.mce-footnotes {
break-inside: avoid;
width: 100%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
display: none;
}
}
.mce-content-body figure.align-left {
float: left;
}
@@ -215,6 +253,13 @@ pre[class*="language-"] {
.mce-preview-object[data-mce-selected="2"] .mce-shim {
display: none;
}
.mce-content-body .mce-mergetag:hover {
background-color: rgba(0, 108, 231, 0.3);
}
.mce-content-body .mce-mergetag-affix {
background-color: rgba(0, 108, 231, 0.3);
color: #006ce7;
}
.mce-object {
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%20fill%3D%22%23cccccc%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
border: 1px dashed #aaa;
@@ -506,10 +551,10 @@ pre[class*="language-"] {
border-color: rgba(0, 84, 180, 0.7);
}
}
.mce-content-body img::-moz-selection {
.mce-content-body img[data-mce-selected]::-moz-selection {
background: none;
}
.mce-content-body img::selection {
.mce-content-body img[data-mce-selected]::selection {
background: none;
}
.ephox-snooker-resizer-bar {
@@ -21,11 +21,28 @@
.mce-content-body .mce-item-anchor[data-mce-selected] {
outline-offset: 1px;
}
.tox-comments-visible .tox-comment {
background-color: #fff0b7;
.tox-comments-visible .tox-comment[contenteditable="false"]:not([data-mce-selected]),
.tox-comments-visible span.tox-comment img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #ffe89d;
}
.tox-comments-visible .tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #ffe168;
.tox-comments-visible .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment:not([data-mce-selected]) {
background-color: #ffe89d;
outline: none;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #fed635;
}
.tox-checklist > li:not(.tox-checklist--hidden) {
list-style: none;
@@ -205,6 +222,27 @@ pre[class*="language-"] {
.tox-cursor-format-painter {
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
}
div.mce-footnotes hr {
margin-inline-end: auto;
margin-inline-start: 0;
width: 25%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
text-decoration: none;
}
@media print {
sup.mce-footnote a {
color: black;
text-decoration: none;
}
div.mce-footnotes {
break-inside: avoid;
width: 100%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
display: none;
}
}
.mce-content-body figure.align-left {
float: left;
}
@@ -234,6 +272,13 @@ pre[class*="language-"] {
.mce-preview-object[data-mce-selected="2"] .mce-shim {
display: none;
}
.mce-content-body .mce-mergetag:hover {
background-color: rgba(0, 108, 231, 0.1);
}
.mce-content-body .mce-mergetag-affix {
background-color: rgba(0, 108, 231, 0.1);
color: #006ce7;
}
.mce-object {
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
border: 1px dashed #aaa;
@@ -525,10 +570,10 @@ pre[class*="language-"] {
border-color: rgba(0, 84, 180, 0.7);
}
}
.mce-content-body img::-moz-selection {
.mce-content-body img[data-mce-selected]::-moz-selection {
background: none;
}
.mce-content-body img::selection {
.mce-content-body img[data-mce-selected]::selection {
background: none;
}
.ephox-snooker-resizer-bar {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+90 -19
View File
@@ -252,11 +252,24 @@ button::-moz-focus-inner {
margin: 0;
outline: none;
padding: 4px 16px;
position: relative;
text-align: center;
text-decoration: none;
text-transform: none;
white-space: nowrap;
}
.tox .tox-button::before {
border-radius: 6px;
bottom: -1px;
box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #006ce7, 0 0 0 3px rgba(0, 108, 231, 0.25);
content: '';
left: -1px;
opacity: 0;
pointer-events: none;
position: absolute;
right: -1px;
top: -1px;
}
.tox .tox-button[disabled] {
background-color: #006ce7;
background-image: none;
@@ -272,6 +285,9 @@ button::-moz-focus-inner {
box-shadow: none;
color: #fff;
}
.tox .tox-button:focus-visible:not(:disabled)::before {
opacity: 1;
}
.tox .tox-button:hover:not(:disabled) {
background-color: #0060ce;
background-image: none;
@@ -933,8 +949,9 @@ button::-moz-focus-inner {
justify-content: space-between;
}
.tox .tox-comment__date {
color: rgba(255, 255, 255, 0.5);
color: #fff;
font-size: 12px;
line-height: 18px;
}
.tox .tox-comment__body {
color: #fff;
@@ -1093,20 +1110,30 @@ button::-moz-focus-inner {
.tox .tox-user__avatar svg {
fill: rgba(255, 255, 255, 0.5);
}
.tox .tox-user__avatar img {
border-radius: 50%;
height: 36px;
object-fit: cover;
vertical-align: middle;
width: 36px;
}
.tox .tox-user__name {
color: rgba(255, 255, 255, 0.5);
font-size: 12px;
color: #fff;
font-size: 14px;
font-style: normal;
font-weight: bold;
text-transform: uppercase;
line-height: 18px;
text-transform: none;
}
.tox:not([dir=rtl]) .tox-user__avatar svg {
.tox:not([dir=rtl]) .tox-user__avatar svg,
.tox:not([dir=rtl]) .tox-user__avatar img {
margin-right: 8px;
}
.tox:not([dir=rtl]) .tox-user__avatar + .tox-user__name {
margin-left: 8px;
}
.tox[dir=rtl] .tox-user__avatar svg {
.tox[dir=rtl] .tox-user__avatar svg,
.tox[dir=rtl] .tox-user__avatar img {
margin-left: 8px;
}
.tox[dir=rtl] .tox-user__avatar + .tox-user__name {
@@ -1151,10 +1178,11 @@ button::-moz-focus-inner {
width: 95vw;
z-index: 2;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog {
align-self: flex-start;
margin: 8px auto;
max-height: calc(100vh - 8px * 2);
width: calc(100vw - 16px);
}
}
@@ -1210,7 +1238,7 @@ button::-moz-focus-inner {
text-align: left;
text-transform: none;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog__body {
flex-direction: column;
}
@@ -1221,7 +1249,7 @@ button::-moz-focus-inner {
flex-direction: column;
padding: 16px 16px;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog__body-nav {
flex-direction: row;
-webkit-overflow-scrolling: touch;
@@ -1389,6 +1417,9 @@ button::-moz-focus-inner {
padding-bottom: 8px;
padding-top: 8px;
}
.tox .tox-dialog__iframe.tox-dialog__iframe--opaque {
background: #fff;
}
.tox .tox-dialog__popups {
position: absolute;
width: 100%;
@@ -1421,12 +1452,12 @@ button::-moz-focus-inner {
.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein {
transition-delay: 0s;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav {
margin-right: 0;
}
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child) {
margin-left: 8px;
}
@@ -1438,12 +1469,12 @@ button::-moz-focus-inner {
.tox[dir=rtl] .tox-dialog__body {
text-align: right;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav {
margin-left: 0;
}
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child) {
margin-right: 8px;
}
@@ -1500,6 +1531,8 @@ body.tox-dialog__disable-scroll {
overflow: hidden;
}
.tox .tox-editor-header {
display: grid;
grid-template-columns: 1fr min-content;
z-index: 1;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header {
@@ -1581,8 +1614,7 @@ body.tox-dialog__disable-scroll {
max-width: 25em;
}
.tox .tox-autocompleter .tox-menu {
border-color: #161f29;
box-shadow: none;
box-sizing: border-box;
max-width: 25em;
}
.tox .tox-autocompleter .tox-autocompleter-highlight {
@@ -2073,6 +2105,12 @@ body.tox-dialog__disable-scroll {
.tox .tox-menu.tox-collection.tox-collection--grid {
padding: 8px;
}
@media only screen and (min-width: 768px ) {
.tox .tox-menu .tox-collection__item-label {
overflow-wrap: break-word;
word-break: normal;
}
}
.tox .tox-menu__label h1,
.tox .tox-menu__label h2,
.tox .tox-menu__label h3,
@@ -2085,16 +2123,45 @@ body.tox-dialog__disable-scroll {
margin: 0;
}
.tox .tox-menubar {
background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='transparent'/%3E%3C/svg%3E") left 0 top 0 #222F3E;
background: repeating-linear-gradient(transparent 0px 1px, transparent 1px 39px) center top 39px / 100% calc(100% - 39px) no-repeat;
background-color: #222F3E;
display: flex;
flex: 0 0 auto;
flex-shrink: 0;
flex-wrap: wrap;
grid-column: 1 / -1;
grid-row: 1;
padding: 0 11px 0 12px;
}
.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
border-top: 1px solid transparent;
.tox .tox-promotion + .tox-menubar {
grid-column: 1;
}
.tox .tox-promotion {
background: repeating-linear-gradient(transparent 0px 1px, transparent 1px 39px) center top 39px / 100% calc(100% - 39px) no-repeat;
background-color: #222F3E;
grid-column: 2;
grid-row: 1;
padding-inline-end: 8px;
padding-inline-start: 4px;
padding-top: 5px;
}
.tox .tox-promotion-link {
align-items: unsafe center;
background-color: #E8F1F8;
border-radius: 5px;
color: #086BE6;
cursor: pointer;
display: flex;
font-size: 14px;
height: 26.6px;
padding: 4px 8px;
white-space: nowrap;
}
.tox .tox-promotion-link:hover {
background-color: #B4D7FF;
}
.tox .tox-promotion-link:focus {
background-color: #D9EDF7;
}
/* Deprecated. Remove in next major release */
.tox .tox-mbtn {
@@ -2874,10 +2941,14 @@ body.tox-dialog__disable-scroll {
.tox .tox-toolbar__overflow--shrinking {
transition: opacity 0.3s ease, height 0.2s linear 0.1s, visibility 0s linear 0.3s;
}
.tox .tox-toolbar-overlord,
.tox .tox-anchorbar {
grid-column: 1 / -1;
}
.tox .tox-menubar + .tox-toolbar,
.tox .tox-menubar + .tox-toolbar-overlord {
border-top: 1px solid transparent;
margin-top: 0px;
margin-top: -1px;
padding-bottom: 1px;
padding-top: 1px;
}
File diff suppressed because one or more lines are too long
+51 -6
View File
@@ -21,11 +21,28 @@
.mce-content-body .mce-item-anchor[data-mce-selected] {
outline-offset: 1px;
}
.tox-comments-visible .tox-comment {
background-color: #fff0b7;
.tox-comments-visible .tox-comment[contenteditable="false"]:not([data-mce-selected]),
.tox-comments-visible span.tox-comment img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #ffe89d;
}
.tox-comments-visible .tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #ffe168;
.tox-comments-visible .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment:not([data-mce-selected]) {
background-color: #ffe89d;
outline: none;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #fed635;
}
.tox-checklist > li:not(.tox-checklist--hidden) {
list-style: none;
@@ -205,6 +222,27 @@ pre[class*="language-"] {
.tox-cursor-format-painter {
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
}
div.mce-footnotes hr {
margin-inline-end: auto;
margin-inline-start: 0;
width: 25%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
text-decoration: none;
}
@media print {
sup.mce-footnote a {
color: black;
text-decoration: none;
}
div.mce-footnotes {
break-inside: avoid;
width: 100%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
display: none;
}
}
.mce-content-body figure.align-left {
float: left;
}
@@ -234,6 +272,13 @@ pre[class*="language-"] {
.mce-preview-object[data-mce-selected="2"] .mce-shim {
display: none;
}
.mce-content-body .mce-mergetag:hover {
background-color: rgba(0, 108, 231, 0.1);
}
.mce-content-body .mce-mergetag-affix {
background-color: rgba(0, 108, 231, 0.1);
color: #006ce7;
}
.mce-object {
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
border: 1px dashed #aaa;
@@ -525,10 +570,10 @@ pre[class*="language-"] {
border-color: rgba(0, 84, 180, 0.7);
}
}
.mce-content-body img::-moz-selection {
.mce-content-body img[data-mce-selected]::-moz-selection {
background: none;
}
.mce-content-body img::selection {
.mce-content-body img[data-mce-selected]::selection {
background: none;
}
.ephox-snooker-resizer-bar {
@@ -21,11 +21,28 @@
.mce-content-body .mce-item-anchor[data-mce-selected] {
outline-offset: 1px;
}
.tox-comments-visible .tox-comment {
background-color: #fff0b7;
.tox-comments-visible .tox-comment[contenteditable="false"]:not([data-mce-selected]),
.tox-comments-visible span.tox-comment img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #ffe89d;
}
.tox-comments-visible .tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #ffe168;
.tox-comments-visible .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment:not([data-mce-selected]) {
background-color: #ffe89d;
outline: none;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #fed635;
}
.tox-checklist > li:not(.tox-checklist--hidden) {
list-style: none;
@@ -205,6 +222,27 @@ pre[class*="language-"] {
.tox-cursor-format-painter {
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
}
div.mce-footnotes hr {
margin-inline-end: auto;
margin-inline-start: 0;
width: 25%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
text-decoration: none;
}
@media print {
sup.mce-footnote a {
color: black;
text-decoration: none;
}
div.mce-footnotes {
break-inside: avoid;
width: 100%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
display: none;
}
}
.mce-content-body figure.align-left {
float: left;
}
@@ -234,6 +272,13 @@ pre[class*="language-"] {
.mce-preview-object[data-mce-selected="2"] .mce-shim {
display: none;
}
.mce-content-body .mce-mergetag:hover {
background-color: rgba(0, 108, 231, 0.1);
}
.mce-content-body .mce-mergetag-affix {
background-color: rgba(0, 108, 231, 0.1);
color: #006ce7;
}
.mce-object {
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
border: 1px dashed #aaa;
@@ -525,10 +570,10 @@ pre[class*="language-"] {
border-color: rgba(0, 84, 180, 0.7);
}
}
.mce-content-body img::-moz-selection {
.mce-content-body img[data-mce-selected]::-moz-selection {
background: none;
}
.mce-content-body img::selection {
.mce-content-body img[data-mce-selected]::selection {
background: none;
}
.ephox-snooker-resizer-bar {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+90 -19
View File
@@ -252,11 +252,24 @@ button::-moz-focus-inner {
margin: 0;
outline: none;
padding: 4px 16px;
position: relative;
text-align: center;
text-decoration: none;
text-transform: none;
white-space: nowrap;
}
.tox .tox-button::before {
border-radius: 6px;
bottom: -1px;
box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #006ce7, 0 0 0 3px rgba(0, 108, 231, 0.25);
content: '';
left: -1px;
opacity: 0;
pointer-events: none;
position: absolute;
right: -1px;
top: -1px;
}
.tox .tox-button[disabled] {
background-color: #006ce7;
background-image: none;
@@ -272,6 +285,9 @@ button::-moz-focus-inner {
box-shadow: none;
color: #fff;
}
.tox .tox-button:focus-visible:not(:disabled)::before {
opacity: 1;
}
.tox .tox-button:hover:not(:disabled) {
background-color: #0060ce;
background-image: none;
@@ -933,8 +949,9 @@ button::-moz-focus-inner {
justify-content: space-between;
}
.tox .tox-comment__date {
color: rgba(34, 47, 62, 0.7);
color: #222f3e;
font-size: 12px;
line-height: 18px;
}
.tox .tox-comment__body {
color: #222f3e;
@@ -1093,20 +1110,30 @@ button::-moz-focus-inner {
.tox .tox-user__avatar svg {
fill: rgba(34, 47, 62, 0.7);
}
.tox .tox-user__avatar img {
border-radius: 50%;
height: 36px;
object-fit: cover;
vertical-align: middle;
width: 36px;
}
.tox .tox-user__name {
color: rgba(34, 47, 62, 0.7);
font-size: 12px;
color: #222f3e;
font-size: 14px;
font-style: normal;
font-weight: bold;
text-transform: uppercase;
line-height: 18px;
text-transform: none;
}
.tox:not([dir=rtl]) .tox-user__avatar svg {
.tox:not([dir=rtl]) .tox-user__avatar svg,
.tox:not([dir=rtl]) .tox-user__avatar img {
margin-right: 8px;
}
.tox:not([dir=rtl]) .tox-user__avatar + .tox-user__name {
margin-left: 8px;
}
.tox[dir=rtl] .tox-user__avatar svg {
.tox[dir=rtl] .tox-user__avatar svg,
.tox[dir=rtl] .tox-user__avatar img {
margin-left: 8px;
}
.tox[dir=rtl] .tox-user__avatar + .tox-user__name {
@@ -1151,10 +1178,11 @@ button::-moz-focus-inner {
width: 95vw;
z-index: 2;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog {
align-self: flex-start;
margin: 8px auto;
max-height: calc(100vh - 8px * 2);
width: calc(100vw - 16px);
}
}
@@ -1210,7 +1238,7 @@ button::-moz-focus-inner {
text-align: left;
text-transform: none;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog__body {
flex-direction: column;
}
@@ -1221,7 +1249,7 @@ button::-moz-focus-inner {
flex-direction: column;
padding: 16px 16px;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog__body-nav {
flex-direction: row;
-webkit-overflow-scrolling: touch;
@@ -1389,6 +1417,9 @@ button::-moz-focus-inner {
padding-bottom: 8px;
padding-top: 8px;
}
.tox .tox-dialog__iframe.tox-dialog__iframe--opaque {
background: #fff;
}
.tox .tox-dialog__popups {
position: absolute;
width: 100%;
@@ -1421,12 +1452,12 @@ button::-moz-focus-inner {
.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein {
transition-delay: 0s;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav {
margin-right: 0;
}
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child) {
margin-left: 8px;
}
@@ -1438,12 +1469,12 @@ button::-moz-focus-inner {
.tox[dir=rtl] .tox-dialog__body {
text-align: right;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav {
margin-left: 0;
}
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child) {
margin-right: 8px;
}
@@ -1500,6 +1531,8 @@ body.tox-dialog__disable-scroll {
overflow: hidden;
}
.tox .tox-editor-header {
display: grid;
grid-template-columns: 1fr min-content;
z-index: 1;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header {
@@ -1581,8 +1614,7 @@ body.tox-dialog__disable-scroll {
max-width: 25em;
}
.tox .tox-autocompleter .tox-menu {
border-color: #eeeeee;
box-shadow: none;
box-sizing: border-box;
max-width: 25em;
}
.tox .tox-autocompleter .tox-autocompleter-highlight {
@@ -2073,6 +2105,12 @@ body.tox-dialog__disable-scroll {
.tox .tox-menu.tox-collection.tox-collection--grid {
padding: 8px;
}
@media only screen and (min-width: 768px ) {
.tox .tox-menu .tox-collection__item-label {
overflow-wrap: break-word;
word-break: normal;
}
}
.tox .tox-menu__label h1,
.tox .tox-menu__label h2,
.tox .tox-menu__label h3,
@@ -2085,16 +2123,45 @@ body.tox-dialog__disable-scroll {
margin: 0;
}
.tox .tox-menubar {
background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='transparent'/%3E%3C/svg%3E") left 0 top 0 #fff;
background: repeating-linear-gradient(transparent 0px 1px, transparent 1px 39px) center top 39px / 100% calc(100% - 39px) no-repeat;
background-color: #fff;
display: flex;
flex: 0 0 auto;
flex-shrink: 0;
flex-wrap: wrap;
grid-column: 1 / -1;
grid-row: 1;
padding: 0 11px 0 12px;
}
.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
border-top: 1px solid transparent;
.tox .tox-promotion + .tox-menubar {
grid-column: 1;
}
.tox .tox-promotion {
background: repeating-linear-gradient(transparent 0px 1px, transparent 1px 39px) center top 39px / 100% calc(100% - 39px) no-repeat;
background-color: #fff;
grid-column: 2;
grid-row: 1;
padding-inline-end: 8px;
padding-inline-start: 4px;
padding-top: 5px;
}
.tox .tox-promotion-link {
align-items: unsafe center;
background-color: #E8F1F8;
border-radius: 5px;
color: #086BE6;
cursor: pointer;
display: flex;
font-size: 14px;
height: 26.6px;
padding: 4px 8px;
white-space: nowrap;
}
.tox .tox-promotion-link:hover {
background-color: #B4D7FF;
}
.tox .tox-promotion-link:focus {
background-color: #D9EDF7;
}
/* Deprecated. Remove in next major release */
.tox .tox-mbtn {
@@ -2874,10 +2941,14 @@ body.tox-dialog__disable-scroll {
.tox .tox-toolbar__overflow--shrinking {
transition: opacity 0.3s ease, height 0.2s linear 0.1s, visibility 0s linear 0.3s;
}
.tox .tox-toolbar-overlord,
.tox .tox-anchorbar {
grid-column: 1 / -1;
}
.tox .tox-menubar + .tox-toolbar,
.tox .tox-menubar + .tox-toolbar-overlord {
border-top: 1px solid transparent;
margin-top: 0px;
margin-top: -1px;
padding-bottom: 1px;
padding-top: 1px;
}
File diff suppressed because one or more lines are too long
@@ -21,11 +21,28 @@
.mce-content-body .mce-item-anchor[data-mce-selected] {
outline-offset: 1px;
}
.tox-comments-visible .tox-comment {
background-color: #fff0b7;
.tox-comments-visible .tox-comment[contenteditable="false"]:not([data-mce-selected]),
.tox-comments-visible span.tox-comment img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #ffe89d;
}
.tox-comments-visible .tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #ffe168;
.tox-comments-visible .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment:not([data-mce-selected]) {
background-color: #ffe89d;
outline: none;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #fed635;
}
.tox-checklist > li:not(.tox-checklist--hidden) {
list-style: none;
@@ -186,6 +203,27 @@ pre[class*="language-"] {
.tox-cursor-format-painter {
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
}
div.mce-footnotes hr {
margin-inline-end: auto;
margin-inline-start: 0;
width: 25%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
text-decoration: none;
}
@media print {
sup.mce-footnote a {
color: black;
text-decoration: none;
}
div.mce-footnotes {
break-inside: avoid;
width: 100%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
display: none;
}
}
.mce-content-body figure.align-left {
float: left;
}
@@ -215,6 +253,13 @@ pre[class*="language-"] {
.mce-preview-object[data-mce-selected="2"] .mce-shim {
display: none;
}
.mce-content-body .mce-mergetag:hover {
background-color: rgba(0, 108, 231, 0.3);
}
.mce-content-body .mce-mergetag-affix {
background-color: rgba(0, 108, 231, 0.3);
color: #006ce7;
}
.mce-object {
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%20fill%3D%22%23cccccc%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
border: 1px dashed #aaa;
@@ -506,10 +551,10 @@ pre[class*="language-"] {
border-color: rgba(0, 84, 180, 0.7);
}
}
.mce-content-body img::-moz-selection {
.mce-content-body img[data-mce-selected]::-moz-selection {
background: none;
}
.mce-content-body img::selection {
.mce-content-body img[data-mce-selected]::selection {
background: none;
}
.ephox-snooker-resizer-bar {
@@ -21,11 +21,28 @@
.mce-content-body .mce-item-anchor[data-mce-selected] {
outline-offset: 1px;
}
.tox-comments-visible .tox-comment {
background-color: #fff0b7;
.tox-comments-visible .tox-comment[contenteditable="false"]:not([data-mce-selected]),
.tox-comments-visible span.tox-comment img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #ffe89d;
}
.tox-comments-visible .tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #ffe168;
.tox-comments-visible .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment:not([data-mce-selected]) {
background-color: #ffe89d;
outline: none;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #fed635;
}
.tox-checklist > li:not(.tox-checklist--hidden) {
list-style: none;
@@ -205,6 +222,27 @@ pre[class*="language-"] {
.tox-cursor-format-painter {
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
}
div.mce-footnotes hr {
margin-inline-end: auto;
margin-inline-start: 0;
width: 25%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
text-decoration: none;
}
@media print {
sup.mce-footnote a {
color: black;
text-decoration: none;
}
div.mce-footnotes {
break-inside: avoid;
width: 100%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
display: none;
}
}
.mce-content-body figure.align-left {
float: left;
}
@@ -234,6 +272,13 @@ pre[class*="language-"] {
.mce-preview-object[data-mce-selected="2"] .mce-shim {
display: none;
}
.mce-content-body .mce-mergetag:hover {
background-color: rgba(0, 108, 231, 0.1);
}
.mce-content-body .mce-mergetag-affix {
background-color: rgba(0, 108, 231, 0.1);
color: #006ce7;
}
.mce-object {
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
border: 1px dashed #aaa;
@@ -525,10 +570,10 @@ pre[class*="language-"] {
border-color: rgba(0, 84, 180, 0.7);
}
}
.mce-content-body img::-moz-selection {
.mce-content-body img[data-mce-selected]::-moz-selection {
background: none;
}
.mce-content-body img::selection {
.mce-content-body img[data-mce-selected]::selection {
background: none;
}
.ephox-snooker-resizer-bar {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+98 -18
View File
@@ -252,11 +252,24 @@ button::-moz-focus-inner {
margin: 0;
outline: none;
padding: 4px 16px;
position: relative;
text-align: center;
text-decoration: none;
text-transform: none;
white-space: nowrap;
}
.tox .tox-button::before {
border-radius: 3px;
bottom: -1px;
box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #207ab7, 0 0 0 3px rgba(32, 122, 183, 0.25);
content: '';
left: -1px;
opacity: 0;
pointer-events: none;
position: absolute;
right: -1px;
top: -1px;
}
.tox .tox-button[disabled] {
background-color: #207ab7;
background-image: none;
@@ -272,6 +285,9 @@ button::-moz-focus-inner {
box-shadow: none;
color: #fff;
}
.tox .tox-button:focus-visible:not(:disabled)::before {
opacity: 1;
}
.tox .tox-button:hover:not(:disabled) {
background-color: #1c6ca1;
background-image: none;
@@ -933,8 +949,9 @@ button::-moz-focus-inner {
justify-content: space-between;
}
.tox .tox-comment__date {
color: rgba(255, 255, 255, 0.5);
color: #fff;
font-size: 12px;
line-height: 18px;
}
.tox .tox-comment__body {
color: #fff;
@@ -1093,20 +1110,30 @@ button::-moz-focus-inner {
.tox .tox-user__avatar svg {
fill: rgba(255, 255, 255, 0.5);
}
.tox .tox-user__avatar img {
border-radius: 50%;
height: 36px;
object-fit: cover;
vertical-align: middle;
width: 36px;
}
.tox .tox-user__name {
color: rgba(255, 255, 255, 0.5);
font-size: 12px;
color: #fff;
font-size: 14px;
font-style: normal;
font-weight: bold;
text-transform: uppercase;
line-height: 18px;
text-transform: none;
}
.tox:not([dir=rtl]) .tox-user__avatar svg {
.tox:not([dir=rtl]) .tox-user__avatar svg,
.tox:not([dir=rtl]) .tox-user__avatar img {
margin-right: 8px;
}
.tox:not([dir=rtl]) .tox-user__avatar + .tox-user__name {
margin-left: 8px;
}
.tox[dir=rtl] .tox-user__avatar svg {
.tox[dir=rtl] .tox-user__avatar svg,
.tox[dir=rtl] .tox-user__avatar img {
margin-left: 8px;
}
.tox[dir=rtl] .tox-user__avatar + .tox-user__name {
@@ -1151,10 +1178,11 @@ button::-moz-focus-inner {
width: 95vw;
z-index: 2;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog {
align-self: flex-start;
margin: 8px auto;
max-height: calc(100vh - 8px * 2);
width: calc(100vw - 16px);
}
}
@@ -1210,7 +1238,7 @@ button::-moz-focus-inner {
text-align: left;
text-transform: none;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog__body {
flex-direction: column;
}
@@ -1221,7 +1249,7 @@ button::-moz-focus-inner {
flex-direction: column;
padding: 16px 16px;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog__body-nav {
flex-direction: row;
-webkit-overflow-scrolling: touch;
@@ -1389,6 +1417,9 @@ button::-moz-focus-inner {
padding-bottom: 8px;
padding-top: 8px;
}
.tox .tox-dialog__iframe.tox-dialog__iframe--opaque {
background: #fff;
}
.tox .tox-dialog__popups {
position: absolute;
width: 100%;
@@ -1421,12 +1452,12 @@ button::-moz-focus-inner {
.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein {
transition-delay: 0s;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav {
margin-right: 0;
}
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child) {
margin-left: 8px;
}
@@ -1438,12 +1469,12 @@ button::-moz-focus-inner {
.tox[dir=rtl] .tox-dialog__body {
text-align: right;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav {
margin-left: 0;
}
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child) {
margin-right: 8px;
}
@@ -1500,6 +1531,8 @@ body.tox-dialog__disable-scroll {
overflow: hidden;
}
.tox .tox-editor-header {
display: grid;
grid-template-columns: 1fr min-content;
z-index: 1;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header {
@@ -1581,8 +1614,7 @@ body.tox-dialog__disable-scroll {
max-width: 25em;
}
.tox .tox-autocompleter .tox-menu {
border-color: #000000;
box-shadow: none;
box-sizing: border-box;
max-width: 25em;
}
.tox .tox-autocompleter .tox-autocompleter-highlight {
@@ -2073,6 +2105,12 @@ body.tox-dialog__disable-scroll {
.tox .tox-menu.tox-collection.tox-collection--grid {
padding: 4px;
}
@media only screen and (min-width: 768px ) {
.tox .tox-menu .tox-collection__item-label {
overflow-wrap: break-word;
word-break: normal;
}
}
.tox .tox-menu__label h1,
.tox .tox-menu__label h2,
.tox .tox-menu__label h3,
@@ -2091,10 +2129,39 @@ body.tox-dialog__disable-scroll {
flex: 0 0 auto;
flex-shrink: 0;
flex-wrap: wrap;
grid-column: 1 / -1;
grid-row: 1;
padding: 0 4px 0 4px;
}
.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
border-top: 1px solid #000000;
.tox .tox-promotion + .tox-menubar {
grid-column: 1;
}
.tox .tox-promotion {
background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E") left 0 top 0 #222f3e;
background-color: #222f3e;
grid-column: 2;
grid-row: 1;
padding-inline-end: 8px;
padding-inline-start: 4px;
padding-top: 5px;
}
.tox .tox-promotion-link {
align-items: unsafe center;
background-color: #E8F1F8;
border-radius: 5px;
color: #086BE6;
cursor: pointer;
display: flex;
font-size: 14px;
height: 26.6px;
padding: 4px 8px;
white-space: nowrap;
}
.tox .tox-promotion-link:hover {
background-color: #B4D7FF;
}
.tox .tox-promotion-link:focus {
background-color: #D9EDF7;
}
/* Deprecated. Remove in next major release */
.tox .tox-mbtn {
@@ -2874,10 +2941,14 @@ body.tox-dialog__disable-scroll {
.tox .tox-toolbar__overflow--shrinking {
transition: opacity 0.3s ease, height 0.2s linear 0.1s, visibility 0s linear 0.3s;
}
.tox .tox-toolbar-overlord,
.tox .tox-anchorbar {
grid-column: 1 / -1;
}
.tox .tox-menubar + .tox-toolbar,
.tox .tox-menubar + .tox-toolbar-overlord {
border-top: 1px solid #000000;
margin-top: 0;
margin-top: -1px;
padding-bottom: 0px;
padding-top: 0px;
}
@@ -3087,6 +3158,12 @@ body.tox-dialog__disable-scroll {
border: 1px solid #000000;
padding: 0;
}
.tox .tox-pop .tox-pop__dialog .tox-toolbar {
padding: 0;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
border-top: 1px solid #000000;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary,
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child {
border-top: 1px solid #000000;
@@ -3117,3 +3194,6 @@ body.tox-dialog__disable-scroll {
padding-bottom: 0;
padding-right: 0;
}
.tox .tox-button::before {
display: none;
}
File diff suppressed because one or more lines are too long
+51 -6
View File
@@ -21,11 +21,28 @@
.mce-content-body .mce-item-anchor[data-mce-selected] {
outline-offset: 1px;
}
.tox-comments-visible .tox-comment {
background-color: #fff0b7;
.tox-comments-visible .tox-comment[contenteditable="false"]:not([data-mce-selected]),
.tox-comments-visible span.tox-comment img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #ffe89d;
}
.tox-comments-visible .tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #ffe168;
.tox-comments-visible .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment:not([data-mce-selected]) {
background-color: #ffe89d;
outline: none;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #fed635;
}
.tox-checklist > li:not(.tox-checklist--hidden) {
list-style: none;
@@ -205,6 +222,27 @@ pre[class*="language-"] {
.tox-cursor-format-painter {
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
}
div.mce-footnotes hr {
margin-inline-end: auto;
margin-inline-start: 0;
width: 25%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
text-decoration: none;
}
@media print {
sup.mce-footnote a {
color: black;
text-decoration: none;
}
div.mce-footnotes {
break-inside: avoid;
width: 100%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
display: none;
}
}
.mce-content-body figure.align-left {
float: left;
}
@@ -234,6 +272,13 @@ pre[class*="language-"] {
.mce-preview-object[data-mce-selected="2"] .mce-shim {
display: none;
}
.mce-content-body .mce-mergetag:hover {
background-color: rgba(0, 108, 231, 0.1);
}
.mce-content-body .mce-mergetag-affix {
background-color: rgba(0, 108, 231, 0.1);
color: #006ce7;
}
.mce-object {
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
border: 1px dashed #aaa;
@@ -525,10 +570,10 @@ pre[class*="language-"] {
border-color: rgba(0, 84, 180, 0.7);
}
}
.mce-content-body img::-moz-selection {
.mce-content-body img[data-mce-selected]::-moz-selection {
background: none;
}
.mce-content-body img::selection {
.mce-content-body img[data-mce-selected]::selection {
background: none;
}
.ephox-snooker-resizer-bar {
@@ -21,11 +21,28 @@
.mce-content-body .mce-item-anchor[data-mce-selected] {
outline-offset: 1px;
}
.tox-comments-visible .tox-comment {
background-color: #fff0b7;
.tox-comments-visible .tox-comment[contenteditable="false"]:not([data-mce-selected]),
.tox-comments-visible span.tox-comment img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #ffe89d;
}
.tox-comments-visible .tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #ffe168;
.tox-comments-visible .tox-comment[contenteditable="false"][data-mce-annotation-active="true"]:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] img:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > audio:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] > video:not([data-mce-selected]),
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"] span.mce-preview-object:not([data-mce-selected]) {
outline: 3px solid #fed635;
}
.tox-comments-visible span.tox-comment:not([data-mce-selected]) {
background-color: #ffe89d;
outline: none;
}
.tox-comments-visible span.tox-comment[data-mce-annotation-active="true"]:not([data-mce-selected="inline-boundary"]) {
background-color: #fed635;
}
.tox-checklist > li:not(.tox-checklist--hidden) {
list-style: none;
@@ -205,6 +222,27 @@ pre[class*="language-"] {
.tox-cursor-format-painter {
cursor: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M15%2C6%20C15%2C5.45%2014.55%2C5%2014%2C5%20L6%2C5%20C5.45%2C5%205%2C5.45%205%2C6%20L5%2C10%20C5%2C10.55%205.45%2C11%206%2C11%20L14%2C11%20C14.55%2C11%2015%2C10.55%2015%2C10%20L15%2C9%20L16%2C9%20L16%2C12%20L9%2C12%20L9%2C19%20C9%2C19.55%209.45%2C20%2010%2C20%20L11%2C20%20C11.55%2C20%2012%2C19.55%2012%2C19%20L12%2C14%20L18%2C14%20L18%2C7%20L15%2C7%20L15%2C6%20Z%22%2F%3E%0A%20%20%20%20%3Cpath%20fill%3D%22%23000%22%20fill-rule%3D%22nonzero%22%20d%3D%22M1%2C1%20L8.25%2C1%20C8.66421356%2C1%209%2C1.33578644%209%2C1.75%20L9%2C1.75%20C9%2C2.16421356%208.66421356%2C2.5%208.25%2C2.5%20L2.5%2C2.5%20L2.5%2C8.25%20C2.5%2C8.66421356%202.16421356%2C9%201.75%2C9%20L1.75%2C9%20C1.33578644%2C9%201%2C8.66421356%201%2C8.25%20L1%2C1%20Z%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A"), default;
}
div.mce-footnotes hr {
margin-inline-end: auto;
margin-inline-start: 0;
width: 25%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
text-decoration: none;
}
@media print {
sup.mce-footnote a {
color: black;
text-decoration: none;
}
div.mce-footnotes {
break-inside: avoid;
width: 100%;
}
div.mce-footnotes li > a.mce-footnotes-backlink {
display: none;
}
}
.mce-content-body figure.align-left {
float: left;
}
@@ -234,6 +272,13 @@ pre[class*="language-"] {
.mce-preview-object[data-mce-selected="2"] .mce-shim {
display: none;
}
.mce-content-body .mce-mergetag:hover {
background-color: rgba(0, 108, 231, 0.1);
}
.mce-content-body .mce-mergetag-affix {
background-color: rgba(0, 108, 231, 0.1);
color: #006ce7;
}
.mce-object {
background: transparent url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%203h16a1%201%200%200%201%201%201v16a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V4a1%201%200%200%201%201-1zm1%202v14h14V5H5zm4.79%202.565l5.64%204.028a.5.5%200%200%201%200%20.814l-5.64%204.028a.5.5%200%200%201-.79-.407V7.972a.5.5%200%200%201%20.79-.407z%22%2F%3E%3C%2Fsvg%3E%0A") no-repeat center;
border: 1px dashed #aaa;
@@ -525,10 +570,10 @@ pre[class*="language-"] {
border-color: rgba(0, 84, 180, 0.7);
}
}
.mce-content-body img::-moz-selection {
.mce-content-body img[data-mce-selected]::-moz-selection {
background: none;
}
.mce-content-body img::selection {
.mce-content-body img[data-mce-selected]::selection {
background: none;
}
.ephox-snooker-resizer-bar {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+99 -19
View File
@@ -252,11 +252,24 @@ button::-moz-focus-inner {
margin: 0;
outline: none;
padding: 4px 16px;
position: relative;
text-align: center;
text-decoration: none;
text-transform: none;
white-space: nowrap;
}
.tox .tox-button::before {
border-radius: 3px;
bottom: -1px;
box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #207ab7, 0 0 0 3px rgba(32, 122, 183, 0.25);
content: '';
left: -1px;
opacity: 0;
pointer-events: none;
position: absolute;
right: -1px;
top: -1px;
}
.tox .tox-button[disabled] {
background-color: #207ab7;
background-image: none;
@@ -272,6 +285,9 @@ button::-moz-focus-inner {
box-shadow: none;
color: #fff;
}
.tox .tox-button:focus-visible:not(:disabled)::before {
opacity: 1;
}
.tox .tox-button:hover:not(:disabled) {
background-color: #1c6ca1;
background-image: none;
@@ -933,8 +949,9 @@ button::-moz-focus-inner {
justify-content: space-between;
}
.tox .tox-comment__date {
color: rgba(34, 47, 62, 0.7);
color: #222f3e;
font-size: 12px;
line-height: 18px;
}
.tox .tox-comment__body {
color: #222f3e;
@@ -1093,20 +1110,30 @@ button::-moz-focus-inner {
.tox .tox-user__avatar svg {
fill: rgba(34, 47, 62, 0.7);
}
.tox .tox-user__avatar img {
border-radius: 50%;
height: 36px;
object-fit: cover;
vertical-align: middle;
width: 36px;
}
.tox .tox-user__name {
color: rgba(34, 47, 62, 0.7);
font-size: 12px;
color: #222f3e;
font-size: 14px;
font-style: normal;
font-weight: bold;
text-transform: uppercase;
line-height: 18px;
text-transform: none;
}
.tox:not([dir=rtl]) .tox-user__avatar svg {
.tox:not([dir=rtl]) .tox-user__avatar svg,
.tox:not([dir=rtl]) .tox-user__avatar img {
margin-right: 8px;
}
.tox:not([dir=rtl]) .tox-user__avatar + .tox-user__name {
margin-left: 8px;
}
.tox[dir=rtl] .tox-user__avatar svg {
.tox[dir=rtl] .tox-user__avatar svg,
.tox[dir=rtl] .tox-user__avatar img {
margin-left: 8px;
}
.tox[dir=rtl] .tox-user__avatar + .tox-user__name {
@@ -1151,10 +1178,11 @@ button::-moz-focus-inner {
width: 95vw;
z-index: 2;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog {
align-self: flex-start;
margin: 8px auto;
max-height: calc(100vh - 8px * 2);
width: calc(100vw - 16px);
}
}
@@ -1210,7 +1238,7 @@ button::-moz-focus-inner {
text-align: left;
text-transform: none;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog__body {
flex-direction: column;
}
@@ -1221,7 +1249,7 @@ button::-moz-focus-inner {
flex-direction: column;
padding: 16px 16px;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox .tox-dialog__body-nav {
flex-direction: row;
-webkit-overflow-scrolling: touch;
@@ -1389,6 +1417,9 @@ button::-moz-focus-inner {
padding-bottom: 8px;
padding-top: 8px;
}
.tox .tox-dialog__iframe.tox-dialog__iframe--opaque {
background: #fff;
}
.tox .tox-dialog__popups {
position: absolute;
width: 100%;
@@ -1421,12 +1452,12 @@ button::-moz-focus-inner {
.tox .tox-dialog-dock-transition.tox-dialog-dock-fadein {
transition-delay: 0s;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav {
margin-right: 0;
}
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox:not([dir=rtl]) .tox-dialog__body-nav-item:not(:first-child) {
margin-left: 8px;
}
@@ -1438,12 +1469,12 @@ button::-moz-focus-inner {
.tox[dir=rtl] .tox-dialog__body {
text-align: right;
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav {
margin-left: 0;
}
}
@media only screen and (max-width:767px) {
@media only screen and (max-width: 767px ) {
body:not(.tox-force-desktop) .tox[dir=rtl] .tox-dialog__body-nav-item:not(:first-child) {
margin-right: 8px;
}
@@ -1500,6 +1531,8 @@ body.tox-dialog__disable-scroll {
overflow: hidden;
}
.tox .tox-editor-header {
display: grid;
grid-template-columns: 1fr min-content;
z-index: 1;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header {
@@ -1510,7 +1543,7 @@ body.tox-dialog__disable-scroll {
transition: box-shadow 0.5s;
}
.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-bottom .tox-editor-header {
border-top: 1px solid #c1c1c1;
border-top: 1px solid #cccccc;
box-shadow: none;
}
.tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-sticky-on .tox-editor-header {
@@ -1581,8 +1614,7 @@ body.tox-dialog__disable-scroll {
max-width: 25em;
}
.tox .tox-autocompleter .tox-menu {
border-color: #cccccc;
box-shadow: none;
box-sizing: border-box;
max-width: 25em;
}
.tox .tox-autocompleter .tox-autocompleter-highlight {
@@ -2073,6 +2105,12 @@ body.tox-dialog__disable-scroll {
.tox .tox-menu.tox-collection.tox-collection--grid {
padding: 4px;
}
@media only screen and (min-width: 768px ) {
.tox .tox-menu .tox-collection__item-label {
overflow-wrap: break-word;
word-break: normal;
}
}
.tox .tox-menu__label h1,
.tox .tox-menu__label h2,
.tox .tox-menu__label h3,
@@ -2091,10 +2129,39 @@ body.tox-dialog__disable-scroll {
flex: 0 0 auto;
flex-shrink: 0;
flex-wrap: wrap;
grid-column: 1 / -1;
grid-row: 1;
padding: 0 4px 0 4px;
}
.tox.tox-tinymce:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
border-top: 1px solid #cccccc;
.tox .tox-promotion + .tox-menubar {
grid-column: 1;
}
.tox .tox-promotion {
background: url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;
background-color: #fff;
grid-column: 2;
grid-row: 1;
padding-inline-end: 8px;
padding-inline-start: 4px;
padding-top: 5px;
}
.tox .tox-promotion-link {
align-items: unsafe center;
background-color: #E8F1F8;
border-radius: 5px;
color: #086BE6;
cursor: pointer;
display: flex;
font-size: 14px;
height: 26.6px;
padding: 4px 8px;
white-space: nowrap;
}
.tox .tox-promotion-link:hover {
background-color: #B4D7FF;
}
.tox .tox-promotion-link:focus {
background-color: #D9EDF7;
}
/* Deprecated. Remove in next major release */
.tox .tox-mbtn {
@@ -2874,10 +2941,14 @@ body.tox-dialog__disable-scroll {
.tox .tox-toolbar__overflow--shrinking {
transition: opacity 0.3s ease, height 0.2s linear 0.1s, visibility 0s linear 0.3s;
}
.tox .tox-toolbar-overlord,
.tox .tox-anchorbar {
grid-column: 1 / -1;
}
.tox .tox-menubar + .tox-toolbar,
.tox .tox-menubar + .tox-toolbar-overlord {
border-top: 1px solid #cccccc;
margin-top: 0;
margin-top: -1px;
padding-bottom: 0px;
padding-top: 0px;
}
@@ -3087,6 +3158,12 @@ body.tox-dialog__disable-scroll {
border: 1px solid #cccccc;
padding: 0;
}
.tox .tox-pop .tox-pop__dialog .tox-toolbar {
padding: 0;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-menubar {
border-top: 1px solid #cccccc;
}
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar-overlord:first-child .tox-toolbar__primary,
.tox:not(.tox-tinymce-inline) .tox-editor-header:not(:first-child) .tox-toolbar:first-child {
border-top: 1px solid #cccccc;
@@ -3117,3 +3194,6 @@ body.tox-dialog__disable-scroll {
padding-bottom: 0;
padding-right: 0;
}
.tox .tox-button::before {
display: none;
}
File diff suppressed because one or more lines are too long
+19 -42
View File
@@ -1,11 +1,13 @@
<script lang="ts" setup>
import eruda from 'eruda'
import VConsole from 'vconsole'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import hotkeys from 'hotkeys-js'
import eventBus from './utils/eventBus'
import useSettingsStore from '@/store/modules/settings'
import useMenuStore from '@/store/modules/menu'
const settingsStore = useSettingsStore()
const { auth } = useAuth()
const buttonConfig = ref({
autoInsertSpace: true,
@@ -14,59 +16,27 @@ const buttonConfig = ref({
// 侧边栏主导航当前实际宽度
const mainSidebarActualWidth = computed(() => {
let actualWidth = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--g-main-sidebar-width'))
if (['head', 'single'].includes(settingsStore.menu.menuMode))
if (['head', 'single'].includes(settingsStore.settings.menu.menuMode)) {
actualWidth = 0
}
return `${actualWidth}px`
})
// 侧边栏次导航当前实际宽度
const subSidebarActualWidth = computed(() => {
let actualWidth = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--g-sub-sidebar-width'))
if (settingsStore.menu.subMenuCollapse)
if (settingsStore.settings.menu.subMenuCollapse) {
actualWidth = 64
}
return `${actualWidth}px`
})
watch(() => settingsStore.app.colorScheme, () => {
if (settingsStore.app.colorScheme === 'dark')
document.documentElement.classList.add('dark')
else
document.documentElement.classList.remove('dark')
}, {
immediate: true,
})
watch(() => settingsStore.mode, () => {
if (settingsStore.mode === 'pc') {
settingsStore.$patch((state) => {
state.menu.subMenuCollapse = settingsStore.subMenuCollapseLastStatus
})
}
else if (settingsStore.mode === 'mobile') {
settingsStore.$patch((state) => {
state.menu.subMenuCollapse = true
})
}
document.body.setAttribute('data-mode', settingsStore.mode)
}, {
immediate: true,
})
watch(() => settingsStore.menu.menuMode, () => {
document.body.setAttribute('data-menu-mode', settingsStore.menu.menuMode)
}, {
immediate: true,
})
watch([
() => settingsStore.app.enableDynamicTitle,
() => settingsStore.settings.app.enableDynamicTitle,
() => settingsStore.title,
], () => {
if (settingsStore.app.enableDynamicTitle && settingsStore.title) {
const title = settingsStore.title
if (settingsStore.settings.app.enableDynamicTitle && settingsStore.title) {
const title = typeof settingsStore.title === 'function' ? settingsStore.title() : settingsStore.title
document.title = `${title} - ${import.meta.env.VITE_APP_TITLE}`
}
else {
@@ -85,16 +55,23 @@ onMounted(() => {
eventBus.emit('global-system-info-toggle')
})
})
import.meta.env.VITE_APP_DEBUG_TOOL === 'eruda' && eruda.init()
import.meta.env.VITE_APP_DEBUG_TOOL === 'vconsole' && new VConsole()
</script>
<template>
<el-config-provider :locale="zhCn" :size="settingsStore.app.elementSize" :button="buttonConfig">
<el-config-provider :locale="zhCn" :size="settingsStore.settings.app.elementSize" :button="buttonConfig">
<RouterView
v-slot="{ Component, route }"
:style="{
'--g-main-sidebar-actual-width': mainSidebarActualWidth,
'--g-sub-sidebar-actual-width': subSidebarActualWidth,
}"
/>
>
<component :is="Component" v-if="auth(route.meta.auth ?? '')" />
<not-allowed v-else />
</RouterView>
<system-info />
</el-config-provider>
</template>
+20 -20
View File
@@ -1,20 +1,23 @@
import axios from 'axios'
// import qs from 'qs'
import { ElMessage } from 'element-plus'
import router from '@/router/index'
import useUserStore from '@/store/modules/user'
const toLogin = () => {
router.push({
path: '/login',
query: {
redirect: router.currentRoute.value.path !== '/login' ? router.currentRoute.value.fullPath : undefined,
},
useUserStore().logout().then(() => {
router.push({
path: '/login',
query: {
redirect: router.currentRoute.value.path !== '/login' ? router.currentRoute.value.fullPath : undefined,
},
})
})
}
const api = axios.create({
baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
timeout: 10000,
baseURL: (import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true') ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
timeout: 1000 * 60,
responseType: 'json',
})
@@ -25,9 +28,9 @@ api.interceptors.request.use(
* 全局拦截请求发送前提交的参数
* 以下代码为示例,在请求头里带上 token 信息
*/
if (userStore.isLogin && request.headers)
if (userStore.isLogin && request.headers) {
request.headers.Token = userStore.token
}
// 是否将 POST 请求参数进行字符串化处理
if (request.method === 'post') {
// request.data = qs.stringify(request.data, {
@@ -47,11 +50,7 @@ api.interceptors.response.use(
* 请求出错时 error 会返回错误信息
*/
if (response.data.status === 1) {
if (response.data.error === '') {
// 请求成功并且没有报错
return Promise.resolve(response.data)
}
else {
if (response.data.error !== '') {
// 这里做错误提示,如果使用了 element plus 则可以使用 Message 进行提示
// ElMessage.error(options)
return Promise.reject(response.data)
@@ -60,18 +59,19 @@ api.interceptors.response.use(
else {
toLogin()
}
return Promise.resolve(response.data)
},
(error) => {
let message = error.message
if (message === 'Network Error')
if (message === 'Network Error') {
message = '后端网络故障'
else if (message.includes('timeout'))
}
else if (message.includes('timeout')) {
message = '接口请求超时'
else if (message.includes('Request failed with status code'))
}
else if (message.includes('Request failed with status code')) {
message = `接口${message.substr(message.length - 3)}异常`
}
ElMessage({
message,
type: 'error',
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.2 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

+1 -1
View File
@@ -1 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M768 298.667h170.667V384h-256V128H768v170.667zM341.333 384h-256v-85.333H256V128h85.333v256zM768 725.333V896h-85.333V640h256v85.333H768zM341.333 640v256H256V725.333H85.333V640h256z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M768 298.667h170.667V384h-256V128H768v170.667zM341.333 384h-256v-85.333H256V128h85.333v256zM768 725.333V896h-85.333V640h256v85.333H768zM341.333 640v256H256V725.333H85.333V640h256z"/></svg>

Before

Width:  |  Height:  |  Size: 299 B

After

Width:  |  Height:  |  Size: 299 B

+1 -1
View File
@@ -1 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M682.667 128h256v256h-85.334V213.333H682.667V128zm-597.334 0h256v85.333H170.667V384H85.333V128zm768 682.667V640h85.334v256h-256v-85.333h170.666zm-682.666 0h170.666V896h-256V640h85.334v170.667z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M682.667 128h256v256h-85.334V213.333H682.667V128zm-597.334 0h256v85.333H170.667V384H85.333V128zm768 682.667V640h85.334v256h-256v-85.333h170.666zm-682.666 0h170.666V896h-256V640h85.334v170.667z"/></svg>

Before

Width:  |  Height:  |  Size: 312 B

After

Width:  |  Height:  |  Size: 312 B

+1 -1
View File
@@ -1 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M704 328a72 72 0 1 0 144 0 72 72 0 1 0-144 0z"/><path d="M999.904 116.608a32 32 0 0 0-21.952-10.912L521.76 73.792a31.552 31.552 0 0 0-27.2 11.904l-92.192 114.848a32 32 0 0 0 .672 40.896l146.144 169.952-147.456 194.656 36.48-173.376a32 32 0 0 0-11.136-31.424L235.616 245.504l79.616-125.696a32 32 0 0 0-29.28-49.024L45.76 87.552a32 32 0 0 0-29.696 34.176l55.808 798.016a32.064 32.064 0 0 0 34.304 29.696l176.512-13.184c17.632-1.312 30.848-16.672 29.504-34.272s-16.576-31.04-34.304-29.536L133.44 883.232l-6.432-92.512 125.312-12.576a32 32 0 0 0 28.672-35.04 32.16 32.16 0 0 0-35.04-28.672L122.56 726.848 82.144 149.184l145.152-10.144-60.96 96.224a32 32 0 0 0 6.848 41.952l198.4 161.344-58.752 279.296a30.912 30.912 0 0 0 .736 14.752 31.68 31.68 0 0 0 1.408 11.04l51.52 154.56a31.968 31.968 0 0 0 27.456 21.76l523.104 47.552a32.064 32.064 0 0 0 34.848-29.632l55.776-798.048a32.064 32.064 0 0 0-7.776-23.232zm-98.912 630.848-412.576-39.648a31.52 31.52 0 0 0-34.912 28.768 32 32 0 0 0 28.8 34.912l414.24 39.808-6.272 89.536-469.728-42.72-39.584-118.72 234.816-310.016a31.936 31.936 0 0 0-1.248-40.192L468.896 219.84l65.088-81.056 407.584 28.48-40.576 580.192z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M704 328a72 72 0 1 0 144 0 72 72 0 1 0-144 0z"/><path d="M999.904 116.608a32 32 0 0 0-21.952-10.912L521.76 73.792a31.552 31.552 0 0 0-27.2 11.904l-92.192 114.848a32 32 0 0 0 .672 40.896l146.144 169.952-147.456 194.656 36.48-173.376a32 32 0 0 0-11.136-31.424L235.616 245.504l79.616-125.696a32 32 0 0 0-29.28-49.024L45.76 87.552a32 32 0 0 0-29.696 34.176l55.808 798.016a32.064 32.064 0 0 0 34.304 29.696l176.512-13.184c17.632-1.312 30.848-16.672 29.504-34.272s-16.576-31.04-34.304-29.536L133.44 883.232l-6.432-92.512 125.312-12.576a32 32 0 0 0 28.672-35.04 32.16 32.16 0 0 0-35.04-28.672L122.56 726.848 82.144 149.184l145.152-10.144-60.96 96.224a32 32 0 0 0 6.848 41.952l198.4 161.344-58.752 279.296a30.912 30.912 0 0 0 .736 14.752 31.68 31.68 0 0 0 1.408 11.04l51.52 154.56a31.968 31.968 0 0 0 27.456 21.76l523.104 47.552a32.064 32.064 0 0 0 34.848-29.632l55.776-798.048a32.064 32.064 0 0 0-7.776-23.232zm-98.912 630.848-412.576-39.648a31.52 31.52 0 0 0-34.912 28.768 32 32 0 0 0 28.8 34.912l414.24 39.808-6.272 89.536-469.728-42.72-39.584-118.72 234.816-310.016a31.936 31.936 0 0 0-1.248-40.192L468.896 219.84l65.088-81.056 407.584 28.48-40.576 580.192z"/></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

+1 -1
View File
@@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1629577492940" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7817" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M512.213359 958.989357 63.594899 510.930645l84.024695-84.023672L448.20351 729.129202 448.20351 63.546292l127.940904 0L576.144414 729.129202l299.651684-302.222229 84.009346 84.023672L512.213359 958.989357z" p-id="7818"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="icon" viewBox="0 0 1024 1024"><path d="M512.213 958.99 63.595 510.93l84.025-84.023 300.584 302.222V63.546h127.94V729.13l299.652-302.222 84.01 84.024-447.593 448.058z"/></svg>

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 244 B

+1 -1
View File
@@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1629616013600" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3179" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M916.210526 242.526316v215.578947H204.8l194.021053-194.021052-75.452632-75.452632-323.368421 323.368421 323.368421 323.368421 75.452632-75.452632-194.021053-194.021052h819.2v-323.368421z" p-id="3180"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="icon" viewBox="0 0 1024 1024"><path d="M916.21 242.526v215.58H204.8l194.021-194.022-75.453-75.452L0 512l323.368 323.368 75.453-75.452L204.8 565.895H1024V242.526z"/></svg>

Before

Width:  |  Height:  |  Size: 588 B

After

Width:  |  Height:  |  Size: 240 B

+1 -1
View File
@@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1629577505039" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8607" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M959.804421 511.603981l-84.009346 84.023672L576.143391 293.406446l0 665.582911L448.20351 958.989357 448.20351 293.406446 147.619594 595.628676l-84.024695-84.023672L512.213359 63.546292 959.804421 511.603981z" p-id="8608"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" class="icon" viewBox="0 0 1024 1024"><path d="m959.804 511.604-84.009 84.024-299.652-302.222V958.99h-127.94V293.406L147.62 595.63l-84.025-84.024L512.213 63.546l447.591 448.058z"/></svg>

Before

Width:  |  Height:  |  Size: 609 B

After

Width:  |  Height:  |  Size: 248 B

+1 -1
View File
@@ -1 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M165.415 827.077c-11.815 0-19.692-7.877-19.692-19.692V214.646c0-11.815 7.877-19.692 19.692-19.692h159.508c7.877 0 17.723 3.938 23.63 9.846l228.432 287.508c7.877 9.846 7.877 25.6 0 37.415l-230.4 287.508c-5.908 7.877-15.754 11.815-25.6 11.815l-155.57-1.97zm706.954-334.77L641.97 206.77c-9.846-11.815-27.569-15.754-41.354-3.938l-45.292 37.415c-13.785 9.846-15.754 29.539-3.938 41.354L738.462 512 551.385 744.37c-9.847 11.815-7.877 31.507 3.938 41.353l45.292 37.415c13.785 9.847 29.539 7.877 41.354-3.938l230.4-287.508c7.877-15.754 7.877-29.538 0-39.384z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M165.415 827.077c-11.815 0-19.692-7.877-19.692-19.692V214.646c0-11.815 7.877-19.692 19.692-19.692h159.508c7.877 0 17.723 3.938 23.63 9.846l228.432 287.508c7.877 9.846 7.877 25.6 0 37.415l-230.4 287.508c-5.908 7.877-15.754 11.815-25.6 11.815l-155.57-1.97zm706.954-334.77L641.97 206.77c-9.846-11.815-27.569-15.754-41.354-3.938l-45.292 37.415c-13.785 9.846-15.754 29.539-3.938 41.354L738.462 512 551.385 744.37c-9.847 11.815-7.877 31.507 3.938 41.353l45.292 37.415c13.785 9.847 29.539 7.877 41.354-3.938l230.4-287.508c7.877-15.754 7.877-29.538 0-39.384z"/></svg>

Before

Width:  |  Height:  |  Size: 670 B

After

Width:  |  Height:  |  Size: 670 B

+1 -1
View File
@@ -1 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M487 71.425a75 75 0 0 1 72.575 0l335.7 185.5a75 75 0 0 1 38.75 65.65V690.85a75 75 0 0 1-38.75 65.625l-335.7 185.55a75 75 0 0 1-72.55 0l-335.7-185.5a75 75 0 0 1-38.75-65.675V322.6a75 75 0 0 1 38.75-65.6L487 71.4v.025zM859 322.6 523.275 137.1l-335.7 185.5v368.25l335.7 185.5 335.75-185.5V322.6zm-601.75 37.1A37.5 37.5 0 0 1 308.2 345l215.1 118.875L738.45 345a37.5 37.5 0 0 1 36.25 65.625l-213.9 118.25V764.55a37.5 37.5 0 0 1-75 0v-235.7l-213.9-118.2a37.5 37.5 0 0 1-14.65-51v.05z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M487 71.425a75 75 0 0 1 72.575 0l335.7 185.5a75 75 0 0 1 38.75 65.65V690.85a75 75 0 0 1-38.75 65.625l-335.7 185.55a75 75 0 0 1-72.55 0l-335.7-185.5a75 75 0 0 1-38.75-65.675V322.6a75 75 0 0 1 38.75-65.6L487 71.4v.025zM859 322.6 523.275 137.1l-335.7 185.5v368.25l335.7 185.5 335.75-185.5V322.6zm-601.75 37.1A37.5 37.5 0 0 1 308.2 345l215.1 118.875L738.45 345a37.5 37.5 0 0 1 36.25 65.625l-213.9 118.25V764.55a37.5 37.5 0 0 1-75 0v-235.7l-213.9-118.2a37.5 37.5 0 0 1-14.65-51v.05z"/></svg>

Before

Width:  |  Height:  |  Size: 597 B

After

Width:  |  Height:  |  Size: 597 B

+1 -1
View File
@@ -1 +1 @@
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M913.6 135.2H380.2c-26.7 0-44.4 17.8-44.4 44.4V224c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4zm-755.6 0h-44.4c-22.2 0-44.4 22.2-44.4 44.4V224c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm0 311.1h-44.4c-22.2 0-44.4 22.2-44.4 44.4v44.4c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm755.6 0H380.2c-26.7 0-44.4 17.8-44.4 44.4v44.4c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4zM158 757.4h-44.4c-22.2 0-44.4 22.2-44.4 44.4v44.4c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm755.6 0H380.2c-26.7 0-44.4 17.8-44.4 44.4v44.4c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024"><path d="M913.6 135.2H380.2c-26.7 0-44.4 17.8-44.4 44.4V224c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4zm-755.6 0h-44.4c-22.2 0-44.4 22.2-44.4 44.4V224c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm0 311.1h-44.4c-22.2 0-44.4 22.2-44.4 44.4v44.4c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm755.6 0H380.2c-26.7 0-44.4 17.8-44.4 44.4v44.4c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4zM158 757.4h-44.4c-22.2 0-44.4 22.2-44.4 44.4v44.4c0 22.2 22.2 44.4 44.4 44.4H158c22.2 0 44.4-22.2 44.4-44.4v-44.4c.1-22.2-22.1-44.4-44.4-44.4zm755.6 0H380.2c-26.7 0-44.4 17.8-44.4 44.4v44.4c0 26.7 17.8 44.4 44.4 44.4h533.3c26.7 0 44.4-17.8 44.4-44.4v-44.4c.1-26.6-17.7-44.4-44.3-44.4z"/></svg>

Before

Width:  |  Height:  |  Size: 971 B

After

Width:  |  Height:  |  Size: 971 B

+1 -1
View File
@@ -1 +1 @@
<svg class="icon" viewBox="0 0 1028 1024" xmlns="http://www.w3.org/2000/svg" width="200.781" height="200"><path d="M989.867 234.667H499.2c-17.067 0-34.133-21.334-34.133-42.667 0-25.6 12.8-42.667 34.133-42.667h490.667c17.066 0 34.133 17.067 34.133 42.667 0 21.333-12.8 42.667-34.133 42.667zm-473.6 128h465.066c25.6 0 46.934 21.333 46.934 42.666 0 25.6-21.334 42.667-46.934 42.667H516.267c-25.6 0-46.934-17.067-46.934-42.667s21.334-42.666 46.934-42.666zm0 298.666c-25.6 0-46.934-21.333-46.934-42.666 0-25.6 21.334-42.667 46.934-42.667h465.066c25.6 0 46.934 17.067 46.934 42.667s-21.334 42.666-46.934 42.666H516.267zm4.266 128H972.8c29.867 0 51.2 17.067 51.2 42.667s-21.333 42.667-51.2 42.667H520.533c-29.866 0-51.2-17.067-51.2-42.667s21.334-42.667 51.2-42.667zm-192 25.6c-17.066 17.067-46.933 17.067-64 0L12.8 541.867c-17.067-17.067-17.067-51.2 0-68.267l251.733-273.067c17.067-17.066 46.934-17.066 64 0s17.067 51.2 0 68.267L106.667 507.733l221.866 238.934c17.067 21.333 17.067 51.2 0 68.266z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="200.781" height="200" class="icon" viewBox="0 0 1028 1024"><path d="M989.867 234.667H499.2c-17.067 0-34.133-21.334-34.133-42.667 0-25.6 12.8-42.667 34.133-42.667h490.667c17.066 0 34.133 17.067 34.133 42.667 0 21.333-12.8 42.667-34.133 42.667zm-473.6 128h465.066c25.6 0 46.934 21.333 46.934 42.666 0 25.6-21.334 42.667-46.934 42.667H516.267c-25.6 0-46.934-17.067-46.934-42.667s21.334-42.666 46.934-42.666zm0 298.666c-25.6 0-46.934-21.333-46.934-42.666 0-25.6 21.334-42.667 46.934-42.667h465.066c25.6 0 46.934 17.067 46.934 42.667s-21.334 42.666-46.934 42.666H516.267zm4.266 128H972.8c29.867 0 51.2 17.067 51.2 42.667s-21.333 42.667-51.2 42.667H520.533c-29.866 0-51.2-17.067-51.2-42.667s21.334-42.667 51.2-42.667zm-192 25.6c-17.066 17.067-46.933 17.067-64 0L12.8 541.867c-17.067-17.067-17.067-51.2 0-68.267l251.733-273.067c17.067-17.066 46.934-17.066 64 0s17.067 51.2 0 68.267L106.667 507.733l221.866 238.934c17.067 21.333 17.067 51.2 0 68.266z"/></svg>

Before

Width:  |  Height:  |  Size: 998 B

After

Width:  |  Height:  |  Size: 998 B

-1
View File
@@ -6,5 +6,4 @@
"overlay": #1d1e1f,
)
);
@use "element-plus/theme-chalk/src/dark/css-vars.scss" as *;
@@ -5,6 +5,5 @@
// )
// )
// );
@use "element-plus/theme-chalk/src/index.scss" as *;
@use "./dark.scss";
+4
View File
@@ -82,3 +82,7 @@ textarea {
margin-left: 10px;
}
}
.el-loading-mask {
z-index: 900 !important;
}
+5 -7
View File
@@ -1,12 +1,10 @@
// 文字超出隐藏,默认为单行超出隐藏,可设置多行
@mixin text-overflow($line: 1, $fixed-width: true) {
@if ($line == 1 and $fixed-width == true) {
@if $line == 1 and $fixed-width == true {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@else {
} @else {
/* stylelint-disable-next-line value-no-vendor-prefix */
display: -webkit-box;
-webkit-box-orient: vertical;
@@ -19,17 +17,17 @@
@mixin position-center($type: x) {
position: absolute;
@if ($type == x) {
@if $type == x {
left: 50%;
transform: translateX(-50%);
}
@if ($type == y) {
@if $type == y {
top: 50%;
transform: translateY(-50%);
}
@if ($type == xy) {
@if $type == xy {
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
-30
View File
@@ -1,30 +0,0 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'
export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
Auth: typeof import('./components/Auth/index.vue')['default']
AuthAll: typeof import('./components/AuthAll/index.vue')['default']
BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default']
Copyright: typeof import('./components/Copyright/index.vue')['default']
Editor: typeof import('./components/Editor/index.vue')['default']
FileUpload: typeof import('./components/FileUpload/index.vue')['default']
FixedActionBar: typeof import('./components/FixedActionBar/index.vue')['default']
ImagePreview: typeof import('./components/ImagePreview/index.vue')['default']
ImagesUpload: typeof import('./components/ImagesUpload/index.vue')['default']
ImageUpload: typeof import('./components/ImageUpload/index.vue')['default']
PageHeader: typeof import('./components/PageHeader/index.vue')['default']
PageMain: typeof import('./components/PageMain/index.vue')['default']
PcasCascader: typeof import('./components/PcasCascader/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SearchBar: typeof import('./components/SearchBar/index.vue')['default']
SvgIcon: typeof import('./components/SvgIcon/index.vue')['default']
SystemInfo: typeof import('./components/SystemInfo/index.vue')['default']
Trend: typeof import('./components/Trend/index.vue')['default']
}
}
+4 -4
View File
@@ -15,9 +15,9 @@ const emit = defineEmits(['checkAll', 'checkNull'])
const checkAll = computed({
get() {
let flag = false
if (props.data.length !== 0 && props.data.length === props.selectionData.length)
if (props.data.length !== 0 && props.data.length === props.selectionData.length) {
flag = true
}
return flag
},
set(newVal) {
@@ -27,9 +27,9 @@ const checkAll = computed({
const isIndeterminate = computed(() => {
let flag = false
if (props.selectionData.length > 0 && props.selectionData.length < props.data.length)
if (props.selectionData.length > 0 && props.selectionData.length < props.data.length) {
flag = true
}
return flag
})
</script>
+6 -6
View File
@@ -6,15 +6,15 @@ const settingsStore = useSettingsStore()
</script>
<template>
<footer v-if="route.meta.copyright ?? settingsStore.copyright.enable" class="copyright">
<footer v-if="route.meta.copyright ?? settingsStore.settings.copyright.enable" class="copyright">
<span>Copyright</span>
<span class="icon">©</span>
<span v-if="settingsStore.copyright.dates">{{ settingsStore.copyright.dates }}</span>
<template v-if="settingsStore.copyright.company">
<a v-if="settingsStore.copyright.website" :href="settingsStore.copyright.website" target="_blank" rel="noopener">{{ settingsStore.copyright.company }}</a>
<span v-else>{{ settingsStore.copyright.company }}</span>
<span v-if="settingsStore.settings.copyright.dates">{{ settingsStore.settings.copyright.dates }}</span>
<template v-if="settingsStore.settings.copyright.company">
<a v-if="settingsStore.settings.copyright.website" :href="settingsStore.settings.copyright.website" target="_blank" rel="noopener">{{ settingsStore.settings.copyright.company }}</a>
<span v-else>{{ settingsStore.settings.copyright.company }}</span>
</template>
<a v-if="settingsStore.copyright.beian" href="https://beian.miit.gov.cn/" target="_blank" rel="noopener">{{ settingsStore.copyright.beian }}</a>
<a v-if="settingsStore.settings.copyright.beian" href="https://beian.miit.gov.cn/" target="_blank" rel="noopener">{{ settingsStore.settings.copyright.beian }}</a>
</footer>
</template>
+3 -3
View File
@@ -42,8 +42,8 @@ const settingsStore = useSettingsStore()
const defaultSetting = ref({
language_url: 'tinymce/langs/zh-Hans.js',
language: 'zh-Hans',
skin_url: settingsStore.app.colorScheme === 'light' ? 'tinymce/skins/ui/oxide' : 'tinymce/skins/ui/oxide-dark',
content_css: settingsStore.app.colorScheme === 'light' ? 'tinymce/skins/content/default/content.min.css' : 'tinymce/skins/content/dark/content.min.css',
skin_url: settingsStore.settings.app.colorScheme === 'light' ? 'tinymce/skins/ui/oxide' : 'tinymce/skins/ui/oxide-dark',
content_css: settingsStore.settings.app.colorScheme === 'light' ? 'tinymce/skins/content/default/content.min.css' : 'tinymce/skins/content/dark/content.min.css',
min_height: 250,
max_height: 600,
selector: 'textarea',
@@ -59,7 +59,7 @@ const defaultSetting = ref({
'%H:%M:%S',
],
// https://www.tiny.cloud/docs/tinymce/6/file-image-upload/#images_upload_handler
images_upload_handler: (blobInfo: any, progress: any) => new Promise((resolve, reject) => {
images_upload_handler: (blobInfo: any) => new Promise((resolve) => {
const img = `data:image/jpeg;base64,${blobInfo.base64()}`
resolve(img)
}),
+5 -5
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup name="FileUpload">
import { UploadUserFile } from 'element-plus'
import { ElMessage, UploadUserFile } from 'element-plus'
import type { UploadProps } from 'element-plus'
const props = defineProps({
@@ -48,12 +48,12 @@ const beforeUpload: UploadProps['beforeUpload'] = (file) => {
const fileExt = fileName.at(-1)
const isTypeOk = props.ext.includes(fileExt)
const isSizeOk = file.size / 1024 / 1024 < props.size
if (!isTypeOk)
if (!isTypeOk) {
ElMessage.error(`上传文件只支持 ${props.ext.join(' / ')} 格式!`)
if (!isSizeOk)
}
if (!isSizeOk) {
ElMessage.error(`上传文件大小不能超过 ${props.size}MB!`)
}
return isTypeOk && isSizeOk
}
+1 -1
View File
@@ -24,7 +24,7 @@ const realHeight = computed(() => {
</script>
<template>
<el-image :src="src" fit="cover" :style="`width:${realWidth};height:${realHeight};`" :preview-src-list="[src]">
<el-image :src="src" fit="cover" :style="`width:${realWidth};height:${realHeight};`" :preview-src-list="[src]" preview-teleported>
<template #error>
<div class="image-slot">
<el-icon>
+8 -7
View File
@@ -1,5 +1,6 @@
<script lang="ts" setup name="ImageUpload">
import type { UploadProps } from 'element-plus'
import { ElMessage } from 'element-plus'
const props = defineProps({
action: {
@@ -75,15 +76,15 @@ const beforeUpload: UploadProps['beforeUpload'] = (file) => {
const fileExt = fileName.at(-1)
const isTypeOk = props.ext.includes(fileExt)
const isSizeOk = file.size / 1024 / 1024 < props.size
if (!isTypeOk)
if (!isTypeOk) {
ElMessage.error(`上传图片只支持 ${props.ext.join(' / ')} 格式!`)
if (!isSizeOk)
}
if (!isSizeOk) {
ElMessage.error(`上传图片大小不能超过 ${props.size}MB!`)
if (isTypeOk && isSizeOk)
}
if (isTypeOk && isSizeOk) {
uploadData.value.progress.preview = URL.createObjectURL(file)
}
return isTypeOk && isSizeOk
}
const onProgress: UploadProps['onProgress'] = (file) => {
@@ -146,7 +147,7 @@ const onSuccess: UploadProps['onSuccess'] = (res) => {
<el-alert :title="`上传图片支持 ${ext.join(' / ')} 格式,且图片大小不超过 ${size}MB,建议图片尺寸为 ${width}*${height}`" type="info" show-icon :closable="false" />
</div>
</div>
<el-image-viewer v-if="uploadData.imageViewerVisible" :url-list="[url]" @close="previewClose" />
<el-image-viewer v-if="uploadData.imageViewerVisible" :url-list="[url]" teleported @close="previewClose" />
</div>
</template>
+12 -11
View File
@@ -1,5 +1,6 @@
<script lang="ts" setup name="ImagesUpload">
import type { UploadProps } from 'element-plus'
import { ElMessage } from 'element-plus'
const props = defineProps({
action: {
@@ -81,12 +82,12 @@ function remove(index: number) {
// 移动
function move(index: number, type: 'left' | 'right') {
const url = props.url
if (type === 'left' && index !== 0)
if (type === 'left' && index !== 0) {
url[index] = url.splice(index - 1, 1, url[index])[0]
if (type === 'right' && index !== url.length - 1)
}
if (type === 'right' && index !== url.length - 1) {
url[index] = url.splice(index + 1, 1, url[index])[0]
}
emit('update:url', url)
}
@@ -95,15 +96,15 @@ const beforeUpload: UploadProps['beforeUpload'] = (file) => {
const fileExt = fileName.at(-1)
const isTypeOk = props.ext.includes(fileExt)
const isSizeOk = file.size / 1024 / 1024 < props.size
if (!isTypeOk)
if (!isTypeOk) {
ElMessage.error(`上传图片只支持 ${props.ext.join(' / ')} 格式!`)
if (!isSizeOk)
}
if (!isSizeOk) {
ElMessage.error(`上传图片大小不能超过 ${props.size}MB!`)
if (isTypeOk && isSizeOk)
}
if (isTypeOk && isSizeOk) {
uploadData.value.progress.preview = URL.createObjectURL(file)
}
return isTypeOk && isSizeOk
}
const onProgress: UploadProps['onProgress'] = (file) => {
@@ -173,7 +174,7 @@ const onSuccess: UploadProps['onSuccess'] = (res) => {
<el-alert :title="`上传图片支持 ${ext.join(' / ')} 格式,单张图片大小不超过 ${size}MB,建议图片尺寸为 ${width}*${height},且图片数量不超过 ${max} 张`" type="info" show-icon :closable="false" />
</div>
</div>
<el-image-viewer v-if="uploadData.imageViewerVisible" :url-list="url as string[]" :initial-index="uploadData.dialogImageIndex" @close="previewClose" />
<el-image-viewer v-if="uploadData.imageViewerVisible" :url-list="url as string[]" :initial-index="uploadData.dialogImageIndex" teleported @close="previewClose" />
</div>
</template>
+71
View File
@@ -0,0 +1,71 @@
<script lang="ts" setup>
const router = useRouter()
const data = ref({
inter: NaN,
countdown: 5,
})
onUnmounted(() => {
data.value.inter && window.clearInterval(data.value.inter)
})
onMounted(() => {
data.value.inter = window.setInterval(() => {
data.value.countdown--
if (data.value.countdown === 0) {
data.value.inter && window.clearInterval(data.value.inter)
goBack()
}
}, 1000)
})
function goBack() {
router.push('/')
}
</script>
<template>
<div class="notallowed">
<svg-icon name="403" class="icon" />
<div class="content">
<h1>403</h1>
<div class="desc">
抱歉,你无权访问该页面
</div>
<el-button type="primary" @click="goBack">
{{ data.countdown }} 秒后,返回首页
</el-button>
</div>
</div>
</template>
<style lang="scss" scoped>
.notallowed {
display: flex;
align-items: center;
justify-content: space-between;
width: 700px;
@include position-center(xy);
.icon {
width: 400px;
height: 400px;
}
.content {
h1 {
margin: 0;
font-size: 72px;
color: var(--el-text-color-primary);
}
.desc {
margin: 20px 0 30px;
font-size: 20px;
color: var(--el-text-color-secondary);
}
}
}
</style>
+14 -1
View File
@@ -9,6 +9,8 @@ defineProps({
default: '',
},
})
const slots = useSlots()
</script>
<template>
@@ -23,7 +25,7 @@ defineProps({
</slot>
</div>
</div>
<div class="sub">
<div v-if="slots.default" class="sub">
<slot />
</div>
</div>
@@ -65,4 +67,15 @@ defineProps({
flex: none;
}
}
[data-mode="mobile"] {
.header {
flex-direction: column;
.main {
margin-right: auto;
margin-bottom: 20px;
}
}
}
</style>
+10 -7
View File
@@ -91,18 +91,20 @@ function anyToCode(value: any[], dictionarie: any[] = pcasData.value) {
const input: string[] = []
if (value.length > 0) {
const findItem = dictionarie.find((item) => {
if (props.format === 'code')
if (props.format === 'code') {
return item.code === value[0]
else if (props.format === 'name')
}
else if (props.format === 'name') {
return item.name === value[0]
else
}
else {
return item.name === value[0].name && item.code === value[0].code
}
})
input.push(findItem.code)
if (findItem.children)
if (findItem.children) {
input.push(...anyToCode(value.slice(1 - value.length), findItem.children))
}
}
return input
}
@@ -125,8 +127,9 @@ function codeToAny(codes: string[], dictionarie: any[] = pcasData.value): any {
})
}
const newCodes = codes.slice(1 - codes.length)
if (newCodes.length > 0 && findItem.children)
if (newCodes.length > 0 && findItem.children) {
output.push(...codeToAny(newCodes, findItem.children))
}
}
return output
}
+2 -2
View File
@@ -32,9 +32,9 @@ const transformStyle = computed(() => {
break
}
}
if (props.rotate !== 0)
if (props.rotate !== 0) {
style.push(`rotate(${props.rotate}deg)`)
}
return `transform: ${style.join(' ')};`
})
</script>
+2 -2
View File
@@ -24,9 +24,9 @@ const props = defineProps({
const isUp = computed(() => {
let isUp = props.type === 'up'
if (props.reverse)
if (props.reverse) {
isUp = !isUp
}
return isUp
})
</script>
+53 -43
View File
@@ -1,9 +1,9 @@
<script lang="ts" setup name="AppSetting">
import { useClipboard } from '@vueuse/core'
import { ElMessage } from 'element-plus'
import eventBus from '@/utils/eventBus'
import useSettingsStore from '@/store/modules/settings'
import useMenuStore from '@/store/modules/menu'
import globalSettingsDefault from '@/settings.default'
const route = useRoute()
@@ -12,14 +12,13 @@ const menuStore = useMenuStore()
const isShow = ref(false)
const settings = ref(globalSettingsDefault)
watch(() => settings, () => {
settingsStore.updateSettings(settings.value)
menuStore.setActived(0)
settings.value.menu.menuMode !== 'single' && menuStore.setActived(route.fullPath)
}, {
deep: true,
watch(() => settingsStore.settings.menu.menuMode, (value) => {
if (value === 'single') {
menuStore.setActived(0)
}
else {
menuStore.setActived(route.fullPath)
}
})
onMounted(() => {
@@ -31,12 +30,13 @@ onMounted(() => {
const { copy, copied, isSupported } = useClipboard()
watch(copied, (val) => {
if (val)
if (val) {
ElMessage.success('复制成功,请粘贴到 src/settings.ts 文件中!')
}
})
function handleCopy() {
copy(JSON.stringify(settings.value, null, 4))
copy(JSON.stringify(settingsStore.settings, null, 2))
}
</script>
@@ -46,9 +46,9 @@ function handleCopy() {
<el-alert title="应用配置可实时预览效果,但只是临时生效,要想真正作用于项目,可以点击下方的“复制配置”按钮,并将配置粘贴到 src/settings.ts 文件中。同时建议在生产环境隐藏应用配置功能。" type="error" :closable="false" />
<el-divider>颜色主题</el-divider>
<div class="color-scheme">
<div class="switch" :class="settings.app.colorScheme" @click="settings.app.colorScheme = settings.app.colorScheme === 'dark' ? 'light' : 'dark'">
<div class="switch" :class="settingsStore.settings.app.colorScheme" @click="settingsStore.settings.app.colorScheme = settingsStore.settings.app.colorScheme === 'dark' ? 'light' : 'dark'">
<el-icon class="icon">
<svg-icon :name="settings.app.colorScheme === 'light' ? 'ep:sunny' : 'ep:moon'" />
<svg-icon :name="settingsStore.settings.app.colorScheme === 'light' ? 'ep:sunny' : 'ep:moon'" />
</el-icon>
</div>
</div>
@@ -57,7 +57,7 @@ function handleCopy() {
</el-divider>
<div v-if="settingsStore.mode === 'pc'" class="menu-mode">
<el-tooltip content="侧边栏模式(含主导航)" placement="top" :show-after="500">
<div class="mode mode-side" :class="{ active: settings.menu.menuMode === 'side' }" @click="settings.menu.menuMode = 'side'">
<div class="mode mode-side" :class="{ active: settingsStore.settings.menu.menuMode === 'side' }" @click="settingsStore.settings.menu.menuMode = 'side'">
<div class="mode-container" />
<el-icon>
<svg-icon name="ep:check" />
@@ -65,7 +65,7 @@ function handleCopy() {
</div>
</el-tooltip>
<el-tooltip content="顶部模式" placement="top" :show-after="500">
<div class="mode mode-head" :class="{ active: settings.menu.menuMode === 'head' }" @click="settings.menu.menuMode = 'head'">
<div class="mode mode-head" :class="{ active: settingsStore.settings.menu.menuMode === 'head' }" @click="settingsStore.settings.menu.menuMode = 'head'">
<div class="mode-container" />
<el-icon>
<svg-icon name="ep:check" />
@@ -73,7 +73,7 @@ function handleCopy() {
</div>
</el-tooltip>
<el-tooltip content="侧边栏模式(不含主导航)" placement="top" :show-after="500">
<div class="mode mode-single" :class="{ active: settings.menu.menuMode === 'single' }" @click="settings.menu.menuMode = 'single'">
<div class="mode mode-single" :class="{ active: settingsStore.settings.menu.menuMode === 'single' }" @click="settingsStore.settings.menu.menuMode = 'single'">
<div class="mode-container" />
<el-icon>
<svg-icon name="ep:check" />
@@ -91,7 +91,7 @@ function handleCopy() {
</el-icon>
</el-tooltip>
</div>
<el-switch v-model="settings.menu.switchMainMenuAndPageJump" :disabled="['single'].includes(settings.menu.menuMode)" />
<el-switch v-model="settingsStore.settings.menu.switchMainMenuAndPageJump" :disabled="['single'].includes(settingsStore.settings.menu.menuMode)" />
</div>
<div class="setting-item">
<div class="label">
@@ -102,32 +102,42 @@ function handleCopy() {
</el-icon>
</el-tooltip>
</div>
<el-switch v-model="settings.menu.subMenuUniqueOpened" />
<el-switch v-model="settingsStore.settings.menu.subMenuUniqueOpened" />
</div>
<div class="setting-item">
<div class="label">
次导航是否折叠
</div>
<el-switch v-model="settings.menu.subMenuCollapse" />
<el-switch v-model="settingsStore.settings.menu.subMenuCollapse" />
</div>
<div v-if="settingsStore.mode === 'pc'" class="setting-item">
<div class="label">
显示次导航折叠按钮
</div>
<el-switch v-model="settings.menu.enableSubMenuCollapseButton" />
<el-switch v-model="settingsStore.settings.menu.enableSubMenuCollapseButton" />
</div>
<div class="setting-item">
<div class="label">
是否启用快捷键
</div>
<el-switch v-model="settings.menu.enableHotkeys" :disabled="['single'].includes(settingsStore.menu.menuMode)" />
<el-switch v-model="settingsStore.settings.menu.enableHotkeys" :disabled="['single'].includes(settingsStore.settings.menu.menuMode)" />
</div>
<el-divider>顶栏</el-divider>
<div class="setting-item">
<div class="label">
是否固定
模式
</div>
<el-switch v-model="settings.topbar.fixed" />
<el-radio-group v-model="settingsStore.settings.topbar.mode" size="small">
<el-radio-button label="static">
静止
</el-radio-button>
<el-radio-button label="fixed">
固定
</el-radio-button>
<el-radio-button label="sticky">
粘性
</el-radio-button>
</el-radio-group>
</div>
<el-divider>工具栏</el-divider>
<div v-if="settingsStore.mode === 'pc'" class="setting-item">
@@ -139,7 +149,7 @@ function handleCopy() {
</el-icon>
</el-tooltip>
</div>
<el-switch v-model="settings.toolbar.enableFullscreen" />
<el-switch v-model="settingsStore.settings.toolbar.enableFullscreen" />
</div>
<div class="setting-item">
<div class="label">
@@ -150,7 +160,7 @@ function handleCopy() {
</el-icon>
</el-tooltip>
</div>
<el-switch v-model="settings.toolbar.enablePageReload" />
<el-switch v-model="settingsStore.settings.toolbar.enablePageReload" />
</div>
<div class="setting-item">
<div class="label">
@@ -161,7 +171,7 @@ function handleCopy() {
</el-icon>
</el-tooltip>
</div>
<el-switch v-model="settings.toolbar.enableColorScheme" />
<el-switch v-model="settingsStore.settings.toolbar.enableColorScheme" />
</div>
<el-divider v-if="settingsStore.mode === 'pc'">
面包屑导航
@@ -170,7 +180,7 @@ function handleCopy() {
<div class="label">
是否启用
</div>
<el-switch v-model="settings.breadcrumb.enable" />
<el-switch v-model="settingsStore.settings.breadcrumb.enable" />
</div>
<el-divider>导航搜索</el-divider>
<div class="setting-item">
@@ -182,62 +192,62 @@ function handleCopy() {
</el-icon>
</el-tooltip>
</div>
<el-switch v-model="settings.navSearch.enable" />
<el-switch v-model="settingsStore.settings.navSearch.enable" />
</div>
<div class="setting-item">
<div class="label">
是否启用快捷键
</div>
<el-switch v-model="settings.navSearch.enableHotkeys" :disabled="!settings.navSearch.enable" />
<el-switch v-model="settingsStore.settings.navSearch.enableHotkeys" :disabled="!settingsStore.settings.navSearch.enable" />
</div>
<el-divider>底部版权</el-divider>
<div class="setting-item">
<div class="label">
是否启用
</div>
<el-switch v-model="settings.copyright.enable" />
<el-switch v-model="settingsStore.settings.copyright.enable" />
</div>
<div class="setting-item">
<div class="label">
日期
</div>
<el-input v-model="settings.copyright.dates" size="small" :disabled="!settings.copyright.enable" />
<el-input v-model="settingsStore.settings.copyright.dates" size="small" :disabled="!settingsStore.settings.copyright.enable" />
</div>
<div class="setting-item">
<div class="label">
公司
</div>
<el-input v-model="settings.copyright.company" size="small" :disabled="!settings.copyright.enable" />
<el-input v-model="settingsStore.settings.copyright.company" size="small" :disabled="!settingsStore.settings.copyright.enable" />
</div>
<div class="setting-item">
<div class="label">
网址
</div>
<el-input v-model="settings.copyright.website" size="small" :disabled="!settings.copyright.enable" />
<el-input v-model="settingsStore.settings.copyright.website" size="small" :disabled="!settingsStore.settings.copyright.enable" />
</div>
<div class="setting-item">
<div class="label">
备案
</div>
<el-input v-model="settings.copyright.beian" size="small" :disabled="!settings.copyright.enable" />
<el-input v-model="settingsStore.settings.copyright.beian" size="small" :disabled="!settingsStore.settings.copyright.enable" />
</div>
<el-divider>控制台</el-divider>
<el-divider>主页</el-divider>
<div class="setting-item">
<div class="label">
是否开启
<el-tooltip content="该功能开启时,登录成功默认进入控制台页面,反之则默认进入导航栏里第一个导航页面" placement="top">
<el-tooltip content="该功能开启时,登录成功默认进入主页,反之则默认进入导航栏里第一个导航页面" placement="top">
<el-icon>
<svg-icon name="ep:question-filled" />
</el-icon>
</el-tooltip>
</div>
<el-switch v-model="settings.dashboard.enable" />
<el-switch v-model="settingsStore.settings.home.enable" />
</div>
<div class="setting-item">
<div class="label">
控制台名称
主页名称
</div>
<el-input v-model="settings.dashboard.title" size="small" />
<el-input v-model="settingsStore.settings.home.title" size="small" />
</div>
<el-divider>其它</el-divider>
<div class="setting-item">
@@ -249,7 +259,7 @@ function handleCopy() {
</el-icon>
</el-tooltip>
</div>
<el-radio-group v-model="settings.app.elementSize" size="small">
<el-radio-group v-model="settingsStore.settings.app.elementSize" size="small">
<el-radio-button label="large">
较大
</el-radio-button>
@@ -265,7 +275,7 @@ function handleCopy() {
<div class="label">
是否启用权限
</div>
<el-switch v-model="settings.app.enablePermission" />
<el-switch v-model="settingsStore.settings.app.enablePermission" />
</div>
<div class="setting-item">
<div class="label">
@@ -276,7 +286,7 @@ function handleCopy() {
</el-icon>
</el-tooltip>
</div>
<el-switch v-model="settings.app.enableProgress" />
<el-switch v-model="settingsStore.settings.app.enableProgress" />
</div>
<div class="setting-item">
<div class="label">
@@ -287,7 +297,7 @@ function handleCopy() {
</el-icon>
</el-tooltip>
</div>
<el-switch v-model="settings.app.enableDynamicTitle" />
<el-switch v-model="settingsStore.settings.app.enableDynamicTitle" />
</div>
<template v-if="isSupported" #footer>
<el-button type="primary" @click="handleCopy">
+4 -4
View File
@@ -21,7 +21,7 @@ function handlerMouserScroll(event: WheelEvent) {
<template>
<transition name="header">
<header v-if="settingsStore.mode === 'pc' && settingsStore.menu.menuMode === 'head'">
<header v-if="settingsStore.mode === 'pc' && settingsStore.settings.menu.menuMode === 'head'">
<div class="header-container">
<div class="main">
<Logo />
@@ -30,10 +30,10 @@ function handlerMouserScroll(event: WheelEvent) {
<template v-for="(item, index) in menuStore.allMenus" :key="index">
<div v-if="item.children && item.children.length !== 0" class="item-container" :class="{ active: index === menuStore.actived }">
<div class="item" @click="switchTo(index)">
<el-icon>
<svg-icon v-if="item.meta.icon" :name="item.meta.icon" />
<el-icon v-if="item.meta?.icon">
<svg-icon :name="item.meta.icon" />
</el-icon>
<span v-if="item.meta.title">{{ item.meta.title }}</span>
<span v-if="item.meta?.title">{{ item.meta.title }}</span>
</div>
</div>
</template>
@@ -18,15 +18,15 @@ onMounted(() => {
<el-drawer v-model="isShow" title="快捷键介绍" direction="rtl" :size="360">
<el-descriptions title="全局" :column="1" border>
<el-descriptions-item label="查看系统信息">
Alt + I
{{ settingsStore.os === 'mac' ? '⌥' : 'Alt' }} + I
</el-descriptions-item>
<el-descriptions-item v-if="settingsStore.navSearch.enable && settingsStore.navSearch.enableHotkeys" label="唤起导航搜索">
Alt + S
<el-descriptions-item v-if="settingsStore.settings.navSearch.enable && settingsStore.settings.navSearch.enableHotkeys" label="唤起导航搜索">
{{ settingsStore.os === 'mac' ? '⌥' : 'Alt' }} + S
</el-descriptions-item>
</el-descriptions>
<el-descriptions v-if="settingsStore.menu.enableHotkeys && ['side', 'head'].includes(settingsStore.menu.menuMode)" title="主导航" :column="1" border>
<el-descriptions v-if="settingsStore.settings.menu.enableHotkeys && ['side', 'head'].includes(settingsStore.settings.menu.menuMode)" title="主导航" :column="1" border>
<el-descriptions-item label="激活下一个主导航">
Alt + `
{{ settingsStore.os === 'mac' ? '⌥' : 'Alt' }} + `
</el-descriptions-item>
</el-descriptions>
</el-drawer>
+5 -4
View File
@@ -22,15 +22,15 @@ const to = computed(() => {
const rtn: {
name?: string
} = {}
if (settingsStore.dashboard.enable)
rtn.name = 'dashboard'
if (settingsStore.settings.home.enable) {
rtn.name = 'home'
}
return rtn
})
</script>
<template>
<router-link :to="to" class="title" :class="{ 'is-link': settingsStore.dashboard.enable }" :title="title">
<router-link :to="to" class="title" :class="{ 'is-link': settingsStore.settings.home.enable }" :title="title">
<img v-if="showLogo" :src="logo" class="logo">
<span v-if="showTitle">{{ title }}</span>
</router-link>
@@ -58,6 +58,7 @@ const to = computed(() => {
.logo {
width: 30px;
height: 30px;
object-fit: contain;
& + span {
margin-left: 10px;
+5 -5
View File
@@ -11,7 +11,7 @@ const { switchTo } = useMenu()
<template>
<transition name="main-sidebar">
<div v-if="settingsStore.menu.menuMode === 'side' || (settingsStore.mode === 'mobile' && settingsStore.menu.menuMode !== 'single')" class="main-sidebar-container">
<div v-if="settingsStore.settings.menu.menuMode === 'side' || (settingsStore.mode === 'mobile' && settingsStore.settings.menu.menuMode !== 'single')" class="main-sidebar-container">
<Logo :show-title="false" class="sidebar-logo" />
<!-- 侧边栏模式(含主导航) -->
<div class="nav">
@@ -19,12 +19,12 @@ const { switchTo } = useMenu()
<div
v-if="item.children && item.children.length !== 0" :key="index" class="item" :class="{
active: index === menuStore.actived,
}" :title="item.meta.title" @click="switchTo(index)"
}" :title="item.meta?.title ?? '[ 无标题 ]'" @click="switchTo(index)"
>
<el-icon>
<svg-icon v-if="item.meta.icon" :name="item.meta.icon" />
<el-icon v-if="item.meta?.icon">
<svg-icon :name="item.meta.icon" />
</el-icon>
<span>{{ item.meta.title }}</span>
<span>{{ item.meta?.title ?? '[ 无标题 ]' }}</span>
</div>
</template>
</div>
+128 -94
View File
@@ -1,12 +1,12 @@
<script lang="ts" setup name="Search">
import { cloneDeep } from 'lodash-es'
import hotkeys from 'hotkeys-js'
import { isExternalLink } from '@/utils'
import type { RouteRecordRaw } from 'vue-router'
import eventBus from '@/utils/eventBus'
import useSettingsStore from '@/store/modules/settings'
import useRouteStore from '@/store/modules/route'
import useMenuStore from '@/store/modules/menu'
import type { Menu, Route } from '@/global'
import type { Menu } from '#/global'
const router = useRouter()
@@ -15,10 +15,11 @@ const routeStore = useRouteStore()
const menuStore = useMenuStore()
interface listTypes {
icon?: string
title: string
breadcrumb: string[]
path: string
icon?: string
title?: string | Function
link?: string
breadcrumb: (string | Function | undefined)[]
}
const isShow = ref(false)
@@ -38,15 +39,39 @@ const resultList = computed(() => {
let result = []
result = sourceList.value.filter((item) => {
let flag = false
if (item.title.includes(searchInput.value))
if (item.title) {
if (typeof item.title === 'function') {
if (item.title().includes(searchInput.value)) {
flag = true
}
}
else {
if (item.title.includes(searchInput.value)) {
flag = true
}
}
}
if (item.path.includes(searchInput.value)) {
flag = true
if (item.path.includes(searchInput.value))
}
if (item.breadcrumb.some((b) => {
let flag = false
if (b) {
if (typeof b === 'function') {
if (b().includes(searchInput.value)) {
flag = true
}
}
else {
if (b.includes(searchInput.value)) {
flag = true
}
}
}
return flag
})) {
flag = true
if (item.breadcrumb.some(b => b.includes(searchInput.value)))
flag = true
}
return flag
})
return result
@@ -86,18 +111,18 @@ onMounted(() => {
isShow.value = !isShow.value
})
hotkeys('alt+s', (e) => {
if (settingsStore.navSearch.enable && settingsStore.navSearch.enableHotkeys) {
if (settingsStore.settings.navSearch.enable && settingsStore.settings.navSearch.enableHotkeys) {
e.preventDefault()
isShow.value = true
}
})
hotkeys('esc', (e) => {
if (settingsStore.navSearch.enable && settingsStore.navSearch.enableHotkeys) {
if (settingsStore.settings.navSearch.enable && settingsStore.settings.navSearch.enableHotkeys) {
e.preventDefault()
isShow.value = false
}
})
if (settingsStore.app.routeBaseOn !== 'filesystem') {
if (settingsStore.settings.app.routeBaseOn !== 'filesystem') {
routeStore.routes.forEach((item) => {
item.children && getSourceList(item.children)
})
@@ -109,52 +134,46 @@ onMounted(() => {
}
})
function hasChildren(item: Route.recordRaw) {
function hasChildren(item: RouteRecordRaw) {
let flag = true
if (item.children && item.children.every(i => i.meta.sidebar === false))
if (item.children?.every(i => i.meta?.sidebar === false)) {
flag = false
}
return flag
}
function getSourceList(arr: Route.recordRaw[], basePath?: string, icon?: string, breadcrumb?: string[]) {
function getSourceList(arr: RouteRecordRaw[], basePath?: string, icon?: string, breadcrumb?: (string | Function | undefined)[]) {
arr.forEach((item) => {
if (item.meta.sidebar !== false) {
if (item.meta?.sidebar !== false) {
const breadcrumbTemp = cloneDeep(breadcrumb) || []
if (item.children && hasChildren(item)) {
breadcrumbTemp.push(typeof item.meta.title === 'function' ? item.meta.title() : item.meta.title)
getSourceList(item.children, basePath ? [basePath, item.path].join('/') : item.path, item.meta.icon || icon, breadcrumbTemp)
breadcrumbTemp.push(item.meta?.title)
getSourceList(item.children, basePath ? [basePath, item.path].join('/') : item.path, item.meta?.icon ?? icon, breadcrumbTemp)
}
else {
breadcrumbTemp.push(typeof item.meta.title === 'function' ? item.meta.title() : item.meta.title)
let path = ''
if (isExternalLink(item.path))
path = item.path
else
path = basePath ? [basePath, item.path].join('/') : item.path
breadcrumbTemp.push(item.meta?.title)
sourceList.value.push({
icon: item.meta.icon || icon,
title: typeof item.meta.title === 'function' ? item.meta.title() : item.meta.title,
path: basePath ? [basePath, item.path].join('/') : item.path,
icon: item.meta?.icon ?? icon,
title: item.meta?.title,
link: item.meta?.link,
breadcrumb: breadcrumbTemp,
path,
})
}
}
})
}
function getSourceListByMenus(arr: Menu.recordRaw[], icon?: string, breadcrumb?: string[]) {
function getSourceListByMenus(arr: Menu.recordRaw[], icon?: string, breadcrumb?: (string | Function | undefined)[]) {
arr.forEach((item) => {
const breadcrumbTemp = cloneDeep(breadcrumb) || []
if (item.children && item.children.length > 0) {
breadcrumbTemp.push(item.meta.title)
getSourceListByMenus(item.children, item.meta.icon, breadcrumbTemp)
breadcrumbTemp.push(item.meta?.title)
getSourceListByMenus(item.children, item.meta?.icon ?? icon, breadcrumbTemp)
}
else {
breadcrumbTemp.push(item.meta.title)
breadcrumbTemp.push(item.meta?.title)
sourceList.value.push({
icon: item.meta.icon || icon,
title: item.meta.title,
icon: item.meta?.icon ?? icon,
title: item.meta?.title,
path: item.path as string,
breadcrumb: breadcrumbTemp,
})
@@ -165,24 +184,25 @@ function getSourceListByMenus(arr: Menu.recordRaw[], icon?: string, breadcrumb?:
function keyUp() {
if (resultList.value.length) {
actived.value -= 1
if (actived.value < 0)
if (actived.value < 0) {
actived.value = resultList.value.length - 1
}
handleScroll()
}
}
function keyDown() {
if (resultList.value.length) {
actived.value += 1
if (actived.value > resultList.value.length - 1)
if (actived.value > resultList.value.length - 1) {
actived.value = 0
}
handleScroll()
}
}
function keyEnter() {
if (actived.value !== -1)
if (actived.value !== -1) {
searchResultItemRef.value[actived.value].click()
}
}
function handleScroll() {
let scrollTo = 0
@@ -192,23 +212,25 @@ function handleScroll() {
const activedClientHeight = searchResultItemRef.value[actived.value].clientHeight
const searchScrollTop = searchResultRef.value.scrollTop
const searchClientHeight = searchResultRef.value.clientHeight
if (activedOffsetTop + activedClientHeight > searchScrollTop + searchClientHeight)
if (activedOffsetTop + activedClientHeight > searchScrollTop + searchClientHeight) {
scrollTo = activedOffsetTop + activedClientHeight - searchClientHeight
else if (activedOffsetTop <= searchScrollTop)
}
else if (activedOffsetTop <= searchScrollTop) {
scrollTo = activedOffsetTop
}
}
searchResultRef.value.scrollTo({
top: scrollTo,
})
}
function pageJump(url: string) {
if (isExternalLink(url))
window.open(url, 'top')
else
router.push(url)
function pageJump(path: listTypes['path'], link: listTypes['link']) {
if (link) {
window.open(link, '_blank')
}
else {
router.push(path)
}
}
</script>
@@ -225,48 +247,60 @@ function pageJump(url: string) {
</el-input>
<div v-if="settingsStore.mode === 'pc'" class="tips">
<div class="tip">
<span>Alt</span>+<span>S</span>
唤醒搜索面板
<el-tag type="info" size="large">
{{ settingsStore.os === 'mac' ? '⌥' : 'Alt' }} + S
</el-tag>
<el-tag type="info" size="large">
唤醒搜索面板
</el-tag>
</div>
<div class="tip">
<span>
<el-tag type="info" size="large">
<el-icon>
<svg-icon name="search-up" />
</el-icon>
</span>
<span>
</el-tag>
<el-tag type="info" size="large">
<el-icon>
<svg-icon name="search-down" />
</el-icon>
</span>
切换搜索结果
</el-tag>
<el-tag type="info" size="large">
切换搜索结果
</el-tag>
</div>
<div class="tip">
<span>
<el-tag type="info" size="large">
<el-icon>
<svg-icon name="search-enter" />
</el-icon>
</span>
访问页面
</el-tag>
<el-tag type="info" size="large">
访问页面
</el-tag>
</div>
<div class="tip">
<span>ESC</span>
退出
<el-tag type="info" size="large">
ESC
</el-tag>
<el-tag type="info" size="large">
退出
</el-tag>
</div>
</div>
</div>
<div ref="searchResultRef" class="result" :class="{ mobile: settingsStore.mode === 'mobile' }">
<a v-for="(item, index) in resultList" :key="item.path" :ref="setSearchResultItemRef" class="item" :class="{ actived: index === actived }" @click="pageJump(item.path)" @mouseover="actived = index">
<div ref="searchResultRef" class="result">
<a v-for="(item, index) in resultList" :key="item.path" :ref="setSearchResultItemRef" class="item" :class="{ actived: index === actived }" @click="pageJump(item.path, item.link)" @mouseover="actived = index">
<el-icon class="icon">
<svg-icon v-if="item.icon" :name="item.icon" />
</el-icon>
<div class="info">
<div class="title">
{{ item.title }}
{{ item.title ?? '[ 无标题 ]' }}
</div>
<div class="breadcrumb">
<span v-for="(bc, bcIndex) in item.breadcrumb" :key="bcIndex">
{{ bc }}
{{ bc ?? '[ 无标题 ]' }}
<el-icon>
<svg-icon name="ep:arrow-right" />
</el-icon>
@@ -288,10 +322,10 @@ function pageJump(url: string) {
left: 0;
width: 100%;
height: 100%;
background-color: var(--el-overlay-color-lighter);
backdrop-filter: blur(10px);
background-image: radial-gradient(transparent 1px, rgb(0 0 0 / 30%) 1px);
background-size: 4px 4px;
backdrop-filter: saturate(50%) blur(4px);
transition: all 0.2s;
transform: translateZ(0);
opacity: 0;
visibility: hidden;
@@ -316,7 +350,7 @@ function pageJump(url: string) {
filter: blur(10px);
.search-box {
margin: 50px 20px 40px;
margin: 50px 20px 20px;
:deep(.el-input__inner) {
height: 52px;
@@ -332,39 +366,39 @@ function pageJump(url: string) {
.tips {
display: flex;
align-items: center;
justify-content: space-evenly;
margin-top: 20px;
line-height: 24px;
font-size: 14px;
color: #fff;
justify-content: center;
padding-top: 20px;
font-weight: bold;
span {
margin: 0 5px;
padding: 3px 8px 5px;
border-radius: 5px;
font-size: 12px;
font-weight: bold;
color: var(--el-text-color-primary);
background-color: var(--el-fill-color);
box-shadow: inset 0 -2px var(--el-fill-color-lighter), inset 0 0 1px 1px var(--el-fill-color-darker);
.tip {
display: flex;
align-items: center;
justify-content: center;
margin: 0 20px;
.el-tag {
margin: 0 5px;
&:first-child {
margin-left: 0;
}
&:last-child {
margin-right: 0;
}
}
}
}
}
.result {
position: relative;
margin: 0 20px;
max-height: calc(100% - 250px);
margin: 0 20px 50px;
border-radius: 5px;
overflow: auto;
background-color: var(--el-bg-color);
box-shadow: 0 0 0 1px var(--el-border-color-darker);
&.mobile {
max-height: calc(100% - 200px);
}
.item {
display: flex;
align-items: center;
+17 -14
View File
@@ -1,7 +1,8 @@
<script lang="ts" setup name="SidebarItem">
// import SidebarItem from './index.vue'
import { isExternalLink, resolveRoutePath } from '@/utils'
import type { Menu } from '@/global'
import { resolveRoutePath } from '@/utils'
import useSettingsStore from '@/store/modules/settings'
import type { Menu } from '#/global'
const props = defineProps({
item: {
@@ -14,11 +15,14 @@ const props = defineProps({
},
})
const settingsStore = useSettingsStore()
const hasChildren = computed(() => {
let flag = true
if (props.item.children) {
if (props.item.children.every(item => item.meta.sidebar === false))
if (props.item.children.every(item => item.meta?.sidebar === false)) {
flag = false
}
}
else {
flag = false
@@ -29,25 +33,25 @@ const hasChildren = computed(() => {
<template>
<div class="sidebar-item">
<router-link v-if="!hasChildren" v-slot="{ href, navigate, isActive, isExactActive }" custom :to="resolveRoutePath(basePath, item.path || '')">
<a :href="isExternalLink(resolveRoutePath(basePath, item.path || '')) ? resolveRoutePath(basePath, item.path || '') : href" :class="[isActive && 'router-link-active', isExactActive && 'router-link-exact-active']" :target="isExternalLink(resolveRoutePath(basePath, item.path || '')) ? '_blank' : '_self'" @click="navigate">
<el-menu-item :title="item.meta.title" :index="resolveRoutePath(basePath, item.path || '')">
<el-icon v-if="item.meta.icon" class="title-icon">
<router-link v-if="!hasChildren" v-slot="{ href, navigate, isActive, isExactActive }" custom :to="resolveRoutePath(basePath, item.path)">
<a :href="item.meta?.link ? item.meta.link : href" :class="[isActive && 'router-link-active', isExactActive && 'router-link-exact-active']" :target="item.meta?.link ? '_blank' : '_self'" @click="navigate">
<el-menu-item :title="item.meta?.title ?? '[ 无标题 ]'" :index="resolveRoutePath(basePath, item.path || '')">
<el-icon v-if="item.meta?.icon" class="title-icon">
<svg-icon :name="item.meta.icon" />
</el-icon>
<span class="title">{{ item.meta.title }}</span>
<span class="title">{{ item.meta?.title ?? '[ 无标题 ]' }}</span>
</el-menu-item>
</a>
</router-link>
<el-sub-menu v-else :title="item.meta.title" :index="resolveRoutePath(basePath, item.path || '')">
<el-sub-menu v-else :title="item.meta?.title ?? '[ 无标题 ]'" :index="settingsStore.settings.app.routeBaseOn !== 'filesystem' ? resolveRoutePath(basePath, item.path) : JSON.stringify(item)">
<template #title>
<el-icon v-if="item.meta.icon" class="title-icon">
<el-icon v-if="item.meta?.icon" class="title-icon">
<svg-icon :name="item.meta.icon" />
</el-icon>
<span class="title">{{ item.meta.title }}</span>
<span class="title">{{ item.meta?.title ?? '[ 无标题 ]' }}</span>
</template>
<template v-for="route in item.children">
<SidebarItem v-if="route.meta.sidebar !== false" :key="route.path" :item="route" :base-path="resolveRoutePath(basePath, item.path || '')" />
<SidebarItem v-if="route.meta?.sidebar !== false" :key="route.path" :item="route" :base-path="resolveRoutePath(basePath, item.path)" />
</template>
</el-sub-menu>
</div>
@@ -64,8 +68,7 @@ const hasChildren = computed(() => {
@include text-overflow;
}
:deep(.el-menu-item),
:deep(.el-sub-menu__title) {
:deep(.el-menu-item) {
display: flex;
align-items: center;
justify-content: center;
+6 -6
View File
@@ -15,22 +15,22 @@ function onSidebarScroll(e: Event) {
</script>
<template>
<div v-if="['side', 'head', 'single'].includes(settingsStore.menu.menuMode) || settingsStore.mode === 'mobile'" class="sub-sidebar-container" :class="{ 'is-collapse': settingsStore.mode === 'pc' && settingsStore.menu.subMenuCollapse }" @scroll="onSidebarScroll">
<div v-if="['side', 'head', 'single'].includes(settingsStore.settings.menu.menuMode) || settingsStore.mode === 'mobile'" class="sub-sidebar-container" :class="{ 'is-collapse': settingsStore.mode === 'pc' && settingsStore.settings.menu.subMenuCollapse }" @scroll="onSidebarScroll">
<Logo
:show-logo="settingsStore.menu.menuMode === 'single'" class="sidebar-logo" :class="{
'sidebar-logo-bg': settingsStore.menu.menuMode === 'single',
:show-logo="settingsStore.settings.menu.menuMode === 'single'" class="sidebar-logo" :class="{
'sidebar-logo-bg': settingsStore.settings.menu.menuMode === 'single',
'shadow': sidebarScrollTop,
}"
/>
<!-- 侧边栏模式(无主导航) -->
<el-menu
:unique-opened="settingsStore.menu.subMenuUniqueOpened" :default-openeds="menuStore.defaultOpenedPaths" :default-active="$route.meta.activeMenu || $route.path" :collapse="settingsStore.mode === 'pc' && settingsStore.menu.subMenuCollapse" :collapse-transition="false" :class="{
'is-collapse-without-logo': settingsStore.menu.menuMode !== 'single' && settingsStore.menu.subMenuCollapse,
:unique-opened="settingsStore.settings.menu.subMenuUniqueOpened" :default-openeds="menuStore.defaultOpenedPaths" :default-active="$route.meta.activeMenu || $route.path" :collapse="settingsStore.mode === 'pc' && settingsStore.settings.menu.subMenuCollapse" :collapse-transition="false" :class="{
'is-collapse-without-logo': settingsStore.settings.menu.menuMode !== 'single' && settingsStore.settings.menu.subMenuCollapse,
}"
>
<transition-group name="sub-sidebar">
<template v-for="(route, index) in menuStore.sidebarMenus">
<SidebarItem v-if="route.meta.sidebar !== false" :key="route.path || index" :item="route" :base-path="route.path" />
<SidebarItem v-if="route.meta?.sidebar !== false" :key="route.path || index" :item="route" :base-path="route.path" />
</template>
</transition-group>
</el-menu>
+12 -15
View File
@@ -12,11 +12,11 @@ const userStore = useUserStore()
const mainPage = useMainPage()
const { isFullscreen, toggle } = useFullscreen()
function userCommand(command: 'dashboard' | 'setting' | 'hotkeys' | 'logout') {
function userCommand(command: 'home' | 'setting' | 'hotkeys' | 'logout') {
switch (command) {
case 'dashboard':
case 'home':
router.push({
name: 'dashboard',
name: 'home',
})
break
case 'setting':
@@ -36,36 +36,33 @@ function userCommand(command: 'dashboard' | 'setting' | 'hotkeys' | 'logout') {
break
}
}
function pro() {
window.open('https://hooray.gitee.io/fantastic-admin-pro-example/', 'top')
}
</script>
<template>
<div class="tools">
<div class="buttons">
<span v-if="settingsStore.navSearch.enable" class="item" @click="eventBus.emit('global-search-toggle')">
<span v-if="settingsStore.settings.navSearch.enable" class="item" @click="eventBus.emit('global-search-toggle')">
<el-icon>
<svg-icon name="ep:search" />
</el-icon>
</span>
<span v-if="settingsStore.mode === 'pc' && settingsStore.toolbar.enableFullscreen" class="item" @click="toggle">
<span v-if="settingsStore.mode === 'pc' && settingsStore.settings.toolbar.enableFullscreen" class="item" @click="toggle">
<el-icon>
<svg-icon :name="isFullscreen ? 'fullscreen-exit' : 'fullscreen'" />
</el-icon>
</span>
<span v-if="settingsStore.toolbar.enablePageReload" class="item" @click="mainPage.reload()">
<span v-if="settingsStore.settings.toolbar.enablePageReload" class="item" @click="mainPage.reload()">
<el-icon>
<svg-icon name="ep:refresh-right" />
</el-icon>
</span>
<span v-if="settingsStore.toolbar.enableColorScheme" class="item" @click="settingsStore.setColorScheme(settingsStore.app.colorScheme === 'dark' ? 'light' : 'dark')">
<span v-if="settingsStore.settings.toolbar.enableColorScheme" class="item" @click="settingsStore.setColorScheme(settingsStore.settings.app.colorScheme === 'dark' ? 'light' : 'dark')">
<el-icon>
<svg-icon v-show="settingsStore.app.colorScheme === 'light'" name="ep:sunny" />
<svg-icon v-show="settingsStore.app.colorScheme === 'dark'" name="ep:moon" />
<svg-icon v-show="settingsStore.settings.app.colorScheme === 'light'" name="ep:sunny" />
<svg-icon v-show="settingsStore.settings.app.colorScheme === 'dark'" name="ep:moon" />
</el-icon>
</span>
<span v-if="settingsStore.toolbar.enableAppSetting" class="item" @click="eventBus.emit('global-theme-toggle')">
<span v-if="settingsStore.settings.toolbar.enableAppSetting" class="item" @click="eventBus.emit('global-theme-toggle')">
<el-icon>
<svg-icon name="ep:setting" />
</el-icon>
@@ -85,8 +82,8 @@ function pro() {
</div>
<template #dropdown>
<el-dropdown-menu class="user-dropdown">
<el-dropdown-item v-if="settingsStore.dashboard.enable" command="dashboard">
控制台
<el-dropdown-item v-if="settingsStore.settings.home.enable" command="home">
{{ settingsStore.settings.home.title }}
</el-dropdown-item>
<el-dropdown-item command="setting">
个人设置
+24 -13
View File
@@ -9,26 +9,27 @@ const settingsStore = useSettingsStore()
const enableSubMenuCollapseButton = computed(() => {
return settingsStore.mode === 'mobile' || (
['side', 'head', 'single'].includes(settingsStore.menu.menuMode)
&& settingsStore.menu.enableSubMenuCollapseButton
['side', 'head', 'single'].includes(settingsStore.settings.menu.menuMode)
&& settingsStore.settings.menu.enableSubMenuCollapseButton
)
})
const breadcrumbList = computed(() => {
const breadcrumbList = []
if (settingsStore.dashboard.enable) {
if (settingsStore.settings.home.enable) {
breadcrumbList.push({
path: '/dashboard',
title: settingsStore.dashboard.title,
path: '/',
title: settingsStore.settings.home.title,
})
}
if (route.meta.breadcrumbNeste)
if (route.meta.breadcrumbNeste) {
breadcrumbList.push(...route.meta.breadcrumbNeste.filter(item => item.hide === false))
}
return breadcrumbList
})
const scrollTop = ref(0)
const scrollOnHide = ref(false)
onMounted(() => {
window.addEventListener('scroll', onScroll)
})
@@ -36,8 +37,12 @@ onUnmounted(() => {
window.removeEventListener('scroll', onScroll)
})
function onScroll() {
scrollTop.value = document.documentElement.scrollTop || document.body.scrollTop
scrollTop.value = (document.documentElement || document.body).scrollTop
}
watch(scrollTop, (val, oldVal) => {
const topbarHeight = parseInt(getComputedStyle(document.documentElement || document.body).getPropertyValue('--g-topbar-height'))
scrollOnHide.value = settingsStore.settings.topbar.mode === 'sticky' && val > oldVal && val > topbarHeight
})
function pathCompile(path: string) {
const toPath = compile(path)
@@ -48,20 +53,21 @@ function pathCompile(path: string) {
<template>
<div
class="topbar-container" :class="{
fixed: settingsStore.topbar.fixed,
[`topbar-${settingsStore.settings.topbar.mode}`]: true,
shadow: scrollTop,
hide: scrollOnHide,
}" data-fixed-calc-width
>
<div class="left-box">
<div v-if="enableSubMenuCollapseButton" class="sidebar-collapse" :class="{ 'is-collapse': settingsStore.menu.subMenuCollapse }" @click="settingsStore.toggleSidebarCollapse()">
<div v-if="enableSubMenuCollapseButton" class="sidebar-collapse" :class="{ 'is-collapse': settingsStore.settings.menu.subMenuCollapse }" @click="settingsStore.toggleSidebarCollapse()">
<el-icon>
<svg-icon name="toolbar-collapse" />
</el-icon>
</div>
<el-breadcrumb v-if="settingsStore.breadcrumb.enable && settingsStore.mode === 'pc' && settingsStore.app.routeBaseOn !== 'filesystem'">
<el-breadcrumb v-if="settingsStore.settings.breadcrumb.enable && settingsStore.mode === 'pc' && settingsStore.settings.app.routeBaseOn !== 'filesystem'">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item, index) in breadcrumbList" :key="item.path" :to="index < breadcrumbList.length - 1 ? pathCompile(item.path) : ''">
{{ item.title }}
{{ item.title ?? '[ 无标题 ]' }}
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
@@ -82,7 +88,8 @@ function pathCompile(path: string) {
background-color: var(--g-toolbar-bg);
transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow);
&.fixed {
&.topbar-fixed,
&.topbar-sticky {
position: fixed;
&.shadow {
@@ -90,6 +97,10 @@ function pathCompile(path: string) {
}
}
&.topbar-sticky.hide {
top: calc(var(--g-topbar-height) * -1) !important;
}
.left-box {
display: flex;
align-items: center;
+97
View File
@@ -0,0 +1,97 @@
<script lang="ts" setup name="LinkView">
const route = useRoute()
function open() {
window.open(route.meta.link, '_blank')
}
</script>
<template>
<div class="link-view">
<transition name="link" mode="out-in" appear>
<page-main :key="route.meta.link" title="⚠️访问提醒">
<div class="container">
<div class="title">
是否访问此链接
</div>
<div class="link">
{{ route.meta.link }}
</div>
<el-button type="primary" plain round @click="open">
<template #icon>
<el-icon>
<svg-icon name="ep:link" />
</el-icon>
</template>
立即访问
</el-button>
</div>
</page-main>
</transition>
</div>
</template>
<style lang="scss" scoped>
.link-view {
display: flex;
flex-direction: column;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
.page-main {
display: flex;
flex-direction: column;
height: 100%;
flex: 1;
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
margin: 0 50px;
.title {
margin: 10px 0;
font-size: 22px;
color: var(--el-text-color-primary);
}
.link {
margin: 10px 0;
max-width: 300px;
font-size: 14px;
color: var(--el-text-color-disabled);
@include text-overflow(3);
}
.el-button {
margin: 20px 0;
}
}
}
}
// link 区动画
.link-enter-active {
transition: 0.2s;
}
.link-leave-active {
transition: 0.15s;
}
.link-enter-from {
opacity: 0;
transform: translateX(-20px);
}
.link-leave-to {
opacity: 0;
transform: translateX(20px);
}
</style>
+20 -15
View File
@@ -1,5 +1,6 @@
<script lang="ts" setup name="Layout">
import hotkeys from 'hotkeys-js'
import LinkView from './components/views/link.vue'
import Header from './components/Header/index.vue'
import MainSidebar from './components/MainSidebar/index.vue'
import SubSidebar from './components/SubSidebar/index.vue'
@@ -17,33 +18,36 @@ const settingsStore = useSettingsStore()
const keepAliveStore = useKeepAliveStore()
const menuStore = useMenuStore()
watch(() => settingsStore.menu.subMenuCollapse, (val) => {
if (settingsStore.mode === 'mobile') {
if (!val)
document.body.classList.add('hidden')
const isLink = computed(() => !!routeInfo.meta.link)
else
watch(() => settingsStore.settings.menu.subMenuCollapse, (val) => {
if (settingsStore.mode === 'mobile') {
if (!val) {
document.body.classList.add('hidden')
}
else {
document.body.classList.remove('hidden')
}
}
})
watch(() => routeInfo.path, () => {
if (settingsStore.mode === 'mobile') {
settingsStore.$patch((state) => {
state.menu.subMenuCollapse = true
state.settings.menu.subMenuCollapse = true
})
}
})
onMounted(() => {
hotkeys('f5', (e) => {
if (settingsStore.toolbar.enablePageReload) {
if (settingsStore.settings.toolbar.enablePageReload) {
e.preventDefault()
useMainPage().reload()
}
})
hotkeys('alt+`', (e) => {
if (settingsStore.menu.enableHotkeys) {
if (settingsStore.settings.menu.enableHotkeys) {
e.preventDefault()
useMenu().switchTo(menuStore.actived + 1 < menuStore.allMenus.length ? menuStore.actived + 1 : 0)
}
@@ -60,21 +64,22 @@ onUnmounted(() => {
<div id="app-main">
<Header />
<div class="wrapper">
<div class="sidebar-container" :class="{ show: settingsStore.mode === 'mobile' && !settingsStore.menu.subMenuCollapse }">
<div class="sidebar-container" :class="{ show: settingsStore.mode === 'mobile' && !settingsStore.settings.menu.subMenuCollapse }">
<MainSidebar />
<SubSidebar />
</div>
<div class="sidebar-mask" :class="{ show: settingsStore.mode === 'mobile' && !settingsStore.menu.subMenuCollapse }" @click="settingsStore.toggleSidebarCollapse()" />
<div class="sidebar-mask" :class="{ show: settingsStore.mode === 'mobile' && !settingsStore.settings.menu.subMenuCollapse }" @click="settingsStore.toggleSidebarCollapse()" />
<div class="main-container" :style="{ 'padding-bottom': $route.meta.paddingBottom } as any">
<Topbar v-if="!(settingsStore.menu.menuMode === 'head' && !settingsStore.menu.enableSubMenuCollapseButton && !settingsStore.breadcrumb.enable)" />
<Topbar v-if="!(settingsStore.settings.menu.menuMode === 'head' && !settingsStore.settings.menu.enableSubMenuCollapseButton && !settingsStore.settings.breadcrumb.enable)" />
<div class="main">
<router-view v-slot="{ Component, route }">
<transition name="main" mode="out-in" appear>
<keep-alive :include="keepAliveStore.list">
<component :is="Component" :key="route.fullPath" />
<component :is="Component" v-show="!isLink" :key="route.fullPath" />
</keep-alive>
</transition>
</router-view>
<LinkView v-if="isLink" />
</div>
<Copyright />
</div>
@@ -147,10 +152,10 @@ onUnmounted(() => {
left: 0;
width: 100%;
height: 100%;
background-color: rgb(0 0 0 / 50%);
backdrop-filter: blur(2px);
background-image: radial-gradient(transparent 1px, rgb(0 0 0 / 30%) 1px);
background-size: 4px 4px;
backdrop-filter: saturate(50%) blur(4px);
transition: all 0.2s;
transform: translateZ(0);
opacity: 0;
visibility: hidden;
+4 -3
View File
@@ -1,4 +1,4 @@
import { createApp } from 'vue'
import './utils/system.copyright'
import ElementPlus from 'element-plus'
import App from './App.vue'
import pinia from './store'
@@ -13,13 +13,14 @@ import 'virtual:svg-icons-register'
import '@/assets/styles/globals.scss'
// 加载 iconify 图标(element plus)
import { downloadAndInstall } from '@/iconify-ep'
if (useSettingsStore().app.iconifyOfflineUse)
downloadAndInstall()
const app = createApp(App)
app.use(ElementPlus)
app.use(pinia)
app.use(router)
directive(app)
if (useSettingsStore().settings.app.iconifyOfflineUse) {
downloadAndInstall()
}
app.mount('#app')
+1 -1
View File
@@ -1,6 +1,6 @@
import MultilevelMenuExample from './modules/multilevel.menu.example'
import type { Menu } from '@/global'
import type { Menu } from '#/global'
const menu: Menu.recordMainRaw[] = [
{
+2 -2
View File
@@ -1,9 +1,9 @@
import type { Menu } from '@/global'
import type { Menu } from '#/global'
const menus: Menu.recordRaw = {
meta: {
title: '多级导航',
icon: 'heroicons-solid:menu-alt-3',
icon: 'sidebar-menu',
},
children: [
{
+2 -2
View File
@@ -1,9 +1,9 @@
import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
const mocks: any[] = []
const mockContext: any = import.meta.glob('./mock/*.js', { eager: true })
const mockContext = import.meta.glob('./mock/*.ts', { eager: true })
Object.keys(mockContext).forEach((v) => {
mocks.push(...mockContext[v].default)
mocks.push(...(mockContext[v] as any).default)
})
export function setupProdMockServer() {
+49 -49
View File
@@ -15,7 +15,7 @@ const { isLoading } = useNProgress()
const router = createRouter({
history: createWebHashHistory(),
routes: useSettingsStore(pinia).app.routeBaseOn === 'filesystem' ? constantRoutesByFilesystem : constantRoutes as RouteRecordRaw[],
routes: useSettingsStore(pinia).settings.app.routeBaseOn === 'filesystem' ? constantRoutesByFilesystem : constantRoutes as RouteRecordRaw[],
})
router.beforeEach(async (to, from, next) => {
@@ -23,51 +23,41 @@ router.beforeEach(async (to, from, next) => {
const userStore = useUserStore()
const menuStore = useMenuStore()
const routeStore = useRouteStore()
settingsStore.app.enableProgress && (isLoading.value = true)
settingsStore.settings.app.enableProgress && (isLoading.value = true)
// 是否已登录
if (userStore.isLogin) {
// 是否已根据权限动态生成并挂载路由
// 是否已根据权限动态生成并注册路由
if (routeStore.isGenerate) {
// 导航栏如果不是 single 模式,则需要根据 path 定位主导航的选中状态
settingsStore.menu.menuMode !== 'single' && menuStore.setActived(to.path)
if (to.name) {
if (to.matched.length !== 0) {
// 如果已登录状态下,进入登录页会强制跳转到控制台页面
if (to.name === 'login') {
next({
name: 'dashboard',
replace: true,
})
}
else if (!settingsStore.dashboard.enable && to.name === 'dashboard') {
// 如果未开启控制台页面,则默认进入侧边栏导航第一个模块
if (menuStore.sidebarMenus.length > 0) {
next({
path: menuStore.sidebarMenusFirstDeepestPath,
replace: true,
})
}
else {
next()
}
}
else {
next()
}
}
else {
// 如果是通过 name 跳转,并且 name 对应的路由没有权限时,需要做这步处理,手动指向到 404 页面
settingsStore.settings.menu.menuMode !== 'single' && menuStore.setActived(to.path)
// 如果已登录状态下,进入登录页会强制跳转到主页
if (to.name === 'login') {
next({
name: 'home',
replace: true,
})
}
// 如果未开启主页,但进入的是主页,则会进入侧边栏导航第一个模块
else if (!settingsStore.settings.home.enable && to.name === 'home') {
if (menuStore.sidebarMenus.length > 0) {
next({
path: '/404',
path: menuStore.sidebarMenusFirstDeepestPath,
replace: true,
})
}
// 如果侧边栏导航第一个模块无法命中,则还是进入主页
else {
next()
}
}
// 正常访问页面
else {
next()
}
}
else {
switch (settingsStore.app.routeBaseOn) {
// 生成动态路由
switch (settingsStore.settings.app.routeBaseOn) {
case 'frontend':
await routeStore.generateRoutesAtFront(asyncRoutes)
break
@@ -76,7 +66,8 @@ router.beforeEach(async (to, from, next) => {
break
case 'filesystem':
await routeStore.generateRoutesAtFilesystem(asyncRoutesByFilesystem)
switch (settingsStore.menu.baseOn) {
// 文件系统生成的路由,需要手动生成导航数据
switch (settingsStore.settings.menu.baseOn) {
case 'frontend':
await menuStore.generateMenusAtFront()
break
@@ -86,18 +77,21 @@ router.beforeEach(async (to, from, next) => {
}
break
}
// 注册并记录路由数据
// 记录的数据会在登出时会使用到,不使用 router.removeRoute 是考虑配置的路由可能不一定有设置 name ,则通过调用 router.addRoute() 返回的回调进行删除
const removeRoutes: Function[] = []
routeStore.flatRoutes.forEach((route) => {
if (!/^(https?:|mailto:|tel:)/.test(route.path))
if (!/^(https?:|mailto:|tel:)/.test(route.path)) {
removeRoutes.push(router.addRoute(route as RouteRecordRaw))
}
})
if (settingsStore.app.routeBaseOn !== 'filesystem') {
if (settingsStore.settings.app.routeBaseOn !== 'filesystem') {
routeStore.flatSystemRoutes.forEach((route) => {
removeRoutes.push(router.addRoute(route as RouteRecordRaw))
})
}
// 记录路由数据,在登出时会使用到,不使用 router.removeRoute 是考虑配置的路由可能不一定有设置 name ,则通过调用 router.addRoute() 返回的回调进行删除
routeStore.setCurrentRemoveRoutes(removeRoutes)
// 动态路由生成并注册后,重新进入当前路由
next({
path: to.path,
query: to.query,
@@ -110,7 +104,7 @@ router.beforeEach(async (to, from, next) => {
next({
name: 'login',
query: {
redirect: to.fullPath,
redirect: to.fullPath !== '/' ? to.fullPath : undefined,
},
})
}
@@ -123,17 +117,23 @@ router.beforeEach(async (to, from, next) => {
router.afterEach((to, from) => {
const settingsStore = useSettingsStore()
const keepAliveStore = useKeepAliveStore()
settingsStore.app.enableProgress && (isLoading.value = false)
settingsStore.settings.app.enableProgress && (isLoading.value = false)
// 设置页面 title
to.meta.title && settingsStore.setTitle(typeof to.meta.title === 'function' ? to.meta.title() : to.meta.title)
if (settingsStore.settings.app.routeBaseOn !== 'filesystem') {
settingsStore.setTitle(to.meta.breadcrumbNeste?.at(-1)?.title ?? to.meta.title)
}
else {
settingsStore.setTitle(to.meta.title)
}
// 判断当前页面是否开启缓存,如果开启,则将当前页面的 name 信息存入 keep-alive 全局状态
if (to.meta.cache) {
const componentName = to.matched.at(-1)?.components?.default.name
if (componentName)
if (componentName) {
keepAliveStore.add(componentName)
else
}
else {
console.warn('该页面组件未设置组件名,会导致缓存失效,请检查')
}
}
// 判断离开页面是否开启缓存,如果开启,则根据缓存规则判断是否需要清空 keep-alive 全局状态里离开页面的 name 信息
if (from.meta.cache) {
@@ -142,22 +142,22 @@ router.afterEach((to, from) => {
// 通过 meta.cache 判断针对哪些页面进行缓存
switch (typeof from.meta.cache) {
case 'string':
if (from.meta.cache !== to.name)
if (from.meta.cache !== to.name) {
keepAliveStore.remove(componentName)
}
break
case 'object':
if (!from.meta.cache.includes(to.name as string))
if (!from.meta.cache.includes(to.name as string)) {
keepAliveStore.remove(componentName)
}
break
}
// 如果进入的是 reload 页面,则也将离开页面的缓存清空
if (to.name === 'reload')
if (to.name === 'reload') {
keepAliveStore.remove(componentName)
}
}
}
document.body.scrollTop = 0
document.documentElement.scrollTop = 0
})
+2 -2
View File
@@ -1,8 +1,8 @@
import type { Route } from '@/global'
import type { RouteRecordRaw } from 'vue-router'
const Layout = () => import('@/layouts/index.vue')
const routes: Route.recordRaw = {
const routes: RouteRecordRaw = {
path: '/breadcrumb_example',
component: Layout,
redirect: '/breadcrumb_example/list1',
@@ -1,8 +1,8 @@
import type { Route } from '@/global'
import type { RouteRecordRaw } from 'vue-router'
const Layout = () => import('@/layouts/index.vue')
const routes: Route.recordRaw = {
const routes: RouteRecordRaw = {
path: '/multilevel_menu_example',
component: Layout,
redirect: '/multilevel_menu_example/page',
+18 -45
View File
@@ -1,19 +1,13 @@
import { setupLayouts } from 'virtual:generated-layouts'
import generatedRoutes from 'virtual:generated-pages'
import type { RouteRecordRaw } from 'vue-router'
import MultilevelMenuExample from './modules/multilevel.menu.example'
import BreadcrumbExample from './modules/breadcrumb.example'
import type { Route } from '@/global'
import type { Route } from '#/global'
import useSettingsStore from '@/store/modules/settings'
// 固定路由(默认路由)
const constantRoutes: Route.recordRaw[] = [
{
path: '/',
redirect: '/dashboard',
meta: {
title: '',
},
},
const constantRoutes: RouteRecordRaw[] = [
{
path: '/login',
name: 'login',
@@ -33,35 +27,33 @@ const constantRoutes: Route.recordRaw[] = [
]
// 系统路由
const systemRoutes: Route.recordRaw[] = [
const systemRoutes: RouteRecordRaw[] = [
{
path: '/dashboard',
path: '/',
component: () => import('@/layouts/index.vue'),
meta: {
title: () => useSettingsStore().dashboard.title,
title: () => useSettingsStore().settings.home.title,
breadcrumb: false,
},
children: [
{
path: '',
name: 'dashboard',
name: 'home',
component: () => import('@/views/index.vue'),
meta: {
title: () => useSettingsStore().dashboard.title,
title: () => useSettingsStore().settings.home.title,
breadcrumb: false,
},
},
{
path: 'reload',
name: 'reload',
component: () => import('@/views/reload.vue'),
meta: {
title: '重新加载',
breadcrumb: false,
},
},
],
},
{
path: '/personal',
component: () => import('@/layouts/index.vue'),
redirect: '/personal/setting',
meta: {
title: '个人中心',
breadcrumb: false,
},
children: [
{
path: 'setting',
name: 'personalSetting',
@@ -81,25 +73,6 @@ const systemRoutes: Route.recordRaw[] = [
},
],
},
{
path: '/reload',
component: () => import('@/layouts/index.vue'),
meta: {
title: '重新加载',
breadcrumb: false,
},
children: [
{
path: '',
name: 'reload',
component: () => import('@/views/reload.vue'),
meta: {
title: '重新加载',
breadcrumb: false,
},
},
],
},
]
// 动态路由(异步路由、导航栏路由)
@@ -122,7 +95,7 @@ const constantRoutesByFilesystem = generatedRoutes.filter((item) => {
const asyncRoutesByFilesystem = setupLayouts(generatedRoutes.filter((item) => {
return item.meta?.enabled !== false && item.meta?.constant !== true && item.meta?.layout !== false
})) as Route.recordRaw[]
}))
export {
constantRoutes,

Some files were not shown because too many files have changed in this diff Show More