Sfoglia il codice sorgente

fix: 修复远程组件获取为null时,使用forEach出错问题,修复原生标签不能使用.native的情况

wu.jian2 1 anno fa
parent
commit
9e11d0270f

+ 2 - 5
data-room-ui/packages/BigScreenDesign/LeftPanel.vue

@@ -42,7 +42,7 @@
               slot="label"
               class="menu-slot"
               name="layer"
-              @dbclick.native="toggleSidebar"
+              @dbclick="toggleSidebar"
             >
               <i
                 :class="['iconfont-bigscreen', 'icon-layer']"
@@ -67,10 +67,7 @@
             v-for="menu in menuList"
             :key="menu.id"
             :name="menu.name"
-            @click.stop.native="
-              fold = false
-              changeActiveCode('')
-            "
+            @click.stop="fold = false, changeActiveCode('')"
           >
             <div
               slot="label"

+ 1 - 1
data-room-ui/packages/RemoteComponents/remoteComponentsList.js

@@ -23,7 +23,7 @@ export default getRemoteComponents(innerRemoteComponents)
 
 // 抛出外部的用户系统组件
 export function getRemoteComponents (comList) {
-  const customList = comList || window.BS_CONFIG?.remoteComponents
+  const customList = (comList || window.BS_CONFIG?.remoteComponents) || []
 
   const list = []
   customList.forEach((config) => {

+ 0 - 1
data-room-ui/packages/js/store/actions.js

@@ -6,7 +6,6 @@ import { getScreenInfo, getDataSetDetails, getDataByDataSetId } from '../api/big
 import { stringToFunction } from '../utils/evalFunctions'
 import { EventBus } from '../utils/eventBus'
 import plotList from 'data-room-ui/G2Plots/plotList'
-// import innerRemoteComponents, { getRemoteComponents } from 'data-room-ui/RemoteComponents/remoteComponentsList'
 export default {
   // 初始化页面数据
   initLayout ({ commit, dispatch }, code) {