fix
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
<template #content>
|
||||
<p>Seed</p>
|
||||
</template>
|
||||
<input class="search_seed" v-show="scene?.value == 'Logo'" @input="ifSeedValue" v-model="searchPictureSeed" type="Number" placeholder='Seed' min="0">
|
||||
<input class="search_seed" max="9999" v-show="scene?.value == 'Logo'" @input="ifSeedValue" v-model="searchPictureSeed" type="Number" placeholder='Seed' min="0">
|
||||
</a-popover>
|
||||
|
||||
<input
|
||||
@@ -99,10 +99,11 @@
|
||||
</div>
|
||||
<span class="inputShowText" ref="inputShowText"></span>
|
||||
</div>
|
||||
<div class="search_keyword" v-show="isInputFocus" @click.stop="">
|
||||
<div class="search_keyword" v-if="workspace?.allKeywordsByStyle" v-show="isInputFocus" @click.stop="">
|
||||
<div class="search_keyword_center">
|
||||
<div class="search_keyword_center_left">
|
||||
<div v-for="item in workspace?.keyWord?.[type_.type2]" @click.stop="cliSetKeyword(item.name)" class="search_keyword_center_item"> {{item.name}} </div>
|
||||
<div v-if="type_.type2 == 'Printboard'" v-for="item in styleRecommend" @click.stop="cliSetKeyword(item)" class="search_keyword_center_item"> {{item}} </div>
|
||||
<div v-for="item in workspace?.allKeywordsByStyle?.[type_.type2]" @click.stop="cliSetKeyword(item)" class="search_keyword_center_item"> {{item}} </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -242,6 +243,7 @@ export default defineComponent({
|
||||
let generateProceedList = ref([])
|
||||
let remGenerate:any = ref(false)
|
||||
let remGenerateTime:any = ref()
|
||||
let styleRecommend:any = inject('styleRecommend')
|
||||
return {
|
||||
searchPictureName,
|
||||
searchPictureSeed,
|
||||
@@ -267,6 +269,7 @@ export default defineComponent({
|
||||
generateProceedList,
|
||||
remGenerate,
|
||||
remGenerateTime,
|
||||
styleRecommend,
|
||||
};
|
||||
},
|
||||
data(prop) {
|
||||
@@ -392,6 +395,7 @@ export default defineComponent({
|
||||
},
|
||||
getgenerate(){
|
||||
this.isTextarea = false
|
||||
this.isInputFocus = false
|
||||
if(this.isGenerate)return
|
||||
clearInterval(this.remGenerateTime)
|
||||
if(this.searchPictureName){
|
||||
@@ -417,16 +421,28 @@ export default defineComponent({
|
||||
let collectionElementId = ''
|
||||
let base64 = ''
|
||||
if(this.sketchboardList?.[0]){
|
||||
level2Type = this.sketchboardList[0].categoryValue?this.sketchboardList[0].categoryValue:''
|
||||
collectionElementId = this.sketchboardList[0].id
|
||||
if(this.sketchboardList[0].base64){
|
||||
base64 = this.sketchboardList[0].imgUrl
|
||||
}
|
||||
}
|
||||
let sloganType = ['Blue and Yellow Starry Night','Green Cthulhu','Red and yellow fire style','Cyberpunk style','City skyline buildings','Red maple leaves','Golden Sunflower','Emerald Jungle Canopy','Pink Sakura Blossom']
|
||||
let sloganText = ''
|
||||
sloganText = this.searchPictureName
|
||||
if(this.upload.level1Type == "Sketchboard"){
|
||||
|
||||
level2Type = this.sketchboardList?.[0]?.categoryValue?this.sketchboardList[0].categoryValue:''
|
||||
}else if(this.upload.level1Type == "Printboard"){
|
||||
level2Type = this.scene?.value
|
||||
if(level2Type == 'Slogan' && this.searchPictureName == ''){
|
||||
var randomNumber = Math.floor(Math.random() * sloganType.length);
|
||||
sloganText = sloganType[randomNumber]
|
||||
}else if(level2Type == 'Pattern'){
|
||||
sloganText = `${this.printModel.value},${sloganText}`
|
||||
}
|
||||
if(!base64 && level2Type == 'Slogan'){
|
||||
message.info('请绘制Slogan');
|
||||
return
|
||||
}
|
||||
}
|
||||
let data = {
|
||||
generateType:'text',
|
||||
@@ -434,7 +450,7 @@ export default defineComponent({
|
||||
collectionElementId:collectionElementId,
|
||||
level1Type:this.upload.level1Type,
|
||||
level2Type:level2Type,
|
||||
text:this.searchPictureName,
|
||||
text:sloganText,
|
||||
seed:this.searchPictureSeed,
|
||||
userId:this?.userInfo?.userId,
|
||||
timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,
|
||||
@@ -559,6 +575,9 @@ export default defineComponent({
|
||||
if(this.searchPictureName[this.searchPictureName.length-1] != ',' && this.searchPictureName.length != 0){
|
||||
str = ','
|
||||
}
|
||||
if(this.upload.level1Type == "Moodboard"){
|
||||
this.styleRecommend.push(value)
|
||||
}
|
||||
this.searchPictureName += str + value
|
||||
},
|
||||
ifSeedValue(e:any){
|
||||
|
||||
Reference in New Issue
Block a user