| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <template>
- <div id="app">
- <router-view />
- </div>
- </template>
- <script>
- import { updateDocumentTitle } from '@/utils/document-title-util';
- import { getPageList } from '@/api/saleOrder';
- export default {
- name: 'App',
- created() {
- console.log(
- '我是-----------eom----应用------------------------------------'
- );
- // 恢复主题
- this.$store.dispatch('theme/recoverTheme');
- // getPageList({ status: [1], size: 10, pageNum: 1 });
- },
- methods: {
- /* 路由切换更新浏览器标题 */
- setDocumentTitle() {
- updateDocumentTitle(
- this.$route,
- (key) => this.$t(key),
- this.$store.state.theme.tabs
- );
- }
- },
- watch: {
- '$i18n.locale'() {
- this.setDocumentTitle();
- },
- $route() {
- this.setDocumentTitle();
- }
- }
- };
- </script>
|