bill 3 týždňov pred
rodič
commit
24bb7e7a92

+ 7 - 5
src/core/components/serial/index.ts

@@ -286,6 +286,7 @@ export const addTable = (draw: DrawExpose) => {
 };
 
 export const syncTable = (table: TableData, items: SerialData[]) => {
+  const tempTable = copy(table)
   const tempRow = table.content[table.content.length - 1];
   const presetIndex = table.content.findIndex(
     (row) => row[0].key === "preset-col",
@@ -335,11 +336,12 @@ export const syncTable = (table: TableData, items: SerialData[]) => {
       table.content[rowNdx][colNdx + 1].content = val;
       table.content[rowNdx][colNdx + 1].joinId = item.id;
     } else {
-      table.height += defaultTableStyle.colHeight;
+      const height = tempTable.content[rowNdx]?.[colNdx]?.height || defaultTableStyle.colHeight
+      table.height += height;
       let cols = [
         {
           ...tempRow[0],
-          height: defaultTableStyle.colHeight,
+          height: height,
           content: item.hideSerial ? '' : item.content!,
           readonly: false,
           hidden: false,
@@ -347,7 +349,7 @@ export const syncTable = (table: TableData, items: SerialData[]) => {
         },
         {
           ...tempRow[1],
-          height: defaultTableStyle.colHeight,
+          height: height,
           content: val,
           readonly: false,
           hidden: false,
@@ -359,7 +361,7 @@ export const syncTable = (table: TableData, items: SerialData[]) => {
         cols.push(
           {
             ...tempRow[2],
-            height: defaultTableStyle.colHeight,
+            height,
             readonly: false,
             content: "",
             hidden: false,
@@ -367,7 +369,7 @@ export const syncTable = (table: TableData, items: SerialData[]) => {
           },
           {
             ...tempRow[3],
-            height: defaultTableStyle.colHeight,
+            height:height,
             content: "",
             readonly: false,
             hidden: false,

+ 6 - 8
src/example/fuse/views/tabulation/overview-viewport.vue

@@ -1,11 +1,6 @@
 <template>
   <div class="content" ref="drawEle">
-    <DrawBoard
-      v-if="drawEle"
-      :merge-layers="true"
-      :ref="(d: any) => initDraw(d)"
-      :handler-resource="uploadResourse"
-    />
+    <DrawBoard v-if="drawEle" :merge-layers="true" :ref="(d: any) => initDraw(d)" :handler-resource="uploadResourse" />
   </div>
 </template>
 
@@ -189,6 +184,8 @@ watchEffect(() => {
 
 const cleanups: Array<() => void> = [];
 const updateOrigin = () => {
+  if (!pixelPaperToDrawPixel.value) return;
+
   mergeFuns(cleanups)();
   cleanups.length = 0;
   if (!mounted) return;
@@ -207,9 +204,10 @@ const updateOrigin = () => {
         // item.strokeWidth = init.strokeWidth;
         cleanups.push(() => (item.strokeWidth = init.strokeWidth));
       } else {
-        item.fixed = false;
-        item.fix = true;
+        // item.fixed = false;
+        // item.fix = true;
         item.strokeWidth = ((init.strokeWidth || 1) * pixelPaperToDrawPixel.value!) / 2;
+
         cleanups.push(() => {
           item.fixed = init.fixed;
           item.fix = init.fix;