sidecomplabel.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //左侧组件配置数据
  2. z.autodeploy.addSideComp({
  3. id:"sidecomplabel",
  4. sidecomp:{
  5. img:"https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2867068672,3134492367&fm=26&gp=0.jpg",
  6. text:"标题"
  7. },
  8. temp:function(compconfig){
  9. var options=compconfig.options;
  10. return '<div class="z-form-label z-col-100" style="font-size:'+options.fontsize.value+'px;text-align:'+options.textalign.value+';"><span class="'+options.color.value+'">'+options.content.value+'</span></div>';
  11. },
  12. render:function(el,compconfig){
  13. },
  14. options:{
  15. "content":{
  16. type:'input',
  17. text:"文字内容",
  18. value:"",
  19. placeholder:"请输入"
  20. },
  21. "fontsize":{
  22. type:'input',
  23. text:"文字大小",
  24. value:"",
  25. placeholder:"请输入"
  26. },
  27. "lineheight":{
  28. type:'input',
  29. text:"行高",
  30. value:"",
  31. placeholder:"请输入"
  32. },
  33. "color":{
  34. type:'select',
  35. text:"颜色",
  36. items:[
  37. {
  38. value:"text-default",
  39. text:'<font class="text-default">默认</font>'
  40. },
  41. {
  42. value:"text-info",
  43. text:'<font class="text-info">文字颜色2</font>'
  44. },
  45. {
  46. value:"text-danger",
  47. text:'<font class="text-danger">文字颜色3</font>'
  48. },
  49. {
  50. value:"text-success",
  51. text:'<font class="text-success">文字颜色4</font>'
  52. }
  53. ],
  54. value:"text-default"
  55. },
  56. "textalign":{
  57. type:'select',
  58. text:"对齐方式",
  59. items:[
  60. {
  61. value:"left",
  62. text:"左"
  63. },
  64. {
  65. value:"center",
  66. text:"中"
  67. },
  68. {
  69. value:"right",
  70. text:"右"
  71. }
  72. ],
  73. value:"center"
  74. }
  75. },
  76. methods:{}
  77. })