<template>
  <div :class="$style.addopinion">
    <p>意见写入方式:</p>
    <a-radio-group :options="options" :default-value="defaultStyle" @change="onChange" />
  </div>
</template>

<script>
import components from './_import-components/sd-addopinion-import'

export default {
  name: 'SdAddopinion',
  metaInfo: {
    title: 'SdAddopinion',
  },
  components,
  data() {
    return {
      defaultStyle: 'add',
      options: [
        {
          label: '追加',
          value: 'add',
        },
        {
          label: '覆盖',
          value: 'cover',
        },
      ],
    }
  },
  methods: {
    onChange(e) {
      this.$emit('opinionStyleChange', e.target.value)
    },
  },
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
.addopinion {
  display: flex;
  p {
    margin-right: 1rem;
  }
}
</style>
