Browse Source

fix: 修改bug

bill 1 year ago
parent
commit
2d446f25cf

File diff suppressed because it is too large
+ 3213 - 1889
src/view/case/draw/board/editCAD/Renderer/Draw.js


+ 2 - 2
src/view/case/draw/edit-shape/image.vue

@@ -20,9 +20,9 @@ const emit = defineEmits<{
 const rotate = ref<number>(props.shape.data.rotate);
 const rotate = ref<number>(props.shape.data.rotate);
 const scale = ref<number>(props.shape.data.scale);
 const scale = ref<number>(props.shape.data.scale);
 watchEffect(() => {
 watchEffect(() => {
-  props.shape.setRotate(rotate);
+  props.shape.setRotate(rotate.value);
 });
 });
 watchEffect(() => {
 watchEffect(() => {
-  props.shape.setScale(scale);
+  props.shape.setScale(scale.value);
 });
 });
 </script>
 </script>

+ 2 - 2
src/view/case/draw/edit-shape/index.ts

@@ -1,5 +1,5 @@
 import { markRaw, reactive } from "vue";
 import { markRaw, reactive } from "vue";
-import { images } from "../board/useBoard";
+import { images, customImage } from "../board/useBoard";
 
 
 const componentLoads = import.meta.glob("./*.vue");
 const componentLoads = import.meta.glob("./*.vue");
 
 
@@ -7,7 +7,7 @@ export const components: { [key in string]: any } = reactive({});
 
 
 const map = {
 const map = {
   label: ["Circle", "Rectangle", "Wall"],
   label: ["Circle", "Rectangle", "Wall"],
-  image: images,
+  image: [...images, customImage],
 };
 };
 
 
 Object.entries(componentLoads).map(([name, fn]) => {
 Object.entries(componentLoads).map(([name, fn]) => {