radio-button.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import { Config } from "@/types/config";
  2. const config: Config = {
  3. url: "https://element.eleme.cn/#/zh-CN/component/radio#an-niu-yang-shi",
  4. attrs: {
  5. size: {
  6. type: "select",
  7. label: "单选框组尺寸",
  8. options: [{ text: "默认", value: null }, "medium", "small", "mini"]
  9. },
  10. textColor: {
  11. type: "color",
  12. label: "Radio 激活时的文本颜色"
  13. },
  14. fill: {
  15. type: "color",
  16. label: "Radio 激活时的填充色和边框色"
  17. }
  18. },
  19. attrsData: {},
  20. attrsDefaultData: {
  21. size: null,
  22. textColor: "#ffffff",
  23. fill: "#409EFF"
  24. },
  25. common: {
  26. default: {
  27. type: "radio",
  28. label: "默认值",
  29. isReloadOptions: true,
  30. options: data => data.options
  31. },
  32. options: {
  33. type: "json-editor",
  34. label: "选项",
  35. tip:
  36. 'options支持`API接口`、`数组`、`函数`、`Promise`等, 具体看<a target="_blank" href="https://www.yuque.com/chaojie-vjiel/vbwzgu/rgenav" class="el-link el-link--primary">文档</a>'
  37. }
  38. },
  39. commonData: {
  40. options: [
  41. { text: "选项1", value: 1 },
  42. { text: "选项2", value: 2 },
  43. { text: "选项3", value: 3 }
  44. ]
  45. },
  46. commonDefaultData: {}
  47. };
  48. export default config;