feat: Support markdown to welcome msg

This commit is contained in:
lejianwen
2024-12-25 19:21:14 +08:00
parent f589d923e9
commit 21254e2b2c
3 changed files with 1072 additions and 7 deletions
+1060
View File
File diff suppressed because it is too large Load Diff
+7 -6
View File
@@ -8,24 +8,25 @@
}, },
"dependencies": { "dependencies": {
"axios": "1.7.4", "axios": "1.7.4",
"clipboard": "2.0.4",
"element-plus": "^2.8.2", "element-plus": "^2.8.2",
"fast-sha256": "^1.3.0",
"js-cookie": "^3.0.1", "js-cookie": "^3.0.1",
"marked": "^15.0.4",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"pinia": "2.0.3", "pinia": "2.0.3",
"vue": "3.2.37", "vue": "3.2.37",
"vue-router": "^4.0.12", "vue-router": "^4.0.12"
"fast-sha256": "^1.3.0",
"clipboard": "2.0.4"
}, },
"devDependencies": { "devDependencies": {
"@element-plus/icons": "0.0.11", "@element-plus/icons": "0.0.11",
"@vitejs/plugin-vue": "^1.9.3", "@vitejs/plugin-vue": "^1.9.3",
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"qs": "^6.10.2", "qs": "^6.10.2",
"sass-loader": "^12.3.0",
"sass": "^1.43.4", "sass": "^1.43.4",
"vite": "^2.9.18", "sass-loader": "^12.3.0",
"ts-proto": "^1.141.1" "ts-proto": "^1.141.1",
"vite": "^2.9.18"
} }
} }
+5 -1
View File
@@ -31,7 +31,7 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card shadow="hover" style="margin-top: 20px"> <el-card shadow="hover" style="margin-top: 20px">
<div v-html="appStore.setting.hello"></div> <div v-html="html"></div>
</el-card> </el-card>
<changePwdDialog v-model:visible="changePwdVisible"></changePwdDialog> <changePwdDialog v-model:visible="changePwdVisible"></changePwdDialog>
</div> </div>
@@ -46,6 +46,7 @@
import { myOauth } from '@/api/user' import { myOauth } from '@/api/user'
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import { T } from '@/utils/i18n' import { T } from '@/utils/i18n'
import { marked } from 'marked'
const appStore = useAppStore() const appStore = useAppStore()
const userStore = useUserStore() const userStore = useUserStore()
@@ -84,6 +85,9 @@
} }
} }
const html = marked(appStore.setting.hello)
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">