修复部分bug部分页面的调整
This commit is contained in:
@@ -139,6 +139,7 @@ import { BrushStore } from "../store/BrushStore";
|
||||
import { OperationType } from "../utils/layerHelper";
|
||||
import { inject } from "vue";
|
||||
import VerticalSlider from "./VerticalSlider.vue";
|
||||
import SvgIcon from "@/component/Canvas/SvgIcon/index.vue";
|
||||
|
||||
const props = defineProps({
|
||||
activeTool: {
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
defineAsyncComponent,
|
||||
shallowRef,
|
||||
provide,
|
||||
defineExpose,
|
||||
} from "vue";
|
||||
import { CanvasManager } from "./managers/CanvasManager";
|
||||
import { LayerManager } from "./managers/LayerManager";
|
||||
@@ -128,7 +127,6 @@ onMounted(async () => {
|
||||
canvasHeight.value = canvasContainerRef.value.clientWidth;
|
||||
canvasWidth.value = canvasContainerRef.value.clientHeight;
|
||||
}
|
||||
console.log(12312)
|
||||
// 创建管理器实例
|
||||
canvasManager = new CanvasManager(canvasRef.value, {
|
||||
width: canvasContainerRef.value.clientWidth - layerWidth.value, // 初始化的时候需要减去侧边栏宽度
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
<template>
|
||||
<div class="c-svg">
|
||||
<svg
|
||||
<!-- <svg
|
||||
:class="svgClass"
|
||||
v-bind="$attrs"
|
||||
:style="{ color: color, fontSize: size + 'px' }"
|
||||
>
|
||||
<use :href="iconName"></use>
|
||||
</svg>
|
||||
</svg> -->
|
||||
<img
|
||||
:class="svgClass"
|
||||
v-bind="$attrs"
|
||||
:style="{ color: color, fontSize: size + 'px' }" :src='iconName' alt="">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -26,7 +30,12 @@ const props = defineProps({
|
||||
default: 16,
|
||||
},
|
||||
});
|
||||
const iconName = computed(() => `#icon-${props.name}`);
|
||||
const iconName = computed(() => {
|
||||
console.log(require(`@/assets/icons/${props.name}.svg`))
|
||||
return require(`@/assets/icons/${props.name}.svg`)
|
||||
return imgUrl
|
||||
});
|
||||
// const iconName = computed(() => `#icon-${props.name}`);
|
||||
const svgClass = computed(() => {
|
||||
if (props.name) return `svg-icon icon-${props.name}`;
|
||||
return "svg-icon";
|
||||
|
||||
Reference in New Issue
Block a user