optimize: ♻️ 删除不需要文件

This commit is contained in:
bunny 2024-11-04 17:30:17 +08:00
parent 7b2987a5af
commit 3d5c2eaa12
45 changed files with 95 additions and 143 deletions

View File

@ -23,12 +23,12 @@ VITE_BASE_API_RETRY=5
VITE_BASE_API_RETRY_DELAY=3000 VITE_BASE_API_RETRY_DELAY=3000
# 是否在打包时使用cdn替换本地库 替换 true 不替换 false # 是否在打包时使用cdn替换本地库 替换 true 不替换 false
VITE_CDN=false VITE_CDN=true
# 是否启用gzip压缩或brotli压缩分两种情况删除原始文件和不删除原始文件 # 是否启用gzip压缩或brotli压缩分两种情况删除原始文件和不删除原始文件
# 压缩时不删除原始文件的配置gzip、brotli、both同时开启 gzip 与 brotli 压缩、none不开启压缩默认 # 压缩时不删除原始文件的配置gzip、brotli、both同时开启 gzip 与 brotli 压缩、none不开启压缩默认
# 压缩时删除原始文件的配置gzip-clear、brotli-clear、both-clear同时开启 gzip 与 brotli 压缩、none不开启压缩默认 # 压缩时删除原始文件的配置gzip-clear、brotli-clear、both-clear同时开启 gzip 与 brotli 压缩、none不开启压缩默认
VITE_COMPRESSION="gzip" VITE_COMPRESSION="none"
# 开发环境读取配置文件路径 # 开发环境读取配置文件路径
VITE_PUBLIC_PATH=/ VITE_PUBLIC_PATH=/

View File

