提交修改
This commit is contained in:
@@ -24,16 +24,12 @@
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="content_item_imgBox_itemImg"
|
||||
class="imgBox"
|
||||
v-show="file?.status === 'done'"
|
||||
|
||||
>
|
||||
<img @click="setGenerate(file)" :class="[file?.isChecked?'active':'']" :src="file?.imgUrl" class="upload_img"/>
|
||||
<a-checkbox v-model:checked="file.isChecked"></a-checkbox>
|
||||
|
||||
<!-- <div class="content_item_imgBox_itemImg_delete" @click="deleteFile(index)">
|
||||
<i class="fi fi-rr-trash"></i>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload_file_item upload_component">
|
||||
@@ -116,11 +112,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="productImg_content_item_title">{{$t('ProductImg.Upload')}}</div>
|
||||
<div class="productImg_content_item_imgBox generalScroll upload_item">
|
||||
|
||||
|
||||
</div> -->
|
||||
<div class="productImg_content_item_generate_btn input_border">
|
||||
<div class="input_box">
|
||||
<div v-show="!isProductimg" class="generage_btn started_btn" @click.stop="getPrductimg">
|
||||
@@ -232,7 +223,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { LoadingOutlined } from "@ant-design/icons-vue";
|
||||
import { defineComponent,watch,createVNode, h, ref ,toRefs,computed,reactive,triggerRef, nextTick} from "vue";
|
||||
import { defineComponent,watch,createVNode, h, ref ,toRefs,computed,reactive,triggerRef, nextTick, inject} from "vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { getCookie,setCookie } from "@/tool/cookie";
|
||||
// import domTurnImg from '@/tool/domTurnImg'
|
||||
@@ -265,6 +256,7 @@ export default defineComponent({
|
||||
let driver__:any = computed(()=>{
|
||||
return store.state.Guide.guide
|
||||
})
|
||||
const createProbject:any = inject('createProbject')
|
||||
let productImgData:any = reactive({
|
||||
isShowMark:false,
|
||||
fileList:{},
|
||||
@@ -411,7 +403,7 @@ export default defineComponent({
|
||||
bor = false
|
||||
}
|
||||
}
|
||||
let beforeUpload = (file: any)=>{
|
||||
let beforeUpload = async (file: any)=>{
|
||||
const isJpgOrPng =
|
||||
file.type === "image/jpeg" ||
|
||||
file.type === "image/png" ||
|
||||
@@ -424,6 +416,12 @@ export default defineComponent({
|
||||
if (!isLt2M) {
|
||||
message.info(useI18n().t('MoodboardUpload.jsContent4'));
|
||||
}
|
||||
if(!productImgData.selectObject.id){
|
||||
productImgData.selectObject.id = await createProbject()
|
||||
upload.value = {
|
||||
projectId:productImgData.selectObject.id
|
||||
}
|
||||
}
|
||||
return (isJpgOrPng && isLt2M) || Upload.LIST_IGNORE;
|
||||
}
|
||||
let deleteFile = (index:any)=>{
|
||||
@@ -968,33 +966,28 @@ methods: {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.upload_file_item{
|
||||
display: flex;
|
||||
margin-right: 1rem;
|
||||
height: 14rem !important;
|
||||
width: 9rem;
|
||||
border: none !important;
|
||||
&.upload_file_item:last-child{
|
||||
width: 9rem;
|
||||
margin-right: 0rem;
|
||||
}
|
||||
}
|
||||
// width: 45%;
|
||||
.productImg_content_item_imgBox{
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 3rem;
|
||||
.content_item_imgBox_itemImg{
|
||||
width: auto;
|
||||
max-width: 20rem;
|
||||
width: 100%;
|
||||
height: 25rem;
|
||||
.content_item_imgBox_itemImg ,.upload_file_item{
|
||||
margin-right: 1rem;
|
||||
width: calc(100% / 2 - .5rem);
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
height: 25rem;
|
||||
position: relative;
|
||||
> .imgBox{
|
||||
width: 100%;
|
||||
}
|
||||
img{
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
.upload_file_item{
|
||||
flex-shrink: 0;
|
||||
width: 36rem;
|
||||
}
|
||||
}
|
||||
.productImg_content_item_generate{
|
||||
--width:100%;
|
||||
|
||||
Reference in New Issue
Block a user