<template>
  <div class="ed-code--toolbar">
    <ed-form v-model="model" :form-desc="formDesc" inline size="mini"></ed-form>
  </div>
</template>

<script>
import {modeInfo, themes} from "./config";

export default {
  name: "Toolbar",
  props: {
    model: {
      type: Object,
      default: () => {
      }
    }
  },
  model: {
    prop: "model",
    event: "input"
  },
  data() {
    return {
      formDesc: [
        {
          label: '语言',
          prop: "mode",
          children: {
            tags: "el-select",
            attrs: {
              filterable: true,
              placeholder: '请选择语言'
            },
            options: modeInfo
          },
        },
        {
          label: '主题',
          prop: "theme",
          children: {
            tags: "el-select",
            attrs: {
              placeholder: '请选择主题'
            },
            options: themes
          },
        },
      ]
    }
  }
}
</script>

<style scoped>

</style>
