Ver Fonte

refactor(解决了切换菜单页面不渲染的bug): 解决了切换菜单页面不渲染的bug

解决了切换菜单页面不渲染的bug
wyoujia há 1 ano atrás
pai
commit
baab9821d0

+ 1 - 1
admin.ui.plus-master/src/layout/navBars/tagsView/tagsView.vue

@@ -158,7 +158,7 @@ const solveAddTagsView = async (path: string, to?: RouteToFrom) => {
       )
   )
   if (current.length <= 0) {
-    // 防止:Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.
+    // 防止:Avoid app logic that relies on enumerating keys on a components instance. The keys will be empty in production mode to avoid performance overhead.
     let findItem = state.tagsViewRoutesList.find((v: RouteItem) => v.path === isDynamicPath)
     if (!findItem) return false
     if (findItem.meta.isAffix) return false

+ 7 - 7
admin.ui.plus-master/src/router/backEnd.ts

@@ -45,7 +45,7 @@ export async function initBackEndControlRoutes() {
   if (!(menus?.length > 0)) return Promise.resolve(true)
   // 存储接口原始路由(未处理component),根据需求选择使用
   useRequestOldRoutes().setRequestOldRoutes(JSON.parse(JSON.stringify(menus)))
-  // 处理路由(component),替换 dynamicRoutes(/@/router/route)第一个顶级 children 的路由
+  // 处理路由(components),替换 dynamicRoutes(/@/router/route)第一个顶级 children 的路由
   const routes = await backEndComponent(menus)
   const isIncludeExample = true
   if (isIncludeExample) {
@@ -159,16 +159,16 @@ export async function getBackEndControlRoutes() {
 /**
  * 重新请求后端路由菜单接口
  * @description 用于菜单管理界面刷新菜单(未进行测试)
- * @description 路径:/src/views/system/menu/component/addMenu.vue
+ * @description 路径:/src/views/system/menu/components/addMenu.vue
  */
 export function setBackEndControlRefreshRoutes() {
   getBackEndControlRoutes()
 }
 
 /**
- * 后端路由 component 转换
+ * 后端路由 components 转换
  * @param routes 后端返回的路由表数组
- * @returns 返回处理成函数后的 component
+ * @returns 返回处理成函数后的 components
  */
 export function backEndComponent(routes: any) {
   if (!routes) return
@@ -180,10 +180,10 @@ export function backEndComponent(routes: any) {
 }
 
 /**
- * 后端路由 component 转换函数
+ * 后端路由 components 转换函数
  * @param dynamicViewsModules 获取目录下的 .vue、.tsx 全部文件
- * @param component 当前要处理项 component
- * @returns 返回处理成函数后的 component
+ * @param component 当前要处理项 components
+ * @returns 返回处理成函数后的 components
  */
 export function dynamicImport(dynamicViewsModules: Record<string, Function>, component: string) {
   const keys = Object.keys(dynamicViewsModules)

+ 2 - 2
admin.ui.plus-master/src/router/route.ts

@@ -34,7 +34,7 @@ declare module 'vue-router' {
  * 定义动态路由
  * 前端添加路由,请在顶级节点的 `children 数组` 里添加
  * @description 未开启 isRequestRoutes 为 true 时使用(前端控制路由),开启时第一个顶级 children 的路由将被替换成接口请求回来的路由数据
- * @description 各字段请查看 `/@/views/example/system/menu/component/addMenu.vue 下的 ruleForm`
+ * @description 各字段请查看 `/@/views/example/system/menu/components/addMenu.vue 下的 ruleForm`
  * @returns 返回路由菜单数据
  */
 export const dynamicRoutes: Array<RouteRecordRaw> = [
@@ -1071,7 +1071,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
                 },
                 /**
                  * 打开内置全屏
-                 * component 都为 `() => import('/@/layout/routerView/link.vue')`
+                 * components 都为 `() => import('/@/layout/routerView/link.vue')`
                  * isLink 链接为内置的路由地址,地址为 staticRoutes 中定义
                  */
                 children: [

+ 4 - 3
admin.ui.plus-master/src/views/admin/authorize/index.vue

@@ -1,6 +1,6 @@
+<!--部件电子档案-->
 <template>
-    <!--部件电子档案-->
-  <div class="layout-pd">
+  <div class="layout-pd" >
     <!--操作-->
     <el-card  shadow="hover" >
           <el-form :model="sdkData.Filter" size="default" label-width="100px" class="mt35 mb35">
@@ -95,6 +95,7 @@
     </el-card>
     <EditDialog ref="editDialogRef" />
   </div>
+
 </template>
 
 <script setup lang="ts" name="authorize/fuelingsdk">
@@ -104,7 +105,7 @@ import {OilSdkAuthorAPI} from "/@/api/admin/deviceAuthorization/oilSdkAuthor";
 import type {pageInput} from "/@/api/admin/shareDto/shareDto";
 
 /**引入组件*/
-const EditDialog = defineAsyncComponent(() => import('./component/editInfo.vue'))
+const EditDialog = defineAsyncComponent(() => import('./components/form-edit.vue'))
 
 const editDialogRef = ref()
 /**sdk授权页面对象 */

+ 0 - 1
admin.ui.plus-master/src/views/admin/personal/index.vue

@@ -131,7 +131,6 @@
         </el-card>
       </el-col>
     </el-row>
-
     <change-password-form ref="changePasswordFormRef" title="修改密码"></change-password-form>
   </div>
 </template>