feat: 裁剪组件

This commit is contained in:
2026-04-21 16:13:55 +08:00
parent 429c7db195
commit ec632554e2
3 changed files with 178 additions and 93 deletions

View File

@@ -28,13 +28,14 @@
:ratio="data.ratio"
:fixedBox="type !== 'apparel'"
:url="data.url"
:type="type"
@change="(v) => (data.preview_url = v)"
/>
<div
class="preview"
:class="{
'is-product': data.isProduct,
'is-apprael': type === 'apprael',
'is-apparel': type === 'apparel',
'is-cover': type === 'cover'
}"
v-if="data.isPreview"
@@ -196,10 +197,15 @@ defineExpose({
box-shadow: 4px 4px 16px 0px #0000000f;
border: 1px solid #ededed;
}
&.is-cover{
img{
&.is-cover {
img {
// width: 29.7rem;
// height: 37.5rem;
height: 37.5rem;
}
}
&.is-apparel {
img {
height: auto;
}
}
}