2023-10-27
上传模特截取模特图片大小功能
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<a-modal class="modal_component cut_pricture_modal"
|
||||
v-model:visible="cutPicuterModal"
|
||||
:footer="null"
|
||||
width="80%"
|
||||
width="65%"
|
||||
:maskClosable="false"
|
||||
:centered="true"
|
||||
:closable="false"
|
||||
@@ -134,6 +134,7 @@ export default defineComponent({
|
||||
finishCropper(){
|
||||
let cropper:any = this.$refs.cropper,
|
||||
that = this
|
||||
|
||||
cropper.getCropData((data:any) => {
|
||||
// 转换为File对象
|
||||
let file = base64toFile(data,this.cropperFileData.name);
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
</label>
|
||||
</div>
|
||||
<div v-if="type_.type2 == 'Printboard'" class="printModel">
|
||||
<div @click="printModel.optype = !printModel.optype">{{ printModel.num }}</div>
|
||||
<div @click.stop="PrintModel">{{ printModel.name }}</div>
|
||||
<ul v-show="printModel.optype">
|
||||
<li class="printModel_item" @click="setPrintModel(1)">1</li>
|
||||
<li class="printModel_item" @click="setPrintModel(2)">2</li>
|
||||
<li class="printModel_item" @click="setprintModel(1)">Model1</li>
|
||||
<li class="printModel_item" @click="setprintModel(2)">Model2</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,7 +43,7 @@
|
||||
<input
|
||||
class="search_input"
|
||||
@input="ifMaximumLength"
|
||||
placeholder="Promopt input"
|
||||
placeholder="Prompt input"
|
||||
:maxlength='inputShow?0:9999'
|
||||
v-model="searchPictureName"
|
||||
@keydown.enter="getgenerate()"
|
||||
@@ -222,6 +222,7 @@ export default defineComponent({
|
||||
let printModel = ref({
|
||||
num:1,
|
||||
optype:false,
|
||||
name:'model1'
|
||||
})
|
||||
// let sketchCatecoryList:any = ref([])
|
||||
let workspace:any = ref({})
|
||||
@@ -343,10 +344,21 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
},
|
||||
setPrintModel(num:any){
|
||||
PrintModel(){
|
||||
if(!this.printModel.optype){
|
||||
document.addEventListener('click',this.removePrintModel)
|
||||
}
|
||||
this.printModel.optype = !this.printModel.optype
|
||||
},
|
||||
removePrintModel(){
|
||||
this.printModel.optype = false
|
||||
document.removeEventListener('click',this.removePrintModel)
|
||||
},
|
||||
setprintModel(num:any){
|
||||
this.printModel = {
|
||||
num : num,
|
||||
optype:false,
|
||||
name:'model'+num
|
||||
}
|
||||
},
|
||||
getgenerate(){
|
||||
@@ -378,7 +390,7 @@ export default defineComponent({
|
||||
level2Type:'',
|
||||
text:this.searchPictureName,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
version:this.printModel.num,//为1就是Print
|
||||
version:0,//为1就是Print
|
||||
gender:'',
|
||||
}
|
||||
this.loadingShow = true
|
||||
@@ -402,7 +414,7 @@ export default defineComponent({
|
||||
this.loadingShow = false
|
||||
});
|
||||
},
|
||||
ifMaximumLength(e){
|
||||
ifMaximumLength(){
|
||||
clearTimeout(this.inputTime)
|
||||
let inputBox = document.getElementsByClassName('generate')[0].getElementsByClassName('input_box')[0]
|
||||
let input = inputBox.getElementsByClassName('search_input')[0]
|
||||
@@ -584,7 +596,7 @@ export default defineComponent({
|
||||
}
|
||||
.printModel{
|
||||
>div{
|
||||
width: 5rem;
|
||||
width: 7rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
border-radius: 1rem;
|
||||
@@ -594,13 +606,14 @@ export default defineComponent({
|
||||
}
|
||||
ul{
|
||||
position: absolute;
|
||||
width: 5rem;
|
||||
width: 7rem;
|
||||
text-align: center;
|
||||
margin-top: .3rem;
|
||||
border-radius: 1rem;
|
||||
overflow: hidden;
|
||||
li{
|
||||
background: rgba(0,0,0,.2);
|
||||
line-height: 2;
|
||||
cursor: pointer;
|
||||
&.printModel_item:hover{
|
||||
background: rgba(0,0,0,.4);
|
||||
|
||||
@@ -347,7 +347,7 @@ export default defineComponent({
|
||||
.header_component {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 30px;
|
||||
// padding: 0 30px;
|
||||
padding-left: 0;
|
||||
width: 100%;
|
||||
height: 7rem;
|
||||
@@ -359,7 +359,9 @@ export default defineComponent({
|
||||
z-index: 1049;
|
||||
background-color: #fff;
|
||||
.header_right{
|
||||
width: 33%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
.header_logo {
|
||||
@@ -386,6 +388,9 @@ export default defineComponent({
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
font-weight: 900;
|
||||
&.nav_item:nth-child(3){
|
||||
margin: 0;
|
||||
}
|
||||
&.nav_item::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
|
||||
@@ -542,6 +542,24 @@ export default defineComponent({
|
||||
&.moodb{
|
||||
margin: 0 2rem 2rem 0;
|
||||
}
|
||||
.pin_block{
|
||||
.ant-checkbox-wrapper{
|
||||
height: 2.2rem;
|
||||
align-items: center;
|
||||
span{
|
||||
font-size: 1.4rem;
|
||||
line-height: 2.3rem;
|
||||
}
|
||||
.ant-checkbox-inner{
|
||||
width: 1.6rem;
|
||||
height: 1.6rem;
|
||||
}
|
||||
.ant-checkbox-inner::after{
|
||||
width: .571428571rem;
|
||||
height: .914285714rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.active{
|
||||
opacity: 0.5;
|
||||
// border: 2px solid;
|
||||
@@ -551,6 +569,8 @@ export default defineComponent({
|
||||
}
|
||||
.pin_block{
|
||||
pointer-events:none;
|
||||
|
||||
|
||||
}
|
||||
.operate_file_block{
|
||||
pointer-events:none;
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal_accomplish">
|
||||
<div v-show="moodboarList.length > 1" class="modal_accomplish">
|
||||
<div class="modal_text">
|
||||
<div>Layout of selected moodboard</div>
|
||||
<div class="modal_btn started_btn" @click.stop="changeTemplateModal()">Edit</div>
|
||||
@@ -390,7 +390,7 @@ export default defineComponent({
|
||||
// layout.init('moodboard')
|
||||
layout.init()
|
||||
}else{
|
||||
message.warning('Please click Layout to sort randomlys')
|
||||
message.warning('Please click Layout to sort randomly')
|
||||
}
|
||||
|
||||
},
|
||||
@@ -636,6 +636,10 @@ export default defineComponent({
|
||||
width: 48.5%;
|
||||
height: 100%;
|
||||
}
|
||||
.wh8{
|
||||
width: 100%;
|
||||
height: 48.5%;
|
||||
}
|
||||
.w1h2{
|
||||
width: 23%;
|
||||
height: 100%;
|
||||
|
||||
@@ -570,7 +570,7 @@ export default defineComponent({
|
||||
level2Type:generage.level2Type,
|
||||
text:this.captionGeneration,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
version:generage.printModel.num,//为1就是Print
|
||||
version:0,//为1就是Print
|
||||
gender:this.workspace.sex,
|
||||
}
|
||||
if(generateType == 'image'||generateType == 'text-image'){
|
||||
|
||||
@@ -677,6 +677,8 @@ export default defineComponent({
|
||||
display: flex;
|
||||
margin-top: 2rem;
|
||||
justify-content: center;
|
||||
max-height: 13%;
|
||||
overflow: hidden;
|
||||
.active{
|
||||
img{
|
||||
border: 2px solid;
|
||||
@@ -684,11 +686,18 @@ export default defineComponent({
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
img{
|
||||
width:5rem;
|
||||
cursor: pointer;
|
||||
margin: 0 2rem;
|
||||
>div{
|
||||
max-height: 13%;
|
||||
overflow: hidden;
|
||||
img{
|
||||
object-fit: cover;
|
||||
width:5rem;
|
||||
cursor: pointer;
|
||||
margin: 0 2rem;
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.layout_centent{
|
||||
display: flex;
|
||||
@@ -854,6 +863,10 @@ export default defineComponent({
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
.wh8{
|
||||
width: 100%;
|
||||
height: 48.5%;
|
||||
}
|
||||
.w1h2{
|
||||
width: 23%;
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user