<template>
  <div class="dainstyle">
    <el-form :model="arr" label-width="90px">
      <el-form-item label="最小层级">
        <el-input
          @change="changeinput"
          size="small"
          v-model="arr.minzoom"
        ></el-input>
      </el-form-item>
      <el-form-item label="最大层级">
        <el-input
          @change="changeinput"
          size="small"
          v-model="arr.maxzoom"
        ></el-input>
      </el-form-item>
      <el-form-item label="是否可见">
        <el-select
          @change="changeinput"
          size="small"
          v-model="arr.layout['visibility']"
          placeholder="请选择"
        >
          <el-option label="可见" value="visible"> </el-option>
          <el-option label="隐藏" value="none"> </el-option>
        </el-select>
      </el-form-item>
      <!-- <el-form-item label="图标图片">
        <el-input
          placeholder="图片地址"
          @change="changeinput"
          size="small"
          v-model="imgUrl"
        ></el-input>
      </el-form-item> -->
      <el-form-item label="图标id">
        <el-input
          placeholder="图片的id"
          @change="changeinput"
          size="small"
          v-model="arr.layout['icon-image']"
        ></el-input>
      </el-form-item>
      <el-form-item label="图标大小">
        <el-input-number
          @change="changeinput"
          size="small"
          v-model="arr.layout['icon-size']"
          :precision="2"
          :step="0.1"
          :max="1"
          controls-position="right"
        ></el-input-number>
      </el-form-item>
      <el-form-item label="图标偏移量">
        <el-input
          style="width: 100px"
          @change="changeinput"
          size="small"
          v-model.number="arr.layout['icon-offset'][0]"
        ></el-input>
        <el-input
          style="width: 100px"
          @change="changeinput"
          size="small"
          v-model.number="arr.layout['icon-offset'][1]"
        ></el-input>
      </el-form-item>
      <el-form-item label="文本大小">
        <el-input
          @change="changeinput"
          size="small"
          v-model.number="arr.layout['text-size']"
        ></el-input>
      </el-form-item>
      <el-form-item label="文本宽度">
        <el-input
          @change="changeinput"
          size="small"
          v-model.number="arr.layout['text-max-width']"
        ></el-input>
      </el-form-item>
      <el-form-item label="文本行高">
        <el-input-number
          @change="changeinput"
          size="small"
          v-model="arr.layout['text-line-height']"
          :precision="1"
          :step="0.1"
          :max="2"
          controls-position="right"
        ></el-input-number>
      </el-form-item>
      <el-form-item label="字符间距">
        <el-input-number
          @change="changeinput"
          size="small"
          v-model="arr.layout['text-letter-spacing']"
          :precision="1"
          :step="0.1"
          :max="2"
          controls-position="right"
        ></el-input-number>
      </el-form-item>
      <el-form-item label="文本偏移量">
        <el-input
          style="width: 100px"
          @change="changeinput"
          size="small"
          v-model.number="arr.layout['text-offset'][0]"
        ></el-input>
        <el-input
          style="width: 100px"
          @change="changeinput"
          size="small"
          v-model.number="arr.layout['text-offset'][1]"
        ></el-input>
      </el-form-item>
      <el-form-item label="图标透明度">
        <el-input-number
          @change="changeinput"
          size="small"
          v-model="arr.paint['icon-opacity']"
          :precision="2"
          :step="0.1"
          :max="1"
          controls-position="right"
        ></el-input-number>
      </el-form-item>
      <el-form-item label="图标颜色">
        <el-color-picker
          @change="changeinput"
          v-model="arr.paint['icon-color']"
        ></el-color-picker>
      </el-form-item>
      <el-form-item label="文本透明度">
        <el-input-number
          @change="changeinput"
          size="small"
          v-model="arr.paint['text-opacity']"
          :precision="2"
          :step="0.1"
          :max="1"
          controls-position="right"
        ></el-input-number>
      </el-form-item>
      <el-form-item label="文本颜色">
        <el-color-picker
          @change="changeinput"
          v-model="arr.paint['text-color']"
        ></el-color-picker>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  props: {
    arr: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
    };
  },
  created () {
    // console.log(this.arr);
  },
  mounted () {
    // console.log(this.arr);
  },
  methods: {
    changeinput() {
      this.$emit("dianchangeinput",this.arr);
    },
  },
};
</script>

<style scoped>

</style>