AutoWidthOption.vue 627 B

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <div style="display:inline-block;">
  3. <label class="radio-label">Cell Auto-Width: </label>
  4. <el-radio-group v-model="autoWidth">
  5. <el-radio :label="true" border>
  6. True
  7. </el-radio>
  8. <el-radio :label="false" border>
  9. False
  10. </el-radio>
  11. </el-radio-group>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. props: {
  17. value: {
  18. type: Boolean,
  19. default: true
  20. }
  21. },
  22. computed: {
  23. autoWidth: {
  24. get() {
  25. return this.value
  26. },
  27. set(val) {
  28. this.$emit('input', val)
  29. }
  30. }
  31. }
  32. }
  33. </script>