@tarojs/components 3.4.0-beta.2 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/taro-components.cjs.js +1 -1
  3. package/dist/cjs/taro-input-core.cjs.entry.js +26 -18
  4. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +12 -3
  5. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +3 -3
  6. package/dist/cjs/taro-tabbar.cjs.entry.js +3 -2
  7. package/dist/cjs/taro-textarea-core.cjs.entry.js +3 -3
  8. package/dist/collection/components/input/input.js +41 -24
  9. package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +11 -2
  10. package/dist/collection/components/pull-to-refresh/style/index.css +1 -0
  11. package/dist/collection/components/scroll-view/scroll-view.js +3 -3
  12. package/dist/collection/components/tabbar/style/index.css +1 -1
  13. package/dist/collection/components/tabbar/tabbar.js +2 -1
  14. package/dist/collection/components/textarea/textarea.js +3 -3
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/taro-components.js +1 -1
  17. package/dist/esm/taro-input-core.entry.js +26 -18
  18. package/dist/esm/taro-pull-to-refresh.entry.js +12 -3
  19. package/dist/esm/taro-scroll-view-core.entry.js +3 -3
  20. package/dist/esm/taro-tabbar.entry.js +3 -2
  21. package/dist/esm/taro-textarea-core.entry.js +3 -3
  22. package/dist/esm-es5/loader.js +1 -1
  23. package/dist/esm-es5/taro-components.js +1 -1
  24. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  25. package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
  26. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  27. package/dist/esm-es5/taro-tabbar.entry.js +1 -1
  28. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  29. package/dist/taro-components/p-19c46f62.system.entry.js +1 -0
  30. package/dist/taro-components/p-2b0d5c90.system.entry.js +1 -0
  31. package/dist/taro-components/{p-627a5064.system.entry.js → p-2dc57c71.system.entry.js} +1 -1
  32. package/dist/taro-components/p-33ee636a.system.js +1 -1
  33. package/dist/taro-components/p-4e54216b.entry.js +1 -0
  34. package/dist/taro-components/{p-12ae0a33.entry.js → p-63ff7fa7.entry.js} +1 -1
  35. package/dist/taro-components/p-71e14298.entry.js +1 -0
  36. package/dist/taro-components/p-8486c251.system.entry.js +1 -0
  37. package/dist/taro-components/{p-dd34408a.entry.js → p-a345ba40.entry.js} +1 -1
  38. package/dist/taro-components/{p-6965567d.entry.js → p-cc818a13.entry.js} +1 -1
  39. package/dist/taro-components/{p-13c1404f.system.entry.js → p-fd0d1168.system.entry.js} +1 -1
  40. package/dist/taro-components/taro-components.css +1 -1
  41. package/dist/taro-components/taro-components.esm.js +1 -1
  42. package/dist/types/components/input/input.d.ts +3 -3
  43. package/dist/types/components/textarea/textarea.d.ts +1 -1
  44. package/dist/types/components.d.ts +1 -0
  45. package/dist-h5/vue/components/picker.js +2 -1
  46. package/package.json +3 -3
  47. package/types/Ad.d.ts +22 -10
  48. package/types/Audio.d.ts +25 -5
  49. package/types/Button.d.ts +96 -23
  50. package/types/Camera.d.ts +11 -11
  51. package/types/Canvas.d.ts +14 -1
  52. package/types/Checkbox.d.ts +65 -1
  53. package/types/CoverImage.d.ts +48 -6
  54. package/types/CoverView.d.ts +51 -8
  55. package/types/Editor.d.ts +57 -0
  56. package/types/Form.d.ts +33 -2
  57. package/types/FunctionalPageNavigator.d.ts +4 -4
  58. package/types/Icon.d.ts +17 -1
  59. package/types/Image.d.ts +24 -4
  60. package/types/Input.d.ts +66 -5
  61. package/types/KeyboardAccessory.d.ts +2 -1
  62. package/types/Label.d.ts +18 -4
  63. package/types/LivePlayer.d.ts +15 -9
  64. package/types/LivePusher.d.ts +21 -15
  65. package/types/Map.d.ts +59 -5
  66. package/types/MatchMedia.d.ts +24 -5
  67. package/types/MovableArea.d.ts +9 -3
  68. package/types/MovableView.d.ts +20 -6
  69. package/types/Navigator.d.ts +7 -7
  70. package/types/OfficialAccount.d.ts +4 -10
  71. package/types/OpenData.d.ts +11 -5
  72. package/types/PageContainer.d.ts +8 -2
  73. package/types/Picker.d.ts +64 -1
  74. package/types/PickerView.d.ts +66 -2
  75. package/types/PickerViewColumn.d.ts +1 -1
  76. package/types/Progress.d.ts +12 -1
  77. package/types/Radio.d.ts +77 -1
  78. package/types/RichText.d.ts +33 -1
  79. package/types/ScrollView.d.ts +91 -9
  80. package/types/ShareElement.d.ts +1 -1
  81. package/types/Slider.d.ts +14 -1
  82. package/types/Swiper.d.ts +26 -1
  83. package/types/SwiperItem.d.ts +28 -3
  84. package/types/Switch.d.ts +21 -3
  85. package/types/Text.d.ts +38 -1
  86. package/types/Textarea.d.ts +17 -1
  87. package/types/Video.d.ts +50 -30
  88. package/types/View.d.ts +33 -1
  89. package/types/VoipRoom.d.ts +10 -11
  90. package/types/WebView.d.ts +7 -1
  91. package/types/common.d.ts +1 -1
  92. package/dist/taro-components/p-04818461.system.entry.js +0 -1
  93. package/dist/taro-components/p-12638ebc.system.entry.js +0 -1
  94. package/dist/taro-components/p-56618f09.entry.js +0 -1
  95. package/dist/taro-components/p-66237ac0.entry.js +0 -1
  96. package/dist/taro-components/p-665e8461.system.entry.js +0 -1
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-f05e1558.js";(()=>{const o=import.meta.url,r={};return""!==o&&(r.resourcesUrl=new URL(".",o).href),e(r)})().then((e=>o([["p-d5971476",[[4,"taro-checkbox-core",{name:[1],value:[1],color:[1],id:[1025],checked:[4],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-checkbox-group-core",{name:[8]},[[0,"checkboxchange","function"]]]]],["p-55b0a30b",[[4,"taro-radio-core",{name:[1],value:[1],id:[1025],checked:[1028],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-radio-group-core",{name:[8]},[[0,"radiochange","function"]]]]],["p-32937866",[[4,"taro-swiper-core",{indicatorDots:[4,"indicator-dots"],indicatorColor:[1,"indicator-color"],indicatorActiveColor:[1,"indicator-active-color"],autoplay:[4],current:[2],interval:[2],duration:[2],circular:[4],vertical:[4],previousMargin:[1,"previous-margin"],nextMargin:[1,"next-margin"],displayMultipleItems:[2,"display-multiple-items"],full:[4],swiperWrapper:[32],swiper:[32],isWillLoadCalled:[32],observer:[32],observerFirst:[32],observerLast:[32]}],[0,"taro-swiper-item-core",{itemId:[1,"item-id"]}]]],["p-cf55a63c",[[0,"taro-ad-core"]]],["p-14dbbb42",[[0,"taro-ad-custom-core"]]],["p-5f8b5f62",[[0,"taro-audio-core",{src:[1],controls:[4],autoplay:[4],loop:[4],muted:[4],nativeProps:[16]}]]],["p-b9280444",[[0,"taro-block-core"]]],["p-83dedaa2",[[4,"taro-button-core",{disabled:[4],hoverClass:[1,"hover-class"],type:[1],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],size:[1],plain:[4],loading:[4],formType:[1,"form-type"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["p-c218c298",[[0,"taro-camera-core"]]],["p-4dbed323",[[0,"taro-canvas-core",{canvasId:[1,"canvas-id"],nativeProps:[16]}]]],["p-9d0ab7c4",[[0,"taro-cover-image-core",{src:[1],nativeProps:[16]}]]],["p-74540410",[[4,"taro-cover-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-a1423df9",[[0,"taro-custom-wrapper-core"]]],["p-94502fc3",[[0,"taro-editor-core"]]],["p-8a5e67cb",[[4,"taro-form-core",{slotParent:[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-3c0230ba",[[0,"taro-functional-page-navigator-core"]]],["p-11932905",[[0,"taro-icon-core",{type:[1],size:[8],color:[1]}]]],["p-9eb7dfa8",[[0,"taro-image-core",{src:[1],mode:[1],lazyLoad:[4,"lazy-load"],nativeProps:[16],aspectFillMode:[32]}]]],["p-66237ac0",[[0,"taro-input-core",{value:[1],type:[1],password:[4],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],confirmType:[1,"confirm-type"],name:[1],nativeProps:[16],_value:[32]}]]],["p-0303f9e0",[[0,"taro-keyboard-accessory-core"]]],["p-e27798a4",[[4,"taro-label-core",{for:[1]}]]],["p-cb395e7d",[[0,"taro-live-player-core"]]],["p-0ee69803",[[0,"taro-live-pusher-core"]]],["p-3dfb1807",[[0,"taro-map-core"]]],["p-92e95d3f",[[0,"taro-match-media-core"]]],["p-554e1039",[[0,"taro-movable-area-core"]]],["p-b75d8a65",[[0,"taro-movable-view-core"]]],["p-065ec61d",[[0,"taro-navigation-bar-core"]]],["p-2d2f8064",[[0,"taro-navigator-core",{hoverClass:[1,"hover-class"],url:[1],openType:[1,"open-type"],isHover:[4,"is-hover"],delta:[2]},[[0,"click","onClick"]]]]],["p-15bea37d",[[0,"taro-official-account-core"]]],["p-c362734b",[[0,"taro-open-data-core"]]],["p-b6d6c744",[[0,"taro-page-container-core"]]],["p-7721e046",[[0,"taro-page-meta-core"]]],["p-95529dc0",[[0,"taro-picker-view-column-core"]]],["p-5c420456",[[0,"taro-picker-view-core"]]],["p-06bffead",[[0,"taro-progress-core",{percent:[2],showInfo:[4,"show-info"],borderRadius:[8,"border-radius"],fontSize:[8,"font-size"],strokeWidth:[8,"stroke-width"],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],active:[4]}]]],["p-56618f09",[[4,"taro-pull-to-refresh",{prefixCls:[1,"prefix-cls"],distanceToRefresh:[2,"distance-to-refresh"],damping:[2],indicator:[16],currSt:[32],dragOnEdge:[32]}]]],["p-8db237e0",[[0,"taro-rich-text-core",{nodes:[1]}]]],["p-6965567d",[[4,"taro-scroll-view-core",{scrollX:[4,"scroll-x"],scrollY:[4,"scroll-y"],upperThreshold:[8,"upper-threshold"],lowerThreshold:[8,"lower-threshold"],mpScrollTop:[8,"scroll-top"],mpScrollLeft:[8,"scroll-left"],mpScrollIntoView:[1,"scroll-into-view"],scrollWithAnimation:[4,"scroll-with-animation"]}]]],["p-cfbfeee8",[[0,"taro-share-element-core"]]],["p-3633bb84",[[0,"taro-slider-core",{min:[2],max:[2],step:[2],disabled:[4],value:[1026],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],blockSize:[2,"block-size"],blockColor:[1,"block-color"],showValue:[4,"show-value"],name:[1],val:[32],totalWidth:[32],touching:[32],ogX:[32],touchId:[32],percent:[32],ogPercent:[32],isWillLoadCalled:[32]}]]],["p-b87cf623",[[0,"taro-slot-core"]]],["p-e6298500",[[0,"taro-switch-core",{type:[1],checked:[4],color:[1],name:[1],disabled:[4],nativeProps:[16],isChecked:[32],isWillLoadCalled:[32]}]]],["p-dd34408a",[[0,"taro-tabbar",{conf:[16],list:[32],borderStyle:[32],backgroundColor:[32],color:[32],selectedColor:[32],selectedIndex:[32],status:[32]}]]],["p-d567b95e",[[4,"taro-text-core",{selectable:[4]}]]],["p-12ae0a33",[[0,"taro-textarea-core",{value:[1],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],autoHeight:[4,"auto-height"],name:[1],nativeProps:[16],line:[32]}]]],["p-17cf8b5b",[[4,"taro-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-59d38db0",[[0,"taro-voip-room-core"]]],["p-8bc82aaa",[[0,"taro-web-view-core",{src:[1]}]]],["p-865c21b5",[[4,"taro-picker-core",{mode:[1],disabled:[4],range:[16],rangeKey:[1,"range-key"],value:[8],start:[1],end:[1],fields:[1],name:[1],pickerValue:[32],height:[32],hidden:[32],fadeOut:[32],isWillLoadCalled:[32]}],[0,"taro-picker-group",{mode:[1],range:[16],rangeKey:[1,"range-key"],height:[2],columnId:[1,"column-id"],updateHeight:[16],onColumnChange:[16],updateDay:[16],startY:[32],preY:[32],hadMove:[32],touchEnd:[32],isMove:[32]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-431197bc",[[0,"taro-video-core",{src:[1],duration:[2],controls:[4],autoplay:[4],loop:[4],muted:[4],initialTime:[2,"initial-time"],poster:[1],objectFit:[1,"object-fit"],showProgress:[4,"show-progress"],showFullscreenBtn:[4,"show-fullscreen-btn"],showPlayBtn:[4,"show-play-btn"],showCenterPlayBtn:[4,"show-center-play-btn"],showMuteBtn:[4,"show-mute-btn"],danmuList:[16],danmuBtn:[4,"danmu-btn"],enableDanmu:[4,"enable-danmu"],enablePlayGesture:[4,"enable-play-gesture"],enableProgressGesture:[4,"enable-progress-gesture"],vslideGesture:[4,"vslide-gesture"],vslideGestureInFullscreen:[4,"vslide-gesture-in-fullscreen"],nativeProps:[16],_duration:[32],_enableDanmu:[32],isPlaying:[32],isFirst:[32],isFullScreen:[32],fullScreenTimestamp:[32],isMute:[32],play:[64],pause:[64],stop:[64],seek:[64],requestFullScreen:[64],exitFullScreen:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{controls:[4],currentTime:[2,"current-time"],duration:[2],isPlaying:[4,"is-playing"],pauseFunc:[16],playFunc:[16],seekFunc:[16],showPlayBtn:[4,"show-play-btn"],showProgress:[4,"show-progress"],setProgressBall:[64],toggleVisibility:[64],getIsDraggingProgressBall:[64],setCurrentTime:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{enable:[4],danmuList:[32],sendDanmu:[64],tick:[64]}]]]],e)));
1
+ import{p as e,b as o}from"./p-f05e1558.js";(()=>{const o=import.meta.url,r={};return""!==o&&(r.resourcesUrl=new URL(".",o).href),e(r)})().then((e=>o([["p-d5971476",[[4,"taro-checkbox-core",{name:[1],value:[1],color:[1],id:[1025],checked:[4],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-checkbox-group-core",{name:[8]},[[0,"checkboxchange","function"]]]]],["p-55b0a30b",[[4,"taro-radio-core",{name:[1],value:[1],id:[1025],checked:[1028],disabled:[4],nativeProps:[16],isWillLoadCalled:[32]}],[0,"taro-radio-group-core",{name:[8]},[[0,"radiochange","function"]]]]],["p-32937866",[[4,"taro-swiper-core",{indicatorDots:[4,"indicator-dots"],indicatorColor:[1,"indicator-color"],indicatorActiveColor:[1,"indicator-active-color"],autoplay:[4],current:[2],interval:[2],duration:[2],circular:[4],vertical:[4],previousMargin:[1,"previous-margin"],nextMargin:[1,"next-margin"],displayMultipleItems:[2,"display-multiple-items"],full:[4],swiperWrapper:[32],swiper:[32],isWillLoadCalled:[32],observer:[32],observerFirst:[32],observerLast:[32]}],[0,"taro-swiper-item-core",{itemId:[1,"item-id"]}]]],["p-cf55a63c",[[0,"taro-ad-core"]]],["p-14dbbb42",[[0,"taro-ad-custom-core"]]],["p-5f8b5f62",[[0,"taro-audio-core",{src:[1],controls:[4],autoplay:[4],loop:[4],muted:[4],nativeProps:[16]}]]],["p-b9280444",[[0,"taro-block-core"]]],["p-83dedaa2",[[4,"taro-button-core",{disabled:[4],hoverClass:[1,"hover-class"],type:[1],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],size:[1],plain:[4],loading:[4],formType:[1,"form-type"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["p-c218c298",[[0,"taro-camera-core"]]],["p-4dbed323",[[0,"taro-canvas-core",{canvasId:[1,"canvas-id"],nativeProps:[16]}]]],["p-9d0ab7c4",[[0,"taro-cover-image-core",{src:[1],nativeProps:[16]}]]],["p-74540410",[[4,"taro-cover-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-a1423df9",[[0,"taro-custom-wrapper-core"]]],["p-94502fc3",[[0,"taro-editor-core"]]],["p-8a5e67cb",[[4,"taro-form-core",{slotParent:[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["p-3c0230ba",[[0,"taro-functional-page-navigator-core"]]],["p-11932905",[[0,"taro-icon-core",{type:[1],size:[8],color:[1]}]]],["p-9eb7dfa8",[[0,"taro-image-core",{src:[1],mode:[1],lazyLoad:[4,"lazy-load"],nativeProps:[16],aspectFillMode:[32]}]]],["p-4e54216b",[[0,"taro-input-core",{value:[1],type:[1],password:[4],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],confirmType:[1,"confirm-type"],name:[1],nativeProps:[16]}]]],["p-0303f9e0",[[0,"taro-keyboard-accessory-core"]]],["p-e27798a4",[[4,"taro-label-core",{for:[1]}]]],["p-cb395e7d",[[0,"taro-live-player-core"]]],["p-0ee69803",[[0,"taro-live-pusher-core"]]],["p-3dfb1807",[[0,"taro-map-core"]]],["p-92e95d3f",[[0,"taro-match-media-core"]]],["p-554e1039",[[0,"taro-movable-area-core"]]],["p-b75d8a65",[[0,"taro-movable-view-core"]]],["p-065ec61d",[[0,"taro-navigation-bar-core"]]],["p-2d2f8064",[[0,"taro-navigator-core",{hoverClass:[1,"hover-class"],url:[1],openType:[1,"open-type"],isHover:[4,"is-hover"],delta:[2]},[[0,"click","onClick"]]]]],["p-15bea37d",[[0,"taro-official-account-core"]]],["p-c362734b",[[0,"taro-open-data-core"]]],["p-b6d6c744",[[0,"taro-page-container-core"]]],["p-7721e046",[[0,"taro-page-meta-core"]]],["p-95529dc0",[[0,"taro-picker-view-column-core"]]],["p-5c420456",[[0,"taro-picker-view-core"]]],["p-06bffead",[[0,"taro-progress-core",{percent:[2],showInfo:[4,"show-info"],borderRadius:[8,"border-radius"],fontSize:[8,"font-size"],strokeWidth:[8,"stroke-width"],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],active:[4]}]]],["p-71e14298",[[4,"taro-pull-to-refresh",{prefixCls:[1,"prefix-cls"],distanceToRefresh:[2,"distance-to-refresh"],damping:[2],indicator:[16],currSt:[32],dragOnEdge:[32]}]]],["p-8db237e0",[[0,"taro-rich-text-core",{nodes:[1]}]]],["p-cc818a13",[[4,"taro-scroll-view-core",{scrollX:[4,"scroll-x"],scrollY:[4,"scroll-y"],upperThreshold:[8,"upper-threshold"],lowerThreshold:[8,"lower-threshold"],mpScrollTop:[8,"scroll-top"],mpScrollLeft:[8,"scroll-left"],mpScrollIntoView:[1,"scroll-into-view"],scrollWithAnimation:[4,"scroll-with-animation"]}]]],["p-cfbfeee8",[[0,"taro-share-element-core"]]],["p-3633bb84",[[0,"taro-slider-core",{min:[2],max:[2],step:[2],disabled:[4],value:[1026],activeColor:[1,"active-color"],backgroundColor:[1,"background-color"],blockSize:[2,"block-size"],blockColor:[1,"block-color"],showValue:[4,"show-value"],name:[1],val:[32],totalWidth:[32],touching:[32],ogX:[32],touchId:[32],percent:[32],ogPercent:[32],isWillLoadCalled:[32]}]]],["p-b87cf623",[[0,"taro-slot-core"]]],["p-e6298500",[[0,"taro-switch-core",{type:[1],checked:[4],color:[1],name:[1],disabled:[4],nativeProps:[16],isChecked:[32],isWillLoadCalled:[32]}]]],["p-a345ba40",[[0,"taro-tabbar",{conf:[16],list:[32],borderStyle:[32],backgroundColor:[32],color:[32],selectedColor:[32],selectedIndex:[32],status:[32]}]]],["p-d567b95e",[[4,"taro-text-core",{selectable:[4]}]]],["p-63ff7fa7",[[0,"taro-textarea-core",{value:[1],placeholder:[1],disabled:[4],maxlength:[2],autoFocus:[4,"auto-focus"],autoHeight:[4,"auto-height"],name:[1],nativeProps:[16],line:[32]}]]],["p-17cf8b5b",[[4,"taro-view-core",{animation:[1],hoverClass:[1,"hover-class"],hoverStartTime:[2,"hover-start-time"],hoverStayTime:[2,"hover-stay-time"],hover:[32],touch:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-59d38db0",[[0,"taro-voip-room-core"]]],["p-8bc82aaa",[[0,"taro-web-view-core",{src:[1]}]]],["p-865c21b5",[[4,"taro-picker-core",{mode:[1],disabled:[4],range:[16],rangeKey:[1,"range-key"],value:[8],start:[1],end:[1],fields:[1],name:[1],pickerValue:[32],height:[32],hidden:[32],fadeOut:[32],isWillLoadCalled:[32]}],[0,"taro-picker-group",{mode:[1],range:[16],rangeKey:[1,"range-key"],height:[2],columnId:[1,"column-id"],updateHeight:[16],onColumnChange:[16],updateDay:[16],startY:[32],preY:[32],hadMove:[32],touchEnd:[32],isMove:[32]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["p-431197bc",[[0,"taro-video-core",{src:[1],duration:[2],controls:[4],autoplay:[4],loop:[4],muted:[4],initialTime:[2,"initial-time"],poster:[1],objectFit:[1,"object-fit"],showProgress:[4,"show-progress"],showFullscreenBtn:[4,"show-fullscreen-btn"],showPlayBtn:[4,"show-play-btn"],showCenterPlayBtn:[4,"show-center-play-btn"],showMuteBtn:[4,"show-mute-btn"],danmuList:[16],danmuBtn:[4,"danmu-btn"],enableDanmu:[4,"enable-danmu"],enablePlayGesture:[4,"enable-play-gesture"],enableProgressGesture:[4,"enable-progress-gesture"],vslideGesture:[4,"vslide-gesture"],vslideGestureInFullscreen:[4,"vslide-gesture-in-fullscreen"],nativeProps:[16],_duration:[32],_enableDanmu:[32],isPlaying:[32],isFirst:[32],isFullScreen:[32],fullScreenTimestamp:[32],isMute:[32],play:[64],pause:[64],stop:[64],seek:[64],requestFullScreen:[64],exitFullScreen:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{controls:[4],currentTime:[2,"current-time"],duration:[2],isPlaying:[4,"is-playing"],pauseFunc:[16],playFunc:[16],seekFunc:[16],showPlayBtn:[4,"show-play-btn"],showProgress:[4,"show-progress"],setProgressBall:[64],toggleVisibility:[64],getIsDraggingProgressBall:[64],setCurrentTime:[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{enable:[4],danmuList:[32],sendDanmu:[64],tick:[64]}]]]],e)));
@@ -3,6 +3,7 @@ import { TaroEvent } from '../../../types';
3
3
  export declare class Input implements ComponentInterface {
4
4
  private inputRef;
5
5
  private isOnComposition;
6
+ private isOnPaste;
6
7
  private onInputExcuted;
7
8
  private fileListener;
8
9
  value: string;
@@ -15,20 +16,19 @@ export declare class Input implements ComponentInterface {
15
16
  confirmType: string;
16
17
  name: string;
17
18
  nativeProps: {};
18
- _value: string;
19
19
  el: HTMLElement;
20
- watchHandler(newValue: string, oldValue: string): void;
21
20
  watchFocus(newValue: boolean, oldValue: boolean): void;
22
21
  onInput: EventEmitter;
22
+ onPaste: EventEmitter;
23
23
  onFocus: EventEmitter;
24
24
  onBlur: EventEmitter;
25
25
  onConfirm: EventEmitter;
26
26
  onChange: EventEmitter;
27
27
  onKeyDown: EventEmitter;
28
- componentWillLoad(): void;
29
28
  componentDidLoad(): void;
30
29
  disconnectedCallback(): void;
31
30
  handleInput: (e: TaroEvent<HTMLInputElement>) => void;
31
+ handlePaste: (e: TaroEvent<HTMLInputElement> & ClipboardEvent) => void;
32
32
  handleFocus: (e: TaroEvent<HTMLInputElement> & FocusEvent) => void;
33
33
  handleBlur: (e: TaroEvent<HTMLInputElement> & FocusEvent) => void;
34
34
  handleChange: (e: TaroEvent<HTMLInputElement>) => void;
@@ -18,7 +18,7 @@ export declare class Textarea implements ComponentInterface {
18
18
  onChange: EventEmitter;
19
19
  onLineChange: EventEmitter;
20
20
  componentDidLoad(): void;
21
- hanldeInput: (e: TaroEvent<HTMLInputElement>) => void;
21
+ handleInput: (e: TaroEvent<HTMLInputElement>) => void;
22
22
  handleFocus: (e: TaroEvent<HTMLInputElement> & FocusEvent) => void;
23
23
  handleBlur: (e: TaroEvent<HTMLInputElement> & FocusEvent) => void;
24
24
  handleChange: (e: TaroEvent<HTMLInputElement>) => void;
@@ -941,6 +941,7 @@ declare namespace LocalJSX {
941
941
  "onFocus"?: (event: CustomEvent<any>) => void;
942
942
  "onInput"?: (event: CustomEvent<any>) => void;
943
943
  "onKeydown"?: (event: CustomEvent<any>) => void;
944
+ "onPaste"?: (event: CustomEvent<any>) => void;
944
945
  "password"?: boolean;
945
946
  "placeholder"?: string;
946
947
  "type"?: string;
@@ -31,7 +31,8 @@ export default {
31
31
  return createElement('taro-picker-core', {
32
32
  class: 'hydrated',
33
33
  domProps: {
34
- range: self.range
34
+ range: self.range,
35
+ rangeKey: self.rangeKey
35
36
  },
36
37
  on: _objectSpread(_objectSpread({}, self.listeners), {}, {
37
38
  change: function change(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/components",
3
- "version": "3.4.0-beta.2",
3
+ "version": "3.4.2",
4
4
  "description": "",
5
5
  "main:h5": "src/index.js",
6
6
  "main": "dist/index.js",
@@ -38,7 +38,7 @@
38
38
  "license": "MIT",
39
39
  "dependencies": {
40
40
  "@stencil/core": "2.9.0",
41
- "@tarojs/taro": "3.4.0-beta.2",
41
+ "@tarojs/taro": "3.4.2",
42
42
  "better-scroll": "^1.14.1",
43
43
  "classnames": "^2.2.5",
44
44
  "intersection-observer": "^0.7.0",
@@ -55,5 +55,5 @@
55
55
  "simulant": "^0.2.2",
56
56
  "workbox-build": "4.3.1"
57
57
  },
58
- "gitHead": "ac3eb29f11aec15d25e061775d9e970efabc2c98"
58
+ "gitHead": "26b329326c6a7da652e8d712ee33df01ab8d2d0e"
59
59
  }
package/types/Ad.d.ts CHANGED
@@ -50,55 +50,55 @@ declare namespace AdProps {
50
50
  */
51
51
  interface AdErrCode {
52
52
  /**
53
- * @abnormal 后端错误调用失败
53
+ * @illustrate 后端错误调用失败
54
54
  * @reason 该项错误不是开发者的异常情况
55
55
  * @solution 一般情况下忽略一段时间即可恢复。
56
56
  */
57
57
  1000
58
58
  /**
59
- * @abnormal 参数错误
59
+ * @illustrate 参数错误
60
60
  * @reason 使用方法错误
61
61
  * @solution 可以前往 developers.weixin.qq.com 确认具体教程(小程序和小游戏分别有各自的教程,可以在顶部选项中,“设计”一栏的右侧进行切换。
62
62
  */
63
63
  1001
64
64
  /**
65
- * @abnormal 广告单元无效
65
+ * @illustrate 广告单元无效
66
66
  * @reason 可能是拼写错误、或者误用了其他APP的广告ID
67
67
  * @solution 请重新前往 mp.weixin.qq.com 确认广告位ID。
68
68
  */
69
69
  1002
70
70
  /**
71
- * @abnormal 内部错误
71
+ * @illustrate 内部错误
72
72
  * @reason 该项错误不是开发者的异常情况
73
73
  * @solution 一般情况下忽略一段时间即可恢复。
74
74
  */
75
75
  1003
76
76
  /**
77
- * @abnormal 无合适的广告
77
+ * @illustrate 无合适的广告
78
78
  * @reason 广告不是每一次都会出现,这次没有出现可能是由于该用户不适合浏览广告
79
79
  * @solution 属于正常情况,且开发者需要针对这种情况做形态上的兼容。
80
80
  */
81
81
  1004
82
82
  /**
83
- * @abnormal 广告组件审核中
83
+ * @illustrate 广告组件审核中
84
84
  * @reason 你的广告正在被审核,无法展现广告
85
85
  * @solution 请前往 mp.weixin.qq.com 确认审核状态,且开发者需要针对这种情况做形态上的兼容。
86
86
  */
87
87
  1005
88
88
  /**
89
- * @abnormal 广告组件被驳回
89
+ * @illustrate 广告组件被驳回
90
90
  * @reason 你的广告审核失败,无法展现广告
91
91
  * @solution 请前往 mp.weixin.qq.com 确认审核状态,且开发者需要针对这种情况做形态上的兼容。
92
92
  */
93
93
  1006
94
94
  /**
95
- * @abnormal 广告组件被封禁
95
+ * @illustrate 广告组件被封禁
96
96
  * @reason 你的广告能力已经被封禁,封禁期间无法展现广告
97
97
  * @solution 请前往 mp.weixin.qq.com 确认小程序广告封禁状态。
98
98
  */
99
99
  1007
100
100
  /**
101
- * @abnormal 广告单元已关闭
101
+ * @illustrate 广告单元已关闭
102
102
  * @reason 该广告位的广告能力已经被关闭
103
103
  * @solution 请前往 mp.weixin.qq.com 重新打开对应广告位的展现。
104
104
  */
@@ -110,7 +110,7 @@ declare namespace AdProps {
110
110
  /** Banner 广告
111
111
  * @classification open
112
112
  * @supported weapp
113
- * @example
113
+ * @example_react
114
114
  * ```tsx
115
115
  * class App extends Component {
116
116
  * render () {
@@ -126,6 +126,18 @@ declare namespace AdProps {
126
126
  * }
127
127
  * }
128
128
  * ```
129
+ * @example_vue
130
+ * ```html
131
+ * <template>
132
+ * <ad
133
+ * unit-id=""
134
+ * ad-intervals="60"
135
+ * `@load="onLoad"
136
+ * `@error="onError"
137
+ * `@close="onClose"
138
+ * />
139
+ * </template>
140
+ * ```
129
141
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/ad.html
130
142
  */
131
143
  declare const Ad: ComponentType<AdProps>
package/types/Audio.d.ts CHANGED
@@ -72,11 +72,16 @@ interface AudioProps extends StandardProps {
72
72
  * @supported weapp, h5, swan
73
73
  */
74
74
  onEnded?: CommonEventFunction
75
+
76
+ /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
77
+ * @supported h5
78
+ */
79
+ nativeProps?: Record<string, unknown>
75
80
  }
76
81
 
77
82
  declare namespace AudioProps {
78
83
  interface onErrorEventDetail {
79
- errMsg: keyof MediaError.code
84
+ errMsg: keyof MediaError.Code
80
85
  }
81
86
  interface onTimeUpdateEventDetail {
82
87
  /** 当前时间 */
@@ -85,7 +90,7 @@ declare namespace AudioProps {
85
90
  duration: number
86
91
  }
87
92
  namespace MediaError {
88
- interface code {
93
+ interface Code {
89
94
  /** 获取资源被用户禁止 */
90
95
  1
91
96
  /** 网络错误 */
@@ -102,18 +107,18 @@ declare namespace AudioProps {
102
107
  * @classification media
103
108
  * @deprecated
104
109
  * @supported weapp, h5, swan
105
- * @example
110
+ * @example_react
106
111
  * ```tsx
107
112
  * export default class PageView extends Component {
108
113
  * constructor() {
109
114
  * super(...arguments)
110
115
  * }
111
- *
116
+ *
112
117
  * render() {
113
118
  * return (
114
119
  * <View className='components-page'>
115
120
  * <Audio
116
- * src='http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E06DCBDC9AB7C49FD713D632D313AC4858BACB8DDD29067D3C601481D36E62053BF8DFEAF74C0A5CCFADD6471160CAF3E6A&fromtag=46'
121
+ * src='https://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E06DCBDC9AB7C49FD713D632D313AC4858BACB8DDD29067D3C601481D36E62053BF8DFEAF74C0A5CCFADD6471160CAF3E6A&fromtag=46'
117
122
  * controls={true}
118
123
  * autoplay={false}
119
124
  * loop={false}
@@ -126,6 +131,21 @@ declare namespace AudioProps {
126
131
  * }
127
132
  * }
128
133
  * ```
134
+ * @example_vue
135
+ * ```html
136
+ * <template>
137
+ * <view class="components-page">
138
+ * <audio
139
+ * id="video"
140
+ * src="https://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E06DCBDC9AB7C49FD713D632D313AC4858BACB8DDD29067D3C601481D36E62053BF8DFEAF74C0A5CCFADD6471160CAF3E6A&fromtag=46"
141
+ * :controls="true"
142
+ * :autoplay="false"
143
+ * :loop="false"
144
+ * :muted="true"
145
+ * />
146
+ * </view>
147
+ * </template>
148
+ * ```
129
149
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/audio.html
130
150
  */
131
151
  declare const Audio: ComponentType<AudioProps>
package/types/Button.d.ts CHANGED
@@ -4,48 +4,48 @@ import { StyleProp, ViewStyle } from 'react-native'
4
4
 
5
5
  interface ButtonProps extends StandardProps {
6
6
  /** 按钮的大小
7
- * @supported weapp, h5, rn
7
+ * @supported weapp, h5, rn, alipay
8
8
  * @default default
9
9
  */
10
- size?: keyof ButtonProps.size
10
+ size?: keyof ButtonProps.Size
11
11
 
12
12
  /** 按钮的样式类型
13
- * @supported weapp, h5, rn
13
+ * @supported weapp, h5, rn, alipay
14
14
  * @default default
15
15
  */
16
- type?: keyof ButtonProps.type
16
+ type?: keyof ButtonProps.Type
17
17
 
18
18
  /** 按钮是否镂空,背景色透明
19
- * @supported weapp, h5, rn
19
+ * @supported weapp, h5, rn, alipay
20
20
  * @default false
21
21
  */
22
22
  plain?: boolean
23
23
 
24
24
  /** 是否禁用
25
- * @supported weapp, h5, rn
25
+ * @supported weapp, h5, rn, alipay
26
26
  * @default false
27
27
  */
28
28
  disabled?: boolean
29
29
 
30
30
  /** 名称前是否带 loading 图标
31
- * @supported weapp, h5, rn
31
+ * @supported weapp, h5, rn, alipay
32
32
  * @default false
33
33
  */
34
34
  loading?: boolean
35
35
 
36
36
  /** 用于 `<form/>` 组件,点击分别会触发 `<form/>` 组件的 submit/reset 事件
37
- * @supported weapp
37
+ * @supported weapp, alipay
38
38
  */
39
- formType?: keyof ButtonProps.formType
39
+ formType?: keyof ButtonProps.FormType
40
40
 
41
41
  /** 微信开放能力
42
42
  * @supported weapp, alipay, qq
43
43
  */
44
- openType?: ButtonProps.openType
44
+ openType?: ButtonProps.OpenType
45
45
 
46
46
  /** 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果
47
47
  * @default button-hover
48
- * @supported weapp, h5
48
+ * @supported weapp, alipay, h5
49
49
  * @rn 支持 hoverStyle 属性,但框架未支持 hoverClass
50
50
  */
51
51
  hoverClass?: string
@@ -58,19 +58,19 @@ interface ButtonProps extends StandardProps {
58
58
 
59
59
  /** 指定是否阻止本节点的祖先节点出现点击态
60
60
  * @default false
61
- * @supported weapp
61
+ * @supported weapp, alipay
62
62
  */
63
63
  hoverStopPropagation?: boolean
64
64
 
65
65
  /** 按住后多久出现点击态,单位毫秒
66
66
  * @default 20
67
- * @supported weapp, h5, rn
67
+ * @supported weapp, alipay, h5, rn
68
68
  */
69
69
  hoverStartTime?: number
70
70
 
71
71
  /** 手指松开后点击态保留时间,单位毫秒
72
72
  * @default 70
73
- * @supported weapp, h5, rn
73
+ * @supported weapp, alipay, h5, rn
74
74
  */
75
75
  hoverStayTime?: number
76
76
 
@@ -79,7 +79,7 @@ interface ButtonProps extends StandardProps {
79
79
  * 生效时机: `open-type="getUserInfo"`
80
80
  * @supported weapp
81
81
  */
82
- lang?: keyof ButtonProps.lang
82
+ lang?: keyof ButtonProps.Lang
83
83
 
84
84
  /** 会话来源
85
85
  *
@@ -199,14 +199,14 @@ interface ButtonProps extends StandardProps {
199
199
 
200
200
  declare namespace ButtonProps {
201
201
  /** size 的合法值 */
202
- interface size {
202
+ interface Size {
203
203
  /** 默认大小 */
204
204
  default
205
205
  /** 小尺寸 */
206
206
  mini
207
207
  }
208
208
  /** type 的合法值 */
209
- interface type {
209
+ interface Type {
210
210
  /** 绿色 */
211
211
  primary
212
212
  /** 白色 */
@@ -215,14 +215,14 @@ declare namespace ButtonProps {
215
215
  warn
216
216
  }
217
217
  /** form-type 的合法值 */
218
- interface formType {
218
+ interface FormType {
219
219
  /** 提交表单 */
220
220
  submit
221
221
  /** 重置表单 */
222
222
  reset
223
223
  }
224
224
  /** open-type 的合法值 */
225
- type openType = keyof openTypeKeys["weapp"] | keyof openTypeKeys["alipay"] | keyof openTypeKeys["qq"]
225
+ type OpenType = keyof openTypeKeys["weapp"] | keyof openTypeKeys["alipay"] | keyof openTypeKeys["qq"]
226
226
  /** open-type 的合法值 */
227
227
  interface openTypeKeys {
228
228
  weapp: {
@@ -297,7 +297,7 @@ declare namespace ButtonProps {
297
297
  }
298
298
  }
299
299
  /** lang 的合法值 */
300
- interface lang {
300
+ interface Lang {
301
301
  /** 英文 */
302
302
  en
303
303
  /** 简体中文 */
@@ -313,7 +313,7 @@ declare namespace ButtonProps {
313
313
  /** 头像 */
314
314
  avatarUrl: string
315
315
  /** 性别 */
316
- gender: keyof gender
316
+ gender: keyof Gender
317
317
  /** 省份,如:`Yunnan` */
318
318
  province: string
319
319
  /** 城市,如:`Dalian` */
@@ -336,7 +336,7 @@ declare namespace ButtonProps {
336
336
  }
337
337
 
338
338
  /** 性别的合法值 */
339
- interface gender {
339
+ interface Gender {
340
340
  /** 未知 */
341
341
  0
342
342
  /** 男 */
@@ -374,7 +374,7 @@ declare namespace ButtonProps {
374
374
  /** 按钮
375
375
  * @classification forms
376
376
  * @supported weapp, h5, rn
377
- * @example
377
+ * @example_react
378
378
  * ```tsx
379
379
  * export default class PageButton extends Component {
380
380
  * state = {
@@ -447,6 +447,79 @@ declare namespace ButtonProps {
447
447
  * }
448
448
  * }
449
449
  * ```
450
+ * @example_vue
451
+ * ```html
452
+ * <template>
453
+ * <view class="container">
454
+ * <button
455
+ * v-for="item in btn"
456
+ * :size="item.size ? item.size : ''"
457
+ * :type="item.type ? item.type : ''"
458
+ * :loading="item.loading ? item.loading : false"
459
+ * :disabled="item.disabled ? item.disabled : false"
460
+ * >
461
+ * {{ item.text }}
462
+ * </button>
463
+ * <button class="btn-max-w" :plain="true" type="primary">按钮</button>
464
+ * <button class="btn-max-w" :plain="true" type="primary" :disabled="true">不可点击的按钮</button>
465
+ * <button class="btn-max-w" :plain="true">按钮</button>
466
+ * <button class="btn-max-w" :plain="true" :disabled="true">按钮</button>
467
+ * <button size="mini" type="primary">按钮</button>
468
+ * <button size="mini" >按钮</button>
469
+ * <button size="mini" type="warn">按钮</button>
470
+ * </view>
471
+ * </template>
472
+ *
473
+ * <script>
474
+ * export default {
475
+ * data() {
476
+ * return {
477
+ * btn: [
478
+ * {
479
+ * text: '页面主操作 Normal',
480
+ * size: 'default',
481
+ * type: 'primary'
482
+ * },
483
+ * {
484
+ * text: '页面主操作 Loading',
485
+ * size: 'default',
486
+ * type: 'primary',
487
+ * loading: true,
488
+ * },
489
+ * {
490
+ * text: '页面主操作 Disabled',
491
+ * size: 'default',
492
+ * type: 'primary',
493
+ * disabled: true,
494
+ * },
495
+ * {
496
+ * text: '页面次要操作 Normal',
497
+ * size: 'default',
498
+ * type: 'default'
499
+ * },
500
+ * {
501
+ * text: '页面次要操作 Disabled',
502
+ * size: 'default',
503
+ * type: 'default',
504
+ * disabled: true,
505
+ * },
506
+ * {
507
+ * text: '警告类操作 Normal',
508
+ * size: 'default',
509
+ * type: 'warn'
510
+ * },
511
+ * {
512
+ * text: '警告类操作 Disabled',
513
+ * size: 'default',
514
+ * type: 'warn',
515
+ * disabled: true,
516
+ * }
517
+ * ]
518
+ * }
519
+ * }
520
+ * }
521
+ * </script>
522
+ * ```
450
523
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/button.html
451
524
  */
452
525
  declare const Button: ComponentType<ButtonProps>
package/types/Camera.d.ts CHANGED
@@ -6,31 +6,31 @@ interface CameraProps extends StandardProps {
6
6
  * @default "normal"
7
7
  * @supported weapp, rn
8
8
  */
9
- mode?: keyof CameraProps.mode
9
+ mode?: keyof CameraProps.Mode
10
10
 
11
11
  /** 分辨率,不支持动态修改
12
12
  * @default "medium"
13
13
  * @supported weapp
14
14
  */
15
- resolution?: keyof CameraProps.resolution
15
+ resolution?: keyof CameraProps.Resolution
16
16
 
17
17
  /** 摄像头朝向
18
18
  * @default "back"
19
19
  * @supported weapp, rn
20
20
  */
21
- devicePosition?: keyof CameraProps.devicePosition
21
+ devicePosition?: keyof CameraProps.DevicePosition
22
22
 
23
23
  /** 闪光灯
24
24
  * @default "auto"
25
25
  * @supported weapp, rn
26
26
  */
27
- flash?: keyof CameraProps.flash
27
+ flash?: keyof CameraProps.Flash
28
28
 
29
29
  /** 指定期望的相机帧数据尺寸
30
30
  * @default "medium"
31
31
  * @supported weapp
32
32
  */
33
- frameSize?: keyof CameraProps.frameSize
33
+ frameSize?: keyof CameraProps.FrameSize
34
34
 
35
35
  /** 扫码识别区域,格式为[x, y, w, h],
36
36
  * x,y是相对于camera显示区域的左上角,
@@ -64,14 +64,14 @@ interface CameraProps extends StandardProps {
64
64
 
65
65
  declare namespace CameraProps {
66
66
  /** mode 的合法值 */
67
- interface mode {
67
+ interface Mode {
68
68
  /** 相机模式 */
69
69
  normal
70
70
  /** 扫码模式 */
71
71
  scanCode
72
72
  }
73
73
  /** resolution 的合法值 */
74
- interface resolution {
74
+ interface Resolution {
75
75
  /** 低 */
76
76
  low
77
77
  /** 中 */
@@ -80,14 +80,14 @@ declare namespace CameraProps {
80
80
  high
81
81
  }
82
82
  /** device-position 的合法值 */
83
- interface devicePosition {
83
+ interface DevicePosition {
84
84
  /** 前置 */
85
85
  front
86
86
  /** 后置 */
87
87
  back
88
88
  }
89
89
  /** flash 的合法值 */
90
- interface flash {
90
+ interface Flash {
91
91
  /** 自动 */
92
92
  auto
93
93
  /** 打开 */
@@ -98,7 +98,7 @@ declare namespace CameraProps {
98
98
  torch
99
99
  }
100
100
  /** frame-size 的合法值 */
101
- interface frameSize {
101
+ interface FrameSize {
102
102
  /** 小尺寸帧数据 */
103
103
  small
104
104
  /** 中尺寸帧数据 */
@@ -115,7 +115,7 @@ declare namespace CameraProps {
115
115
 
116
116
  /** 系统相机
117
117
  * @classification media
118
- * @supported weapp
118
+ * @supported weapp, rn
119
119
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/camera.html
120
120
  */
121
121
  declare const Camera: ComponentType<CameraProps>
package/types/Canvas.d.ts CHANGED
@@ -47,6 +47,11 @@ interface CanvasProps extends StandardProps<any, CanvasTouchEvent> {
47
47
  * @supported weapp
48
48
  */
49
49
  onError?: CommonEventFunction<CanvasProps.onErrorEventDetail>
50
+
51
+ /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
52
+ * @supported h5
53
+ */
54
+ nativeProps?: Record<string, unknown>
50
55
  }
51
56
 
52
57
  declare namespace CanvasProps {
@@ -60,16 +65,24 @@ declare namespace CanvasProps {
60
65
  * `<Canvas />` 组件的 RN 版本尚未实现。
61
66
  * @classification canvas
62
67
  * @supported weapp
63
- * @example
68
+ * @example_react
64
69
  * ```tsx
65
70
  * class App extends Components {
66
71
  * render () {
72
+ * // 如果是支付宝小程序,则要加上 id 属性,值和canvasId一致
67
73
  * return (
68
74
  * <Canvas style='width: 300px; height: 200px;' canvasId='canvas' />
69
75
  * )
70
76
  * }
71
77
  * }
72
78
  * ```
79
+ * @example_vue
80
+ * ```html
81
+ * <template>
82
+ * <!-- 如果是支付宝小程序,则要加上 id 属性,值和canvasId一致 -->
83
+ * <canvas style="width: 300px; height: 200px;" canvas-id="canvas" />
84
+ * </template>
85
+ * ```
73
86
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/canvas.html
74
87
  */
75
88
  declare const Canvas: ComponentType<CanvasProps>