@aochuang/common 1.0.0 → 1.0.126
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.
- package/common/index.js +13 -0
- package/common/loading/index.js +7 -0
- package/common/loading/loading.vue +71 -0
- package/common/resizable/index.js +3 -0
- package/common/resizable/resizable.vue +260 -0
- package/common/scroll-load-more/index.js +3 -0
- package/common/scroll-load-more/scroll-load-more.vue +397 -0
- package/common/static-map/index.js +3 -0
- package/common/static-map/static-map.vue +87 -0
- package/common/tips/index.js +7 -0
- package/common/tips/tips.vue +82 -0
- package/common/tooltip/index.js +7 -0
- package/common/tooltip/popper.js +18 -0
- package/common/tooltip/tooltip.vue +75 -0
- package/common/viewer/index.js +4 -0
- package/common/viewer/util.js +40 -0
- package/common/viewer/viewer.vue +607 -0
- package/common/viewer-pedestal/index.js +3 -0
- package/common/viewer-pedestal/viewer-pedestal.vue +70 -0
- package/common/voice/index.js +21 -0
- package/common/voice/util.js +18 -0
- package/common/voice/voice-player-aac.js +584 -0
- package/common/voice/voice-player-audio.js +159 -0
- package/common/voice/voice-player.js +309 -0
- package/common/voice/voice.vue +274 -0
- package/common/voice-player/index.js +3 -0
- package/common/voice-player/voice-player.vue +785 -0
- package/common/waterfall/index.js +3 -0
- package/common/waterfall/waterfall.vue +169 -0
- package/common/wechat-emoji/emoji/666.png +0 -0
- package/common/wechat-emoji/emoji/Emm.png +0 -0
- package/common/wechat-emoji/emoji/OK.png +0 -0
- package/common/wechat-emoji/emoji//344/272/262/344/272/262.png +0 -0
- package/common/wechat-emoji/emoji//344/276/277/344/276/277.png +0 -0
- package/common/wechat-emoji/emoji//345/201/267/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//345/202/262/346/205/242.png +0 -0
- package/common/wechat-emoji/emoji//345/206/215/350/247/201.png +0 -0
- package/common/wechat-emoji/emoji//345/207/213/350/260/242.png +0 -0
- package/common/wechat-emoji/emoji//345/210/240/351/231/244.png +0 -0
- package/common/wechat-emoji/emoji//345/212/240/346/262/271.png +0 -0
- package/common/wechat-emoji/emoji//345/213/276/345/274/225.png +0 -0
- package/common/wechat-emoji/emoji//345/217/221/345/221/206.png +0 -0
- package/common/wechat-emoji/emoji//345/217/221/346/200/222.png +0 -0
- package/common/wechat-emoji/emoji//345/217/221/346/212/226.png +0 -0
- package/common/wechat-emoji/emoji//345/217/257/346/200/234.png +0 -0
- package/common/wechat-emoji/emoji//345/217/263/345/223/274/345/223/274.png +0 -0
- package/common/wechat-emoji/emoji//345/217/271/346/260/224.png +0 -0
- package/common/wechat-emoji/emoji//345/220/203/347/223/234.png +0 -0
- package/common/wechat-emoji/emoji//345/220/210/345/215/201.png +0 -0
- package/common/wechat-emoji/emoji//345/220/220.png +0 -0
- package/common/wechat-emoji/emoji//345/220/220/350/210/214/345/244/264.png +0 -0
- package/common/wechat-emoji/emoji//345/221/262/347/211/231.png +0 -0
- package/common/wechat-emoji/emoji//345/222/222/351/252/202.png +0 -0
- package/common/wechat-emoji/emoji//345/222/226/345/225/241.png +0 -0
- package/common/wechat-emoji/emoji//345/223/207.png +0 -0
- package/common/wechat-emoji/emoji//345/223/210/346/254/240.png +0 -0
- package/common/wechat-emoji/emoji//345/225/244/351/205/222.png +0 -0
- package/common/wechat-emoji/emoji//345/230/230.png +0 -0
- package/common/wechat-emoji/emoji//345/230/264/345/224/207.png +0 -0
- package/common/wechat-emoji/emoji//345/230/277/345/223/210.png +0 -0
- package/common/wechat-emoji/emoji//345/233/247.png +0 -0
- package/common/wechat-emoji/emoji//345/233/260.png +0 -0
- package/common/wechat-emoji/emoji//345/235/217/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//345/244/247/345/223/255.png +0 -0
- package/common/wechat-emoji/emoji//345/244/251/345/225/212.png +0 -0
- package/common/wechat-emoji/emoji//345/244/252/351/230/263.png +0 -0
- package/common/wechat-emoji/emoji//345/244/261/346/234/233.png +0 -0
- package/common/wechat-emoji/emoji//345/245/213/346/226/227.png +0 -0
- package/common/wechat-emoji/emoji//345/245/270/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//345/245/275/347/232/204.png +0 -0
- package/common/wechat-emoji/emoji//345/247/224/345/261/210.png +0 -0
- package/common/wechat-emoji/emoji//345/256/263/347/276/236.png +0 -0
- package/common/wechat-emoji/emoji//345/260/264/345/260/254.png +0 -0
- package/common/wechat-emoji/emoji//345/267/246/345/223/274/345/223/274.png +0 -0
- package/common/wechat-emoji/emoji//345/272/206/347/245/235.png +0 -0
- package/common/wechat-emoji/emoji//345/274/261.png +0 -0
- package/common/wechat-emoji/emoji//345/274/272.png +0 -0
- package/common/wechat-emoji/emoji//345/276/227/346/204/217.png +0 -0
- package/common/wechat-emoji/emoji//345/276/256/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//345/277/203/347/242/216.png +0 -0
- package/common/wechat-emoji/emoji//345/277/253/345/223/255/344/272/206.png +0 -0
- package/common/wechat-emoji/emoji//346/200/204/347/201/253.png +0 -0
- package/common/wechat-emoji/emoji//346/201/220/346/203/247.png +0 -0
- package/common/wechat-emoji/emoji//346/202/240/351/227/262.png +0 -0
- package/common/wechat-emoji/emoji//346/203/212/346/201/220.png +0 -0
- package/common/wechat-emoji/emoji//346/203/212/350/256/266.png +0 -0
- package/common/wechat-emoji/emoji//346/204/211/345/277/253.png +0 -0
- package/common/wechat-emoji/emoji//346/206/250/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//346/211/223/350/204/270.png +0 -0
- package/common/wechat-emoji/emoji//346/212/223/347/213/202.png +0 -0
- package/common/wechat-emoji/emoji//346/212/240/351/274/273.png +0 -0
- package/common/wechat-emoji/emoji//346/212/261/346/213/263.png +0 -0
- package/common/wechat-emoji/emoji//346/213/245/346/212/261.png +0 -0
- package/common/wechat-emoji/emoji//346/213/263/345/244/264.png +0 -0
- package/common/wechat-emoji/emoji//346/215/202/350/204/270.png +0 -0
- package/common/wechat-emoji/emoji//346/217/241/346/211/213.png +0 -0
- package/common/wechat-emoji/emoji//346/222/207/345/230/264.png +0 -0
- package/common/wechat-emoji/emoji//346/223/246/346/261/227.png +0 -0
- package/common/wechat-emoji/emoji//346/225/262/346/211/223.png +0 -0
- package/common/wechat-emoji/emoji//346/227/240/350/257/255.png +0 -0
- package/common/wechat-emoji/emoji//346/227/272/346/237/264.png +0 -0
- package/common/wechat-emoji/emoji//346/231/225.png +0 -0
- package/common/wechat-emoji/emoji//346/234/210/344/272/256.png +0 -0
- package/common/wechat-emoji/emoji//346/234/272/346/231/272.png +0 -0
- package/common/wechat-emoji/emoji//346/261/227.png +0 -0
- package/common/wechat-emoji/emoji//346/265/201/346/261/227.png +0 -0
- package/common/wechat-emoji/emoji//346/265/201/346/263/252.png +0 -0
- package/common/wechat-emoji/emoji//347/202/270/345/274/271.png +0 -0
- package/common/wechat-emoji/emoji//347/203/237/350/212/261.png +0 -0
- package/common/wechat-emoji/emoji//347/210/206/347/253/271.png +0 -0
- package/common/wechat-emoji/emoji//347/210/261/345/277/203.png +0 -0
- package/common/wechat-emoji/emoji//347/214/252/345/244/264.png +0 -0
- package/common/wechat-emoji/emoji//347/216/253/347/221/260.png +0 -0
- package/common/wechat-emoji/emoji//347/224/237/347/227/205.png +0 -0
- package/common/wechat-emoji/emoji//347/226/221/351/227/256.png +0 -0
- package/common/wechat-emoji/emoji//347/231/274.png +0 -0
- package/common/wechat-emoji/emoji//347/231/275/347/234/274.png +0 -0
- package/common/wechat-emoji/emoji//347/232/261/347/234/211.png +0 -0
- package/common/wechat-emoji/emoji//347/235/241.png +0 -0
- package/common/wechat-emoji/emoji//347/240/264/346/266/225/344/270/272/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//347/244/274/347/211/251.png +0 -0
- package/common/wechat-emoji/emoji//347/244/276/344/274/232/347/244/276/344/274/232.png +0 -0
- package/common/wechat-emoji/emoji//347/246/217.png +0 -0
- package/common/wechat-emoji/emoji//347/254/221/350/204/270.png +0 -0
- package/common/wechat-emoji/emoji//347/272/242/345/214/205.png +0 -0
- package/common/wechat-emoji/emoji//347/277/273/347/231/275/347/234/274.png +0 -0
- package/common/wechat-emoji/emoji//350/200/266.png +0 -0
- package/common/wechat-emoji/emoji//350/203/234/345/210/251.png +0 -0
- package/common/wechat-emoji/emoji//350/204/270/347/272/242.png +0 -0
- package/common/wechat-emoji/emoji//350/211/262.png +0 -0
- package/common/wechat-emoji/emoji//350/213/246/346/266/251.png +0 -0
- package/common/wechat-emoji/emoji//350/217/234/345/210/200.png +0 -0
- package/common/wechat-emoji/emoji//350/233/213/347/263/225.png +0 -0
- package/common/wechat-emoji/emoji//350/241/260.png +0 -0
- package/common/wechat-emoji/emoji//350/243/202/345/274/200.png +0 -0
- package/common/wechat-emoji/emoji//350/245/277/347/223/234.png +0 -0
- package/common/wechat-emoji/emoji//350/256/251/346/210/221/347/234/213/347/234/213.png +0 -0
- package/common/wechat-emoji/emoji//350/260/203/347/232/256.png +0 -0
- package/common/wechat-emoji/emoji//350/267/263/350/267/263.png +0 -0
- package/common/wechat-emoji/emoji//350/275/254/345/234/210.png +0 -0
- package/common/wechat-emoji/emoji//351/204/231/350/247/206.png +0 -0
- package/common/wechat-emoji/emoji//351/227/255/345/230/264.png +0 -0
- package/common/wechat-emoji/emoji//351/230/264/351/231/251.png +0 -0
- package/common/wechat-emoji/emoji//351/232/276/350/277/207.png +0 -0
- package/common/wechat-emoji/emoji//351/252/267/351/253/205.png +0 -0
- package/common/wechat-emoji/emoji//351/254/274/350/204/270.png +0 -0
- package/common/wechat-emoji/emoji//351/270/241.png +0 -0
- package/common/wechat-emoji/emoji//351/274/223/346/216/214.png +0 -0
- package/common/wechat-emoji/index.js +14 -0
- package/common/wechat-emoji/order.json +111 -0
- package/common/wechat-emoji/utils.js +52 -0
- package/common/wechat-emoji/wechat-emoji.vue +74 -0
- package/common/wechat-emoji-select/index.js +3 -0
- package/common/wechat-emoji-select/wechat-emoji-select.vue +67 -0
- package/components/advanced-filter/advanced-filter-condition-item/advanced-filter-condition-item-boolean.vue +33 -0
- package/components/advanced-filter/advanced-filter-condition-item/advanced-filter-condition-item-date-range.vue +30 -0
- package/components/advanced-filter/advanced-filter-condition-item/advanced-filter-condition-item-date.vue +41 -0
- package/components/advanced-filter/advanced-filter-condition-item/advanced-filter-condition-item-datetime-range.vue +34 -0
- package/components/advanced-filter/advanced-filter-condition-item/advanced-filter-condition-item-datetime.vue +41 -0
- package/components/advanced-filter/advanced-filter-condition-item/advanced-filter-condition-item-number-range.vue +67 -0
- package/components/advanced-filter/advanced-filter-condition-item/advanced-filter-condition-item-number.vue +35 -0
- package/components/advanced-filter/advanced-filter-condition-item/advanced-filter-condition-item-string.vue +41 -0
- package/components/advanced-filter/advanced-filter-condition-item/advanced-filter-condition-item-value.vue +73 -0
- package/components/advanced-filter/advanced-filter-condition-item/advanced-filter-condition-item.vue +226 -0
- package/components/advanced-filter/advanced-filter-condition-toggle.vue +112 -0
- package/components/advanced-filter/advanced-filter-condition.vue +352 -0
- package/components/advanced-filter/advanced-filter-permanent-item.vue +10 -0
- package/components/advanced-filter/advanced-filter-permanent.vue +10 -0
- package/components/advanced-filter/advanced-filter-scene-form.vue +95 -0
- package/components/advanced-filter/advanced-filter-scene-item.vue +64 -0
- package/components/advanced-filter/advanced-filter-scene-manage.vue +264 -0
- package/components/advanced-filter/advanced-filter-scene-transfer.vue +283 -0
- package/components/advanced-filter/advanced-filter-scene.vue +199 -0
- package/components/advanced-filter/advanced-filter.vue +119 -0
- package/components/advanced-filter/index.js +35 -0
- package/components/advanced-filter/utils.js +132 -0
- package/components/autocomplete/autocomplete.vue +121 -0
- package/components/autocomplete/index.js +7 -0
- package/components/avatar/avatar.png +0 -0
- package/components/avatar/avatar.vue +216 -0
- package/components/avatar/index.js +7 -0
- package/components/brick-wall/brick-wall-skeleton.vue +125 -0
- package/components/brick-wall/brick-wall.vue +293 -0
- package/components/brick-wall/index.js +7 -0
- package/components/button/button.vue +550 -0
- package/components/button/index.js +7 -0
- package/components/button/utils.js +20 -0
- package/components/cascader/cascader.vue +184 -0
- package/components/cascader/index.js +7 -0
- package/components/cascader/util.js +50 -0
- package/components/checkbox/checkbox.vue +114 -0
- package/components/checkbox/index.js +7 -0
- package/components/checkbox-button/index.js +8 -0
- package/components/checkbox-group/checkbox-group.vue +11 -0
- package/components/checkbox-group/index.js +7 -0
- package/components/date-picker/date-picker.vue +307 -0
- package/components/date-picker/index.js +7 -0
- package/components/dialog/dialog.vue +187 -0
- package/components/dialog/index.js +14 -0
- package/components/dialog/utils.js +20 -0
- package/components/drawer/drawer.vue +186 -0
- package/components/drawer/index.js +14 -0
- package/components/drawer/utils.js +36 -0
- package/components/dropdown/dropdown-item.vue +71 -0
- package/components/dropdown/dropdown.vue +326 -0
- package/components/dropdown/index.js +16 -0
- package/components/empty/empty.vue +89 -0
- package/components/empty/index.js +7 -0
- package/components/filter/filter-group.vue +44 -0
- package/components/filter/filter-item.vue +122 -0
- package/components/filter/filter-more.vue +114 -0
- package/components/filter/filter.vue +407 -0
- package/components/filter/index.js +20 -0
- package/components/filter/refresh-line.svg +1 -0
- package/components/filter/util.js +5 -0
- package/components/form/form-cell.vue +231 -0
- package/components/form/form-group.vue +147 -0
- package/components/form/form-row.vue +51 -0
- package/components/form/form.vue +287 -0
- package/components/form/index.js +24 -0
- package/components/grid/grid-card-view/grid-card-view.vue +157 -0
- package/components/grid/grid-column.vue +137 -0
- package/components/grid/grid-filter/grid-filter-group.vue +41 -0
- package/components/grid/grid-filter/grid-filter-item.vue +68 -0
- package/components/grid/grid-filter/grid-filter.vue +115 -0
- package/components/grid/grid-filter/util.js +7 -0
- package/components/grid/grid-filter-operate/grid-filter-operate-item.vue +55 -0
- package/components/grid/grid-filter-operate/grid-filter-operate.vue +46 -0
- package/components/grid/grid-sort/grid-sort-proxy.js +27 -0
- package/components/grid/grid-sort/grid-sort.vue +205 -0
- package/components/grid/grid-sort/icons/asc.png +0 -0
- package/components/grid/grid-sort/icons/desc.png +0 -0
- package/components/grid/grid-sort/index.js +7 -0
- package/components/grid/grid-table-view/grid-table-view.vue +178 -0
- package/components/grid/grid-table.vue +549 -0
- package/components/grid/grid-toolbar/grid-batch-toolbar-proxy.js +21 -0
- package/components/grid/grid-toolbar/grid-batch-toolbar.vue +129 -0
- package/components/grid/grid-toolbar/grid-global-toolbar-proxy.js +21 -0
- package/components/grid/grid-toolbar/grid-global-toolbar.vue +37 -0
- package/components/grid/grid-toolbar/grid-more-toolbar-proxy.js +21 -0
- package/components/grid/grid-toolbar/grid-more-toolbar.vue +138 -0
- package/components/grid/grid-toolbar/grid-row-toolbar.vue +279 -0
- package/components/grid/grid-view-select.vue +78 -0
- package/components/grid/grid.vue +1114 -0
- package/components/grid/icons/more-line.svg +1 -0
- package/components/grid/icons/refresh.svg +14 -0
- package/components/grid/index.js +60 -0
- package/components/grid/util.js +31 -0
- package/components/icon/demo.css +539 -0
- package/components/icon/demo_index.html +9112 -0
- package/components/icon/icon.vue +96 -0
- package/components/icon/iconfont.css +1567 -0
- package/components/icon/iconfont.eot +0 -0
- package/components/icon/iconfont.js +1 -0
- package/components/icon/iconfont.json +2725 -0
- package/components/icon/iconfont.svg +455 -0
- package/components/icon/iconfont.ttf +0 -0
- package/components/icon/iconfont.woff +0 -0
- package/components/icon/iconfont.woff2 +0 -0
- package/components/icon/index.js +7 -0
- package/components/image/image.vue +377 -0
- package/components/image/index.js +14 -0
- package/components/image/util.js +107 -0
- package/components/index.js +157 -0
- package/components/loading/index.js +7 -0
- package/components/loading/loading.vue +130 -0
- package/components/menu/index.js +20 -0
- package/components/menu/menu-group.vue +245 -0
- package/components/menu/menu-item.vue +269 -0
- package/components/menu/menu.vue +64 -0
- package/components/message/index.js +19 -0
- package/components/message/message.js +31 -0
- package/components/message/message.less +6 -0
- package/components/message-box/index.js +14 -0
- package/components/message-box/message-box.js +140 -0
- package/components/message-box/message-box.less +5 -0
- package/components/pagination/index.js +7 -0
- package/components/pagination/pagination.vue +197 -0
- package/components/panel/index.js +7 -0
- package/components/panel/panel.vue +44 -0
- package/components/popover/index.js +7 -0
- package/components/popover/popover.vue +163 -0
- package/components/popup-select/index.js +7 -0
- package/components/popup-select/popup-select.vue +114 -0
- package/components/radio/index.js +7 -0
- package/components/radio/radio.vue +92 -0
- package/components/radio-button/index.js +7 -0
- package/components/radio-button/radio-button.vue +20 -0
- package/components/radio-group/index.js +7 -0
- package/components/radio-group/radio-group.vue +22 -0
- package/components/searchbox/index.js +7 -0
- package/components/searchbox/searchbox.vue +272 -0
- package/components/select/index.js +11 -0
- package/components/select/select-load-more.vue +53 -0
- package/components/select/select.vue +578 -0
- package/components/skeleton/index.js +16 -0
- package/components/skeleton/skeleton-rows.vue +52 -0
- package/components/skeleton/skeleton.vue +72 -0
- package/components/sortable/index.js +11 -0
- package/components/sortable/sortable-item.vue +77 -0
- package/components/sortable/sortable.vue +67 -0
- package/components/spinner/index.js +7 -0
- package/components/spinner/spinner.vue +121 -0
- package/components/spinner-range/index.js +7 -0
- package/components/spinner-range/spinner-range.vue +97 -0
- package/components/spinner-textarea/index.js +7 -0
- package/components/spinner-textarea/spinner-textarea.vue +65 -0
- package/components/switch/index.js +7 -0
- package/components/switch/switch.vue +105 -0
- package/components/tabbar/index.js +9 -0
- package/components/tabbar/tabbar-item.vue +162 -0
- package/components/tabbar/tabbar.vue +49 -0
- package/components/tabs/index.js +12 -0
- package/components/tabs/tabs.vue +120 -0
- package/components/tag/index.js +9 -0
- package/components/tag/tag.less +39 -0
- package/components/text/index.js +7 -0
- package/components/text/text.vue +69 -0
- package/components/textarea/index.js +7 -0
- package/components/textarea/textarea.vue +245 -0
- package/components/textbox/index.js +7 -0
- package/components/textbox/textbox.vue +275 -0
- package/components/time-picker/index.js +7 -0
- package/components/time-picker/time-picker.vue +84 -0
- package/components/toolbar/index.js +16 -0
- package/components/toolbar/toolbar-item.vue +43 -0
- package/components/toolbar/toolbar.vue +81 -0
- package/components/tooltip/index.js +9 -0
- package/components/tooltip/tooltip.vue +86 -0
- package/components/transfer/index.js +7 -0
- package/components/transfer/transfer-element.vue +109 -0
- package/components/transfer/transfer-load-more.vue +53 -0
- package/components/transfer/transfer.vue +260 -0
- package/components/tree/index.js +7 -0
- package/components/tree/tree.vue +485 -0
- package/components/tree/utils.js +122 -0
- package/components/video/index.js +7 -0
- package/components/video/video.vue +101 -0
- package/package.json +15 -1
- package/uni-common/more-button/more-button.vue +23 -0
- package/uni-common/popup-select/popup-select.vue +217 -0
- package/uni-common/portray/portray.vue +54 -0
- package/uni-common/refresh-view/refresh-view.vue +94 -0
- package/uni-common/scroll-load-more/scroll-load-more.vue +201 -0
- package/uni-common/tree-popup-select/index.js +3 -0
- package/uni-common/tree-popup-select/tree-popup-select-panel.vue +92 -0
- package/uni-common/tree-popup-select/tree-popup-select.vue +124 -0
- package/uni-common/tree-popup-select/util.js +19 -0
- package/uni-common/wechat-emoji/index.js +13 -0
- package/uni-common/wechat-emoji/order.json +438 -0
- package/uni-common/wechat-emoji/utils.js +52 -0
- package/uni-common/wechat-emoji/wechat-emoji.vue +74 -0
- package/uni-components/avatar/avatar.vue +81 -0
- package/uni-components/badge/badge.vue +57 -0
- package/uni-components/empty/empty.vue +27 -0
- package/uni-components/exception/exception.vue +47 -0
- package/uni-components/icon/demo.css +539 -0
- package/uni-components/icon/demo_index.html +1591 -0
- package/uni-components/icon/icon.vue +48 -0
- package/uni-components/icon/iconfont.css +259 -0
- package/uni-components/icon/iconfont.js +1 -0
- package/uni-components/icon/iconfont.json +436 -0
- package/uni-components/icon/iconfont.ttf +0 -0
- package/uni-components/icon/iconfont.woff +0 -0
- package/uni-components/icon/iconfont.woff2 +0 -0
- package/uni-components/icon/index.js +3 -0
- package/uni-components/image/image.vue +38 -0
- package/uni-components/image/index.js +3 -0
- package/uni-components/loading/index.js +3 -0
- package/uni-components/loading/loading.vue +30 -0
- package/uni-components/message/message-item.vue +29 -0
- package/uni-components/message/message.js +80 -0
- package/uni-components/message/message.vue +30 -0
- package/uni-components/message-box/message-box-item.vue +54 -0
- package/uni-components/message-box/message-box.js +91 -0
- package/uni-components/message-box/message-box.vue +52 -0
- package/uni-components/picker/picker.vue +270 -0
- package/uni-components/popup/index.js +3 -0
- package/uni-components/popup/popup.vue +143 -0
- package/uni-components/search/index.js +3 -0
- package/uni-components/search/search.vue +86 -0
- package/uni-components/skeleton/skeleton-chat.vue +85 -0
- package/uni-components/skeleton/skeleton-contact.vue +84 -0
- package/uni-components/skeleton/skeleton-detail.vue +84 -0
- package/uni-components/skeleton/skeleton.vue +32 -0
- package/uni-components/tabbar/tabbar-item.vue +33 -0
- package/uni-components/tabbar/tabbar.vue +87 -0
- package/uni-components/tree/index.js +3 -0
- package/uni-components/tree/tree-select-loading.vue +48 -0
- package/uni-components/tree/tree-select-node.vue +202 -0
- package/uni-components/tree/tree-select-store.js +520 -0
- package/uni-components/tree/tree-select.vue +210 -0
- package/uni-components/tree/utils.js +33 -0
- package/uni-components/video/index.js +3 -0
- package/uni-components/video/video.vue +29 -0
- package/uni-components/voice/index.js +3 -0
- package/uni-components/voice/voice.vue +24 -0
- package/uni-components/waterfall/index.js +3 -0
- package/uni-components/waterfall/util.js +72 -0
- package/uni-components/waterfall/waterfall.vue +147 -0
- package/utils/data.js +128 -0
- package/utils/date.js +495 -0
- package/utils/dom.js +37 -0
- package/utils/emitter.js +3 -0
- package/utils/event.js +92 -0
- package/utils/file.js +76 -0
- package/utils/json.js +40 -0
- package/utils/network-detector.js +258 -0
- package/utils/oss.js +11 -0
- package/utils/resize-event.js +35 -0
- package/utils/share-message.js +81 -0
- package/utils/share-websocket.js +127 -0
- package/utils/string.js +59 -0
- package/utils/time-task.js +60 -0
- package/utils/url.js +46 -0
- package/utils/util.js +427 -0
- package/utils/utils.js +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 通过原生audio实现播放音频
|
|
3
|
+
* 注意仅支持视频源是mpr3格式,主要用于微聊天记录离线播放场景,离线不支持ajax获取文件解析
|
|
4
|
+
*/
|
|
5
|
+
export default class VoicePlayerAudio {
|
|
6
|
+
constructor (options) {
|
|
7
|
+
this.options = Object.assign({}, {
|
|
8
|
+
playRate: 1,
|
|
9
|
+
onPlaying: null,
|
|
10
|
+
onEnded: null,
|
|
11
|
+
onPlay: null,
|
|
12
|
+
onError: null,
|
|
13
|
+
onPause: null
|
|
14
|
+
}, options)
|
|
15
|
+
// 创建音频元素
|
|
16
|
+
this.$audio = document.createElement('audio')
|
|
17
|
+
this.$audio.autoplay = false
|
|
18
|
+
this.$audio.onplaying = () => {
|
|
19
|
+
const totalPosition = this.$audio.duration
|
|
20
|
+
clearInterval(this._timer)
|
|
21
|
+
this._timer = setInterval(() => {
|
|
22
|
+
if (!this._play) {
|
|
23
|
+
return
|
|
24
|
+
}
|
|
25
|
+
const currPosition = this.$audio.currentTime
|
|
26
|
+
this.options.onPlaying && this.options.onPlaying({
|
|
27
|
+
currPosition: Math.min(currPosition, totalPosition),
|
|
28
|
+
totalPosition: totalPosition
|
|
29
|
+
})
|
|
30
|
+
if (currPosition >= totalPosition) {
|
|
31
|
+
clearInterval(this._timer)
|
|
32
|
+
}
|
|
33
|
+
}, 100)
|
|
34
|
+
}
|
|
35
|
+
this.$audio.onplay = () => {
|
|
36
|
+
this.options.onPlay && this.options.onPlay()
|
|
37
|
+
}
|
|
38
|
+
this.$audio.onended = () => {
|
|
39
|
+
// 有时候还没播放完就触发了这个事件,导致进度条有问题
|
|
40
|
+
this.options.onPlaying && this.options.onPlaying({
|
|
41
|
+
currPosition: Math.min(this.$audio.currentTime, this.$audio.duration),
|
|
42
|
+
totalPosition: this.$audio.duration
|
|
43
|
+
})
|
|
44
|
+
clearInterval(this._timer)
|
|
45
|
+
this.stop()
|
|
46
|
+
}
|
|
47
|
+
this.$audio.addEventListener('stop', () => {
|
|
48
|
+
clearInterval(this._timer)
|
|
49
|
+
this.options.onEnded && this.options.onEnded()
|
|
50
|
+
})
|
|
51
|
+
this.$audio.onerror = () => {
|
|
52
|
+
clearInterval(this._timer)
|
|
53
|
+
this.options.onError && this.options.onError({
|
|
54
|
+
url: this._url,
|
|
55
|
+
message: 'Invalid Url'
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
this.setPlaybackRate(this.options.playRate)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 设置播放倍率
|
|
63
|
+
*/
|
|
64
|
+
setPlaybackRate (rate) {
|
|
65
|
+
if (typeof rate !== 'number') {
|
|
66
|
+
throw new Error('必须是整型')
|
|
67
|
+
}
|
|
68
|
+
this.stop()
|
|
69
|
+
this._playbackRate = rate
|
|
70
|
+
this.$audio.playbackRate = rate
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 设置播放进度
|
|
75
|
+
*/
|
|
76
|
+
setPosition (position) {
|
|
77
|
+
if (position === this._currPosition) {
|
|
78
|
+
return
|
|
79
|
+
}
|
|
80
|
+
this._currPosition = position
|
|
81
|
+
this.$audio.currentTime = position
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 设置播放url地址
|
|
86
|
+
*/
|
|
87
|
+
setUrl (url, cb) {
|
|
88
|
+
const play = this._play
|
|
89
|
+
this._url = url
|
|
90
|
+
if (!url) {
|
|
91
|
+
this.stop()
|
|
92
|
+
}
|
|
93
|
+
this.$audio.src = url
|
|
94
|
+
if (play) {
|
|
95
|
+
this.start()
|
|
96
|
+
}
|
|
97
|
+
const eventCb = () => {
|
|
98
|
+
cb && cb({
|
|
99
|
+
duration: this.$audio.duration,
|
|
100
|
+
status: 'success'
|
|
101
|
+
})
|
|
102
|
+
this.$audio.removeEventListener('loadedmetadata', eventCb)
|
|
103
|
+
}
|
|
104
|
+
this.$audio.addEventListener('loadedmetadata', eventCb)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 开始播放
|
|
109
|
+
*/
|
|
110
|
+
start () {
|
|
111
|
+
if (this._play) {
|
|
112
|
+
return
|
|
113
|
+
}
|
|
114
|
+
this._play = true
|
|
115
|
+
this.$audio.play()
|
|
116
|
+
this.$audio.playbackRate = this._playbackRate
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* 停止播放
|
|
121
|
+
*/
|
|
122
|
+
stop (callback) {
|
|
123
|
+
if (!this._play) {
|
|
124
|
+
callback && callback()
|
|
125
|
+
return
|
|
126
|
+
}
|
|
127
|
+
this._play = false
|
|
128
|
+
this.$audio.pause()
|
|
129
|
+
this.$audio.currentTime = 0
|
|
130
|
+
// 手动创建并派发自定义stop事件
|
|
131
|
+
this.$audio.dispatchEvent(new Event('stop'))
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* 暂停播放
|
|
136
|
+
*/
|
|
137
|
+
pause () {
|
|
138
|
+
this._play = false
|
|
139
|
+
this.$audio.pause()
|
|
140
|
+
this.options.onPause && this.options.onPause()
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* 恢复播放
|
|
145
|
+
*/
|
|
146
|
+
resume () {
|
|
147
|
+
this._play = true
|
|
148
|
+
this.$audio.play()
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* 销毁
|
|
153
|
+
*/
|
|
154
|
+
destroy () {
|
|
155
|
+
this.stop()
|
|
156
|
+
this.$audio.remove()
|
|
157
|
+
clearInterval(this._timer)
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { loadScript } from '../../utils/file'
|
|
2
|
+
import { getBenzAMRRecorderLibPath } from './util'
|
|
3
|
+
/**
|
|
4
|
+
* 通过第三方库解析音频文件进行播放
|
|
5
|
+
* 由于电话这种音频不同设备上生成的格式不一样,ios是amr格式,而andorid是mp3格式,同时html5不支持amr格式,所以需要转码播放
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
function loadAmrRecorder () {
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
if (window.BenzAMRRecorder) {
|
|
11
|
+
resolve(window.BenzAMRRecorder)
|
|
12
|
+
} else {
|
|
13
|
+
return loadScript(getBenzAMRRecorderLibPath()).then(() => {
|
|
14
|
+
resolve(window.BenzAMRRecorder)
|
|
15
|
+
}, reject)
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default class VoicePlayer {
|
|
21
|
+
_url = null
|
|
22
|
+
_play = false
|
|
23
|
+
_currPosition = 0
|
|
24
|
+
_playbackRate = 1
|
|
25
|
+
_onUrlChange = null
|
|
26
|
+
_onPlayChange = null
|
|
27
|
+
|
|
28
|
+
constructor (options) {
|
|
29
|
+
this.options = Object.assign({}, {
|
|
30
|
+
playRate: 1,
|
|
31
|
+
onPlaying: null,
|
|
32
|
+
onEnded: null,
|
|
33
|
+
onPlay: null,
|
|
34
|
+
onError: null,
|
|
35
|
+
onPause: null
|
|
36
|
+
}, options)
|
|
37
|
+
this._timer = null
|
|
38
|
+
this._totalPosition = null
|
|
39
|
+
this.setPlaybackRate(this.options.playRate)
|
|
40
|
+
loadAmrRecorder().then((BenzAMRRecorder) => {
|
|
41
|
+
let _instance = null
|
|
42
|
+
const _checkPlay = () => {
|
|
43
|
+
this._totalPosition = _instance.getDuration()
|
|
44
|
+
clearInterval(this._timer)
|
|
45
|
+
this._timer = setInterval(() => {
|
|
46
|
+
if (!_instance.isPlaying()) {
|
|
47
|
+
clearTimeout(this._timer)
|
|
48
|
+
return
|
|
49
|
+
}
|
|
50
|
+
this._currPosition = _instance.getCurrentPosition() * this._playbackRate
|
|
51
|
+
// console.log(this._currPosition, _instance._isPlaying)
|
|
52
|
+
const surplus = this._totalPosition - this._currPosition
|
|
53
|
+
if (surplus < 0.1) {
|
|
54
|
+
this._currPosition += surplus
|
|
55
|
+
}
|
|
56
|
+
if (this._currPosition <= this._totalPosition) {
|
|
57
|
+
this._onPlaying({
|
|
58
|
+
currPosition: this._currPosition,
|
|
59
|
+
totalPosition: this._totalPosition
|
|
60
|
+
})
|
|
61
|
+
if (this._currPosition === this._totalPosition) {
|
|
62
|
+
clearInterval(this._timer)
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
clearInterval(this._timer)
|
|
66
|
+
}
|
|
67
|
+
}, 100)
|
|
68
|
+
this.options.onPlay && this.options.onPlay()
|
|
69
|
+
}
|
|
70
|
+
const _checkUrl = (cb) => {
|
|
71
|
+
this._totalPosition = 0
|
|
72
|
+
this._currPosition = 0
|
|
73
|
+
clearTimeout(this._timer)
|
|
74
|
+
if (!this._url) {
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
if (_instance) {
|
|
78
|
+
_instance.onPlay(() => {})
|
|
79
|
+
_instance.onEnded(() => {})
|
|
80
|
+
_instance.stop()
|
|
81
|
+
}
|
|
82
|
+
_instance = new BenzAMRRecorder()
|
|
83
|
+
_instance.initWithUrl(this._url).then(() => {
|
|
84
|
+
if (this._play) {
|
|
85
|
+
_instance.play()
|
|
86
|
+
_instance.setPosition(this._currPosition)
|
|
87
|
+
}
|
|
88
|
+
this._totalPosition = _instance.getDuration()
|
|
89
|
+
cb({
|
|
90
|
+
status: 'success',
|
|
91
|
+
duration: this._totalPosition
|
|
92
|
+
})
|
|
93
|
+
}, (err) => {
|
|
94
|
+
this.options.onError && this.options.onError({
|
|
95
|
+
url: this._url,
|
|
96
|
+
message: err.message
|
|
97
|
+
})
|
|
98
|
+
cb({
|
|
99
|
+
status: 'error',
|
|
100
|
+
message: err.message
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
_instance.onCreatedRecrod((evt) => {
|
|
104
|
+
evt.playbackRateValue = this._playbackRate
|
|
105
|
+
})
|
|
106
|
+
_instance.onResume(() => {
|
|
107
|
+
_checkPlay()
|
|
108
|
+
})
|
|
109
|
+
_instance.onPause(() => {
|
|
110
|
+
clearTimeout(this._timer)
|
|
111
|
+
this.options.onPause && this.options.onPause()
|
|
112
|
+
})
|
|
113
|
+
_instance.onPlay(() => {
|
|
114
|
+
_checkPlay()
|
|
115
|
+
})
|
|
116
|
+
_instance.onStop(() => {
|
|
117
|
+
this._play = false
|
|
118
|
+
this.options.onEnded && this.options.onEnded()
|
|
119
|
+
if (this._onStopCallback) {
|
|
120
|
+
this._onStopCallback()
|
|
121
|
+
this._onStopCallback = null
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
}
|
|
125
|
+
this._onPlayChange = (type) => {
|
|
126
|
+
clearInterval(this._timer)
|
|
127
|
+
if (_instance && _instance.isInit()) {
|
|
128
|
+
if (type === 'stop') {
|
|
129
|
+
_instance.stop()
|
|
130
|
+
} else if (type === 'play') {
|
|
131
|
+
_instance.play()
|
|
132
|
+
} else if (type === 'pause') {
|
|
133
|
+
_instance.pause()
|
|
134
|
+
} else if (type === 'resume') {
|
|
135
|
+
_instance.resume()
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
this._onUrlChange = (cb) => {
|
|
140
|
+
_checkUrl(cb)
|
|
141
|
+
}
|
|
142
|
+
this._onPositionChange = ({ position }) => {
|
|
143
|
+
if (_instance && _instance.isPlaying()) {
|
|
144
|
+
_instance.setPosition(position)
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
this._onPlaying = (evt) => {
|
|
148
|
+
this.options.onPlaying && this.options.onPlaying(evt)
|
|
149
|
+
}
|
|
150
|
+
this._onGetRawData = () => {
|
|
151
|
+
if (!_instance) {
|
|
152
|
+
return
|
|
153
|
+
}
|
|
154
|
+
return _instance._rawData
|
|
155
|
+
}
|
|
156
|
+
_checkUrl()
|
|
157
|
+
})
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
setPlaybackRate (rate) {
|
|
161
|
+
if (typeof rate !== 'number') {
|
|
162
|
+
throw new Error('必须是整型')
|
|
163
|
+
}
|
|
164
|
+
this._playbackRate = rate
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
setPosition (position) {
|
|
168
|
+
if (position === this._currPosition) {
|
|
169
|
+
return
|
|
170
|
+
}
|
|
171
|
+
this._currPosition = position
|
|
172
|
+
this._onPositionChange && this._onPositionChange({
|
|
173
|
+
position
|
|
174
|
+
})
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
ajax (url) {
|
|
178
|
+
return new Promise((resolve, reject) => {
|
|
179
|
+
var xhr = new XMLHttpRequest()
|
|
180
|
+
xhr.open('GET', url, true)
|
|
181
|
+
xhr.responseType = 'arraybuffer'
|
|
182
|
+
xhr.onload = function () {
|
|
183
|
+
resolve(this.response)
|
|
184
|
+
}
|
|
185
|
+
xhr.onerror = () => {
|
|
186
|
+
reject(new Error('Failed to fetch ' + url))
|
|
187
|
+
}
|
|
188
|
+
xhr.send()
|
|
189
|
+
})
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
getRawData () {
|
|
193
|
+
return this._onGetRawData && this._onGetRawData()
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
convertToWavByBuffer (buffer) {
|
|
197
|
+
return new Promise((resolve, reject) => {
|
|
198
|
+
loadAmrRecorder().then((BenzAMRRecorder) => {
|
|
199
|
+
const _instance = new BenzAMRRecorder()
|
|
200
|
+
_instance._runAMRWorker({
|
|
201
|
+
command: 'toWAV',
|
|
202
|
+
buffer
|
|
203
|
+
}, (rs) => {
|
|
204
|
+
if (!rs) {
|
|
205
|
+
reject('解码失败')
|
|
206
|
+
} else {
|
|
207
|
+
const wav = new Blob([rs], {
|
|
208
|
+
type: 'audio/wav'
|
|
209
|
+
})
|
|
210
|
+
resolve(wav)
|
|
211
|
+
}
|
|
212
|
+
})
|
|
213
|
+
}, reject)
|
|
214
|
+
})
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
convertToWavByUrl (url) {
|
|
218
|
+
return new Promise((resolve, reject) => {
|
|
219
|
+
loadAmrRecorder().then((BenzAMRRecorder) => {
|
|
220
|
+
const _instance = new BenzAMRRecorder()
|
|
221
|
+
this.ajax(url).then(rs => {
|
|
222
|
+
const u8Array = new Uint8Array(rs)
|
|
223
|
+
_instance.decodeAMRAsync(u8Array).then((samples) => {
|
|
224
|
+
// samples为空证明是双声道模式
|
|
225
|
+
if (!samples) {
|
|
226
|
+
_instance._playEmpty()
|
|
227
|
+
BenzAMRRecorder.RecorderControl.decodeAudioArrayBufferByContext(rs).then((data) => {
|
|
228
|
+
return _instance.encodeAMRAsync(data, BenzAMRRecorder.RecorderControl.getCtxSampleRate())
|
|
229
|
+
}, reject).then((rawData) => {
|
|
230
|
+
_instance._runAMRWorker({
|
|
231
|
+
command: 'toWAV',
|
|
232
|
+
buffer: rawData
|
|
233
|
+
}, (rs) => {
|
|
234
|
+
if (!rs) {
|
|
235
|
+
reject('解码失败')
|
|
236
|
+
} else {
|
|
237
|
+
const wav = new Blob([rs], {
|
|
238
|
+
type: 'audio/wav'
|
|
239
|
+
})
|
|
240
|
+
resolve(wav)
|
|
241
|
+
}
|
|
242
|
+
})
|
|
243
|
+
}, reject)
|
|
244
|
+
} else {
|
|
245
|
+
_instance._runAMRWorker({
|
|
246
|
+
command: 'toWAV',
|
|
247
|
+
buffer: u8Array
|
|
248
|
+
}, (rs) => {
|
|
249
|
+
if (!rs) {
|
|
250
|
+
reject('解码失败')
|
|
251
|
+
} else {
|
|
252
|
+
const wav = new Blob([rs], {
|
|
253
|
+
type: 'audio/wav'
|
|
254
|
+
})
|
|
255
|
+
resolve(wav)
|
|
256
|
+
}
|
|
257
|
+
})
|
|
258
|
+
}
|
|
259
|
+
}, reject)
|
|
260
|
+
})
|
|
261
|
+
}, reject)
|
|
262
|
+
})
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
setUrl (url, cb) {
|
|
266
|
+
this._url = url
|
|
267
|
+
if (!url) {
|
|
268
|
+
this.stop()
|
|
269
|
+
} else {
|
|
270
|
+
this._onUrlChange && this._onUrlChange(ctx => {
|
|
271
|
+
cb && cb(ctx)
|
|
272
|
+
})
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
start () {
|
|
277
|
+
if (this._play) {
|
|
278
|
+
return
|
|
279
|
+
}
|
|
280
|
+
this._play = true
|
|
281
|
+
this._onPlayChange && this._onPlayChange('play')
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
stop (callback) {
|
|
285
|
+
if (!this._play) {
|
|
286
|
+
callback && callback()
|
|
287
|
+
return
|
|
288
|
+
}
|
|
289
|
+
this._play = false
|
|
290
|
+
this._onPlayChange && this._onPlayChange('stop')
|
|
291
|
+
this._onStopCallback = callback
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
pause () {
|
|
295
|
+
this._play = false
|
|
296
|
+
this._onPlayChange && this._onPlayChange('pause')
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
resume () {
|
|
300
|
+
this._play = true
|
|
301
|
+
this._onPlayChange && this._onPlayChange('resume')
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
destroy () {
|
|
305
|
+
this.stop()
|
|
306
|
+
this._onStopCallback = null
|
|
307
|
+
clearInterval(this._timer)
|
|
308
|
+
}
|
|
309
|
+
}
|