Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaojob committed May 27, 2024
2 parents 099c7c6 + 77f3bba commit 19408bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 82 deletions.
13 changes: 9 additions & 4 deletions src/components/imgStroke.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
</iSwitch>
</div>
<div class="operation">
<div class="hd">
<div class="hd" style="flex-basis: 98px">
<span>描边大小</span>
</div>
<div class="flex-1">
<div style="width: 100%">
<Slider v-model="strokeWidth" :max="50" @on-change="onSliderChange"></Slider>
</div>
</div>

<div class="operation" style="justify-content: flex-start">
<div class="operation" style="justify-content: space-between">
<div class="hd">
<span>描边颜色</span>
</div>
Expand All @@ -62,6 +62,7 @@
<script name="ImgStroke" lang="ts" setup>
import useSelect from '@/hooks/select';
import { fabric } from 'fabric';
import { Slider } from 'view-ui-plus';
interface IActiveCanvas extends fabric.Canvas {
[x: string]: any;
Expand All @@ -76,7 +77,8 @@ const openImgStroke = ref(false);
const strokeWidth = ref(5);
const strokeColor = ref('#000');
const isOnlyStroke = ref(false);
const getActiveObject = () => canvasEditor.canvas.getActiveObjects()[0] as unknown as IActiveCanvas;
const getActiveObject = () =>
canvasEditor.canvas?.getActiveObjects()[0] as unknown as IActiveCanvas;
const setOrigin = () => {
const _activeObject = getActiveObject();
Expand Down Expand Up @@ -212,6 +214,9 @@ async function addImage(src: string): Promise<HTMLImageElement | undefined> {
display: flex;
justify-content: space-between;
align-items: center;
.slide-wrap {
width: 100%;
}
}
}
</style>
78 changes: 0 additions & 78 deletions typings/auto-imports.d.ts

This file was deleted.

0 comments on commit 19408bd

Please sign in to comment.