<template>
  <el-form label-width="160px" style="margin-top:180px;">
    <el-form-item label="区块名称：">
      <el-select filterable placeholder="" v-model="block" class="form-item">
        <el-option v-for="item in blocks" :key="item.code" :label="item.name" :value="item.code">
        </el-option>
      </el-select>
    </el-form-item>
  </el-form>
</template>
<script>
export default {
  data() {
    return {
      block: '',
      blocks: []
    }
  },
  methods: {
    getCode() {
      return `<cms:block code="${this.block}">{ZCMS:<z:lang id="Contentcore.Template.BlockFile">区块文件</z:lang>}</cms:block>`
    },
    async init() {
      let res = await axios.get('/ui/blocklist')
      this.blocks = res.data.status === 1 ? res.data.data : this.blocks
    }
  },
  async created() {
  }
}
</script>
