<template>
  <div>
    <div class="title">
      <span contenteditable="true" @blur="edit('title', $event)">
        {{ data.title }}
      </span>
    </div>
    <div class="subTitle">
      <span contenteditable="true" @blur="edit('subTitle', $event)">
        {{ data.subTitle }}
      </span>
    </div>
    <div class="image">
      <UploadEl :data="{icon:data.img}"/>
    </div>
  </div>
</template>

<script>

import UploadEl from "@/components/editEl/uploadEl.vue";

export default {
  name: 'EditEl5',
  props: ['data'],
  components: {UploadEl},
  data() {
    return {}
  },
  mounted() {
  },
  methods: {
    edit(key, e) {
      this.$props.data[key] = e.target.innerText
    },
  }
}
</script>

<style lang="less" scoped>
@import "~@/style.less";

.title {
  padding-top: 4.2vw;
  width: 100%;
  text-align: center;
  font-size: 2.5vw;
  letter-spacing: 4px;
  color: #0003;
}

.subTitle {
  padding-top: 0.4vw;
  width: 100%;
  text-align: center;
  font-size: 1.9vw;
  letter-spacing: 2px;
  color: #000;
}

.image {
  width: 65vw;
  height: 33.3vw;
  display: inline-block;
  margin: 4vw 0 6vw 0;
}
</style>
