|
@@ -43,6 +43,7 @@ cutout(){
|
|
|
<div class="title_two">剪裁</div>
|
|
<div class="title_two">剪裁</div>
|
|
|
<div class="flex left">
|
|
<div class="flex left">
|
|
|
<el-select v-model="clipSettings.shape" @change="applyClipPath" size="small" style="width:100px">
|
|
<el-select v-model="clipSettings.shape" @change="applyClipPath" size="small" style="width:100px">
|
|
|
|
|
+ <el-option label="无" value=""></el-option>
|
|
|
<el-option label="矩形" value="rect"></el-option>
|
|
<el-option label="矩形" value="rect"></el-option>
|
|
|
<el-option label="圆形" value="circle"></el-option>
|
|
<el-option label="圆形" value="circle"></el-option>
|
|
|
<el-option label="SVG" value="svg"></el-option>
|
|
<el-option label="SVG" value="svg"></el-option>
|
|
@@ -58,36 +59,104 @@ cutout(){
|
|
|
style="width:200px"
|
|
style="width:200px"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <div class="flex left mar-top-10 ">
|
|
|
|
|
+ <div class="label fs-14 c-333 te-l" style="width: 35px;">X</div>
|
|
|
|
|
+ <el-slider
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ v-model="clipSettings.offsetX"
|
|
|
|
|
+ :step="1"
|
|
|
|
|
+ :min="1"
|
|
|
|
|
+ :max="canvas.width"
|
|
|
|
|
+ style="width:120px;"
|
|
|
|
|
+ :show-tooltip="false"
|
|
|
|
|
+ @input="applyClipPath"
|
|
|
|
|
+
|
|
|
|
|
+ ></el-slider>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="flex left mar-top-10 ">
|
|
|
|
|
+ <div class="label fs-14 c-333 te-l" style="width: 35px;">Y</div>
|
|
|
|
|
+ <el-slider
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ v-model="clipSettings.offsetY"
|
|
|
|
|
+ :step="1"
|
|
|
|
|
+ :min="1"
|
|
|
|
|
+ :max="canvas.height"
|
|
|
|
|
+ style="width:120px;"
|
|
|
|
|
+ :show-tooltip="false"
|
|
|
|
|
+ @input="applyClipPath"
|
|
|
|
|
+
|
|
|
|
|
+ ></el-slider>
|
|
|
|
|
+ </div>
|
|
|
<div v-if="clipSettings.shape === 'svg'" class="flex left" style="margin-left:10px">
|
|
<div v-if="clipSettings.shape === 'svg'" class="flex left" style="margin-left:10px">
|
|
|
<el-input-number v-model="clipSettings.svgWidth" @input="applyClipPath" :step="1" :min="1" size="small" style="width:80px"/>
|
|
<el-input-number v-model="clipSettings.svgWidth" @input="applyClipPath" :step="1" :min="1" size="small" style="width:80px"/>
|
|
|
<el-input-number v-model="clipSettings.svgHeight" @input="applyClipPath" :step="1" :min="1" size="small" style="width:80px"/>
|
|
<el-input-number v-model="clipSettings.svgHeight" @input="applyClipPath" :step="1" :min="1" size="small" style="width:80px"/>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- 矩形参数 -->
|
|
<!-- 矩形参数 -->
|
|
|
- <div v-if="clipSettings.shape === 'rect'" class="flex left" style="margin-left:10px">
|
|
|
|
|
- <el-input-number v-model="clipSettings.width" @input="applyClipPath" :step="1" :min="1" size="small" style="width:80px"/>
|
|
|
|
|
- <el-input-number v-model="clipSettings.height" @input="applyClipPath" :step="1" :min="1" size="small" style="width:80px"/>
|
|
|
|
|
- <el-input-number v-model="clipSettings.rectRadius" @input="applyClipPath" :step="1" :min="0" size="small" style="width:60px" placeholder="圆角"/>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <template v-if="clipSettings.shape === 'rect'">
|
|
|
|
|
+ <div class="flex left mar-top-10 ">
|
|
|
|
|
+ <div class="label fs-14 c-333 te-l" style="width: 35px;">宽</div>
|
|
|
|
|
+
|
|
|
|
|
+ <el-slider
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ v-model="clipSettings.width"
|
|
|
|
|
+ :step="1"
|
|
|
|
|
+ :min="1"
|
|
|
|
|
+ :max="canvas.width"
|
|
|
|
|
+ style="width:120px;"
|
|
|
|
|
+ :show-tooltip="false"
|
|
|
|
|
+ @input="applyClipPath"
|
|
|
|
|
+
|
|
|
|
|
+ ></el-slider>
|
|
|
|
|
+
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex left mar-top-10 ">
|
|
|
|
|
+ <div class="label fs-14 c-333 te-l" style="width: 35px;">高</div>
|
|
|
|
|
+
|
|
|
|
|
+ <el-slider
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ v-model="clipSettings.height"
|
|
|
|
|
+ :step="1"
|
|
|
|
|
+ :min="1"
|
|
|
|
|
+ :max="canvas.height"
|
|
|
|
|
+ style="width:120px;"
|
|
|
|
|
+ :show-tooltip="false"
|
|
|
|
|
+ @input="applyClipPath"
|
|
|
|
|
+
|
|
|
|
|
+ ></el-slider>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex left mar-top-10 ">
|
|
|
|
|
+ <div class="label fs-14 c-333 te-l" style="width: 35px;">圆角</div>
|
|
|
|
|
+ <el-input-number v-model="clipSettings.rectRadius" @input="applyClipPath" :step="1" :min="0" size="small" placeholder="圆角"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
|
|
|
<!-- 圆形参数 -->
|
|
<!-- 圆形参数 -->
|
|
|
- <div v-else class="flex left" style="margin-left:10px">
|
|
|
|
|
- <el-input-number v-model="clipSettings.radius" @input="applyClipPath" :step="1" :min="1" size="small" style="width:80px"/>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div v-else class="flex left mar-top-10 ">
|
|
|
|
|
+ <div class="label fs-14 c-333 te-l" style="width: 35px;">圆角</div>
|
|
|
|
|
+ <el-input-number v-model="clipSettings.radius" @input="applyClipPath" :step="1" :min="1" size="small"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<!-- 描边参数 -->
|
|
<!-- 描边参数 -->
|
|
|
- <div class="flex left" style="margin-top:8px">
|
|
|
|
|
- <el-color-picker v-model="clipSettings.strokeColor" @change="applyClipPath" size="small"/>
|
|
|
|
|
- <el-input-number v-model="clipSettings.strokeWidth" @input="applyClipPath" :step="1" :min="0" :max="10" size="small" style="width:60px" placeholder="描边"/>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <div class="flex left mar-top-10 ">
|
|
|
|
|
+ <div class="label fs-14 c-333 te-l" style="width: 35px;">描边</div>
|
|
|
|
|
+ <el-input-number v-model="clipSettings.strokeWidth" @input="applyClipPath" :step="1" :min="0" :max="10" size="small" style="width:90px; margin-right: 10px;" placeholder="描边"/>
|
|
|
|
|
+ <el-color-picker v-model="clipSettings.strokeColor" @change="applyClipPath" size="small" class="mar-left-10"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<!-- 偏移参数 -->
|
|
<!-- 偏移参数 -->
|
|
|
- <div class="flex left">
|
|
|
|
|
- <el-input-number v-model="clipSettings.offsetX" @input="applyClipPath" :step="1" size="small" style="width:60px"/>
|
|
|
|
|
- <el-input-number v-model="clipSettings.offsetY" @input="applyClipPath" :step="1" size="small" style="width:60px"/>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- <div class="flex left">
|
|
|
|
|
- <el-button @click="clearClipPath" size="small">清除</el-button>
|
|
|
|
|
|
|
+ <div class="flex left mar-top-10">
|
|
|
|
|
+ <el-button @click="clearClipPath" size="small">清除剪裁</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
`
|
|
`
|
|
|
}
|
|
}
|