hookehuyr

fix

Showing 1 changed file with 14 additions and 20 deletions
......@@ -2,16 +2,11 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-26 23:52:36
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-12 11:12:35
* @LastEditTime: 2024-08-12 12:36:07
* @FilePath: /data-table/src/App.vue
* @Description:
-->
<template>
<!-- <van-row v-if="is_pc">
<van-col span="24">
<router-view></router-view>
</van-col>
</van-row> -->
<router-view></router-view>
</template>
......@@ -19,7 +14,7 @@
import { mainStore, useTitle } from "@/utils/generatePackage";
import { computed, watchEffect, onMounted } from "vue";
import { useRoute, useRouter } from "vue-router";
import { Toast } from "vant";
// import { Toast } from "vant";
// 会根据配置判断是否显示调试控件
// eslint-disable-next-line no-unused-vars
import vConsole from "@/utils/vconsole";
......@@ -31,29 +26,28 @@ import { wxInfo, getUrlParams, stringifyQuery } from "@/utils/tools";
import { styleColor } from "@/constant.js";
import { getFormSettingAPI } from "@/api/form.js";
import { showDialog, showConfirmDialog } from 'vant';
import fp3 from '@/utils/fp3';
// import fp3 from '@/utils/fp3';
import { Updater } from '@/utils/versionUpdater';
// 使用 include + pinia 状态管理动态缓存页面
const store = mainStore();
const keepPages = computed(() => store.getKeepPages);
// // TAG: 全局设置页面标题
// TAG: 全局设置页面标题
const $route = useRoute();
// watchEffect(() => useTitle("表单标题"));
// 监听路由变化
// 切换路由页面返回顶部
const $router = useRouter();
watch(
() => $router.currentRoute.value,
(newValue, oldValue) => {
nextTick(() => {
// document.getElementById('app')?.scrollIntoView();
});
// console.warn(wxInfo().isMobile);
},
{ immediate: true }
);
// watch(
// () => $router.currentRoute.value,
// (newValue, oldValue) => {
// nextTick(() => {
// // document.getElementById('app')?.scrollIntoView();
// });
// },
// { immediate: true }
// );
// TAG: 全局配置Toast
// Toast.setDefaultOptions({
......@@ -98,7 +92,7 @@ onMounted(async () => {
}
// 缓存表单设置
store.changeFormSetting(form_setting);
// 跳转未授权页
// TAG: 跳转未授权页
if (form_setting.auth_error) { // 权限报错信息存在
$router.replace({
path: '/no_auth',
......