jiaxing.liao 1 місяць тому
батько
коміт
09147b7806

+ 5 - 4
src/renderer/src/lvgl-widgets/bar/Bar.vue

@@ -1,13 +1,14 @@
 <template>
   <div :style="styleMap?.mainStyle" class="w-full h-full box-border relative">
     <ImageBg :src="styleMap?.mainStyle?.imageSrc" :image-style="styleMap?.mainStyle?.imageStyle" />
-    <div
-      class="absolute overflow-hidden"
-      :style="indicatorStyle"
-    >
+    <div class="absolute overflow-hidden" :style="indicatorStyle">
       <ImageBg
         :src="styleMap?.indicatorStyle?.imageSrc"
         :image-style="styleMap?.indicatorStyle?.imageStyle"
+        :style="{
+          width: width + 'px',
+          height: height + 'px'
+        }"
       />
     </div>
   </div>

+ 2 - 6
src/renderer/src/lvgl-widgets/roller/Config.vue

@@ -21,11 +21,7 @@
           class="w-full mb-6px flex items-center gap-4px pr-12px"
         >
           <el-radio :value="index" class="mr-0! shrink-0" />
-          <LanguageInput
-            v-model="options[index]"
-            class="flex-1"
-            placeholder="输入选项"
-          />
+          <LanguageInput v-model="options[index]" class="flex-1" placeholder="输入选项" />
           <LuTrash2 class="cursor-pointer shrink-0" size="14px" @click.stop="handleDelete(index)" />
         </div>
       </el-radio-group>
@@ -117,7 +113,7 @@ const normalizeSelected = (nextOptions = options.value) => {
 
 watch(
   () => options.value.join('|'),
-  (list) => {
+  () => {
     normalizeSelected(options.value)
   },
   {

+ 10 - 4
src/renderer/src/lvgl-widgets/slider/Slider.vue

@@ -2,10 +2,16 @@
   <div :style="styleMap?.mainStyle" class="w-full h-full box-border relative">
     <ImageBg :src="styleMap?.mainStyle?.imageSrc" :image-style="styleMap?.mainStyle?.imageStyle" />
     <div class="absolute" :style="indicatorStyle">
-      <ImageBg
-        :src="styleMap?.indicatorStyle?.imageSrc"
-        :image-style="styleMap?.indicatorStyle?.imageStyle"
-      />
+      <div class="absolute w-full h-full overflow-hidden">
+        <ImageBg
+          :src="styleMap?.indicatorStyle?.imageSrc"
+          :image-style="styleMap?.indicatorStyle?.imageStyle"
+          :style="{
+            width: width + 'px',
+            height: height + 'px'
+          }"
+        />
+      </div>
       <!-- 左边值 -->
       <div
         v-if="mode === 'range'"

+ 6 - 2
src/renderer/src/views/designer/config/property/index.vue

@@ -113,8 +113,12 @@
       </el-collapse-item>
     </el-collapse>
     <div
-      :style="{ pointerEvents: isActiveWidgetLocked ? 'auto' : 'none' }"
-      class="absolute left-0 top-0 w-full h-full"
+      :style="{
+        pointerEvents: isActiveWidgetLocked ? 'auto' : 'none',
+        cursor: isActiveWidgetLocked ? 'not-allowed' : 'auto',
+        height: scrollContainerRef?.scrollHeight + 'px'
+      }"
+      class="absolute left-0 top-0 w-full h-full z-1"
       @click="handleClickMask"
     ></div>
   </div>

+ 4 - 4
src/renderer/src/views/designer/sidebar/components/ScreenTreeItem.vue

@@ -60,10 +60,10 @@
 import { ref } from 'vue'
 import {
   LuTrash2,
-  LuLock,
-  LuUnlock,
-  LuEye,
-  LuEyeOff,
+  // LuLock,
+  // LuUnlock,
+  // LuEye,
+  // LuEyeOff,
   LuMonitor,
   LuPanelsTopLeft,
   LuPlus,

+ 2 - 2
src/renderer/src/views/designer/workspace/stage/Moveable.vue

@@ -204,8 +204,7 @@ const getScale = (widget: Page | BaseWidget) => {
 
 const hasLockedWidgetTree = (widget?: BaseWidget | Page): boolean => {
   return (
-    !!widget &&
-    (!!widget.locked || !!widget.children?.some((child) => hasLockedWidgetTree(child)))
+    !!widget && (!!widget.locked || !!widget.children?.some((child) => hasLockedWidgetTree(child)))
   )
 }
 
@@ -225,6 +224,7 @@ const onDragStart = (e) => {
   zIndex.value = e.target.style.zIndex
   e.target.style.zIndex = 999
   appStore.draging = true
+  return false
 }
 // 渲染节点拖拽
 const onDrag = (e) => {