<template>
  <div class="demo-checkbox-group-slot">
    <div class="demo-box">
      <ui-checkbox-group
        v-model="value"
        :options="options">
        <template slot-scope="prop">
          {{ prop.value.toUpperCase() }}
        </template>
      </ui-checkbox-group>
    </div>
    <div class="demo-box">
      <ui-checkbox-group
        v-model="value"
        :options="options"
        type="button">
        <template slot-scope="prop">
          {{ prop.value.toUpperCase() }}
        </template>
      </ui-checkbox-group>
    </div>

    <p>当前值: {{ value }}</p>
  </div>
</template>

<script>
import { CheckboxGroup } from "amumu-ui"

export default {
  components: {
    "ui-checkbox-group": CheckboxGroup,
  },
  data() {
    return {
      value: ["order"],
      options: [
        {
          label: "订单",
          value: "order",
        },
        {
          label: "报价单",
          value: "quotation",
        },
        {
          label: "商机",
          value: "opportunity",
        },
      ],
    }
  },
}
</script>
