tagsAndAttrs.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. let wxml = [
  2. // 建议保留的解析标签
  3. 'view',
  4. 'video',
  5. 'text',
  6. 'image',
  7. 'navigator',
  8. 'swiper',
  9. 'swiper-item',
  10. 'block',
  11. 'form',
  12. 'input',
  13. 'textarea',
  14. 'button',
  15. 'checkbox-group',
  16. 'checkbox',
  17. 'radio-group',
  18. 'radio',
  19. // 可以解析的标签(html或markdown中会很少使用)
  20. // 'canvas',
  21. // 'map',
  22. // 'slider',
  23. // 'scroll-view',
  24. // 'movable-area',
  25. // 'movable-view',
  26. // 'progress',
  27. // 'label',
  28. // 'switch',
  29. // 'picker',
  30. // 'picker-view',
  31. // 'switch',
  32. // // 'audio',
  33. // 'contact-button'
  34. ],
  35. binds = [
  36. // 建议保留的事件
  37. 'bind:touchstart',
  38. 'bind:touchmove',
  39. 'bind:touchcancel',
  40. 'bind:touchend',
  41. 'bind:tap',
  42. // 'bind:longpress',
  43. // 'bind:longtap',
  44. // 'bind:transitionend',
  45. // 'bind:animationstart',
  46. // 'bind:animationiteration',
  47. // 'bind:animationend',
  48. // 'bind:touchforcechange'
  49. ],
  50. attrs = [
  51. 'class',
  52. 'width',
  53. 'height',
  54. 'data',
  55. 'id',
  56. 'style'
  57. ];
  58. module.exports = {
  59. wxml:wxml,
  60. binds:binds,
  61. attrs:[...binds,...attrs]
  62. };