3d添加印花 等
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 文字 -->
|
||||
<div class="falls_item_bottom">
|
||||
<div class="falls_item_bottom" v-if="isText">
|
||||
<div class="falls_item_text" :title="item.text">
|
||||
{{item.text}}
|
||||
</div>
|
||||
@@ -58,7 +58,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -72,6 +71,14 @@ export default defineComponent({
|
||||
type:Boolean,
|
||||
default:true,
|
||||
},
|
||||
isText:{
|
||||
type:Boolean,
|
||||
default:true,
|
||||
},
|
||||
itemWidth:{
|
||||
type:Number,
|
||||
default:300,
|
||||
}
|
||||
},
|
||||
setup(){
|
||||
let list = ref([])
|
||||
@@ -139,7 +146,9 @@ export default defineComponent({
|
||||
const textMarginTop = domCss.getPropertyValue('--textMarginTop').split('px')[0]*1;
|
||||
const textHeight = domCss.getPropertyValue('--textHeight').split('px')[0]*1;
|
||||
const contentHeight = domCss.getPropertyValue('--contentHeight').split('px')[0]*1;
|
||||
this.computedHeight = paddingBottom + textMarginTop + textHeight + contentHeight;
|
||||
if(this.$props.isText){
|
||||
this.computedHeight = paddingBottom + textMarginTop + textHeight + contentHeight;
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.wait_list = []
|
||||
@@ -149,7 +158,7 @@ export default defineComponent({
|
||||
methods: {
|
||||
clearData(){
|
||||
this.wait_list = []
|
||||
this.width = 300
|
||||
this.width = this.itemWidth
|
||||
this.num_x = 1
|
||||
this.gap_x = 0
|
||||
this.gap_y = 0
|
||||
@@ -185,12 +194,12 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
let url = this.wait_list[0].canvasUrl;
|
||||
let url = this.wait_list[0].canvasUrl || this.wait_list[0].url;
|
||||
let data = this.wait_list[0]
|
||||
this.imgDom = document.createElement("img");
|
||||
this.imgDom.src = url;
|
||||
this.imgDom.style.width = this.width + "px";
|
||||
this.imgDom.style.maxHeight = this.width+330 + "px";
|
||||
this.imgDom.style.width = this.itemWidth + "px";
|
||||
this.imgDom.style.maxHeight = this.itemWidth+330 + "px";
|
||||
this.imgDom.style.position = "absolute";
|
||||
this.imgDom.style.top = "-99999px";
|
||||
document.body.appendChild(this.imgDom);
|
||||
@@ -204,6 +213,7 @@ export default defineComponent({
|
||||
pos_num = this.poss[i];
|
||||
}
|
||||
}
|
||||
// this.computedHeight = 0
|
||||
let width = this.imgDom.offsetWidth;
|
||||
let height = this.imgDom.offsetHeight+this.computedHeight;
|
||||
let top = this.poss[idx] + this.gap_y;
|
||||
@@ -230,19 +240,22 @@ export default defineComponent({
|
||||
});
|
||||
},
|
||||
resize() {
|
||||
var t_width = this.$el.offsetWidth;
|
||||
var width = this.width;
|
||||
var num_x = parseInt(t_width / (width + 20));
|
||||
if (num_x < 1) num_x = 1;
|
||||
var remain = t_width - width * num_x;
|
||||
var gap_x = remain / (num_x + 1);
|
||||
this.gap_x = gap_x;
|
||||
this.gap_y = gap_x > 30 ? 30 : gap_x < 30 ? 20 : gap_x;
|
||||
this.num_x = num_x;
|
||||
var poss = [];
|
||||
for (var i = 0; i < num_x; i++) poss.push(0);
|
||||
this.poss = poss;
|
||||
this.reset();
|
||||
nextTick(() => {
|
||||
var t_width = this.$el.offsetWidth;
|
||||
var width = this.itemWidth;
|
||||
var num_x = parseInt(t_width / (width + 20));
|
||||
if (num_x < 1) num_x = 1;
|
||||
var remain = t_width - width * num_x;
|
||||
var gap_x = remain / (num_x + 1);
|
||||
this.gap_x = gap_x;
|
||||
this.gap_y = gap_x > 30 ? 30 : gap_x < 30 ? 20 : gap_x;
|
||||
this.num_x = num_x;
|
||||
var poss = [];
|
||||
for (var i = 0; i < num_x; i++) poss.push(0);
|
||||
this.poss = poss;
|
||||
this.reset();
|
||||
})
|
||||
|
||||
},
|
||||
reset() {
|
||||
for (let i = 0; i < this.list.length; i++) {
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<img v-for="item in scaleImageData?.designPythonOutfitList" v-lazy="item.designUrl">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="userDetail.systemUser == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" >{{$t('newScaleImage.SecondaryCreation')}}</div>
|
||||
<div v-if="userDetail.systemList.indexOf(1) > -1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" >{{$t('newScaleImage.SecondaryCreation')}}</div>
|
||||
<!-- <div v-if="systemUser.value == 1 && scaleImageData.isMine != 1 && scaleImageData.selected != 1" class="started_btn" @click="setChoose" :title="systemUser.value != 1?$t('newScaleImage.jsContent1'): scaleImageData.openSource == 0?$t('newScaleImage.jsContent2'):''" :class="{active:systemUser.value != 1?true:scaleImageData.openSource == 0}">{{$t('newScaleImage.SecondaryCreation')}}</div> -->
|
||||
</div>
|
||||
<div v-else class="newScaleImage_right_content_generate">
|
||||
@@ -408,7 +408,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
let setChoose = () =>{
|
||||
if(userDetail.value.systemUser !== 1){
|
||||
if(userDetail.value.systemList.indexOf(1) == -1){
|
||||
return message.info(t('newScaleImage.jsContent1'))
|
||||
}
|
||||
if(imgData.scaleImageData.openSource == 0){
|
||||
|
||||
Reference in New Issue
Block a user