1
0

aSettingListItem.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {{define "component/settingListItem"}}
  2. <a-list-item :style="{ padding: padding }">
  3. <a-row>
  4. <a-col :lg="24" :xl="12">
  5. <a-list-item-meta>
  6. <template #title>
  7. <slot name="title"></slot>
  8. </template>
  9. <template #description>
  10. <slot name="description"></slot>
  11. </template>
  12. </a-list-item-meta>
  13. </a-col>
  14. <a-col :lg="24" :xl="12">
  15. <slot name="control"></slot>
  16. </a-col>
  17. </a-row>
  18. </a-list-item>
  19. {{end}}
  20. {{define "component/aSettingListItem"}}
  21. <script>
  22. Vue.component('a-setting-list-item', {
  23. props: {
  24. 'paddings': {
  25. type: String,
  26. required: false,
  27. defaultValue: "default",
  28. validator: function (value) {
  29. return ['small', 'default'].includes(value)
  30. }
  31. }
  32. },
  33. template: `{{ template "component/settingListItem" }}`,
  34. computed: {
  35. padding() {
  36. switch (this.paddings) {
  37. case "small":
  38. return "10px 20px !important"
  39. break;
  40. case "default":
  41. return "20px !important"
  42. break;
  43. }
  44. }
  45. }
  46. })
  47. </script>
  48. {{end}}