调整情绪版layout出现拉伸的问题
This commit is contained in:
@@ -1250,10 +1250,14 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
|||||||
background: #000 !important;
|
background: #000 !important;
|
||||||
border-color: #000 !important;
|
border-color: #000 !important;
|
||||||
}
|
}
|
||||||
|
.ant-spin .ant-spin-dot {
|
||||||
|
width: 1.5em;
|
||||||
|
height: 1.5em;
|
||||||
|
}
|
||||||
.ant-spin-dot-item {
|
.ant-spin-dot-item {
|
||||||
background-color: #000000 !important;
|
background-color: #000000 !important;
|
||||||
width: 9px !important;
|
width: 0.9em !important;
|
||||||
height: 9px !important;
|
height: 0.9em !important;
|
||||||
}
|
}
|
||||||
.ant-spin {
|
.ant-spin {
|
||||||
color: #000;
|
color: #000;
|
||||||
|
|||||||
@@ -1378,10 +1378,14 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//loding样式
|
//loding样式
|
||||||
|
.ant-spin .ant-spin-dot{
|
||||||
|
width: 1.5em;
|
||||||
|
height: 1.5em;
|
||||||
|
}
|
||||||
.ant-spin-dot-item{
|
.ant-spin-dot-item{
|
||||||
background-color: #000000 !important;
|
background-color: #000000 !important;
|
||||||
width: 9px !important;
|
width: .9em !important;
|
||||||
height: 9px !important;
|
height: .9em !important;
|
||||||
}
|
}
|
||||||
.ant-spin{
|
.ant-spin{
|
||||||
color: #000;
|
color: #000;
|
||||||
|
|||||||
@@ -34,8 +34,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layout_centent" :class="{active:flex_direction}" id="layoutCentent">
|
<div class="layout_centent" :class="{active:flex_direction}" id="layoutCentent">
|
||||||
<div v-for="item,index in layoutList" :key="item" :class="moodbClassName[index]" class="modal_imgItem" v-layout="item" @mousedown="setpitch(item,index)" @touchstart="setpitch(item,index)" ref="content" >
|
<div v-for="item,index in layoutList" :key="item" :class="moodbClassName[index]" class="modal_imgItem" v-layout="item" @mousedown="setpitch(item,index)" @touchstart="setpitch(item,index)" ref="content" :style="{'background-image':`url(${item.imgUrl})`,'transform':`scale(${item.zoom?item.zoom:1}) rotateZ(${item.angle?item.angle:0}deg)`}">
|
||||||
<img crossOrigin="anonymous" :src="item.imgUrl" :style="{'transform':`translate(-50%, -50%) scale(${item.zoom?item.zoom:1}) rotateZ(${item.angle?item.angle:0}deg)`}" draggable="false" :class="moodbClassName[index]" v-modelImg>
|
<!-- <img crossOrigin="anonymous" :src="item.imgUrl" :style="{'transform':`translate(-50%, -50%) scale(${item.zoom?item.zoom:1}) rotateZ(${item.angle?item.angle:0}deg)`}" draggable="false" :class="moodbClassName[index]" v-modelImg> -->
|
||||||
<ul v-show="item.setPitch" class="layout_btn" >
|
<ul v-show="item.setPitch" class="layout_btn" >
|
||||||
<li class="layout_btn_top" v-compile.stop="'top'"></li>
|
<li class="layout_btn_top" v-compile.stop="'top'"></li>
|
||||||
<li class="layout_btn_bottom" v-compile.stop="'bottom'"></li>
|
<li class="layout_btn_bottom" v-compile.stop="'bottom'"></li>
|
||||||
@@ -736,6 +736,7 @@ export default defineComponent({
|
|||||||
setmoodb(item:any){
|
setmoodb(item:any){
|
||||||
this.moodbClassName = item
|
this.moodbClassName = item
|
||||||
this.$emit('setmoodbClass',this.moodbClassName)
|
this.$emit('setmoodbClass',this.moodbClassName)
|
||||||
|
this.styleObj.class = this.moodbClassName
|
||||||
if(this.content){
|
if(this.content){
|
||||||
for (item of (this.content as any)) {
|
for (item of (this.content as any)) {
|
||||||
item.classList.remove('active')
|
item.classList.remove('active')
|
||||||
@@ -772,7 +773,7 @@ export default defineComponent({
|
|||||||
initDomStyle(){
|
initDomStyle(){
|
||||||
nextTick(()=>{
|
nextTick(()=>{
|
||||||
this.content.forEach((item:any,index:any) => {
|
this.content.forEach((item:any,index:any) => {
|
||||||
if(this.styleObj.domStyle[index]){
|
if(this.styleObj.domStyle[index]?.left){
|
||||||
item.classList.add('active')
|
item.classList.add('active')
|
||||||
this.initStyle(item,this.styleObj.domStyle[index])
|
this.initStyle(item,this.styleObj.domStyle[index])
|
||||||
}
|
}
|
||||||
@@ -794,7 +795,7 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
initStyle(dom:any,style:any){
|
initStyle(dom:any,style:any){
|
||||||
if(!style)return
|
if(!style || !dom)return
|
||||||
for (const [property, value] of Object.entries(style)) {
|
for (const [property, value] of Object.entries(style)) {
|
||||||
|
|
||||||
dom.style.setProperty(property, value);
|
dom.style.setProperty(property, value);
|
||||||
@@ -806,7 +807,7 @@ export default defineComponent({
|
|||||||
this.styleObj.domStyle.push(this.setStyle(item.style))
|
this.styleObj.domStyle.push(this.setStyle(item.style))
|
||||||
this.domObj.dom.forEach((domName:any,index:any) => {
|
this.domObj.dom.forEach((domName:any,index:any) => {
|
||||||
let style = this.domObj.domStyle[index]
|
let style = this.domObj.domStyle[index]
|
||||||
let dom = item.querySelector(domName)
|
let dom = item.querySelector(domName) || item
|
||||||
this.styleObj[style].push(this.setStyle(dom.style))
|
this.styleObj[style].push(this.setStyle(dom.style))
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@@ -840,7 +841,6 @@ export default defineComponent({
|
|||||||
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
let config:any = {headers:{'Content-Type':'multipart/form-data','Accept':'*/*' }}
|
||||||
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
|
Https.axiosPost(Https.httpUrls.elementUpload,param,config)
|
||||||
.then((rv: any) => {
|
.then((rv: any) => {
|
||||||
// console.log(rv);
|
|
||||||
rv.imgUrl = rv.url
|
rv.imgUrl = rv.url
|
||||||
this.layout = false
|
this.layout = false
|
||||||
this.loadingShow = false
|
this.loadingShow = false
|
||||||
@@ -1062,27 +1062,12 @@ export default defineComponent({
|
|||||||
// height: 100%;
|
// height: 100%;
|
||||||
// }
|
// }
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: cover;
|
||||||
&.active{
|
&.active{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
img{
|
|
||||||
// object-fit: cover;
|
|
||||||
// width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
pointer-events: none;
|
|
||||||
float: left;
|
|
||||||
user-select:none;
|
|
||||||
-webkit-user-drag: none;
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%,-50%) scale(1);
|
|
||||||
}
|
|
||||||
::selection {
|
|
||||||
// background: rgba(0,0,0,0);
|
|
||||||
// background: yellow;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.wh1{
|
.wh1{
|
||||||
|
|||||||
@@ -132,8 +132,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal_img_max">
|
<div class="modal_img_max">
|
||||||
<div v-if="!modalImg[0]?.id" class="modal_img" id="modal_img" :class="{active:flex_direction}">
|
<div v-if="!modalImg[0]?.id" class="modal_img" id="modal_img" :class="{active:flex_direction}">
|
||||||
<div v-for="item,index in layoutList" :class="[moodb_className[index]]" class="modal_imgItem">
|
<!-- <div class="modal_img" id="modal_img" :class="{active:flex_direction}"> -->
|
||||||
<img :src="item.imgUrl" v-modelImg>
|
<div v-for="item,index in layoutList" :class="[moodb_className[index]]" :style="{'background-image':`url(${item.imgUrl})`}" class="modal_imgItem">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="modal_img">
|
<div v-else class="modal_img">
|
||||||
@@ -244,30 +244,6 @@ export default defineComponent({
|
|||||||
this.token = getCookie("token") || "";
|
this.token = getCookie("token") || "";
|
||||||
this.uploadUrl = getUploadUrl();
|
this.uploadUrl = getUploadUrl();
|
||||||
},
|
},
|
||||||
directives:{
|
|
||||||
modelImg:{
|
|
||||||
mounted(el) {
|
|
||||||
let parentNode = el.parentNode
|
|
||||||
if(parentNode.offsetHeight >= parentNode.offsetWidth){
|
|
||||||
el.style.height = 100+'%'
|
|
||||||
el.style.width = 'auto'
|
|
||||||
}else{
|
|
||||||
el.style.width = 100+'%'
|
|
||||||
el.style.height = 'auto'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
updated (el) {
|
|
||||||
let parentNode = el.parentNode
|
|
||||||
if(parentNode.offsetHeight >= parentNode.offsetWidth){
|
|
||||||
el.style.height = 100+'%'
|
|
||||||
el.style.width = 'auto'
|
|
||||||
}else{
|
|
||||||
el.style.width = 100+'%'
|
|
||||||
el.style.height = 'auto'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
open(num: Number) {
|
open(num: Number) {
|
||||||
this.openClick = num;
|
this.openClick = num;
|
||||||
@@ -445,7 +421,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.edieShow = true
|
this.edieShow = true
|
||||||
if(this.moodb_[arr.length-1].length == 2){
|
if(this.moodb_[arr.length-1].length == 1){
|
||||||
this.moodb_className = this.moodb_[arr.length-1][0]
|
this.moodb_className = this.moodb_[arr.length-1][0]
|
||||||
}else{
|
}else{
|
||||||
this.moodb_className = this.moodb_[arr.length-1][random]
|
this.moodb_className = this.moodb_[arr.length-1][random]
|
||||||
@@ -628,6 +604,7 @@ export default defineComponent({
|
|||||||
height: calc(5rem*1.2);
|
height: calc(5rem*1.2);
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
&.modal_img::-webkit-scrollbar {
|
&.modal_img::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -706,15 +683,9 @@ export default defineComponent({
|
|||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
img{
|
background-repeat: no-repeat;
|
||||||
position: absolute;
|
background-position: center;
|
||||||
top: 50%;
|
background-size: cover;
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%,-50%);
|
|
||||||
// float: left;
|
|
||||||
// user-select:none;
|
|
||||||
// -webkit-user-drag: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.wh1{
|
.wh1{
|
||||||
width: 23%;
|
width: 23%;
|
||||||
|
|||||||
Reference in New Issue
Block a user