This commit is contained in:
X1627315083
2025-04-01 15:25:15 +08:00
parent 70ed89049a
commit b6e5f05f06
101 changed files with 11533 additions and 1015 deletions

View File

@@ -20,7 +20,7 @@
<div class="title">{{ $t('exportModel.Color') }}</div>
<input type="color" @input="canvasGeneral.setPencilColor" v-model="canvasGeneral.brushwork.color">
<span class="icon iconfont icon-xiala" @click.stop="setOperation('color')" :class="{active: operation == 'color'}"></span>
<div class="labelHover_show" v-show="operation == 'color'" @click.stop="">
<div class="labelHover_show color" v-show="operation == 'color'" @click.stop="">
<div v-for="item in canvasGeneral.colorHistoryList" :style="{'background':item}" @click="canvasGeneral.setColorHistory(item)"></div>
</div>
</div>
@@ -97,14 +97,39 @@
</a-select-option>
</a-select>
</div>
<div class="label_item" v-if="elementList" v-show="
canvasGeneral.operation != 'dashedPencil' &&
canvasGeneral.operation != 'dashed'">
<div>{{ $t('exportModel.select') }}:</div>
<span class="icon iconfont icon-xiala" @click.stop="setOperation('element')" :class="{active: operation == 'element'}"></span>
<div class="labelHover_show element" v-show="operation == 'element'" @click.stop="">
<div v-for="titleItem,key in elementList" class="elementItem">
<div class="titleItem">{{ titleItem?.name }}</div>
<div class="titleImgList">
<div class="titleImgItem" v-for="imgItem in titleItem?.list">
<img :src="imgItem?.url || imgItem?.designOutfitUrl || imgItem?.imgUrl || imgItem?.minioUrl" @click="addImage(imgItem)" alt="">
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent,ref,reactive,nextTick,toRefs,inject} from 'vue'
import { defineComponent,ref,reactive,computed,toRefs,inject} from 'vue'
import { useStore } from "vuex";
export default defineComponent({
components:{},
props:{
elementList:{
type:Object,
default:()=>{return {}}
}
},
setup(){
const store = useStore();
let testModal = ref(true)
let canvasGeneral:any = inject('canvasObj')
const data = reactive({
@@ -121,12 +146,17 @@
const closeModal = ()=>{
document.removeEventListener('click',setOper)
}
const addImage = (item:any)=>{
if(!item.minioUrl)item.minioUrl = item.imgUrl
canvasGeneral.addImage(item)
}
return {
canvasGeneral,
...toRefs(data),
testModal,
setOperation,
closeModal,
addImage
}
}
});
@@ -156,13 +186,37 @@
border: 1px solid;
padding: .5rem 1rem;
background: #fff;
div{
width: 2rem;
height: 2rem;
margin-right: .5rem;
margin-bottom: .5rem;
display: inline-block;
cursor: pointer;
&.color{
div{
width: 2rem;
height: 2rem;
margin-right: .5rem;
margin-bottom: .5rem;
display: inline-block;
cursor: pointer;
}
}
&.element{
height: auto;
max-height: 40rem;
overflow-y: auto;
>.elementItem{
margin-bottom: 1rem;
> .titleImgList{
display: flex;
flex-wrap: wrap;
.titleImgItem{
width: 50%;
padding: 1rem;
> img{
width: 100%;
height: 100%;
object-fit: contain;
cursor: pointer;
}
}
}
}
}
}
input{
@@ -170,7 +224,6 @@
width: 12rem;
}
&.wH input{
width: 5rem;
}
.title{
margin-right: 1rem;