bill 3 viikkoa sitten
vanhempi
commit
5001a40d4c

+ 1 - 1
src/core/html-mount/propertys/components/color.vue

@@ -6,7 +6,7 @@
       :class="{
         weight: color === '#FFFFFF' || color === null,
         tran: color === null,
-        active: (value && value.toUpperCase() === color) || value === color,
+        active: (value && value.toUpperCase() === color) || (value || null) === color,
       }"
       @click="
         () => {

+ 3 - 1
src/core/html-mount/propertys/mount.vue

@@ -17,7 +17,7 @@
 </template>
 
 <script lang="ts" setup>
-import { computed } from "vue";
+import { computed, watch } from "vue";
 import { useStage } from "../../hook/use-global-vars.ts";
 import { useMode } from "../../hook/use-status.ts";
 import { PropertyDescribes } from "./index.ts";
@@ -62,4 +62,6 @@ const hidden = computed(
       mode.value.has(Mode.draw) ||
       mode.value.has(Mode.draging))
 );
+
+watch(hidden, (hide) => !hide && console.log(props.data));
 </script>

+ 2 - 1
src/example/components/header/actions.ts

@@ -82,9 +82,10 @@ export const getHeaderActions = (draw: Draw) => {
     toggleShow: reactive({
       handler: () => {
         draw.history.onceTrack(() => {
+          const val = !floorCoversHide.value
           floorCovers.value.forEach((image) => {
             draw.store.setItem("image", {
-              value: { ...image, hide: !floorCoversHide.value },
+              value: { ...image, hide: val },
               id: image.id,
             });
           });

+ 1 - 0
src/example/fuse/views/overview/header.vue

@@ -304,6 +304,7 @@ const saveHandler = repeatedlyOnly(async () => {
     tabulationData.value.isAutoGen ? undefined : tabulationData.value.store
   );
 
+  console.log(tabStore);
   tabStore.config.compass = storeData.config.compass;
 
   overviewId.value = await window.platform.saveOverviewData(overviewId.value, {

+ 5 - 2
src/example/fuse/views/tabulation/gen-tab.ts

@@ -319,12 +319,12 @@ export const repTabulationStore = async (
 ) => {
   const repData = await genTabulationData(paperKey, compass, cover);
   const layer = store?.layers && store?.layers[defaultLayer];
-  console.error("rep", layer);
+  
   if (!layer) {
     return {
       ...(store || {}),
       config: {
-        ...getEmptyStoreData(),
+        ...getEmptyStoreData().config,
         ...(store?.config || {}),
       },
       layers: {
@@ -333,6 +333,9 @@ export const repTabulationStore = async (
       },
     };
   }
+  if (!store.config) {
+    store.config = {...getEmptyStoreData().config}
+  }
 
   if (repData.image?.length) {
     const imageData = repData.image[0];