@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,549 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vxe-table
|
|
3
|
+
ref="table"
|
|
4
|
+
class="ui-grid-table"
|
|
5
|
+
:class="{ 'is-border': border, 'is-fixed-row-height': isFixedRowHeight }"
|
|
6
|
+
round
|
|
7
|
+
show-header-overflow="tooltip"
|
|
8
|
+
min-height="24px"
|
|
9
|
+
:show-overflow="showOverflow"
|
|
10
|
+
:row-id="rowId"
|
|
11
|
+
:height="tableHeight"
|
|
12
|
+
:max-height="maxHeight"
|
|
13
|
+
:row-config="rowConfig"
|
|
14
|
+
:row-class-name="rowClassName"
|
|
15
|
+
:tree-config="treeConfig"
|
|
16
|
+
:column-config="columnConfig"
|
|
17
|
+
:radio-config="radioConfig"
|
|
18
|
+
:checkbox-config="checkboxConfig"
|
|
19
|
+
:sort-config="sortConfig"
|
|
20
|
+
:seq-config="seqConfig"
|
|
21
|
+
:show-header="showHeader"
|
|
22
|
+
:data="data"
|
|
23
|
+
:border="border ? 'full' : 'inner'"
|
|
24
|
+
:scroll-y="scrollYConfig"
|
|
25
|
+
:scroll-x="scrollXConfig"
|
|
26
|
+
:show-footer="showSummary"
|
|
27
|
+
:footer-method="handleFooterMethod"
|
|
28
|
+
:footer-row-class-name="footerRowClassName"
|
|
29
|
+
@checkbox-change="handleSelectionChange"
|
|
30
|
+
@checkbox-all="handleSelectionAllChange"
|
|
31
|
+
@radio-change="handleRadioChange"
|
|
32
|
+
@cell-mouseenter="handleCellMouseEnter"
|
|
33
|
+
@cell-mouseleave="handleCellMouseLeave"
|
|
34
|
+
@sort-change="handleSortChange"
|
|
35
|
+
@resizable-change="handleColumnResizeableChange"
|
|
36
|
+
>
|
|
37
|
+
<template v-if="selectable && showIndex">
|
|
38
|
+
<vxe-column
|
|
39
|
+
v-if="multiple"
|
|
40
|
+
type="checkbox"
|
|
41
|
+
:show-overflow="false"
|
|
42
|
+
width="60px"
|
|
43
|
+
fixed="left"
|
|
44
|
+
align="center"
|
|
45
|
+
>
|
|
46
|
+
<template #header="{ checked, indeterminate }">
|
|
47
|
+
<template v-if="selectableAll">
|
|
48
|
+
<ui-tooltip content="选中当前页">
|
|
49
|
+
<vex-checkbox
|
|
50
|
+
:value="checked"
|
|
51
|
+
:indeterminate="indeterminate"
|
|
52
|
+
:style="{ width: '18px' }"
|
|
53
|
+
@input="handleCheckAllChange"
|
|
54
|
+
@click.native.stop
|
|
55
|
+
>
|
|
56
|
+
</vex-checkbox>
|
|
57
|
+
</ui-tooltip>
|
|
58
|
+
</template>
|
|
59
|
+
</template>
|
|
60
|
+
</vxe-column>
|
|
61
|
+
<vxe-column v-else type="radio" width="54px" fixed="left" align="center">
|
|
62
|
+
<template slot="radio" slot-scope="scope">
|
|
63
|
+
<vex-radio
|
|
64
|
+
v-if="
|
|
65
|
+
hoverRowId === scope.rowid ||
|
|
66
|
+
handleRowRadioValue(scope.row, scope.column)
|
|
67
|
+
"
|
|
68
|
+
:value="handleRowRadioValue(scope.row, scope.column)"
|
|
69
|
+
:label="true"
|
|
70
|
+
:style="{ width: '18px' }"
|
|
71
|
+
@input="handleRowRadioInput(scope.row, scope.column)"
|
|
72
|
+
>
|
|
73
|
+
</vex-radio>
|
|
74
|
+
<span v-else :style="{'display': 'inline-block'}">
|
|
75
|
+
{{
|
|
76
|
+
showPagination
|
|
77
|
+
? (pageIndex - 1) * pageSize + scope.$rowIndex + 1
|
|
78
|
+
: scope.$rowIndex + 1
|
|
79
|
+
}}
|
|
80
|
+
</span>
|
|
81
|
+
</template>
|
|
82
|
+
</vxe-column>
|
|
83
|
+
</template>
|
|
84
|
+
<template v-else>
|
|
85
|
+
<template v-if="selectable">
|
|
86
|
+
<vxe-column
|
|
87
|
+
v-if="multiple"
|
|
88
|
+
type="checkbox"
|
|
89
|
+
width="60px"
|
|
90
|
+
fixed="left"
|
|
91
|
+
align="center"
|
|
92
|
+
>
|
|
93
|
+
</vxe-column>
|
|
94
|
+
<vxe-column
|
|
95
|
+
v-else
|
|
96
|
+
type="radio"
|
|
97
|
+
width="60px"
|
|
98
|
+
fixed="left"
|
|
99
|
+
align="center"
|
|
100
|
+
></vxe-column>
|
|
101
|
+
</template>
|
|
102
|
+
<vxe-column
|
|
103
|
+
v-if="showIndex"
|
|
104
|
+
type="seq"
|
|
105
|
+
width="60px"
|
|
106
|
+
fixed="left"
|
|
107
|
+
align="center"
|
|
108
|
+
>
|
|
109
|
+
</vxe-column>
|
|
110
|
+
</template>
|
|
111
|
+
<slot></slot>
|
|
112
|
+
</vxe-table>
|
|
113
|
+
</template>
|
|
114
|
+
<script>
|
|
115
|
+
import { Table, Column, Checkbox, Radio } from 'vxe-table'
|
|
116
|
+
import 'vxe-table/lib/style.css'
|
|
117
|
+
|
|
118
|
+
export default {
|
|
119
|
+
name: 'UiGridTable',
|
|
120
|
+
components: {
|
|
121
|
+
VxeTable: Table,
|
|
122
|
+
VxeColumn: Column,
|
|
123
|
+
VexCheckbox: Checkbox,
|
|
124
|
+
VexRadio: Radio
|
|
125
|
+
},
|
|
126
|
+
inject: ['UiGrid'],
|
|
127
|
+
props: {
|
|
128
|
+
data: {
|
|
129
|
+
type: Array
|
|
130
|
+
},
|
|
131
|
+
idField: {
|
|
132
|
+
type: String
|
|
133
|
+
},
|
|
134
|
+
parentField: {
|
|
135
|
+
type: String
|
|
136
|
+
},
|
|
137
|
+
border: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: false
|
|
140
|
+
},
|
|
141
|
+
selectable: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
default: false
|
|
144
|
+
},
|
|
145
|
+
checkStrictly: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
default: false
|
|
148
|
+
},
|
|
149
|
+
selectableAll: {
|
|
150
|
+
type: Boolean,
|
|
151
|
+
default: true
|
|
152
|
+
},
|
|
153
|
+
multiple: {
|
|
154
|
+
type: Boolean,
|
|
155
|
+
default: false
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* 行是否允许选择方法
|
|
159
|
+
*/
|
|
160
|
+
rowCheckMethod: {
|
|
161
|
+
type: Function
|
|
162
|
+
},
|
|
163
|
+
rowVisibleMethod: {
|
|
164
|
+
type: Function
|
|
165
|
+
},
|
|
166
|
+
showIndex: {
|
|
167
|
+
type: Boolean,
|
|
168
|
+
default: false
|
|
169
|
+
},
|
|
170
|
+
showPagination: {
|
|
171
|
+
type: Boolean,
|
|
172
|
+
default: false
|
|
173
|
+
},
|
|
174
|
+
showHeader: {
|
|
175
|
+
type: Boolean,
|
|
176
|
+
default: true
|
|
177
|
+
},
|
|
178
|
+
pageIndex: {
|
|
179
|
+
type: Number,
|
|
180
|
+
default: 1
|
|
181
|
+
},
|
|
182
|
+
pageSize: {
|
|
183
|
+
type: Number,
|
|
184
|
+
default: 20
|
|
185
|
+
},
|
|
186
|
+
height: {
|
|
187
|
+
type: String
|
|
188
|
+
},
|
|
189
|
+
maxHeight: {
|
|
190
|
+
type: String
|
|
191
|
+
},
|
|
192
|
+
rowClassName: {
|
|
193
|
+
type: [String, Function]
|
|
194
|
+
},
|
|
195
|
+
rowHeight: {
|
|
196
|
+
type: String
|
|
197
|
+
},
|
|
198
|
+
defaultSort: {
|
|
199
|
+
type: [Object, Array]
|
|
200
|
+
},
|
|
201
|
+
remoteSort: {
|
|
202
|
+
type: Boolean,
|
|
203
|
+
default: true
|
|
204
|
+
},
|
|
205
|
+
showSummary: {
|
|
206
|
+
type: Boolean,
|
|
207
|
+
default: false
|
|
208
|
+
},
|
|
209
|
+
rowId: {
|
|
210
|
+
type: String,
|
|
211
|
+
default: 'id'
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
data() {
|
|
215
|
+
return {
|
|
216
|
+
hoverRowId: null
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
computed: {
|
|
220
|
+
isFixedRowHeight () {
|
|
221
|
+
return !!this.rowHeight && this.rowHeight !== 'auto'
|
|
222
|
+
},
|
|
223
|
+
tableHeight() {
|
|
224
|
+
let height
|
|
225
|
+
if (this.maxHeight) {
|
|
226
|
+
height = ''
|
|
227
|
+
} else {
|
|
228
|
+
if (this.height && this.height !== 'auto') {
|
|
229
|
+
height = '100%' // vxetable如果设置auto表示自动根据父级元素高度计算
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return height
|
|
233
|
+
},
|
|
234
|
+
sortConfig() {
|
|
235
|
+
return {
|
|
236
|
+
trigger: 'cell',
|
|
237
|
+
defaultSort: this.defaultSort,
|
|
238
|
+
remote: this.remoteSort
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
seqConfig() {
|
|
242
|
+
return {
|
|
243
|
+
seqMethod: ({ seq }) => {
|
|
244
|
+
return this.showPagination
|
|
245
|
+
? (this.pageIndex - 1) * this.pageSize + seq
|
|
246
|
+
: seq
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
scrollYConfig() {
|
|
251
|
+
if (this.rowHeight && this.rowHeight !== 'auto') {
|
|
252
|
+
return {
|
|
253
|
+
gt: 50,
|
|
254
|
+
enabled: true
|
|
255
|
+
}
|
|
256
|
+
} else {
|
|
257
|
+
return {
|
|
258
|
+
// gt: 20
|
|
259
|
+
enabled: false
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
scrollXConfig() {
|
|
264
|
+
return {
|
|
265
|
+
// gt: 10
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
rowConfig() {
|
|
269
|
+
return {
|
|
270
|
+
keyField: this.idField,
|
|
271
|
+
isHover: true,
|
|
272
|
+
height: this.rowHeight && this.rowHeight !== 'auto' ? parseInt(this.rowHeight) : null,
|
|
273
|
+
isCurrent: this.selectable && this.multiple === false
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
columnConfig() {
|
|
277
|
+
return {
|
|
278
|
+
resizable: true
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
treeConfig () {
|
|
282
|
+
if (!this.parentField) {
|
|
283
|
+
return
|
|
284
|
+
}
|
|
285
|
+
return {
|
|
286
|
+
expandAll: true,
|
|
287
|
+
transform: false,
|
|
288
|
+
rowField: this.idField,
|
|
289
|
+
parentField: this.parentField
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
radioConfig() {
|
|
293
|
+
return {
|
|
294
|
+
trigger: 'row',
|
|
295
|
+
visibleMethod: this.rowVisibleMethod,
|
|
296
|
+
checkMethod: this.rowCheckMethod
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
showOverflow () {
|
|
300
|
+
if (!this.rowHeight || this.rowHeight === 'auto') {
|
|
301
|
+
return
|
|
302
|
+
}
|
|
303
|
+
return 'ellipsis'
|
|
304
|
+
},
|
|
305
|
+
checkboxConfig() {
|
|
306
|
+
return {
|
|
307
|
+
trigger: 'cell', // cell(点击单元格触发), row(点击行触发)
|
|
308
|
+
checkStrictly: this.checkStrictly, // 暂时这么写,后面再看
|
|
309
|
+
visibleMethod: this.rowVisibleMethod,
|
|
310
|
+
checkMethod: this.rowCheckMethod,
|
|
311
|
+
reserve: true
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
mounted() {
|
|
316
|
+
const me = this
|
|
317
|
+
const loadTableData = this.$refs.table.loadTableData
|
|
318
|
+
this.$refs.table.loadTableData = function (...args) {
|
|
319
|
+
return loadTableData.apply(this, args).then(() => {
|
|
320
|
+
me.$emit('loaded')
|
|
321
|
+
})
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
beforeDestroy() {
|
|
325
|
+
clearTimeout(this._mouseLeaveTimer)
|
|
326
|
+
},
|
|
327
|
+
methods: {
|
|
328
|
+
footerRowClassName({ $rowIndex }) {
|
|
329
|
+
if ($rowIndex === 0) {
|
|
330
|
+
return 'vxe-table__footer-row'
|
|
331
|
+
}
|
|
332
|
+
return ''
|
|
333
|
+
},
|
|
334
|
+
handleCheckAllChange(value) {
|
|
335
|
+
const event = new window.CustomEvent('input', {
|
|
336
|
+
detail: '模拟触发一下,因为vxTable组件的handleCheckAllEvent需要'
|
|
337
|
+
})
|
|
338
|
+
this.$refs.table.handleCheckAllEvent(event, value)
|
|
339
|
+
},
|
|
340
|
+
handleRowCheckboxValue(row, column) {
|
|
341
|
+
if (!this.$refs.table) {
|
|
342
|
+
return false
|
|
343
|
+
}
|
|
344
|
+
return this.$refs.table.isCheckedByCheckboxRow(row)
|
|
345
|
+
},
|
|
346
|
+
handleRowRadioValue(row, column) {
|
|
347
|
+
if (!this.$refs.table) {
|
|
348
|
+
return false
|
|
349
|
+
}
|
|
350
|
+
return this.$refs.table.isCheckedByRadioRow(row)
|
|
351
|
+
},
|
|
352
|
+
handleRowRadioInput(row) {
|
|
353
|
+
if (!this.$refs.table) {
|
|
354
|
+
return
|
|
355
|
+
}
|
|
356
|
+
this.$refs.table.setRadioRow(row)
|
|
357
|
+
},
|
|
358
|
+
handleCellMouseEnter(evt) {
|
|
359
|
+
this.hoverRowId = evt.rowid
|
|
360
|
+
clearTimeout(this._mouseLeaveTimer)
|
|
361
|
+
this.$emit('hover-row-change', {
|
|
362
|
+
row: evt.row
|
|
363
|
+
})
|
|
364
|
+
},
|
|
365
|
+
handleSortChange (evt) {
|
|
366
|
+
this.$emit('sort-change', evt)
|
|
367
|
+
},
|
|
368
|
+
handleCellMouseLeave() {
|
|
369
|
+
clearTimeout(this._mouseLeaveTimer)
|
|
370
|
+
this._mouseLeaveTimer = setTimeout(() => {
|
|
371
|
+
if (!this.$refs.table.hoverRow) {
|
|
372
|
+
this.hoverRowId = null
|
|
373
|
+
this.$emit('hover-row-change', {
|
|
374
|
+
row: null
|
|
375
|
+
})
|
|
376
|
+
}
|
|
377
|
+
})
|
|
378
|
+
},
|
|
379
|
+
handleSelectionChange(evt) {
|
|
380
|
+
if (!this.selectable) {
|
|
381
|
+
return
|
|
382
|
+
}
|
|
383
|
+
if (!this.multiple) {
|
|
384
|
+
return
|
|
385
|
+
}
|
|
386
|
+
this.$emit('selection-change', {
|
|
387
|
+
selection: evt.records
|
|
388
|
+
})
|
|
389
|
+
},
|
|
390
|
+
handleSelectionAllChange(evt) {
|
|
391
|
+
this.$emit('selection-change', {
|
|
392
|
+
selection: evt.records
|
|
393
|
+
})
|
|
394
|
+
},
|
|
395
|
+
handleRadioChange(evt) {
|
|
396
|
+
if (!this.selectable) {
|
|
397
|
+
return
|
|
398
|
+
}
|
|
399
|
+
if (this.multiple) {
|
|
400
|
+
return
|
|
401
|
+
}
|
|
402
|
+
this.$emit('select-change', {
|
|
403
|
+
row: evt.row
|
|
404
|
+
})
|
|
405
|
+
},
|
|
406
|
+
handleColumnResizeableChange (evt) {
|
|
407
|
+
this.$emit('column-resize-change', evt)
|
|
408
|
+
},
|
|
409
|
+
handleFooterMethod ({ columns, data }) {
|
|
410
|
+
return [
|
|
411
|
+
columns.map((column, columnIndex) => {
|
|
412
|
+
if (columnIndex === 0) {
|
|
413
|
+
return '合计'
|
|
414
|
+
}
|
|
415
|
+
if (column.footerClassName && column.footerClassName.indexOf('is-show-summary') >= 0) {
|
|
416
|
+
return this.sumColumnValue(data, column)
|
|
417
|
+
}
|
|
418
|
+
return null
|
|
419
|
+
})
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
sumColumnValue (list, column) {
|
|
423
|
+
let count = 0
|
|
424
|
+
list.forEach(item => {
|
|
425
|
+
if (item[column.field]) {
|
|
426
|
+
count += Number(item[column.field])
|
|
427
|
+
} else {
|
|
428
|
+
count += 0
|
|
429
|
+
}
|
|
430
|
+
})
|
|
431
|
+
const cacheColumn = this.UiGrid.cacheColumns.find(v => v.prop === column.field)
|
|
432
|
+
if (cacheColumn && cacheColumn.formatSummary) {
|
|
433
|
+
count = cacheColumn.formatSummary({
|
|
434
|
+
value: count
|
|
435
|
+
})
|
|
436
|
+
}
|
|
437
|
+
return count
|
|
438
|
+
},
|
|
439
|
+
clearSelection() {
|
|
440
|
+
this.$refs.table && this.$refs.table.clearCheckboxRow()
|
|
441
|
+
},
|
|
442
|
+
setCheckboxRow(rows, isSelected = true) {
|
|
443
|
+
this.$refs.table && this.$refs.table.setCheckboxRow(rows, isSelected)
|
|
444
|
+
},
|
|
445
|
+
setRadioRow(row) {
|
|
446
|
+
if (row) {
|
|
447
|
+
this.$refs.table && this.$refs.table.setRadioRow(row)
|
|
448
|
+
} else {
|
|
449
|
+
this.$refs.table && this.$refs.table.clearRadioRow()
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
getSortColumns () {
|
|
453
|
+
return this.$refs.table.getSortColumns()
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
</script>
|
|
458
|
+
<style lang="less">
|
|
459
|
+
.ui-grid-table {
|
|
460
|
+
[class*="vxe-"] {
|
|
461
|
+
font-feature-settings: normal;
|
|
462
|
+
font-variant: normal;
|
|
463
|
+
}
|
|
464
|
+
&:not(.is-border) {
|
|
465
|
+
.vxe-resizable {
|
|
466
|
+
&:after {
|
|
467
|
+
content: "";
|
|
468
|
+
position: absolute;
|
|
469
|
+
left: 50%;
|
|
470
|
+
top: 50%;
|
|
471
|
+
margin-left: -1px;
|
|
472
|
+
margin-top: -9px;
|
|
473
|
+
width: 1px;
|
|
474
|
+
height: 18px;
|
|
475
|
+
background-color: rgba(0, 0, 0, 0.08);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.vxe-header--column.col--last {
|
|
480
|
+
.vxe-resizable {
|
|
481
|
+
&:after {
|
|
482
|
+
opacity: 0;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.vxe-table--header {
|
|
489
|
+
.vxe-cell {
|
|
490
|
+
display: flex;
|
|
491
|
+
flex-direction: row;
|
|
492
|
+
align-items: center;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.vxe-cell--title {
|
|
496
|
+
flex: 1;
|
|
497
|
+
min-width: 0;
|
|
498
|
+
white-space: nowrap;
|
|
499
|
+
overflow: hidden;
|
|
500
|
+
text-overflow: ellipsis;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.vxe-cell--sort {
|
|
505
|
+
transform: scale(0.8);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
&.vxe-table .vxe-sort--asc-btn {
|
|
509
|
+
top: -1px;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
&.vxe-table .vxe-sort--desc-btn {
|
|
513
|
+
bottom: -2px;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.vxe-table--render-default .vxe-table--empty-content {
|
|
517
|
+
pointer-events: none;
|
|
518
|
+
}
|
|
519
|
+
&.vxe-table--render-default .vxe-body--column:not(.col--ellipsis),
|
|
520
|
+
&.vxe-table--render-default .vxe-footer--column:not(.col--ellipsis),
|
|
521
|
+
&.vxe-table--render-default .vxe-header--column:not(.col--ellipsis){
|
|
522
|
+
padding-top: 10px;
|
|
523
|
+
padding-bottom: 10px;
|
|
524
|
+
}
|
|
525
|
+
&.vxe-table--render-default .vxe-body--column.col--ellipsis,
|
|
526
|
+
&.vxe-table--render-default .vxe-footer--column.col--ellipsis,
|
|
527
|
+
&.vxe-table--render-default .vxe-header--column.col--ellipsis,
|
|
528
|
+
&.vxe-table--render-default.vxe-editable .vxe-body--column{
|
|
529
|
+
height: 42px;
|
|
530
|
+
}
|
|
531
|
+
&.is-fixed-row-height {
|
|
532
|
+
&.vxe-table--render-default .vxe-body--column:not(.col--ellipsis),
|
|
533
|
+
&.vxe-table--render-default .vxe-footer--column:not(.col--ellipsis),
|
|
534
|
+
&.vxe-table--render-default .vxe-header--column:not(.col--ellipsis){
|
|
535
|
+
padding-top: 5px;
|
|
536
|
+
padding-bottom: 5px;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
.vxe-table__footer-row {
|
|
540
|
+
background-color: #f0f9eb !important;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
body {
|
|
545
|
+
.vxe-table--render-default {
|
|
546
|
+
color: #172b4d;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: 'UiGridBatchToolbar',
|
|
3
|
+
inject: ['UiGrid'],
|
|
4
|
+
props: {
|
|
5
|
+
items: {
|
|
6
|
+
type: Array,
|
|
7
|
+
default: () => []
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
watch: {
|
|
11
|
+
items() {
|
|
12
|
+
this.$set(this.UiGrid.batchToolbarProps, 'items', this.items)
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
created() {
|
|
16
|
+
this.$set(this.UiGrid.batchToolbarProps, 'items', this.items)
|
|
17
|
+
},
|
|
18
|
+
render() {
|
|
19
|
+
return null
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ui-grid-toolbar-batch">
|
|
3
|
+
<ui-toolbar :close-dialog="false">
|
|
4
|
+
<ui-toolbar-item>
|
|
5
|
+
<span class="ui-grid-toolbar-batch__count">已选择<b>{{selecteds.length}}</b>项</span>
|
|
6
|
+
</ui-toolbar-item>
|
|
7
|
+
<ui-toolbar-item
|
|
8
|
+
v-for="(item, index) in innerItems"
|
|
9
|
+
:key="index"
|
|
10
|
+
>
|
|
11
|
+
<component
|
|
12
|
+
v-if="item.render"
|
|
13
|
+
:is="{render: item.render}"
|
|
14
|
+
></component>
|
|
15
|
+
<ui-button
|
|
16
|
+
v-else
|
|
17
|
+
v-bind="item"
|
|
18
|
+
:icon="item.icon"
|
|
19
|
+
size="small"
|
|
20
|
+
:click="handleRenderBtnClick(item)"
|
|
21
|
+
>
|
|
22
|
+
{{item.label}}
|
|
23
|
+
</ui-button>
|
|
24
|
+
</ui-toolbar-item>
|
|
25
|
+
</ui-toolbar>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<script>
|
|
29
|
+
export default {
|
|
30
|
+
name: 'UiGridBatchToolbar',
|
|
31
|
+
props: {
|
|
32
|
+
title: {
|
|
33
|
+
type: String
|
|
34
|
+
},
|
|
35
|
+
data: {
|
|
36
|
+
type: Array,
|
|
37
|
+
default: () => []
|
|
38
|
+
},
|
|
39
|
+
selecteds: {
|
|
40
|
+
type: Array,
|
|
41
|
+
default: () => []
|
|
42
|
+
},
|
|
43
|
+
items: {
|
|
44
|
+
type: Array,
|
|
45
|
+
default: () => []
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
computed: {
|
|
49
|
+
isAllSelected() {
|
|
50
|
+
return this.data.length <= this.selecteds.length
|
|
51
|
+
},
|
|
52
|
+
renderData() {
|
|
53
|
+
return {
|
|
54
|
+
selecteds: this.selecteds
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
innerItems() {
|
|
58
|
+
const me = this
|
|
59
|
+
return (this.items || []).filter(v => {
|
|
60
|
+
if (typeof v.visible === 'boolean') {
|
|
61
|
+
return v.visible
|
|
62
|
+
}
|
|
63
|
+
if (typeof v.visible === 'function') {
|
|
64
|
+
return v.visible()
|
|
65
|
+
}
|
|
66
|
+
return true
|
|
67
|
+
}).map(v => {
|
|
68
|
+
const vv = Object.assign({}, v)
|
|
69
|
+
if (v.render) {
|
|
70
|
+
vv.render = (h) => {
|
|
71
|
+
return v.render(h, me.renderData)
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return vv
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
methods: {
|
|
79
|
+
handleToggleCheckbox(evt) {
|
|
80
|
+
evt.stopPropagation()
|
|
81
|
+
this.$emit('clear-selection')
|
|
82
|
+
},
|
|
83
|
+
handleRenderBtnClick(item) {
|
|
84
|
+
if (item && item.click) {
|
|
85
|
+
return () => {
|
|
86
|
+
const result = item.click({
|
|
87
|
+
item,
|
|
88
|
+
selecteds: this.selecteds
|
|
89
|
+
})
|
|
90
|
+
if (result && result.then) {
|
|
91
|
+
item.loading = true
|
|
92
|
+
result.then(() => {
|
|
93
|
+
item.loading = false
|
|
94
|
+
this.$emit('batch-success')
|
|
95
|
+
}, () => {
|
|
96
|
+
item.loading = false
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
return result
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</script>
|
|
106
|
+
<style lang="less">
|
|
107
|
+
.ui-grid-toolbar-batch{
|
|
108
|
+
width: 100%;
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: row;
|
|
111
|
+
align-items: center;
|
|
112
|
+
height: 32px;
|
|
113
|
+
}
|
|
114
|
+
.ui-grid-toolbar-batch__count{
|
|
115
|
+
display: inline-block;
|
|
116
|
+
color: #888;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.ui-grid-toolbar-batch__count b{
|
|
120
|
+
display: inline-block;
|
|
121
|
+
min-width: 20px;
|
|
122
|
+
text-align: center;
|
|
123
|
+
color: #0052cc;
|
|
124
|
+
}
|
|
125
|
+
.ui-grid-toolbar-batch__checkbox{
|
|
126
|
+
display: inline-block;
|
|
127
|
+
margin-left: 20px;
|
|
128
|
+
}
|
|
129
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: 'UiGridGlobalToolbar',
|
|
3
|
+
inject: ['UiGrid'],
|
|
4
|
+
props: {
|
|
5
|
+
items: {
|
|
6
|
+
type: Array,
|
|
7
|
+
default: () => []
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
watch: {
|
|
11
|
+
items() {
|
|
12
|
+
this.UiGrid.globalToolbarProps.items = this.items
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
created() {
|
|
16
|
+
this.UiGrid.globalToolbarProps.items = this.items
|
|
17
|
+
},
|
|
18
|
+
render() {
|
|
19
|
+
return null
|
|
20
|
+
}
|
|
21
|
+
}
|