Bladeren bron

fix(electron): 修复安装程序配置和图层渲染问题

- 在 NSIS 安装程序配置中添加 perMachine 选项以支持机器级安装
- 注释掉画布对象遍历逻辑以解决渲染性能问题
- 为图层面板列表添加 key 属性以优化组件更新机制
panqiuyao 18 uur geleden
bovenliggende
commit
7cb073223d

+ 1 - 0
electron/config/builder.json

@@ -28,6 +28,7 @@
   ],
   "nsis": {
     "oneClick": false,
+    "perMachine": true,
     "allowElevation": true,
     "allowToChangeInstallationDirectory": true,
     "installerIcon": "build/icons/icon.ico",

+ 2 - 2
frontend/src/views/components/marketingEdit/index.vue

@@ -375,7 +375,7 @@ export default {
             }
           }*/
           if(newColor !== this.this_canvas.bg_color)this.fcanvas.setBackgroundColor(newColor);
-          let objects = this.fcanvas.getObjects();
+ /*         let objects = this.fcanvas.getObjects();
 
           objects.forEach(function(object) {
             // 调整对象的位置
@@ -383,7 +383,7 @@ export default {
             object.top = object.top ;
             object.controls = fabric.Object.prototype.controls
 
-          });
+          });*/
 
           // 重新渲染以应用更改
           this.fcanvas.requestRenderAll();

+ 1 - 1
frontend/src/views/components/marketingEdit/tpl/layer.js

@@ -5,7 +5,7 @@ export default function() {
         <div class="layer-panel__title">图层</div>
       </div>
       <template v-if="layers.length > 0">
-        <div class="layer-panel__list">
+        <div class="layer-panel__list" :key="index">
           <div
             class="layer-item"
             v-for="(item,index) in layers"