@ -30,6 +30,7 @@ export const buildEnvironment = () => {
// 规定触发警告的 chunk 大小, 当某个代码分块的大小超过该限制时Vite 会发出警告 // 规定触发警告的 chunk 大小, 当某个代码分块的大小超过该限制时Vite 会发出警告
chunkSizeWarningLimit: 2000, chunkSizeWarningLimit: 2000,
rollupOptions: { rollupOptions: {
external: [],
input: { input: {
index: pathResolve('../index.html', import.meta.url), index: pathResolve('../index.html', import.meta.url),
}, },
@ -41,7 +42,7 @@ export const buildEnvironment = () => {
manualChunks: id => { manualChunks: id => {
// 如果是包含在包中则打包成 vendor // 如果是包含在包中则打包成 vendor
if (id.includes('node_modules')) { if (id.includes('node_modules')) {
return 'vendor'; return `vendor`;
} }
}, },
}, },

View File

@ -7,54 +7,55 @@ import { Plugin as importToCDN } from 'vite-plugin-cdn-import';
*/ */
export const cdn = importToCDN({ export const cdn = importToCDN({
//prodUrl解释 name: 对应下面modules的nameversion: 自动读取本地package.json中dependencies依赖中对应包的版本号path: 对应下面modules的path当然也可写完整路径会替换prodUrl //prodUrl解释 name: 对应下面modules的nameversion: 自动读取本地package.json中dependencies依赖中对应包的版本号path: 对应下面modules的path当然也可写完整路径会替换prodUrl
prodUrl: 'https://cdn.bootcdn.net/ajax/libs/{name}/{version}/{path}', // prodUrl: 'https://cdn.bootcdn.net/ajax/libs/{name}/{version}/{path}',
prodUrl: 'https://unpkg.com/{name}@{version}/{path}',
modules: [ modules: [
{ {
name: 'vue', name: 'vue',
var: 'Vue', var: 'Vue',
path: 'vue.global.prod.min.js', path: 'dist/vue.global.prod.js',
}, },
{ {
name: 'vue-router', name: 'vue-router',
var: 'VueRouter', var: 'VueRouter',
path: 'vue-router.global.min.js', path: 'dist/vue-router.global.js',
}, },
{ {
name: 'vue-i18n', name: 'vue-i18n',
var: 'VueI18n', var: 'VueI18n',
path: 'vue-i18n.runtime.global.prod.min.js', path: 'dist/vue-i18n.global.prod.js',
}, },
// 项目中没有直接安装vue-demi但是pinia用到了所以需要在引入pinia前引入vue-demihttps://github.com/vuejs/pinia/blob/v2/packages/pinia/package.json#L77 // 项目中没有直接安装vue-demi但是pinia用到了所以需要在引入pinia前引入vue-demihttps://github.com/vuejs/pinia/blob/v2/packages/pinia/package.json#L77
{ {
name: 'vue-demi', name: 'vue-demi',
var: 'VueDemi', var: 'VueDemi',
path: 'index.iife.min.js', path: 'lib/index.iife.js',
}, },
{ {
name: 'pinia', name: 'pinia',
var: 'Pinia', var: 'Pinia',
path: 'pinia.iife.min.js', path: 'dist/pinia.iife.js',
}, },
{ {
name: 'element-plus', name: 'element-plus',
var: 'ElementPlus', var: 'ElementPlus',
path: 'index.full.min.js', path: 'dist/index.full.js',
css: 'index.min.css', css: 'dist/index.css',
}, },
{ {
name: 'axios', name: 'axios',
var: 'axios', var: 'axios',
path: 'axios.min.js', path: 'dist/axios.min.js',
}, },
{ {
name: 'dayjs', name: 'dayjs',
var: 'dayjs', var: 'dayjs',
path: 'dayjs.min.js', path: 'dayjs.min.js',
}, },
// { {
// name: "echarts", name: 'echarts',
// var: "echarts", var: 'echarts',
// path: "echarts.min.js" path: 'dist/echarts.min.js',
// } },
], ],
}); });

View File

@ -15,6 +15,11 @@ export const serverOptions = (mode: string) => {
changeOrigin: true, changeOrigin: true,
rewrite: (path: string) => path.replace(/^\/api/, '/admin'), rewrite: (path: string) => path.replace(/^\/api/, '/admin'),
}, },
'/admin': {
target: VITE_APP_URL,
changeOrigin: true,
rewrite: (path: string) => path.replace(/^\/admin/, '/admin'),
},
'/mock': { '/mock': {
target: VITE_APP_URL, target: VITE_APP_URL,
changeOrigin: true, changeOrigin: true,

View File

@ -7,6 +7,8 @@
<meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" /> <meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
<title>bunny-admin</title> <title>bunny-admin</title>
<link href="/favicon.ico" rel="icon" /> <link href="/favicon.ico" rel="icon" />
<link href="https://unpkg.com/@wangeditor/editor@latest/dist/css/style.css" rel="stylesheet" />
<script src="https://unpkg.com/@wangeditor/editor@latest/dist/index.js"></script>
<script> <script>
window.process = {}; window.process = {};
</script> </script>

View File

@ -58,7 +58,6 @@
"@vue-flow/core": "^1.33.6", "@vue-flow/core": "^1.33.6",
"@vueuse/core": "^10.9.0", "@vueuse/core": "^10.9.0",
"@vueuse/motion": "^2.1.0", "@vueuse/motion": "^2.1.0",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12", "@wangeditor/editor-for-vue": "^5.1.12",
"@zxcvbn-ts/core": "^3.0.4", "@zxcvbn-ts/core": "^3.0.4",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
@ -74,7 +73,7 @@
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"jsbarcode": "^3.11.6", "jsbarcode": "^3.11.6",
"localforage": "^1.10.0", "localforage": "^1.10.0",
"md-editor-v3": "^4.21.1", "md-editor-v3": "^4.21.2",
"mint-filter": "^4.0.3", "mint-filter": "^4.0.3",
"mitt": "^3.0.1", "mitt": "^3.0.1",
"mqtt": "4.3.7", "mqtt": "4.3.7",

View File

@ -35,9 +35,6 @@ importers:
'@vueuse/motion': '@vueuse/motion':
specifier: ^2.1.0 specifier: ^2.1.0
version: 2.2.3(rollup@4.21.1)(vue@3.4.38(typescript@5.5.4)) version: 2.2.3(rollup@4.21.1)(vue@3.4.38(typescript@5.5.4))
'@wangeditor/editor':
specifier: ^5.1.23
version: 5.1.23
'@wangeditor/editor-for-vue': '@wangeditor/editor-for-vue':
specifier: ^5.1.12 specifier: ^5.1.12
version: 5.1.12(@wangeditor/editor@5.1.23)(vue@3.4.38(typescript@5.5.4)) version: 5.1.12(@wangeditor/editor@5.1.23)(vue@3.4.38(typescript@5.5.4))
@ -84,8 +81,8 @@ importers:
specifier: ^1.10.0 specifier: ^1.10.0
version: 1.10.0 version: 1.10.0
md-editor-v3: md-editor-v3:
specifier: ^4.21.1 specifier: ^4.21.2
version: 4.21.1(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(vue@3.4.38(typescript@5.5.4)) version: 4.21.2(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(vue@3.4.38(typescript@5.5.4))
mint-filter: mint-filter:
specifier: ^4.0.3 specifier: ^4.0.3
version: 4.0.3 version: 4.0.3
@ -551,8 +548,8 @@ packages:
resolution: {integrity: sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==} resolution: {integrity: sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
'@codemirror/autocomplete@6.18.1': '@codemirror/autocomplete@6.18.2':
resolution: {integrity: sha512-iWHdj/B1ethnHRTwZj+C1obmmuCzquH29EbcKr0qIjA9NfDeBDJ7vs+WOHsFeLeflE4o+dHfYndJloMKHUkWUA==} resolution: {integrity: sha512-wJGylKtMFR/Ds6Gh01+OovXE/pncPiKZNNBKuC39pKnH+XK5d9+WsNqcrdxPjFPFTigRBqse0rfxw9UxrfyhPg==}
peerDependencies: peerDependencies:
'@codemirror/language': ^6.0.0 '@codemirror/language': ^6.0.0
'@codemirror/state': ^6.0.0 '@codemirror/state': ^6.0.0
@ -634,8 +631,8 @@ packages:
'@codemirror/lint@6.8.2': '@codemirror/lint@6.8.2':
resolution: {integrity: sha512-PDFG5DjHxSEjOXk9TQYYVjZDqlZTFaDBfhQixHnQOEVDDNHUbEh/hstAjcQJaA6FQdZTD1hquXTK0rVBLADR1g==} resolution: {integrity: sha512-PDFG5DjHxSEjOXk9TQYYVjZDqlZTFaDBfhQixHnQOEVDDNHUbEh/hstAjcQJaA6FQdZTD1hquXTK0rVBLADR1g==}
'@codemirror/search@6.5.6': '@codemirror/search@6.5.7':
resolution: {integrity: sha512-rpMgcsh7o0GuCDUXKPvww+muLA1pDJaFrpq/CCHtpQJYz8xopu4D1hPcKRoDD0YlF8gZaqTNIRa4VRBWyhyy7Q==} resolution: {integrity: sha512-6+iLsXvITWKHYlkgHPCs/qiX4dNzn8N78YfhOFvPtPYCkuXqZq10rAfsUMhOq7O/1VjJqdXRflyExlfVcu/9VQ==}
'@codemirror/state@6.4.1': '@codemirror/state@6.4.1':
resolution: {integrity: sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==} resolution: {integrity: sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==}
@ -1117,8 +1114,8 @@ packages:
'@lezer/lr@1.4.2': '@lezer/lr@1.4.2':
resolution: {integrity: sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==} resolution: {integrity: sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==}
'@lezer/markdown@1.3.1': '@lezer/markdown@1.3.2':
resolution: {integrity: sha512-DGlzU/i8DC8k0uz1F+jeePrkATl0jWakauTzftMQOcbaMkHbNSRki/4E2tOzJWsVpoKYhe7iTJ03aepdwVUXUA==} resolution: {integrity: sha512-Wu7B6VnrKTbBEohqa63h5vxXjiC4pO5ZQJ/TDbhJxPQaaIoRD/6UVDhSDtVsCwVZV12vvN9KxuLL3ATMnlG0oQ==}
'@lezer/php@1.0.2': '@lezer/php@1.0.2':
resolution: {integrity: sha512-GN7BnqtGRpFyeoKSEqxvGvhJQiI4zkgmYnDk/JIyc7H7Ifc1tkPnUn/R2R8meH3h/aBf5rzjvU8ZQoyiNDtDrA==} resolution: {integrity: sha512-GN7BnqtGRpFyeoKSEqxvGvhJQiI4zkgmYnDk/JIyc7H7Ifc1tkPnUn/R2R8meH3h/aBf5rzjvU8ZQoyiNDtDrA==}
@ -3449,8 +3446,8 @@ packages:
mathml-tag-names@2.1.3: mathml-tag-names@2.1.3:
resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==} resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==}
md-editor-v3@4.21.1: md-editor-v3@4.21.2:
resolution: {integrity: sha512-887rjL0jJBdu8yA7jHU472gEaLlJ4kH8POzG/qYRLtIN72RuAOuKTiDfJVdnrSqMgpIrXYgVgVt36luQpo/zMA==} resolution: {integrity: sha512-msC30hd5fEX1XXu/VofmG3uI2db+Xydr4kN2tFNO+9awg5GStwKU9E9MlojewR8Wm6eaUQiCVvxbySAyO0HCHg==}
peerDependencies: peerDependencies:
vue: ^3.2.47 vue: ^3.2.47
@ -5614,7 +5611,7 @@ snapshots:
'@babel/helper-validator-identifier': 7.24.7 '@babel/helper-validator-identifier': 7.24.7
to-fast-properties: 2.0.0 to-fast-properties: 2.0.0
'@codemirror/autocomplete@6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)': '@codemirror/autocomplete@6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)':
dependencies: dependencies:
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
@ -5644,7 +5641,7 @@ snapshots:
'@codemirror/lang-css@6.3.0(@codemirror/view@6.34.1)': '@codemirror/lang-css@6.3.0(@codemirror/view@6.34.1)':
dependencies: dependencies:
'@codemirror/autocomplete': 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) '@codemirror/autocomplete': 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
'@lezer/common': 1.2.3 '@lezer/common': 1.2.3
@ -5654,7 +5651,7 @@ snapshots:
'@codemirror/lang-go@6.0.1(@codemirror/view@6.34.1)': '@codemirror/lang-go@6.0.1(@codemirror/view@6.34.1)':
dependencies: dependencies:
'@codemirror/autocomplete': 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) '@codemirror/autocomplete': 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
'@lezer/common': 1.2.3 '@lezer/common': 1.2.3
@ -5664,7 +5661,7 @@ snapshots:
'@codemirror/lang-html@6.4.9': '@codemirror/lang-html@6.4.9':
dependencies: dependencies:
'@codemirror/autocomplete': 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) '@codemirror/autocomplete': 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/lang-css': 6.3.0(@codemirror/view@6.34.1) '@codemirror/lang-css': 6.3.0(@codemirror/view@6.34.1)
'@codemirror/lang-javascript': 6.2.2 '@codemirror/lang-javascript': 6.2.2
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
@ -5681,7 +5678,7 @@ snapshots:
'@codemirror/lang-javascript@6.2.2': '@codemirror/lang-javascript@6.2.2':
dependencies: dependencies:
'@codemirror/autocomplete': 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) '@codemirror/autocomplete': 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
'@codemirror/lint': 6.8.2 '@codemirror/lint': 6.8.2
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
@ -5706,7 +5703,7 @@ snapshots:
'@codemirror/lang-liquid@6.2.1': '@codemirror/lang-liquid@6.2.1':
dependencies: dependencies:
'@codemirror/autocomplete': 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) '@codemirror/autocomplete': 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/lang-html': 6.4.9 '@codemirror/lang-html': 6.4.9
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
@ -5717,13 +5714,13 @@ snapshots:
'@codemirror/lang-markdown@6.3.0': '@codemirror/lang-markdown@6.3.0':
dependencies: dependencies:
'@codemirror/autocomplete': 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) '@codemirror/autocomplete': 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/lang-html': 6.4.9 '@codemirror/lang-html': 6.4.9
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1 '@codemirror/view': 6.34.1
'@lezer/common': 1.2.3 '@lezer/common': 1.2.3
'@lezer/markdown': 1.3.1 '@lezer/markdown': 1.3.2
'@codemirror/lang-php@6.0.1': '@codemirror/lang-php@6.0.1':
dependencies: dependencies:
@ -5735,7 +5732,7 @@ snapshots:
'@codemirror/lang-python@6.1.6(@codemirror/view@6.34.1)': '@codemirror/lang-python@6.1.6(@codemirror/view@6.34.1)':
dependencies: dependencies:
'@codemirror/autocomplete': 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) '@codemirror/autocomplete': 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
'@lezer/common': 1.2.3 '@lezer/common': 1.2.3
@ -5760,7 +5757,7 @@ snapshots:
'@codemirror/lang-sql@6.8.0(@codemirror/view@6.34.1)': '@codemirror/lang-sql@6.8.0(@codemirror/view@6.34.1)':
dependencies: dependencies:
'@codemirror/autocomplete': 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) '@codemirror/autocomplete': 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
'@lezer/common': 1.2.3 '@lezer/common': 1.2.3
@ -5787,7 +5784,7 @@ snapshots:
'@codemirror/lang-xml@6.1.0': '@codemirror/lang-xml@6.1.0':
dependencies: dependencies:
'@codemirror/autocomplete': 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) '@codemirror/autocomplete': 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1 '@codemirror/view': 6.34.1
@ -5796,7 +5793,7 @@ snapshots:
'@codemirror/lang-yaml@6.1.1(@codemirror/view@6.34.1)': '@codemirror/lang-yaml@6.1.1(@codemirror/view@6.34.1)':
dependencies: dependencies:
'@codemirror/autocomplete': 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) '@codemirror/autocomplete': 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
'@lezer/common': 1.2.3 '@lezer/common': 1.2.3
@ -5851,7 +5848,7 @@ snapshots:
'@codemirror/view': 6.34.1 '@codemirror/view': 6.34.1
crelt: 1.0.6 crelt: 1.0.6
'@codemirror/search@6.5.6': '@codemirror/search@6.5.7':
dependencies: dependencies:
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1 '@codemirror/view': 6.34.1
@ -6387,7 +6384,7 @@ snapshots:
dependencies: dependencies:
'@lezer/common': 1.2.3 '@lezer/common': 1.2.3
'@lezer/markdown@1.3.1': '@lezer/markdown@1.3.2':
dependencies: dependencies:
'@lezer/common': 1.2.3 '@lezer/common': 1.2.3
'@lezer/highlight': 1.2.1 '@lezer/highlight': 1.2.1
@ -7426,11 +7423,11 @@ snapshots:
codemirror@6.0.1(@lezer/common@1.2.3): codemirror@6.0.1(@lezer/common@1.2.3):
dependencies: dependencies:
'@codemirror/autocomplete': 6.18.1(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3) '@codemirror/autocomplete': 6.18.2(@codemirror/language@6.10.3)(@codemirror/state@6.4.1)(@codemirror/view@6.34.1)(@lezer/common@1.2.3)
'@codemirror/commands': 6.7.1 '@codemirror/commands': 6.7.1
'@codemirror/language': 6.10.3 '@codemirror/language': 6.10.3
'@codemirror/lint': 6.8.2 '@codemirror/lint': 6.8.2
'@codemirror/search': 6.5.6 '@codemirror/search': 6.5.7
'@codemirror/state': 6.4.1 '@codemirror/state': 6.4.1
'@codemirror/view': 6.34.1 '@codemirror/view': 6.34.1
transitivePeerDependencies: transitivePeerDependencies:
@ -9018,7 +9015,7 @@ snapshots:
mathml-tag-names@2.1.3: {} mathml-tag-names@2.1.3: {}
md-editor-v3@4.21.1(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(vue@3.4.38(typescript@5.5.4)): md-editor-v3@4.21.2(@codemirror/view@6.34.1)(@lezer/common@1.2.3)(vue@3.4.38(typescript@5.5.4)):
dependencies: dependencies:
'@codemirror/lang-markdown': 6.3.0 '@codemirror/lang-markdown': 6.3.0
'@codemirror/language-data': 6.5.1(@codemirror/view@6.34.1) '@codemirror/language-data': 6.5.1(@codemirror/view@6.34.1)

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

View File

@ -1,13 +0,0 @@
<template>
<MdPreview :editorId="id" :modelValue="text" />
</template>
<script setup>
import { MdPreview } from 'md-editor-v3';
import 'md-editor-v3/lib/preview.css';
defineProps({
text: String,
id: String,
});
</script>

View File

@ -0,0 +1,3 @@
<template>
<img alt="loading..." src="@/assets/images/loading.gif" />
</template>

View File

@ -2,7 +2,7 @@
<el-upload :auto-upload="true" :before-upload="beforeUpload" :http-request="onUpload" :show-file-list="false" accept="image/*" drag> <el-upload :auto-upload="true" :before-upload="beforeUpload" :http-request="onUpload" :show-file-list="false" accept="image/*" drag>
<el-image v-if="imageSrc" :src="imageSrc" fit="cover" lazy> <el-image v-if="imageSrc" :src="imageSrc" fit="cover" lazy>
<template #placeholder> <template #placeholder>
<img alt="" src="@/assets/images/tip/loading.gif" /> <ImageLoading />
</template> </template>
</el-image> </el-image>
<el-icon v-else size="36"> <el-icon v-else size="36">
@ -18,6 +18,7 @@ import { ElMessage, UploadRawFile, UploadRequestOptions } from 'element-plus';
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { SystemEnum } from '@/enums/upload'; import { SystemEnum } from '@/enums/upload';
import { fetchUploadFile } from '@/api/v1/system/system'; import { fetchUploadFile } from '@/api/v1/system/system';
import ImageLoading from '@/components/Upload/ImageLoading.vue';
const props = defineProps({ const props = defineProps({
imageUrl: String, imageUrl: String,

View File

@ -1,9 +1,7 @@
import { computed } from 'vue'; import { computed } from 'vue';
import { $t } from '@/plugins/i18n'; import { $t } from '@/plugins/i18n';
/** /** 是否默认 */
* *
*/
export const isDefaultOptions = [ export const isDefaultOptions = [
{ value: true, label: '是' }, { value: true, label: '是' },
{ value: false, label: '否' }, { value: false, label: '否' },
@ -40,8 +38,8 @@ export const isReadStatus = [
{ value: 'false', label: $t('unread') }, { value: 'false', label: $t('unread') },
]; ];
/** /** 分页默认数组个数 */
* *
*/
export const pageSizes: number[] = [15, 30, 50, 100, 150]; export const pageSizes: number[] = [15, 30, 50, 100, 150];
export const tableSelectButtonClass = computed(() => ['!h-[20px]', 'reset-margin', '!text-gray-500', 'dark:!text-white', 'dark:hover:!text-primary']); export const tableSelectButtonClass = computed(() => ['!h-[20px]', 'reset-margin', '!text-gray-500', 'dark:!text-white', 'dark:hover:!text-primary']);
// export const UserAvatar = 'http://116.196.101.14:9000/auth-admin/avatar/user.jpg';
export const UserAvatar = 'https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoj0hHXhgJNOTSOFsS4uZs8x1ConecaVOB8eIl115xmJZcT4oCicvia7wMEufibKtTLqiaJeanU2Lpg3w/132';

View File

@ -6,52 +6,6 @@ export const menuTypeOptions: Array<OptionsType> = [
{ label: '外链', value: 2 }, { label: '外链', value: 2 },
]; ];
export const showLinkOptions: Array<OptionsType> = [
{ label: '显示', tip: '会在菜单中显示', value: true },
{ label: '隐藏', tip: '不会在菜单中显示', value: false },
];
export const fixedTagOptions: Array<OptionsType> = [
{
label: '固定',
tip: '当前菜单名称固定显示在标签页且不可关闭',
value: true,
},
{
label: '不固定',
tip: '当前菜单名称不固定显示在标签页且可关闭',
value: false,
},
];
export const keepAliveOptions: Array<OptionsType> = [
{ label: '缓存', tip: '会保存该页面的整体状态,刷新后会清空状态', value: true },
{
label: '不缓存',
tip: '不会保存该页面的整体状态',
value: false,
},
];
export const hiddenTagOptions: Array<OptionsType> = [
{ label: '允许', tip: '当前菜单名称或自定义信息允许添加到标签页', value: false },
{
label: '禁止',
tip: '当前菜单名称或自定义信息禁止添加到标签页',
value: true,
},
];
export const showParentOptions: Array<OptionsType> = [
{ label: '显示', tip: '会显示父级菜单', value: true },
{ label: '隐藏', tip: '不会显示父级菜单', value: false },
];
export const frameLoadingOptions: Array<OptionsType> = [
{ label: '开启', tip: '有首次加载动画', value: true },
{ label: '关闭', tip: '无首次加载动画', value: false },
];
export const frameSureOptions: Array<OptionsType> = [ export const frameSureOptions: Array<OptionsType> = [
{ label: '是', tip: '有首次加载动画', value: true }, { label: '是', tip: '有首次加载动画', value: true },
{ label: '否', tip: '无首次加载动画', value: false }, { label: '否', tip: '无首次加载动画', value: false },

View File

@ -1,9 +1,5 @@
// 系统枚举变量 // 系统枚举变量
export enum SystemEnum { export enum SystemEnum {
IMAGE_SIZE = 5 * 1024 * 1024, IMAGE_SIZE = 5 * 1024 * 1024,
FILE_SIZE = 10 * 1024 * 1024,
IMAGE_MESSAGE = '文件不能大于5M', IMAGE_MESSAGE = '文件不能大于5M',
FILE_MESSAGE = '文件不能大于10M',
// Base64
Base64 = 'data:text/plain;base64,',
} }

View File

@ -2,7 +2,6 @@ import { storeToRefs } from 'pinia';
import { getConfig } from '@/config'; import { getConfig } from '@/config';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { emitter } from '@/utils/mitt'; import { emitter } from '@/utils/mitt';
import Avatar from '@/assets/user.jpg';
import { getTopMenu } from '@/router/utils'; import { getTopMenu } from '@/router/utils';
import { useFullscreen } from '@vueuse/core'; import { useFullscreen } from '@vueuse/core';
import type { routeMetaType } from '../types'; import type { routeMetaType } from '../types';
@ -16,6 +15,7 @@ import { usePermissionStoreHook } from '@/store/permission';
import ExitFullscreen from '@iconify-icons/ri/fullscreen-exit-fill'; import ExitFullscreen from '@iconify-icons/ri/fullscreen-exit-fill';
import Fullscreen from '@iconify-icons/ri/fullscreen-fill'; import Fullscreen from '@iconify-icons/ri/fullscreen-fill';
import { $t } from '@/plugins/i18n'; import { $t } from '@/plugins/i18n';
import { UserAvatar } from '@/enums/baseConstant';
const errorInfo = 'The current routing configuration is incorrect, please check the configuration'; const errorInfo = 'The current routing configuration is incorrect, please check the configuration';
@ -39,7 +39,7 @@ export function useNav() {
/** 头像(如果头像为空则使用 src/assets/user.jpg */ /** 头像(如果头像为空则使用 src/assets/user.jpg */
const userAvatar = computed(() => { const userAvatar = computed(() => {
return isAllEmpty(useUserStoreHook()?.avatar) ? Avatar : useUserStoreHook()?.avatar; return isAllEmpty(useUserStoreHook()?.avatar) ? UserAvatar : useUserStoreHook()?.avatar;
}); });
/** 昵称(如果昵称为空则显示用户名) */ /** 昵称(如果昵称为空则显示用户名) */

View File

@ -5,6 +5,7 @@ import { storePagination } from '@/store/useStorePagination';
import { import {
fetchAddAdminUser, fetchAddAdminUser,
fetchDeleteAdminUser, fetchDeleteAdminUser,
fetchForcedOffline,
fetchGetAdminUserList, fetchGetAdminUserList,
fetchQueryUser, fetchQueryUser,
fetchUpdateAdminUser, fetchUpdateAdminUser,
@ -118,5 +119,11 @@ export const useAdminUserStore = defineStore('adminUserStore', {
const result = await fetchUpdateUserStatusByAdmin(data); const result = await fetchUpdateUserStatusByAdmin(data);
return storeMessage(result); return storeMessage(result);
}, },
/** 强制用户下线 */
async forcedOffline(data: any) {
const result = await fetchForcedOffline(data);
return storeMessage(result);
},
}, },
}); });

View File

@ -2,7 +2,8 @@
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { onMounted } from 'vue'; import { onMounted } from 'vue';
import 'plus-pro-components/es/components/check-card-group/style/css'; import 'plus-pro-components/es/components/check-card-group/style/css';
import MarkdownPreview from '@/components/Editor/MarkdownPreview.vue'; import { MdPreview } from 'md-editor-v3';
import 'md-editor-v3/lib/preview.css';
import { useMessageUserStore } from '@/store/message/messageUser'; import { useMessageUserStore } from '@/store/message/messageUser';
const route = useRoute(); const route = useRoute();
@ -38,7 +39,7 @@ onMounted(() => {
<el-text>{{ messageUserStore.messageDetail?.updateTime }}</el-text> <el-text>{{ messageUserStore.messageDetail?.updateTime }}</el-text>
<el-text type="primary">&nbsp;&nbsp; By{{ messageUserStore.messageDetail?.sendNickname }}</el-text> <el-text type="primary">&nbsp;&nbsp; By{{ messageUserStore.messageDetail?.sendNickname }}</el-text>
</span> </span>
<markdown-preview v-if="messageUserStore.messageDetail?.editorType === 'markdown'" id="message-detail-markdown" :text="messageUserStore.messageDetail?.content" /> <MdPreview v-if="messageUserStore.messageDetail?.editorType === 'markdown'" id="message-detail-markdown" :model-value="messageUserStore.messageDetail?.content" />
<div v-else v-html="messageUserStore.messageDetail?.content" /> <div v-else v-html="messageUserStore.messageDetail?.content" />
</main> </main>
</div> </div>

View File

@ -12,6 +12,7 @@ import { message } from '@/utils/message';
import { useMessageSendStore } from '@/store/message/messageSend'; import { useMessageSendStore } from '@/store/message/messageSend';
import { usePublicHooks } from '@/views/hooks'; import { usePublicHooks } from '@/views/hooks';
import { Plus } from '@element-plus/icons-vue'; import { Plus } from '@element-plus/icons-vue';
import ImageLoading from '@/components/Upload/ImageLoading.vue';
const formRef = ref(); const formRef = ref();
// //
@ -103,7 +104,7 @@ onMounted(() => {
<el-upload :auto-upload="true" :before-upload="beforeUpload" :http-request="onUpload" :show-file-list="false" accept="image/*" drag> <el-upload :auto-upload="true" :before-upload="beforeUpload" :http-request="onUpload" :show-file-list="false" accept="image/*" drag>
<el-image v-if="coverUrl" :src="coverUrl" fit="cover" lazy> <el-image v-if="coverUrl" :src="coverUrl" fit="cover" lazy>
<template #placeholder> <template #placeholder>
<img alt="" src="@/assets/images/tip/loading.gif" /> <ImageLoading />
</template> </template>
</el-image> </el-image>
<el-icon v-else size="36"> <el-icon v-else size="36">

View File

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import { onBeforeUnmount, ref, shallowRef } from 'vue'; import { onBeforeUnmount, ref, shallowRef } from 'vue';
import '@wangeditor/editor/dist/css/style.css'; // import '@wangeditor/editor/dist/css/style.css';
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'; import { Editor, Toolbar } from '@wangeditor/editor-for-vue';
import { formState } from '@/views/message-management/message-editing/utils/hooks'; import { formState } from '@/views/message-management/message-editing/utils/hooks';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
@ -14,7 +14,7 @@ const token = ref(getToken().token);
editorConfig.MENU_CONF['uploadImage'] = { editorConfig.MENU_CONF['uploadImage'] = {
// //
server: '/api/files/upload', server: '/admin/files/upload',
// form-data fieldName // form-data fieldName
fieldName: 'file', fieldName: 'file',
// //
@ -25,10 +25,6 @@ editorConfig.MENU_CONF['uploadImage'] = {
customInsert(res: any, insertFn) { customInsert(res: any, insertFn) {
// res.data.url // res.data.url
if (res.data.url) { if (res.data.url) {
// const form = new FormData();
// form.append('file', file);
// form.append('type', 'message');
// await fetchUploadFile(form)
setTimeout(() => { setTimeout(() => {
// insertFn // insertFn
insertFn(res.data.url); insertFn(res.data.url);

View File

@ -13,6 +13,8 @@ import { beforeUpload } from '@/views/message-management/message-editing/utils/h
import SplitPane from '@/components/SplitPane'; import SplitPane from '@/components/SplitPane';
import RichEditor from '@/views/message-management/message-send/rich-editor.vue'; import RichEditor from '@/views/message-management/message-send/rich-editor.vue';
import MarkdownEditor from '@/views/message-management/message-send/markdown-editor.vue'; import MarkdownEditor from '@/views/message-management/message-send/markdown-editor.vue';
import { imageLoading } from '@/enums/baseConstant';
import ImageLoading from '@/components/Upload/ImageLoading.vue';
// //
const { switchStyle } = usePublicHooks(); const { switchStyle } = usePublicHooks();
@ -97,7 +99,7 @@ defineExpose({ formRef });
<el-upload :auto-upload="true" :before-upload="beforeUpload" :http-request="onUpload" :show-file-list="false" accept="image/*" drag> <el-upload :auto-upload="true" :before-upload="beforeUpload" :http-request="onUpload" :show-file-list="false" accept="image/*" drag>
<el-image v-if="coverUrl" :src="coverUrl" fit="cover" lazy> <el-image v-if="coverUrl" :src="coverUrl" fit="cover" lazy>
<template #placeholder> <template #placeholder>
<img alt="" src="../../../assets/images/tip/loading.gif" /> <ImageLoading />
</template> </template>
</el-image> </el-image>
<el-icon v-else size="36"> <el-icon v-else size="36">

View File

@ -26,13 +26,12 @@ import Refresh from '@iconify-icons/ep/refresh';
import { selectUserinfo } from '@/components/Table/Userinfo/columns'; import { selectUserinfo } from '@/components/Table/Userinfo/columns';
import { $t } from '@/plugins/i18n'; import { $t } from '@/plugins/i18n';
import { useRenderIcon } from '@/components/CommonIcon/src/hooks'; import { useRenderIcon } from '@/components/CommonIcon/src/hooks';
import userAvatar from '@/assets/user.jpg';
import Upload from '@iconify-icons/ri/upload-line'; import Upload from '@iconify-icons/ri/upload-line';
import Role from '@iconify-icons/ri/admin-line'; import Role from '@iconify-icons/ri/admin-line';
import Password from '@iconify-icons/ri/lock-password-line'; import Password from '@iconify-icons/ri/lock-password-line';
import More from '@iconify-icons/ep/more-filled'; import More from '@iconify-icons/ep/more-filled';
import { useAdminUserStore } from '@/store/system/adminUser'; import { useAdminUserStore } from '@/store/system/adminUser';
import { sexConstant, tableSelectButtonClass, userStatus } from '@/enums/baseConstant'; import { sexConstant, tableSelectButtonClass, UserAvatar, userStatus } from '@/enums/baseConstant';
import { deviceDetection } from '@pureadmin/utils'; import { deviceDetection } from '@pureadmin/utils';
import Tree from '@/views/system/adminUser/tree.vue'; import Tree from '@/views/system/adminUser/tree.vue';
import Airplane from '@/assets/svg/airplane.svg'; import Airplane from '@/assets/svg/airplane.svg';
@ -168,10 +167,10 @@ onMounted(() => {
> >
<!-- 显示头像 --> <!-- 显示头像 -->
<template #avatar="{ row }"> <template #avatar="{ row }">
<el-image :preview-src-list="Array.of(row.avatar || userAvatar)" :src="row.avatar || userAvatar" class="w-[24px] h-[24px] rounded-full align-middle" fit="cover" preview-teleported> <el-image :preview-src-list="Array.of(row.avatar || UserAvatar)" :src="row.avatar || UserAvatar" class="w-[24px] h-[24px] rounded-full align-middle" fit="cover" preview-teleported>
<template #error> <template #error>
<div class="image-slot"> <div class="image-slot">
<img :src="userAvatar" alt="" /> <img :src="UserAvatar" alt="" />
</div> </div>
</template> </template>
</el-image> </el-image>

View File

@ -10,11 +10,11 @@ import ResetPasswordDialog from '@/components/Table/ResetPasswords.vue';
import { deviceDetection, handleTree } from '@pureadmin/utils'; import { deviceDetection, handleTree } from '@pureadmin/utils';
import CropperPreview from '@/components/CropperPreview'; import CropperPreview from '@/components/CropperPreview';
import AssignUserToRole from '@/views/system/adminUser/assign-roles-to-user.vue'; import AssignUserToRole from '@/views/system/adminUser/assign-roles-to-user.vue';
import userAvatar from '@/assets/user.jpg'; import { fetchUploadAvatarByAdmin } from '@/api/v1/system/adminUser';
import { fetchForcedOffline, fetchUploadAvatarByAdmin } from '@/api/v1/system/adminUser';
import { useUserStore } from '@/store/system/user'; import { useUserStore } from '@/store/system/user';
import { useDeptStore } from '@/store/system/dept'; import { useDeptStore } from '@/store/system/dept';
import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue'; import DeleteBatchDialog from '@/components/Table/DeleteBatchDialog.vue';
import { UserAvatar } from '@/enums/baseConstant';
const adminUserStore = useAdminUserStore(); const adminUserStore = useAdminUserStore();
const userStore = useUserStore(); const userStore = useUserStore();
@ -233,7 +233,7 @@ export const onUploadAvatar = (row: any) => {
contentRenderer: () => contentRenderer: () =>
h(CropperPreview, { h(CropperPreview, {
ref: cropRef, ref: cropRef,
imgSrc: row.avatar || userAvatar, imgSrc: row.avatar || UserAvatar,
onCropper: info => (avatarInfo.value = info), onCropper: info => (avatarInfo.value = info),
}), }),
beforeSure: async done => { beforeSure: async done => {
@ -319,7 +319,7 @@ export const onForcedOffline = async (row: any) => {
}); });
if (!confirm) return; if (!confirm) return;
const result = await fetchForcedOffline(id); const result = adminUserStore.forcedOffline(id);
if (result.code !== 200) return; if (result.code !== 200) return;
message(result.message, { type: 'success' }); message(result.message, { type: 'success' });
}; };

View File

@ -1,7 +1,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import MarkdownPreview from '@/components/Editor/MarkdownPreview.vue';
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { decode } from 'js-base64'; import { decode } from 'js-base64';
import { MdPreview } from 'md-editor-v3';
import 'md-editor-v3/lib/preview.css';
const content = ref(); const content = ref();
@ -18,5 +19,5 @@ onMounted(() => {
</script> </script>
<template> <template>
<MarkdownPreview id="server-read-me" :text="content" /> <MdPreview id="server-read-me" :modelValue="content" />
</template> </template>

View File

@ -1,7 +1,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import MarkdownPreview from '@/components/Editor/MarkdownPreview.vue';
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { decode } from 'js-base64'; import { decode } from 'js-base64';
import { MdPreview } from 'md-editor-v3';
import 'md-editor-v3/lib/preview.css';
const content = ref(); const content = ref();
@ -18,5 +19,5 @@ onMounted(() => {
</script> </script>
<template> <template>
<MarkdownPreview id="web-read-me" :text="content" /> <MdPreview id="web-read-me" :modelValue="content" />
</template> </template>