<template>
    <div ref="bargainShare"
    @click="styleClick('click', 'bargainShare')"
    @mousemove="styleClick('mousemove', 'bargainShare')"
    @mouseout="styleClick('mouseout')">

    </div>
</template>

<script>
export default {
    props: ['styleData', 'keyData', 'isTemplate', "isWebClick", "modifyContent"],
    data(){
        return{
            styleDataOld:{},
            isCustomSwitching:"", //有tab切换时
        }
    },
    created(){
          //深拷贝重置需要
    this.styleDataOld = JSON.parse(JSON.stringify(this.styleData));
    },
    methods:{
        //点击可修改位置的方法
    styleClick(type, refName) {
      if (this.isWebClick) {
        //传值给B端
        let byValue = {
          modifyContent: this.modifyContent,
          refName: refName,
          styleData: this.styleDataNew,
          isCustomSwitching: this.isCustomSwitching, //有tab切换时
          c_this: this,
          styleDataOld: this.styleDataOld,
        };
        this.$emit("opertaionCom", type, byValue);
      }
    },
    }
}
</script>