1 files added
6 files modified
| | |
| | | "vue": "2.6.12",
|
| | | "vue-count-to": "1.0.13",
|
| | | "vue-cropper": "0.5.5",
|
| | | "vue-meta": "2.4.0",
|
| | | "vue-router": "3.4.9",
|
| | | "vuedraggable": "2.24.3",
|
| | | "vuex": "3.6.0"
|
| | |
| | |
|
| | | export default {
|
| | | name: "App",
|
| | | components: { ThemePicker },
|
| | | metaInfo() {
|
| | | return {
|
| | | title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
|
| | | titleTemplate: title => {
|
| | | return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
|
| | | }
|
| | | }
|
| | | }
|
| | | components: { ThemePicker }
|
| | | }
|
| | | </script>
|
| | | <style scoped>
|
| | |
| | | key: 'dynamicTitle',
|
| | | value: val
|
| | | })
|
| | | this.$store.dispatch('settings/setTitle', this.$store.state.settings.title)
|
| | | }
|
| | | },
|
| | | },
|
| | |
| | | import ImagePreview from "@/components/ImagePreview"
|
| | | // 字典标签组件
|
| | | import DictTag from '@/components/DictTag'
|
| | | // 头部标签组件
|
| | | import VueMeta from 'vue-meta'
|
| | | // 字典数据组件
|
| | | import DictData from '@/components/DictData'
|
| | |
|
| | |
| | |
|
| | | Vue.use(directive)
|
| | | Vue.use(plugins)
|
| | | Vue.use(VueMeta)
|
| | | DictData.install()
|
| | |
|
| | | /**
|
| | |
| | | module.exports = {
|
| | | /**
|
| | | * 网页标题
|
| | | */
|
| | | title: process.env.VUE_APP_TITLE,
|
| | |
|
| | | /**
|
| | | * 侧边栏主题 深色主题theme-dark,浅色主题theme-light
|
| | | */
|
| | | sideTheme: 'theme-dark',
|
| | |
| | | import defaultSettings from '@/settings'
|
| | | import { useDynamicTitle } from '@/utils/dynamicTitle'
|
| | |
|
| | | const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dynamicTitle } = defaultSettings
|
| | |
|
| | |
| | | // 设置网页标题
|
| | | setTitle({ commit }, title) {
|
| | | state.title = title
|
| | | useDynamicTitle()
|
| | | }
|
| | | }
|
| | |
|
| New file |
| | |
| | | import store from '@/store' |
| | | import defaultSettings from '@/settings' |
| | | |
| | | /** |
| | | * 动态修改标题 |
| | | */ |
| | | export function useDynamicTitle() { |
| | | if (store.state.settings.dynamicTitle) { |
| | | document.title = store.state.settings.title + ' - ' + defaultSettings.title |
| | | } else { |
| | | document.title = defaultSettings.title |
| | | } |
| | | } |