vue-devui 1.0.0-beta.7 → 1.0.0-pre.0
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/README.md +81 -66
- package/accordion/index.es.js +522 -39
- package/accordion/index.umd.js +1 -1
- package/accordion/style.css +1 -1
- package/alert/index.es.js +7 -8
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/{toast → auto-complete}/index.d.ts +0 -0
- package/auto-complete/index.es.js +976 -0
- package/auto-complete/index.umd.js +1 -0
- package/auto-complete/package.json +7 -0
- package/auto-complete/style.css +1 -0
- package/avatar/index.es.js +1 -1
- package/avatar/index.umd.js +1 -1
- package/back-top/index.es.js +1 -1
- package/back-top/index.umd.js +1 -1
- package/badge/index.es.js +13 -19
- package/badge/index.umd.js +1 -1
- package/button/index.es.js +263 -83
- package/button/index.umd.js +1 -1
- package/button/style.css +1 -1
- package/card/index.es.js +1 -1
- package/card/index.umd.js +1 -1
- package/carousel/index.es.js +7 -6
- package/carousel/index.umd.js +1 -1
- package/cascader/index.es.js +5393 -773
- package/cascader/index.umd.js +27 -1
- package/checkbox/index.es.js +1 -1
- package/checkbox/index.umd.js +1 -1
- package/checkbox/style.css +1 -1
- package/color-picker/index.d.ts +7 -0
- package/color-picker/index.es.js +8187 -0
- package/color-picker/index.umd.js +27 -0
- package/color-picker/package.json +7 -0
- package/color-picker/style.css +1 -0
- package/comment/index.es.js +42 -13
- package/comment/index.umd.js +1 -1
- package/comment/style.css +1 -1
- package/countdown/index.d.ts +7 -0
- package/countdown/index.es.js +176 -0
- package/countdown/index.umd.js +1 -0
- package/countdown/package.json +7 -0
- package/countdown/style.css +1 -0
- package/date-picker/index.es.js +11 -12
- package/date-picker/index.umd.js +1 -1
- package/date-picker/style.css +1 -1
- package/dragdrop/index.es.js +135 -10
- package/dragdrop/index.umd.js +1 -1
- package/drawer/index.es.js +173 -203
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +412 -302
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +275 -5610
- package/editable-select/index.umd.js +1 -27
- package/editable-select/style.css +1 -1
- package/form/index.es.js +6129 -461
- package/form/index.umd.js +27 -1
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +111 -119
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/gantt/index.es.js +6 -18
- package/gantt/index.umd.js +1 -1
- package/gantt/style.css +1 -1
- package/grid/index.es.js +3 -3
- package/grid/index.umd.js +1 -1
- package/grid/style.css +1 -1
- package/icon/index.es.js +3 -2
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +78 -20
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +5 -6
- package/input/index.umd.js +1 -1
- package/input/style.css +1 -1
- package/input-icon/index.es.js +6 -6
- package/input-icon/index.umd.js +1 -1
- package/input-icon/style.css +1 -1
- package/input-number/index.es.js +2 -1
- package/input-number/index.umd.js +1 -1
- package/layout/index.es.js +1 -1
- package/layout/index.umd.js +1 -1
- package/list/index.d.ts +7 -0
- package/list/index.es.js +39 -0
- package/list/index.umd.js +1 -0
- package/{toast → list}/package.json +1 -1
- package/list/style.css +1 -0
- package/loading/index.es.js +3 -3
- package/loading/index.umd.js +1 -1
- package/modal/index.es.js +297 -761
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/nav-sprite/index.es.js +1 -675
- package/nav-sprite/index.umd.js +1 -1
- package/notification/index.d.ts +7 -0
- package/notification/index.es.js +286 -0
- package/notification/index.umd.js +1 -0
- package/notification/package.json +7 -0
- package/notification/style.css +1 -0
- package/nuxt/components/Accordion.js +3 -0
- package/nuxt/components/Alert.js +3 -0
- package/nuxt/components/Anchor.js +3 -0
- package/nuxt/components/Aside.js +3 -0
- package/nuxt/components/AutoComplete.js +3 -0
- package/nuxt/components/Avatar.js +3 -0
- package/nuxt/components/BackTop.js +3 -0
- package/nuxt/components/Badge.js +3 -0
- package/nuxt/components/Breadcrumb.js +3 -0
- package/nuxt/components/Button.js +3 -0
- package/nuxt/components/Card.js +3 -0
- package/nuxt/components/Carousel.js +3 -0
- package/nuxt/components/CarouselItem.js +3 -0
- package/nuxt/components/Cascader.js +3 -0
- package/nuxt/components/Checkbox.js +3 -0
- package/nuxt/components/Col.js +3 -0
- package/nuxt/components/ColorPicker.js +3 -0
- package/nuxt/components/Column.js +3 -0
- package/nuxt/components/Comment.js +3 -0
- package/nuxt/components/Content.js +3 -0
- package/nuxt/components/Countdown.js +3 -0
- package/nuxt/components/DatePicker.js +3 -0
- package/nuxt/components/Drawer.js +3 -0
- package/nuxt/components/DrawerService.js +3 -0
- package/nuxt/components/Dropdown.js +3 -0
- package/nuxt/components/DropdownMenu.js +3 -0
- package/nuxt/components/EditableSelect.js +3 -0
- package/nuxt/components/FixedOverlay.js +3 -0
- package/nuxt/components/FlexibleOverlay.js +3 -0
- package/nuxt/components/Footer.js +3 -0
- package/nuxt/components/Form.js +3 -0
- package/nuxt/components/FormControl.js +3 -0
- package/nuxt/components/FormItem.js +3 -0
- package/nuxt/components/FormLabel.js +3 -0
- package/nuxt/components/FormOperation.js +3 -0
- package/nuxt/components/Fullscreen.js +3 -0
- package/nuxt/components/Gantt.js +3 -0
- package/nuxt/components/Header.js +3 -0
- package/nuxt/components/IFileOptions.js +3 -0
- package/nuxt/components/IUploadOptions.js +3 -0
- package/nuxt/components/Icon.js +2 -0
- package/nuxt/components/ImagePreviewService.js +3 -0
- package/nuxt/components/Input.js +3 -0
- package/nuxt/components/InputIcon.js +3 -0
- package/nuxt/components/InputNumber.js +3 -0
- package/nuxt/components/Layout.js +3 -0
- package/nuxt/components/List.js +3 -0
- package/nuxt/components/ListItem.js +3 -0
- package/nuxt/components/Loading.js +3 -0
- package/nuxt/components/LoadingService.js +3 -0
- package/nuxt/components/Modal.js +3 -0
- package/nuxt/components/NavSprite.js +2 -0
- package/nuxt/components/Notification.js +3 -0
- package/nuxt/components/NotificationService.js +3 -0
- package/nuxt/components/Pagination.js +3 -0
- package/nuxt/components/Panel.js +3 -0
- package/nuxt/components/Popover.js +3 -0
- package/nuxt/components/Progress.js +3 -0
- package/nuxt/components/QuadrantDiagram.js +3 -0
- package/nuxt/components/Radio.js +3 -0
- package/nuxt/components/RadioGroup.js +3 -0
- package/nuxt/components/Rate.js +3 -0
- package/nuxt/components/ReadTip.js +3 -0
- package/nuxt/components/Result.js +3 -0
- package/nuxt/components/Row.js +3 -0
- package/nuxt/components/Search.js +3 -0
- package/nuxt/components/Select.js +3 -0
- package/nuxt/components/Skeleton.js +3 -0
- package/nuxt/components/SkeletonItem.js +3 -0
- package/nuxt/components/Slider.js +3 -0
- package/nuxt/components/Splitter.js +3 -0
- package/nuxt/components/Statistic.js +3 -0
- package/nuxt/components/Status.js +3 -0
- package/nuxt/components/StepsGuide.js +3 -0
- package/nuxt/components/StickSlider.js +3 -0
- package/nuxt/components/Sticky.js +2 -0
- package/nuxt/components/Switch.js +3 -0
- package/nuxt/components/Table.js +3 -0
- package/nuxt/components/Tabs.js +3 -0
- package/nuxt/components/Tag.js +3 -0
- package/nuxt/components/TagInput.js +3 -0
- package/nuxt/components/Textarea.js +3 -0
- package/nuxt/components/TimeAxis.js +3 -0
- package/nuxt/components/TimeAxisItem.js +3 -0
- package/nuxt/components/TimePicker.js +3 -0
- package/nuxt/components/Tooltip.js +3 -0
- package/nuxt/components/Transfer.js +3 -0
- package/nuxt/components/Tree.js +3 -0
- package/nuxt/components/TreeSelect.js +3 -0
- package/nuxt/components/Upload.js +3 -0
- package/nuxt/components/UploadStatus.js +3 -0
- package/nuxt/components/badgeProps.js +3 -0
- package/nuxt/components/buttonProps.js +3 -0
- package/nuxt/components/dropdownMenuProps.js +3 -0
- package/nuxt/components/fixedOverlayProps.js +3 -0
- package/nuxt/components/flexibleOverlayProps.js +3 -0
- package/nuxt/components/notificationProps.js +3 -0
- package/nuxt/components/overlayEmits.js +3 -0
- package/nuxt/components/overlayProps.js +3 -0
- package/nuxt/components/popoverProps.js +3 -0
- package/nuxt/components/tooltipProps.js +3 -0
- package/nuxt/components/uploadProps.js +3 -0
- package/nuxt/index.js +13 -0
- package/overlay/index.es.js +146 -200
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +10 -18
- package/pagination/index.es.js +4 -4
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +3 -3
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +5948 -190
- package/popover/index.umd.js +27 -1
- package/popover/style.css +1 -1
- package/progress/index.es.js +9 -9
- package/progress/index.umd.js +3 -3
- package/quadrant-diagram/index.es.js +5405 -166
- package/quadrant-diagram/index.umd.js +27 -1
- package/radio/index.es.js +6 -6
- package/radio/index.umd.js +1 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +1 -1
- package/rate/index.umd.js +1 -1
- package/read-tip/index.es.js +21 -7
- package/read-tip/index.umd.js +1 -1
- package/read-tip/style.css +1 -1
- package/result/index.d.ts +7 -0
- package/result/index.es.js +119 -0
- package/result/index.umd.js +1 -0
- package/result/package.json +7 -0
- package/result/style.css +1 -0
- package/ripple/index.es.js +6 -3
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +5435 -201
- package/search/index.umd.js +27 -1
- package/search/style.css +1 -1
- package/select/index.es.js +3 -2
- package/select/index.umd.js +1 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +1 -1
- package/skeleton/index.umd.js +1 -1
- package/slider/index.es.js +3 -6
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +5904 -60
- package/splitter/index.umd.js +27 -1
- package/splitter/style.css +1 -1
- package/statistic/index.d.ts +7 -0
- package/statistic/index.es.js +267 -0
- package/statistic/index.umd.js +1 -0
- package/statistic/package.json +7 -0
- package/statistic/style.css +1 -0
- package/status/index.es.js +2 -2
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/steps-guide/index.es.js +8 -6
- package/steps-guide/index.umd.js +1 -1
- package/sticky/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +1 -1
- package/switch/index.umd.js +1 -1
- package/table/index.es.js +701 -359
- package/table/index.umd.js +1 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +3 -4
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +37 -11
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/tag-input/index.es.js +1 -13
- package/tag-input/index.umd.js +1 -1
- package/textarea/index.es.js +1 -1
- package/textarea/index.umd.js +1 -1
- package/textarea/style.css +1 -1
- package/{theme → theme/theme.scss} +0 -0
- package/time-axis/index.es.js +5 -2
- package/time-axis/index.umd.js +1 -1
- package/time-picker/index.es.js +269 -84
- package/time-picker/index.umd.js +1 -1
- package/time-picker/style.css +1 -1
- package/tooltip/index.es.js +5798 -141
- package/tooltip/index.umd.js +27 -1
- package/tooltip/style.css +1 -1
- package/transfer/index.es.js +6522 -635
- package/transfer/index.umd.js +27 -1
- package/transfer/style.css +1 -1
- package/tree/index.es.js +5858 -146
- package/tree/index.umd.js +27 -1
- package/tree/style.css +1 -1
- package/tree-select/index.es.js +130 -35
- package/tree-select/index.umd.js +1 -1
- package/tree-select/style.css +1 -1
- package/upload/index.es.js +464 -2681
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +15597 -14569
- package/vue-devui.umd.js +16 -16
- package/toast/index.es.js +0 -2059
- package/toast/index.umd.js +0 -1
- package/toast/style.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Pe=Object.defineProperty;var re=Object.getOwnPropertySymbols;var Oe=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable;var O=(p,t,m)=>t in p?Pe(p,t,{enumerable:!0,configurable:!0,writable:!0,value:m}):p[t]=m,E=(p,t)=>{for(var m in t||(t={}))Oe.call(t,m)&&O(p,m,t[m]);if(re)for(var m of re(t))je.call(t,m)&&O(p,m,t[m]);return p};var C=(p,t,m)=>(O(p,typeof t!="symbol"?t+"":t,m),m);(function(p,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue"),require("@floating-ui/dom")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom"],t):(p=typeof globalThis!="undefined"?globalThis:p||self,t(p.index={},p.Vue,p.dom))})(this,function(p,t,m){"use strict";const se={modelValue:{type:String,default:""},source:{type:Array,default:null},allowEmptyValueSearch:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},appendToBodyDirections:{type:Object,default:()=>({originX:"left",originY:"bottom",overlayX:"left",overlayY:"top"})},disabled:{type:Boolean,default:!1},delay:{type:Number,default:300},disabledKey:{type:String,default:null},formatter:{type:Function,default:e=>e?e.label||e.toString():""},isSearching:{type:Boolean,default:!1},sceneType:{type:String,default:null},searchFn:{type:Function,default:null},tipsText:{type:String,default:"\u6700\u8FD1\u8F93\u5165"},latestSource:{type:Array,default:null},valueParser:{type:Function,default:e=>e},enableLazyLoad:{type:Boolean,default:!1},dAutoCompleteWidth:{type:Number,default:null},showAnimation:{type:Boolean,default:!0},maxHeight:{type:Number,default:300},transInputFocusEmit:{type:Function,default:null},selectValue:{type:Function,default:null},loadMore:{type:Function,default:null}},j=Symbol("DropdownPropsKey");function ie(e,n){const o=(r,d)=>{const i={item:r,index:d};return e.slots.itemTemplate?e.slots.itemTemplate(i):null},l=()=>e.slots.noResultItemTemplate?e.slots.noResultItemTemplate(n.value):null,s=()=>e.slots.searchingTemplate?e.slots.searchingTemplate(n.value):null;return{customRenderSolts:()=>{const r={};return e.slots.itemTemplate&&(r.itemTemplate=o),e.slots.noResultItemTemplate&&(r.noResultItemTemplate=l),e.slots.searchingTemplate&&(r.searchingTemplate=s),r}}}function ue(e,n,o,l,s){const a=t.ref([]),r=t.ref(!1);return{handleSearch:async(u,c)=>{if(u==""&&!n.value){a.value=[],r.value=!1;return}let v=[];u=u.toLowerCase(),c?v=o.value:l.value?v=await l.value(u):o.value.forEach(f=>{let y=s.value(f);y=y.toLowerCase(),y.startsWith(u)&&v.push(f)}),a.value=v,a.value.length==0?r.value=!0:r.value=!1},recentlyFocus:u=>{u&&(a.value=u)},searchList:a,showNoResultItemTemplate:r}}function de(e,n,o,l,s,a,r,d,i,u){const c=t.ref(!1),v=t.ref(),f=t.ref(!1),h=((S,D)=>{let g;return(...b)=>{g&&clearTimeout(g),g=setTimeout(async()=>{f.value=!0,await S(...b),f.value=!1},D)}})(async S=>{await r(S),c.value=!0},a.value),T=S=>{const D=S.target;f.value=!1,o.value=!1,e.emit("update:modelValue",D.value),h(D.value)},A=()=>{r(l.value),i(u.value),d.value&&d.value()},V=()=>{c.value=!1,f.value=!1,o.value=!1};return{handleClose:V,toggleMenu:()=>{s.value||(c.value?V():(c.value=!0,e.slots.noResultItemTemplate&&n.value.length==0&&l.value.trim()!=""&&(o.value=!0)))},onInput:T,onFocus:A,inputRef:v,visible:c,searchStatus:f}}function ce(e,n,o,l,s,a){const r=t.ref(0),d=u=>{if(n.value.length==0)return 0;const c=n.value.indexOf(u);return c==-1?0:c};return{selectedIndex:r,selectOptionClick:async u=>{const c=s.value(u);e.emit("update:modelValue",c),a(),await l(c),r.value=d(c),o.value&&o.value()}}}function fe(e,n,o){const l=t.ref(!1),s=t.ref(),a=()=>{if(!e.enableLazyLoad&&l)return;const d=s.value,i=d.scrollHeight,u=d.clientHeight+d.scrollTop;u>=i&&u>=e.maxHeight&&(e.loadMore(),l.value=!0)};n.expose({loadFinish:r});async function r(){await o(e.modelValue,e.enableLazyLoad),l.value=!1}return{showLoading:l,dropDownRef:s,loadMore:a}}function pe(e,n,o,l,s,a,r,d){var v;const i=t.ref((v=l.value)!=null?v:0),u=f=>{const y=e.value,w=y.children[f];t.nextTick(()=>{if(w.scrollIntoViewIfNeeded)w.scrollIntoViewIfNeeded(!1);else{const h=y.getBoundingClientRect(),T=w.getBoundingClientRect();(T.bottom>h.bottom||T.top<h.top)&&w.scrollIntoView(!1)}})};return{hoverIndex:i,handlekeyDown:f=>{var h;const y=f.key||f.code;if(y==="Escape"&&(n.value&&o.value.length||s.value||a.value)){d();return}const w=n.value&&o.value.length&&!s.value&&!a.value;if(y==="ArrowDown"&&w){if(i.value===o.value.length-1){i.value=0,u(i.value);return}i.value=i.value+1,u(i.value)}else if(y==="ArrowUp"&&w){if(i.value===0){i.value=o.value.length-1,u(i.value);return}i.value=i.value-1,u(i.value)}if(y==="Enter"&&w){r(o.value[i.value]),i.value=(h=l.value)!=null?h:0;return}}}}var ze="";class M{constructor(){C(this,"top","50%");C(this,"left","50%")}}const ve={message:String,backdrop:Boolean,view:{type:Object,default:()=>new M},zIndex:Number,isFull:{type:Boolean,default:!1}};class me{constructor(){C(this,"target");C(this,"message");C(this,"loadingTemplateRef");C(this,"backdrop",!0);C(this,"positionType","relative");C(this,"view",new M);C(this,"zIndex")}}var _e="",ye=t.defineComponent({name:"DLoading",inheritAttrs:!1,props:ve,setup(e){const n={top:e.view.top,left:e.view.left,zIndex:e.zIndex};e.message||(n.background="none");const o=t.ref(!1);return{style:n,isShow:o,open:()=>{o.value=!0},close:()=>{o.value=!1}}},render(){var r;const{isShow:e,isFull:n,backdrop:o,style:l,message:s,$slots:a}=this;return e&&t.createVNode("div",{class:["devui-loading-contanier",n?"devui-loading--full":""]},[((r=a.default)==null?void 0:r.call(a))||t.createVNode("div",{class:"devui-loading-wrapper"},[o?t.createVNode("div",{class:"devui-loading-mask"},null):null,t.createVNode("div",{style:l,class:"devui-loading-area"},[t.createVNode("div",{class:"devui-busy-default-spinner"},[t.createVNode("div",{class:"devui-loading-bar1"},null),t.createVNode("div",{class:"devui-loading-bar2"},null),t.createVNode("div",{class:"devui-loading-bar3"},null),t.createVNode("div",{class:"devui-loading-bar4"},null)]),s?t.createVNode("span",{class:"devui-loading-text"},[s]):null])])])}});const H=Symbol("dev_component_container");function ge(e,n,o=null){const l=t.h(e,E({},n),o),s=document.createElement("div");return l[H]=s,t.render(l,s),l.component}function we(e){t.render(null,e==null?void 0:e.vnode[H])}const he=t.defineComponent(ye),F=new WeakSet,R=e=>{if(!e)return!0;if(Array.isArray(e))return e.length===0;if(e instanceof Set||e instanceof Map)return e.size===0;if(e instanceof Promise)return!1;if(typeof e=="object")try{return Object.keys(e).length===0}catch{return!1}return!1},z=e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase(),be=e=>{switch(z(e)){case"promise":return[e];case"array":return e.some(o=>z(o)!=="promise")?(console.error(new TypeError("Binding values should all be of type Promise")),"error"):e;default:return!1}},_=e=>{F.delete(e),e.instance.proxy.close(),we(e.instance)},K=(e,n)=>{if(n.value){const o=be(n.value);if(o==="error")return;e.instance.proxy.open(),e.appendChild(e.mask),F.add(e),o&&Promise.all(o).catch(l=>{console.error(new Error("Promise handling errors"),l)}).finally(()=>{_(e)})}else _(e)},$=e=>{e.removeAttribute("zindex"),e.removeAttribute("positiontype"),e.removeAttribute("backdrop"),e.removeAttribute("message"),e.removeAttribute("view"),e.removeAttribute("loadingtemplateref")},W=(e,n)=>{const o=E(E({},new me),n),l=o.loadingTemplateRef,s=ge(he,E({},o),l?()=>l:null);e.style.position=o.positionType,e.options=o,e.instance=s,e.mask=s.proxy.$el},Te={mounted:function(e,n,o){W(e,o.props),$(e),!R(n.value)&&K(e,n)},updated:function(e,n,o){!R(n.value)&&F.has(e)||R(n.value)&&!F.has(e)||(!F.has(e)&&W(e,o.props),$(e),K(e,n))}};var Y=t.defineComponent({name:"DAutoCompleteDropdown",directives:{dLoading:Te},setup(e,n){const o=t.inject(j),{visible:l,selectedIndex:s,selectOptionClick:a,searchList:r,searchStatus:d,dropDownRef:i,loadMore:u,showLoading:c,showNoResultItemTemplate:v,latestSource:f,modelValue:y,hoverIndex:w}=o,{disabled:h,maxHeight:T,appendToBody:A,formatter:V,disabledKey:k,isSearching:S}=o.props,D=g=>{g[k]||a(g)};return()=>t.withDirectives(t.createVNode("div",{class:["devui-dropdown-menu",A&&"devui-dropdown-menu-cdk",h&&"disabled",f.value&&"devui-dropdown-latestSource"]},[t.createVNode("ul",{ref:i,class:"devui-list-unstyled scroll-height",style:{maxHeight:`${T}px`},onScroll:u},[S&&n.slots.searchingTemplate&&d.value&&t.createVNode("li",{class:"devui-is-searching-template"},[t.createVNode("div",{class:"devui-no-data-tip"},[n.slots.searchingTemplate()])]),f.value&&!y.value&&t.createVNode("li",{class:"devui-popup-tips"},[t.createTextVNode("\u6700\u8FD1\u8F93\u5165")]),!v.value&&!d.value&&r!=null&&r.value.length>0&&r.value.map((g,b)=>t.createVNode("li",{onClick:()=>D(g),class:["devui-dropdown-item",s.value==b&&"selected",{disabled:k&&g[k]},{"devui-dropdown-bg":w.value==b}],title:V(g),key:V(g)},[n.slots.itemTemplate?n.slots.itemTemplate(g,b):V(g)])),!d.value&&r.value.length==0&&n.slots.noResultItemTemplate&&v.value&&t.createVNode("li",{class:"devui-no-result-template"},[t.createVNode("div",{class:"devui-no-data-tip"},[n.slots.noResultItemTemplate()])])])]),[[t.resolveDirective("dLoading"),c.value],[t.vShow,l.value&&r.value.length>0||n.slots.noResultItemTemplate&&v.value||S&&n.slots.searchingTemplate&&d.value]])}});const Ve=typeof window!="undefined";function q(e,n,o){document.addEventListener?e&&n&&o&&e.addEventListener(n,o,!1):e&&n&&o&&e.attachEvent("on"+n,o)}const N=Symbol("@@clickoutside"),x=new Map;let U,B=0,X=!0;function G(e,n,o){return Ve&&X&&(X=!1,q(document,"mousedown",l=>{U=l}),q(document,"mouseup",l=>{for(const[s,a]of x)a[N].documentHandler(l,U)})),function(l,s){!o||!n.instance||!l.target||!s.target||e.contains(l.target)||e.contains(s.target)||e===l.target||e[N].bindingFn&&e[N].bindingFn()}}const Se={beforeMount:function(e,n,o){B++,x.set(B,e),e[N]={nid:B,documentHandler:G(e,n,o),bindingFn:n.value}},updated:function(e,n,o){e[N].documentHandler=G(e,n,o),e[N].bindingFn=n.value},unmounted:function(e){x.delete(e[N].nid),delete e[N]}},Ce={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0}};function J(e){const n=/(auto|scroll|hidden)/;for(let o=e;o=o.parentElement;o.parentElement!==document.body){const l=window.getComputedStyle(o);if(n.test(l.overflow+l.overflowX+l.overflowY))return o}return window}function Ne(e,n,o,l){let{x:s,y:a}=n;if(!e){const{width:r,height:d}=l;s&&o.includes("start")&&(s=12),s&&o.includes("end")&&(s=Math.round(r-24)),a&&o.includes("start")&&(a=10),a&&o.includes("end")&&(a=d-14)}return{x:s,y:a}}function Ae(e,n){const o=t.ref(),l=t.ref(),s=(r,d,i,u)=>{const{x:c,y:v}=Ne(e.isArrowCenter,i,d,u.getBoundingClientRect()),f={top:"bottom",right:"left",bottom:"top",left:"right"}[d.split("-")[0]];Object.assign(r.style,{left:c?`${c}px`:"",top:v?`${v}px`:"",right:"",bottom:"",[f]:"-4px"})},a=async()=>{const r=e.origin,d=t.unref(o.value),i=t.unref(l.value),u=[m.offset(e.offset),m.autoPlacement({alignment:e.align,allowedPlacements:e.position})];e.showArrow&&u.push(m.arrow({element:i}));const{x:c,y:v,placement:f,middlewareData:y}=await m.computePosition(r,d,{strategy:"fixed",middleware:u});n("positionChange",f),Object.assign(d.style,{top:`${v}px`,left:`${c}px`}),e.showArrow&&s(i,f,y.arrow,d)};return t.watch(()=>e.modelValue,()=>{const r=J(e.origin);e.modelValue&&e.origin?(t.nextTick(a),r.addEventListener("scroll",a),r!==window&&window.addEventListener("scroll",a),window.addEventListener("resize",a)):(r.removeEventListener("scroll",a),r!==window&&window.removeEventListener("scroll",a),window.removeEventListener("resize",a))}),t.onUnmounted(()=>{const r=J(e.origin);r.removeEventListener("scroll",a),r!==window&&window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}),{arrowRef:l,overlayRef:o}}var Ke="";const De=t.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:Ce,emits:["update:modelValue","positionChange"],setup(e,{slots:n,attrs:o,emit:l}){const{arrowRef:s,overlayRef:a}=Ae(e,l);return()=>{var r;return e.modelValue&&t.createVNode("div",t.mergeProps({ref:a,class:"devui-flexible-overlay"},o),[(r=n.default)==null?void 0:r.call(n),e.showArrow&&t.createVNode("div",{ref:s,class:"devui-flexible-overlay-arrow"},null)])}}});function Q(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}var L=t.defineComponent({name:"DAutoComplete",directives:{ClickOutside:Se},props:se,emits:["update:modelValue"],setup(e,n){const{disabled:o,modelValue:l,appendToBody:s,dAutoCompleteWidth:a,delay:r,allowEmptyValueSearch:d,formatter:i,transInputFocusEmit:u,selectValue:c,source:v,searchFn:f,appendToBodyDirections:y,latestSource:w,showAnimation:h}=t.toRefs(e),{handleSearch:T,searchList:A,showNoResultItemTemplate:V,recentlyFocus:k}=ue(n,d,v,f,i),{onInput:S,onFocus:D,inputRef:g,visible:b,searchStatus:Z,handleClose:P,toggleMenu:ke}=de(n,A,V,l,o,r,T,u,k,w),{selectedIndex:ee,selectOptionClick:te}=ce(n,A,c,T,i,P),{showLoading:Fe,dropDownRef:oe,loadMore:Le}=fe(e,n,T),{customRenderSolts:ne}=ie(n,l),{hoverIndex:Ee,handlekeyDown:Re}=pe(oe,b,A,ee,Z,V,te,P);t.provide(j,{props:e,visible:b,term:"",searchList:A,selectedIndex:ee,searchStatus:Z,selectOptionClick:te,dropDownRef:oe,showLoading:Fe,loadMore:Le,latestSource:w,modelValue:l,showNoResultItemTemplate:V,hoverIndex:Ee});const le=t.ref(),ae=t.reactive({appendToBodyDirections:{}});ae.appendToBodyDirections=y;const xe=()=>{if(s.value){let I;return t.createVNode(De,{hasBackdrop:!1,origin:le,position:ae.appendToBodyDirections,visible:b.value,"onUpdate:visible":Be=>b.value=Be},{default:()=>[t.createVNode("div",{class:"devui-dropdown devui-auto-complete-menu",style:{width:a.value>0&&a.value+"px"}},[t.createVNode(Y,null,Q(I=ne())?I:{default:()=>[I]})])]})}else{let I;return t.createVNode("div",{class:"devui-dropdown",style:{width:a.value>0&&a.value+"px"}},[t.createVNode(t.Transition,{name:h?"fade":""},{default:()=>[t.createVNode(Y,null,Q(I=ne())?I:{default:()=>[I]})]})])}};return()=>t.withDirectives(t.createVNode("div",{class:["devui-auto-complete","devui-form-group","devui-has-feedback",b.value&&"devui-select-open"],ref:le,style:{width:a.value>0&&a.value+"px"}},[t.createVNode("input",{disabled:o.value,type:"text",onClick:ke,class:["devui-form-control","devui-dropdown-origin","devui-dropdown-origin-open",o.value&&"disabled"],placeholder:"Search",onInput:S,onFocus:D,value:l.value,ref:g,onKeydown:Re},null),xe()]),[[t.resolveDirective("click-outside"),P]])}});L.install=function(e){e.component(L.name,L)};var Ie={title:"AutoComplete \u81EA\u52A8\u8865\u5168",category:"\u6570\u636E\u5F55\u5165",status:"100%",install(e){e.use(L)}};p.AutoComplete=L,p.default=Ie,Object.defineProperty(p,"__esModule",{value:!0}),p[Symbol.toStringTag]="Module"});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.devui-auto-complete .devui-dropdown-menu,.devui-auto-complete-menu .devui-dropdown-menu{left:0!important;top:0!important}.devui-auto-complete .active{background:var(--devui-list-item-hover-bg, #f2f5fc)}.devui-auto-complete .devui-dropdown-menu{width:100%;display:block}.devui-auto-complete .devui-dropdown-menu-cdk{position:static}.devui-auto-complete .devui-dropdown-item{cursor:pointer;display:block;width:100%;padding:8px 12px;clear:both;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:14px}.devui-auto-complete .devui-dropdown-menu .devui-dropdown-item:not(.disabled).selected{color:var(--devui-list-item-active-text, #ffffff);background-color:var(--devui-list-item-active-bg, #5e7ce0)}.devui-auto-complete .devui-no-result-template,.devui-auto-complete .devui-is-searching-template{display:block;width:100%;padding:8px 12px;clear:both;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:not-allowed;background-color:var(--devui-disabled-bg, #f5f5f6);color:var(--devui-disabled-text, #adb0b8);line-height:14px}.devui-auto-complete .devui-no-result-template:hover,.devui-auto-complete .devui-no-result-template:active,.devui-auto-complete .devui-no-result-template:hover:active,.devui-auto-complete .devui-is-searching-template:hover,.devui-auto-complete .devui-is-searching-template:active,.devui-auto-complete .devui-is-searching-template:hover:active{background-color:var(--devui-unavailable, #f5f5f6)}.devui-auto-complete .devui-dropdown-item.disabled,.devui-auto-complete .devui-dropdown-item.disabled:hover{cursor:not-allowed;color:var(--devui-disabled-text, #adb0b8)}.devui-auto-complete ul.devui-list-unstyled{margin:0;overflow-y:auto}.devui-auto-complete .devui-dropdown-bg{background:var(--devui-list-item-hover-bg, #f2f5fc);color:var(--devui-list-item-hover-text, #526ecc)}.devui-auto-complete .devui-popup-tips{color:var(--devui-text-weak, #575d6c);padding:4px 12px}.devui-auto-complete .devui-dropdown-latestSource ul{line-height:initial!important}@keyframes devui-busy-spinner-anim{0%{transform:rotate(0) scale(1)}50%{transform:rotate(135deg) scale(1.5)}to{transform:rotate(270deg) scale(1)}}.devui-loading-mask{position:absolute;left:0;right:0;bottom:0;top:0;background-color:var(--devui-line, #adb0b8);opacity:.3}.devui-loading-wrapper{text-align:center}.devui-loading--full{position:fixed;left:0;right:0;bottom:0;top:0;z-index:9999}.devui-loading--hidden{overflow:hidden}.devui-loading-text{margin-left:10px}.devui-loading-area{position:absolute;transform:translate(-50%,-50%);padding:12px 14px;background:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px)}.devui-busy-default-spinner{position:relative;display:inline-block;width:15px;height:15px;animation:devui-busy-spinner-anim 1s linear infinite}.devui-busy-default-spinner div{position:absolute;left:44.5%;top:37%;width:6px;height:6px;border-radius:50%}.devui-busy-default-spinner .devui-loading-bar1{top:0;left:0;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-busy-default-spinner .devui-loading-bar2{top:0;left:9px;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-busy-default-spinner .devui-loading-bar3{top:9px;left:0;background:#859bff;background:var(--devui-brand-foil, #859bff)}.devui-busy-default-spinner .devui-loading-bar4{top:9px;left:9px;background:#5e7ce0;background:var(--devui-brand, #5e7ce0)}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 2px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-connected-overlay, 0 2px 8px 0) var(--devui-shadow, rgba(0, 0, 0, .2));z-index:1000}.devui-flexible-overlay-arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}
|
package/avatar/index.es.js
CHANGED
package/avatar/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(i,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(i=typeof globalThis!="undefined"?globalThis:i||self,e(i.index={},i.Vue))})(this,function(i,e){"use strict";const M=t=>{const{width:l,height:a}=t;return e.createVNode("svg",{style:{width:`${l}px`,height:`${a}px`,verticalAlign:"middle"},viewBox:"0 0 30 30",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createVNode("g",{id:"\u672A\u547D\u540D",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("circle",{id:"Oval",fill:"#CACFD8",cx:"15",cy:"15",r:"15"},null),e.createVNode("path",{d:"M14.9997866,16 C12.5145053,16 10.4997866,13.9852814 10.4997866,11.5 C10.4997866,9.01471863 12.5145053,7 14.9997866,7 C17.485068,7 19.4997866,9.01471863 19.4997866,11.5 C19.4997866,13.9852814 17.485068,16 14.9997866,16 Z M23,23 L7,22.998553 C7,19.0122153 10.8892296,16.5 14.9997866,16.5 C19.1103437,16.5 23,20 23,23 Z",id:"\u5F62\u72B6\u7ED3\u5408",fill:"#FFFFFF"},null)])])};var Z=e.defineComponent({name:"AvatarBodyIcon",props:{width:{type:Number,default:16},height:{type:Number,default:16}},render(){const{width:t,height:l}=this;return e.createVNode(M,{width:t,height:l},null)}});const b=t=>{const{width:l,height:a}=t;return e.createVNode("svg",{style:{width:`${l}px`,height:`${a}px`,verticalAlign:"middle"},viewBox:"0 0 30 30",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("path",{d:"M22.31,19.2474562 L22.31,21.9974562 L20.81,21.9974562 L20.81,19.2474562 L18.06,19.2474562 L18.06,17.7474562 L20.81,17.7474562 L20.81,14.9974562 L22.31,14.9974562 L22.31,17.7474562 L25.06,17.7474562 L25.06,19.2474562 L22.31,19.2474562 Z M14.9297866,14.9974562 C12.4445053,14.9974562 10.4297866,12.9827376 10.4297866,10.4974562 C10.4297866,8.01217483 12.4445053,5.9974562 14.9297866,5.9974562 C17.415068,5.9974562 19.4297866,8.01217483 19.4297866,10.4974562 C19.4297866,12.9827376 17.415068,14.9974562 14.9297866,14.9974562 Z M19.6797866,20.2474562 L19.6797866,21.9971623 L6.93,21.9960092 C6.93,18.0096715 10.8192296,15.4974562 14.9297866,15.4974562 C16.4608397,15.4974562 17.9612467,15.983021 19.2414296,16.7474562 L17.06,16.7474562 L17.06,20.2474562 L19.6797866,20.2474562 Z",id:"\u5F62\u72B6\u7ED3\u5408",fill:"#959EB2"},null),e.createVNode("path",{d:"M0,15 L1,15 C1,15.6118966 1.03919561,16.2186526 1.11683409,16.8178549 L0.125124012,16.9463505 C0.0425740367,16.309242 0,15.6595925 0,15 Z M0.503241262,18.867175 L1.46961749,18.6100428 C1.62594651,19.1975718 1.8203704,19.7729973 2.05141295,20.3332823 L1.12693074,20.7145074 C0.880599065,20.1171459 0.67172715,19.500393 0.503241262,18.867175 Z M1.99122134,22.4730778 L2.85786221,21.9741453 C3.16078316,22.5003161 3.49772502,23.0063252 3.86631639,23.4889602 L3.0715754,24.0959089 C2.6777461,23.5802273 2.31659753,23.0382531 1.99122134,22.4730778 Z M4.38894559,25.6021078 L5.09634867,24.8952974 C5.52582519,25.3251341 5.98272136,25.7268214 6.46397085,26.0975793 L5.85367498,26.8897529 C5.33779918,26.4923186 4.84851395,26.0620615 4.38894559,25.6021078 Z M7.4424647,27.9597887 L7.94703323,27.096417 C8.47111119,27.4026968 9.0146817,27.6746032 9.57453904,27.9101878 L9.18668461,28.8319084 C8.58423501,28.5784013 8.00181692,28.2866833 7.4424647,27.9597887 Z M11.0671021,29.4791103 L11.3286494,28.5139196 C11.9126912,28.6721832 12.5080563,28.7925378 13.1119738,28.8738935 L12.9784667,29.8649413 C12.3271613,29.7772019 11.6891102,29.647662 11.0671021,29.4791103 Z M15,30 C14.9951965,30 14.9903936,29.9999977 14.9855912,30 L14.9865313,28.9999937 C14.9929361,28.9999987 14.9929361,28.9999987 14.999296,29 C15.6071552,29 16.2093364,28.9614092 16.8041774,28.8849313 L16.9316965,29.8767674 C16.2992813,29.9580762 15.6545362,30 15,30 Z M18.8545762,29.5001051 L18.5982903,28.5335041 C19.1860387,28.3776677 19.7617059,28.1837179 20.3222555,27.9531286 L20.7026875,28.8779375 C20.1050484,29.123784 19.4880358,29.3321488 18.8545762,29.5001051 Z M22.4608087,28.0158343 L21.9626951,27.1487226 C22.4893928,26.8461604 22.9959399,26.5095265 23.479119,26.1411926 L24.0853678,26.9364676 C23.5691101,27.3300178 23.0265585,27.6908386 22.4608087,28.0158343 Z M25.5921583,25.6209863 L24.8860071,24.9129252 C25.3161421,24.4839504 25.7181674,24.0275419 26.0893023,23.5467621 L26.8808873,24.1578212 C26.4830546,24.6731862 26.0524368,25.1619493 25.5921583,25.6209863 Z M27.9526445,22.5697466 L27.0897495,22.0643633 C27.3964738,21.5406601 27.6688549,20.9974409 27.904942,20.4379104 L28.8262855,20.8266601 C28.5722411,21.4287497 28.2800163,22.0107897 27.9526445,22.5697466 Z M29.4756977,18.9454696 L28.5107363,18.6830777 C28.6695136,18.099165 28.7903877,17.5039035 28.8722662,16.9000659 L29.8631978,17.0344333 C29.7748946,17.6856516 29.6447979,18.3235936 29.4756977,18.9454696 Z M30,15 C30,15.0093541 29.9999914,15.0187063 29.9999743,15.0280564 L28.999976,15.0262257 C28.9999956,15.0134169 28.9999956,15.0134169 29,15.0006466 C29,14.3970304 28.9619395,13.7989704 28.8865088,13.208136 L29.8784576,13.0814959 C29.9586571,13.7096843 30,14.3500145 30,15 Z M29.5038108,11.1594275 L28.5369608,11.4147728 C28.3816616,10.8267413 28.1882232,10.2507676 27.9581175,9.68988857 L28.8832852,9.31033004 C29.1286141,9.90831524 29.3364318,10.5256569 29.5038108,11.1594275 Z M28.0228788,7.55146763 L27.1552968,8.0487618 C26.853241,7.52179373 26.5170958,7.0149453 26.1492295,6.53143425 L26.9450761,5.92593594 C27.3381231,6.44254364 27.6984223,6.98541919 28.0228788,7.55146763 Z M25.6309089,4.41780044 L24.9221905,5.12329189 C24.4935639,4.69270467 24.0374698,4.2902078 23.5569705,3.9185855 L24.1687554,3.12756133 C24.6838129,3.52591118 25.1722392,3.95703271 25.6309089,4.41780044 Z M22.5819506,2.05451093 L22.0757531,2.91692851 C21.5523008,2.60968727 21.0092999,2.33677531 20.4499564,2.10014728 L20.8395722,1.17916981 C21.4414531,1.43379309 22.0232574,1.72658499 22.5819506,2.05451093 Z M18.9594329,0.528106464 L18.696103,1.4928123 C18.1122842,1.33345081 17.517086,1.21199245 16.9132846,1.12953261 L17.0485964,0.138729543 C17.6997753,0.227659622 18.3376514,0.358382523 18.9594329,0.528106464 Z M15,-1.11022302e-16 C15.0139048,-1.11022302e-16 15.0278052,1.892004e-05 15.0417011,5.673578e-05 L15.0389797,1.00005303 C15.0197685,1.00000934 15.0197685,1.00000934 15.0005868,1.00000001 C14.4012162,1 13.8072783,1.03753392 13.2204527,1.11192427 L13.0946918,0.119863691 C13.7186509,0.0407660189 14.3545651,-1.11022302e-16 15,-1.11022302e-16 Z M11.1720354,0.492865376 L11.4265338,1.45993857 C10.8386468,1.61464899 10.2627801,1.80746996 9.70196444,2.03693489 L9.32327455,1.11141127 C9.92118954,0.86676666 10.5384173,0.659610554 11.1720354,0.492865376 Z M7.56375123,1.97008801 L8.06022548,2.83813946 C7.53298826,3.13968806 7.02583975,3.47534367 6.54199783,3.84274131 L5.93725081,3.04632368 C6.4542073,2.65378102 6.99740556,2.29400434 7.56375123,1.97008801 Z M4.42776842,4.35917772 L5.13259949,5.06855291 C4.70156141,5.49682984 4.29859416,5.95260763 3.92648544,6.43282469 L3.13602297,5.82031423 C3.53488885,5.30556625 3.96651291,4.81747851 4.42776842,4.35917772 Z M2.0616775,7.40585279 L2.92361696,7.91286401 C2.61586086,8.43606175 2.34241977,8.97884042 2.10525197,9.53799293 L1.18464153,9.14751063 C1.43984243,8.54584288 1.73319965,7.96427837 2.0616775,7.40585279 Z M0.531541456,11.0280046 L1.49601653,11.2921785 C1.33614878,11.8758413 1.21417484,12.4709081 1.13119244,13.074601 L0.140507978,12.9384235 C0.230001486,12.2873626 0.361276825,11.6496255 0.531541456,11.0280046 Z",id:"\u8499\u7248",fill:"#CACFD8","fill-rule":"nonzero"},null)])])};var x=e.defineComponent({name:"AvatarNobodyIcon",props:{width:{type:Number,default:16},height:{type:Number,default:16}},render(){const{width:t,height:l}=this;return e.createVNode(b,{width:t,height:l},null)}}),S="",L=e.defineComponent({name:"DAvatar",props:{name:{type:String,default:null},gender:{type:String,default:null},width:{type:Number,default:36},height:{type:Number,default:36},isRound:{type:Boolean,default:!0},imgSrc:{type:String,default:""},customText:{type:String,default:null}},setup(t){const{name:l,width:a,height:d,customText:o,gender:u,imgSrc:w,isRound:N}=e.toRefs(t),s=e.ref(!0),C=e.ref(!1),f=e.ref(12),h=e.ref(),n=e.ref(),p=r=>{const c=r,v=Math.min(a.value,d.value);c?(s.value=!1,y(c,v)):c===""?(s.value=!1,n.value=""):s.value=!0,f.value=v/4+3},y=(r,c)=>{if(o.value){n.value=o.value,g(o.value.substr(0,1));return}if(r.length<2)n.value=r;else if(/^[\u4e00-\u9fa5]/.test(r))n.value=r.substr(r.length-2,2);else if(/^[A-Za-z]/.test(r))if(/[_ -]/.test(r)){const v=r.split(/_|-|\s+/)[0],A=r.split(/_|-|\s+/)[1];n.value=v.substr(0,1).toUpperCase()+A.substr(0,1).toUpperCase()}else n.value=r.substr(0,2).toUpperCase();else n.value=r.substr(0,2);c<30&&(n.value=r.substr(0,1).toUpperCase()),g(r.substr(0,1))},g=r=>{if(u.value){if(u.value.toLowerCase()==="male")h.value=1;else if(u.value.toLowerCase()==="female")h.value=0;else throw new Error('gender must be "Male" or "Female"');return}const c=r.charCodeAt(0);h.value=c%2},m=()=>{C.value=!0};return p(o.value?o.value:l.value),e.watch([l,a,d,o,u],()=>{p(o.value?o.value:l.value)}),{showErrorAvatar:m,isErrorImg:C,code:h,fontSize:f,nameDisplay:n,isNobody:s}},render(){const{imgSrc:t,showErrorAvatar:l,height:a,width:d,isRound:o,isErrorImg:u,code:w,fontSize:N,nameDisplay:s,isNobody:C}=this,f=e.createVNode("img",{src:t,alt:"",onError:l,style:{height:`${a}px`,width:`${d}px`,borderRadius:o?"100%":"0"}},null),h=t&&!u?f:null,n=e.createVNode("span",{class:`devui-avatar-style devui-avatar-background-${w}`,style:{height:`${a}px`,width:`${d}px`,lineHeight:`${a}px`,fontSize:`${N}px`,borderRadius:o?"100%":"0"}},[s]),p=!t&&!C&&(s==null?void 0:s.length)!==0?n:null,y=e.createVNode("span",{class:"devui-avatar-style",style:{borderRadius:o?"100%":"0"}},[e.createVNode(Z,{width:d,height:a},null)]),g=!t&&!C&&(s==null?void 0:s.length)===0?y:null,m=e.createVNode("span",{class:"devui-avatar-style",style:{borderRadius:o?"100%":"0"}},[e.createVNode(x,{width:d,height:a},null)]),r=!t&&C||u?m:null;return e.createVNode("span",{class:"devui-avatar"},[h,p,g,r])}});L.install=function(t){t.component(L.name,L)};var V={title:"Avatar \u5934\u50CF",category:"\u6570\u636E\u5C55\u793A",status:"\u5DF2\u5B8C\u6210",install(t){t.use(L)}};i.Avatar=L,i.default=V,Object.defineProperty(i,"__esModule",{value:!0}),i[Symbol.toStringTag]="Module"});
|
|
1
|
+
(function(i,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(i=typeof globalThis!="undefined"?globalThis:i||self,e(i.index={},i.Vue))})(this,function(i,e){"use strict";const M=t=>{const{width:l,height:a}=t;return e.createVNode("svg",{style:{width:`${l}px`,height:`${a}px`,verticalAlign:"middle"},viewBox:"0 0 30 30",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createVNode("g",{id:"\u672A\u547D\u540D",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("circle",{id:"Oval",fill:"#CACFD8",cx:"15",cy:"15",r:"15"},null),e.createVNode("path",{d:"M14.9997866,16 C12.5145053,16 10.4997866,13.9852814 10.4997866,11.5 C10.4997866,9.01471863 12.5145053,7 14.9997866,7 C17.485068,7 19.4997866,9.01471863 19.4997866,11.5 C19.4997866,13.9852814 17.485068,16 14.9997866,16 Z M23,23 L7,22.998553 C7,19.0122153 10.8892296,16.5 14.9997866,16.5 C19.1103437,16.5 23,20 23,23 Z",id:"\u5F62\u72B6\u7ED3\u5408",fill:"#FFFFFF"},null)])])};var Z=e.defineComponent({name:"AvatarBodyIcon",props:{width:{type:Number,default:16},height:{type:Number,default:16}},render(){const{width:t,height:l}=this;return e.createVNode(M,{width:t,height:l},null)}});const b=t=>{const{width:l,height:a}=t;return e.createVNode("svg",{style:{width:`${l}px`,height:`${a}px`,verticalAlign:"middle"},viewBox:"0 0 30 30",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("path",{d:"M22.31,19.2474562 L22.31,21.9974562 L20.81,21.9974562 L20.81,19.2474562 L18.06,19.2474562 L18.06,17.7474562 L20.81,17.7474562 L20.81,14.9974562 L22.31,14.9974562 L22.31,17.7474562 L25.06,17.7474562 L25.06,19.2474562 L22.31,19.2474562 Z M14.9297866,14.9974562 C12.4445053,14.9974562 10.4297866,12.9827376 10.4297866,10.4974562 C10.4297866,8.01217483 12.4445053,5.9974562 14.9297866,5.9974562 C17.415068,5.9974562 19.4297866,8.01217483 19.4297866,10.4974562 C19.4297866,12.9827376 17.415068,14.9974562 14.9297866,14.9974562 Z M19.6797866,20.2474562 L19.6797866,21.9971623 L6.93,21.9960092 C6.93,18.0096715 10.8192296,15.4974562 14.9297866,15.4974562 C16.4608397,15.4974562 17.9612467,15.983021 19.2414296,16.7474562 L17.06,16.7474562 L17.06,20.2474562 L19.6797866,20.2474562 Z",id:"\u5F62\u72B6\u7ED3\u5408",fill:"#959EB2"},null),e.createVNode("path",{d:"M0,15 L1,15 C1,15.6118966 1.03919561,16.2186526 1.11683409,16.8178549 L0.125124012,16.9463505 C0.0425740367,16.309242 0,15.6595925 0,15 Z M0.503241262,18.867175 L1.46961749,18.6100428 C1.62594651,19.1975718 1.8203704,19.7729973 2.05141295,20.3332823 L1.12693074,20.7145074 C0.880599065,20.1171459 0.67172715,19.500393 0.503241262,18.867175 Z M1.99122134,22.4730778 L2.85786221,21.9741453 C3.16078316,22.5003161 3.49772502,23.0063252 3.86631639,23.4889602 L3.0715754,24.0959089 C2.6777461,23.5802273 2.31659753,23.0382531 1.99122134,22.4730778 Z M4.38894559,25.6021078 L5.09634867,24.8952974 C5.52582519,25.3251341 5.98272136,25.7268214 6.46397085,26.0975793 L5.85367498,26.8897529 C5.33779918,26.4923186 4.84851395,26.0620615 4.38894559,25.6021078 Z M7.4424647,27.9597887 L7.94703323,27.096417 C8.47111119,27.4026968 9.0146817,27.6746032 9.57453904,27.9101878 L9.18668461,28.8319084 C8.58423501,28.5784013 8.00181692,28.2866833 7.4424647,27.9597887 Z M11.0671021,29.4791103 L11.3286494,28.5139196 C11.9126912,28.6721832 12.5080563,28.7925378 13.1119738,28.8738935 L12.9784667,29.8649413 C12.3271613,29.7772019 11.6891102,29.647662 11.0671021,29.4791103 Z M15,30 C14.9951965,30 14.9903936,29.9999977 14.9855912,30 L14.9865313,28.9999937 C14.9929361,28.9999987 14.9929361,28.9999987 14.999296,29 C15.6071552,29 16.2093364,28.9614092 16.8041774,28.8849313 L16.9316965,29.8767674 C16.2992813,29.9580762 15.6545362,30 15,30 Z M18.8545762,29.5001051 L18.5982903,28.5335041 C19.1860387,28.3776677 19.7617059,28.1837179 20.3222555,27.9531286 L20.7026875,28.8779375 C20.1050484,29.123784 19.4880358,29.3321488 18.8545762,29.5001051 Z M22.4608087,28.0158343 L21.9626951,27.1487226 C22.4893928,26.8461604 22.9959399,26.5095265 23.479119,26.1411926 L24.0853678,26.9364676 C23.5691101,27.3300178 23.0265585,27.6908386 22.4608087,28.0158343 Z M25.5921583,25.6209863 L24.8860071,24.9129252 C25.3161421,24.4839504 25.7181674,24.0275419 26.0893023,23.5467621 L26.8808873,24.1578212 C26.4830546,24.6731862 26.0524368,25.1619493 25.5921583,25.6209863 Z M27.9526445,22.5697466 L27.0897495,22.0643633 C27.3964738,21.5406601 27.6688549,20.9974409 27.904942,20.4379104 L28.8262855,20.8266601 C28.5722411,21.4287497 28.2800163,22.0107897 27.9526445,22.5697466 Z M29.4756977,18.9454696 L28.5107363,18.6830777 C28.6695136,18.099165 28.7903877,17.5039035 28.8722662,16.9000659 L29.8631978,17.0344333 C29.7748946,17.6856516 29.6447979,18.3235936 29.4756977,18.9454696 Z M30,15 C30,15.0093541 29.9999914,15.0187063 29.9999743,15.0280564 L28.999976,15.0262257 C28.9999956,15.0134169 28.9999956,15.0134169 29,15.0006466 C29,14.3970304 28.9619395,13.7989704 28.8865088,13.208136 L29.8784576,13.0814959 C29.9586571,13.7096843 30,14.3500145 30,15 Z M29.5038108,11.1594275 L28.5369608,11.4147728 C28.3816616,10.8267413 28.1882232,10.2507676 27.9581175,9.68988857 L28.8832852,9.31033004 C29.1286141,9.90831524 29.3364318,10.5256569 29.5038108,11.1594275 Z M28.0228788,7.55146763 L27.1552968,8.0487618 C26.853241,7.52179373 26.5170958,7.0149453 26.1492295,6.53143425 L26.9450761,5.92593594 C27.3381231,6.44254364 27.6984223,6.98541919 28.0228788,7.55146763 Z M25.6309089,4.41780044 L24.9221905,5.12329189 C24.4935639,4.69270467 24.0374698,4.2902078 23.5569705,3.9185855 L24.1687554,3.12756133 C24.6838129,3.52591118 25.1722392,3.95703271 25.6309089,4.41780044 Z M22.5819506,2.05451093 L22.0757531,2.91692851 C21.5523008,2.60968727 21.0092999,2.33677531 20.4499564,2.10014728 L20.8395722,1.17916981 C21.4414531,1.43379309 22.0232574,1.72658499 22.5819506,2.05451093 Z M18.9594329,0.528106464 L18.696103,1.4928123 C18.1122842,1.33345081 17.517086,1.21199245 16.9132846,1.12953261 L17.0485964,0.138729543 C17.6997753,0.227659622 18.3376514,0.358382523 18.9594329,0.528106464 Z M15,-1.11022302e-16 C15.0139048,-1.11022302e-16 15.0278052,1.892004e-05 15.0417011,5.673578e-05 L15.0389797,1.00005303 C15.0197685,1.00000934 15.0197685,1.00000934 15.0005868,1.00000001 C14.4012162,1 13.8072783,1.03753392 13.2204527,1.11192427 L13.0946918,0.119863691 C13.7186509,0.0407660189 14.3545651,-1.11022302e-16 15,-1.11022302e-16 Z M11.1720354,0.492865376 L11.4265338,1.45993857 C10.8386468,1.61464899 10.2627801,1.80746996 9.70196444,2.03693489 L9.32327455,1.11141127 C9.92118954,0.86676666 10.5384173,0.659610554 11.1720354,0.492865376 Z M7.56375123,1.97008801 L8.06022548,2.83813946 C7.53298826,3.13968806 7.02583975,3.47534367 6.54199783,3.84274131 L5.93725081,3.04632368 C6.4542073,2.65378102 6.99740556,2.29400434 7.56375123,1.97008801 Z M4.42776842,4.35917772 L5.13259949,5.06855291 C4.70156141,5.49682984 4.29859416,5.95260763 3.92648544,6.43282469 L3.13602297,5.82031423 C3.53488885,5.30556625 3.96651291,4.81747851 4.42776842,4.35917772 Z M2.0616775,7.40585279 L2.92361696,7.91286401 C2.61586086,8.43606175 2.34241977,8.97884042 2.10525197,9.53799293 L1.18464153,9.14751063 C1.43984243,8.54584288 1.73319965,7.96427837 2.0616775,7.40585279 Z M0.531541456,11.0280046 L1.49601653,11.2921785 C1.33614878,11.8758413 1.21417484,12.4709081 1.13119244,13.074601 L0.140507978,12.9384235 C0.230001486,12.2873626 0.361276825,11.6496255 0.531541456,11.0280046 Z",id:"\u8499\u7248",fill:"#CACFD8","fill-rule":"nonzero"},null)])])};var x=e.defineComponent({name:"AvatarNobodyIcon",props:{width:{type:Number,default:16},height:{type:Number,default:16}},render(){const{width:t,height:l}=this;return e.createVNode(b,{width:t,height:l},null)}}),S="",L=e.defineComponent({name:"DAvatar",props:{name:{type:String,default:null},gender:{type:String,default:null},width:{type:Number,default:36},height:{type:Number,default:36},isRound:{type:Boolean,default:!0},imgSrc:{type:String,default:""},customText:{type:String,default:null}},setup(t){const{name:l,width:a,height:d,customText:o,gender:u,imgSrc:w,isRound:N}=e.toRefs(t),s=e.ref(!0),C=e.ref(!1),f=e.ref(12),h=e.ref(),n=e.ref(),p=r=>{const c=r,v=Math.min(a.value,d.value);c?(s.value=!1,y(c,v)):c===""?(s.value=!1,n.value=""):s.value=!0,f.value=v/4+3},y=(r,c)=>{if(o.value){n.value=o.value,g(o.value.substr(0,1));return}if(r.length<2)n.value=r;else if(/^[\u4e00-\u9fa5]/.test(r))n.value=r.substr(r.length-2,2);else if(/^[A-Za-z]/.test(r))if(/[_ -]/.test(r)){const v=r.split(/_|-|\s+/)[0],A=r.split(/_|-|\s+/)[1];n.value=v.substr(0,1).toUpperCase()+A.substr(0,1).toUpperCase()}else n.value=r.substr(0,2).toUpperCase();else n.value=r.substr(0,2);c<30&&(n.value=r.substr(0,1).toUpperCase()),g(r.substr(0,1))},g=r=>{if(u.value){if(u.value.toLowerCase()==="male")h.value=1;else if(u.value.toLowerCase()==="female")h.value=0;else throw new Error('gender must be "Male" or "Female"');return}const c=r.charCodeAt(0);h.value=c%2},m=()=>{C.value=!0};return p(o.value?o.value:l.value),e.watch([l,a,d,o,u],()=>{p(o.value?o.value:l.value)}),{showErrorAvatar:m,isErrorImg:C,code:h,fontSize:f,nameDisplay:n,isNobody:s}},render(){const{imgSrc:t,showErrorAvatar:l,height:a,width:d,isRound:o,isErrorImg:u,code:w,fontSize:N,nameDisplay:s,isNobody:C}=this,f=e.createVNode("img",{src:t,alt:"",onError:l,style:{height:`${a}px`,width:`${d}px`,borderRadius:o?"100%":"0"}},null),h=t&&!u?f:null,n=e.createVNode("span",{class:`devui-avatar-style devui-avatar-background-${w}`,style:{height:`${a}px`,width:`${d}px`,lineHeight:`${a}px`,fontSize:`${N}px`,borderRadius:o?"100%":"0"}},[s]),p=!t&&!C&&(s==null?void 0:s.length)!==0?n:null,y=e.createVNode("span",{class:"devui-avatar-style",style:{borderRadius:o?"100%":"0"}},[e.createVNode(Z,{width:d,height:a},null)]),g=!t&&!C&&(s==null?void 0:s.length)===0?y:null,m=e.createVNode("span",{class:"devui-avatar-style",style:{borderRadius:o?"100%":"0"}},[e.createVNode(x,{width:d,height:a},null)]),r=!t&&C||u?m:null;return e.createVNode("span",{class:"devui-avatar"},[h,p,g,r])}});L.install=function(t){t.component(L.name,L)};var V={title:"Avatar \u5934\u50CF",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(t){t.use(L)}};i.Avatar=L,i.default=V,Object.defineProperty(i,"__esModule",{value:!0}),i[Symbol.toStringTag]="Module"});
|
package/back-top/index.es.js
CHANGED
|
@@ -94,7 +94,7 @@ var BackTop = defineComponent({
|
|
|
94
94
|
const slots = ctx.slots;
|
|
95
95
|
const backTopRef = ref(null);
|
|
96
96
|
const position = usePosition(props);
|
|
97
|
-
|
|
97
|
+
const isVisible = useVisibility(props, backTopRef);
|
|
98
98
|
const scrollToTop = () => {
|
|
99
99
|
window && window.scrollTo({
|
|
100
100
|
top: 0,
|
package/back-top/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var m=Object.defineProperty,w=Object.defineProperties;var f=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var g=(e,t,o)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,r=(e,t)=>{for(var o in t||(t={}))y.call(t,o)&&g(e,o,t[o]);if(N)for(var o of N(t))A.call(t,o)&&g(e,o,t[o]);return e},a=(e,t)=>w(e,f(t));(function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.index={},e.Vue))})(this,function(e,t){"use strict";const o={bottom:{type:String,default:"50px"},right:{type:String,default:"30px"},target:{type:String,default:"window"},visibleHeight:{type:Number,default:300}};function d(M){const{bottom:n,right:i}=M;return{bottom:n,right:i}}function j(M,n){const i=M.target;return i==="window"?window||document.documentElement||document.body:(()=>{const u=document.querySelector(i);if(!u)throw new Error(`props ${i} is not existed`);return u.parentElement.style.position="relative",n.value.style.position="absolute",u})()}function I(M,n){const i=M.visibleHeight,c=t.ref(0),
|
|
1
|
+
var m=Object.defineProperty,w=Object.defineProperties;var f=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var g=(e,t,o)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,r=(e,t)=>{for(var o in t||(t={}))y.call(t,o)&&g(e,o,t[o]);if(N)for(var o of N(t))A.call(t,o)&&g(e,o,t[o]);return e},a=(e,t)=>w(e,f(t));(function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.index={},e.Vue))})(this,function(e,t){"use strict";const o={bottom:{type:String,default:"50px"},right:{type:String,default:"30px"},target:{type:String,default:"window"},visibleHeight:{type:Number,default:300}};function d(M){const{bottom:n,right:i}=M;return{bottom:n,right:i}}function j(M,n){const i=M.target;return i==="window"?window||document.documentElement||document.body:(()=>{const u=document.querySelector(i);if(!u)throw new Error(`props ${i} is not existed`);return u.parentElement.style.position="relative",n.value.style.position="absolute",u})()}function I(M,n){const i=M.visibleHeight,c=t.ref(0),s=function(){c.value=u===window?window.pageYOffset:u.scrollTop};let u=null;return t.onMounted(()=>{u=j(M,n),D(u,"scroll",T(s,150))}),t.computed(()=>c.value>=i)}function D(M,n,i){M&&M.addEventListener(n,i)}function T(M,n){let i=null;return(...c)=>{const s=+Date.now();if(s-i>n)return i=s,M.apply(this,c)}}var b="",p="data:image/svg+xml;base64,PHN2ZyB0PSIxNjM2MjU2NTI0MjUxIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjM0NTciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTAgMGgxMDI0djEwMjRIMHoiIGZpbGw9IiNmZmZmZmYiIGZpbGwtb3BhY2l0eT0iMCIgcC1pZD0iMzQ1OCI+PC9wYXRoPjxwYXRoIGQ9Ik04NzguOTMzMzMzIDY1OC40MTA2NjdhNDEuNjg1MzMzIDQxLjY4NTMzMyAwIDAgMS01OC45NDQgMC4zMmwtMzA3Ljk2OC0zMDQuNjRMMjA0LjAxMDY2NyA2NTguNzczMzMzYTQxLjY4NTMzMyA0MS42ODUzMzMgMCAwIDEtNTguNTYgMC4wNjQgNDAuNjE4NjY3IDQwLjYxODY2NyAwIDAgMS0wLjA2NC01Ny44MTMzMzNsMzM1LjQyNC0zMzEuNzMzMzMzYTQxLjU3ODY2NyA0MS41Nzg2NjcgMCAwIDEgMzEuMDQtMTIuMDEwNjY3IDQxLjQ5MzMzMyA0MS40OTMzMzMgMCAwIDEgMzEuMzYgMTEuOTg5MzMzbDMzNS40MDI2NjYgMzMxLjczMzMzNGMxNS45MzYgMTUuNzg2NjY3IDE2LjA4NTMzMyA0MS40OTMzMzMgMC4zMiA1Ny40MjkzMzN6IiBmaWxsPSIjZmZmZmZmIiBwLWlkPSIzNDU5Ij48L3BhdGg+PHBhdGggZD0iTTU1NC42NjY2NjcgMzYyLjY2NjY2N3Y1MzMuMzMzMzMzYTQyLjY2NjY2NyA0Mi42NjY2NjcgMCAxIDEtODUuMzMzMzM0IDBWMzYyLjY2NjY2N2E0Mi42NjY2NjcgNDIuNjY2NjY3IDAgMSAxIDg1LjMzMzMzNCAwek0xMjggODUuMzMzMzMzaDc2OGE0Mi42NjY2NjcgNDIuNjY2NjY3IDAgMSAxIDAgODUuMzMzMzM0SDEyOGE0Mi42NjY2NjcgNDIuNjY2NjY3IDAgMSAxIDAtODUuMzMzMzM0eiIgZmlsbD0iI2ZmZmZmZiIgcC1pZD0iMzQ2MCI+PC9wYXRoPjwvc3ZnPg==",l=t.defineComponent({name:"DBackTop",props:o,emits:[],setup(M,n){const i=n.slots,c=t.ref(null),s=d(M),u=I(M,c),z=()=>{window&&window.scrollTo({top:0,left:0,behavior:"smooth"})};return()=>t.createVNode("div",{class:"devui-back-top",ref:c,style:a(r({},s),{display:u.value?"block":"none"}),onClick:z},[t.createVNode("div",{class:["devui-back-top-base",i.default?"devui-backtop-custom":"devui-back-top-content"]},[i.default?i.default():t.createVNode(p,null,null)])])}});l.install=function(M){M.component(l.name,l)};var Y={title:"BackTop \u56DE\u5230\u9876\u90E8",category:"\u5BFC\u822A",status:"60%",install(M){M.use(l)}};e.BackTop=l,e.default=Y,Object.defineProperty(e,"__esModule",{value:!0}),e[Symbol.toStringTag]="Module"});
|
package/badge/index.es.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { defineComponent, computed, createVNode } from "vue";
|
|
2
|
-
var badge = "";
|
|
3
2
|
const badgeStatusType = ["danger", "warning", "waiting", "success", "info"];
|
|
4
3
|
const badgePositionType = ["top-left", "top-right", "bottom-left", "bottom-right"];
|
|
5
4
|
const badgeProps = {
|
|
@@ -18,12 +17,12 @@ const badgeProps = {
|
|
|
18
17
|
type: String,
|
|
19
18
|
validator: (val) => badgeStatusType.includes(val)
|
|
20
19
|
},
|
|
21
|
-
|
|
20
|
+
position: {
|
|
22
21
|
type: String,
|
|
23
22
|
default: "top-right",
|
|
24
23
|
validator: (val) => badgePositionType.includes(val)
|
|
25
24
|
},
|
|
26
|
-
|
|
25
|
+
offset: {
|
|
27
26
|
type: Array
|
|
28
27
|
},
|
|
29
28
|
bgColor: {
|
|
@@ -33,29 +32,27 @@ const badgeProps = {
|
|
|
33
32
|
type: String
|
|
34
33
|
}
|
|
35
34
|
};
|
|
35
|
+
var badge = "";
|
|
36
36
|
var Badge = defineComponent({
|
|
37
37
|
name: "DBadge",
|
|
38
38
|
props: badgeProps,
|
|
39
|
-
emits: [],
|
|
40
39
|
setup(props, ctx) {
|
|
41
40
|
const className = computed(() => {
|
|
42
41
|
const base = "devui-badge-content";
|
|
43
|
-
return [base, props.showDot ? `${base}-dot` : `${base}-count`, props.status && `${base}-${props.status}`, ctx.slots.default && props.
|
|
42
|
+
return [base, props.showDot ? `${base}-dot` : `${base}-count`, props.status && `${base}-${props.status}`, ctx.slots.default && props.position && `${base}-${props.position}`, ctx.slots.default && `${base}-fixed`].join(" ");
|
|
44
43
|
});
|
|
45
44
|
const style = computed(() => {
|
|
46
45
|
const styleMap = {
|
|
47
46
|
bgColor: "background",
|
|
48
47
|
textColor: "color"
|
|
49
48
|
};
|
|
50
|
-
const ret = Object.keys(styleMap).reduce((
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
return ret2;
|
|
49
|
+
const ret = Object.keys(styleMap).reduce((result, key) => {
|
|
50
|
+
props[key] && (result[styleMap[key]] = props[key]);
|
|
51
|
+
return result;
|
|
55
52
|
}, {});
|
|
56
|
-
if (ctx.slots.default && props.
|
|
57
|
-
const [x, y] = props.
|
|
58
|
-
const [yName, xName] = props.
|
|
53
|
+
if (ctx.slots.default && props.offset) {
|
|
54
|
+
const [x, y] = props.offset;
|
|
55
|
+
const [yName, xName] = props.position.split("-");
|
|
59
56
|
ret[yName] = y + "px";
|
|
60
57
|
ret[xName] = x + "px";
|
|
61
58
|
}
|
|
@@ -81,15 +78,12 @@ var Badge = defineComponent({
|
|
|
81
78
|
};
|
|
82
79
|
}
|
|
83
80
|
});
|
|
84
|
-
Badge.install = function(app) {
|
|
85
|
-
app.component(Badge.name, Badge);
|
|
86
|
-
};
|
|
87
81
|
var index = {
|
|
88
82
|
title: "Badge \u5FBD\u6807",
|
|
89
83
|
category: "\u6570\u636E\u5C55\u793A",
|
|
90
|
-
status: "
|
|
84
|
+
status: "100%",
|
|
91
85
|
install(app) {
|
|
92
|
-
app.
|
|
86
|
+
app.component(Badge.name, Badge);
|
|
93
87
|
}
|
|
94
88
|
};
|
|
95
|
-
export { Badge, index as default };
|
|
89
|
+
export { Badge, badgeProps, index as default };
|
package/badge/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(o
|
|
1
|
+
(function(n,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(n=typeof globalThis!="undefined"?globalThis:n||self,o(n.index={},n.Vue))})(this,function(n,o){"use strict";const c=["danger","warning","waiting","success","info"],f=["top-left","top-right","bottom-left","bottom-right"],l={count:{type:[Number,String]},maxCount:{type:Number,default:99},showDot:{type:Boolean,default:!1},status:{type:String,validator:t=>c.includes(t)},position:{type:String,default:"top-right",validator:t=>f.includes(t)},offset:{type:Array},bgColor:{type:String},textColor:{type:String}};var x="",s=o.defineComponent({name:"DBadge",props:l,setup(t,i){const g=o.computed(()=>{const e="devui-badge-content";return[e,t.showDot?`${e}-dot`:`${e}-count`,t.status&&`${e}-${t.status}`,i.slots.default&&t.position&&`${e}-${t.position}`,i.slots.default&&`${e}-fixed`].join(" ")}),m=o.computed(()=>{const e={bgColor:"background",textColor:"color"},u=Object.keys(e).reduce((d,a)=>(t[a]&&(d[e[a]]=t[a]),d),{});if(i.slots.default&&t.offset){const[d,a]=t.offset,[b,v]=t.position.split("-");u[b]=a+"px",u[v]=d+"px"}return u}),y=o.computed(()=>{if(!t.showDot)return typeof t.count=="number"&&typeof t.maxCount=="number"&&t.count>t.maxCount?`${t.maxCount}+`:t.count});return()=>{var e,u;return o.createVNode("div",{class:"devui-badge"},[(u=(e=i.slots).default)==null?void 0:u.call(e),o.createVNode("div",{class:g.value,style:m.value},[y.value])])}}}),r={title:"Badge \u5FBD\u6807",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(t){t.component(s.name,s)}};n.Badge=s,n.badgeProps=l,n.default=r,Object.defineProperty(n,"__esModule",{value:!0}),n[Symbol.toStringTag]="Module"});
|
package/button/index.es.js
CHANGED
|
@@ -14,7 +14,11 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
var __publicField = (obj, key, value) => {
|
|
18
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19
|
+
return value;
|
|
20
|
+
};
|
|
21
|
+
import { defineComponent, createVNode, ref, h, render, computed, toRefs, withDirectives, resolveDirective } from "vue";
|
|
18
22
|
var Icon = defineComponent({
|
|
19
23
|
name: "DIcon",
|
|
20
24
|
props: {
|
|
@@ -49,7 +53,8 @@ var Icon = defineComponent({
|
|
|
49
53
|
"src": name,
|
|
50
54
|
"alt": name.split("/")[name.split("/").length - 1],
|
|
51
55
|
"style": {
|
|
52
|
-
width: size
|
|
56
|
+
width: size,
|
|
57
|
+
verticalAlign: "text-bottom"
|
|
53
58
|
}
|
|
54
59
|
}, null) : createVNode("i", {
|
|
55
60
|
"class": `${classPrefix} ${classPrefix}-${name}`,
|
|
@@ -63,127 +68,302 @@ var Icon = defineComponent({
|
|
|
63
68
|
Icon.install = function(app) {
|
|
64
69
|
app.component(Icon.name, Icon);
|
|
65
70
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
class View {
|
|
72
|
+
constructor() {
|
|
73
|
+
__publicField(this, "top", "50%");
|
|
74
|
+
__publicField(this, "left", "50%");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const componentProps = {
|
|
78
|
+
message: String,
|
|
79
|
+
backdrop: Boolean,
|
|
80
|
+
view: {
|
|
81
|
+
type: Object,
|
|
82
|
+
default: () => new View()
|
|
83
|
+
},
|
|
84
|
+
zIndex: Number,
|
|
85
|
+
isFull: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: false
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
class LoadingProps {
|
|
91
|
+
constructor() {
|
|
92
|
+
__publicField(this, "target");
|
|
93
|
+
__publicField(this, "message");
|
|
94
|
+
__publicField(this, "loadingTemplateRef");
|
|
95
|
+
__publicField(this, "backdrop", true);
|
|
96
|
+
__publicField(this, "positionType", "relative");
|
|
97
|
+
__publicField(this, "view", new View());
|
|
98
|
+
__publicField(this, "zIndex");
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
var loading = "";
|
|
102
|
+
var Loading = defineComponent({
|
|
103
|
+
name: "DLoading",
|
|
104
|
+
inheritAttrs: false,
|
|
105
|
+
props: componentProps,
|
|
106
|
+
setup(props) {
|
|
107
|
+
const style = {
|
|
108
|
+
top: props.view.top,
|
|
109
|
+
left: props.view.left,
|
|
110
|
+
zIndex: props.zIndex
|
|
111
|
+
};
|
|
112
|
+
if (!props.message) {
|
|
113
|
+
style.background = "none";
|
|
114
|
+
}
|
|
115
|
+
const isShow = ref(false);
|
|
116
|
+
const open = () => {
|
|
117
|
+
isShow.value = true;
|
|
118
|
+
};
|
|
119
|
+
const close = () => {
|
|
120
|
+
isShow.value = false;
|
|
121
|
+
};
|
|
122
|
+
return {
|
|
123
|
+
style,
|
|
124
|
+
isShow,
|
|
125
|
+
open,
|
|
126
|
+
close
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
render() {
|
|
130
|
+
var _a;
|
|
131
|
+
const {
|
|
132
|
+
isShow,
|
|
133
|
+
isFull,
|
|
134
|
+
backdrop,
|
|
135
|
+
style,
|
|
136
|
+
message,
|
|
137
|
+
$slots
|
|
138
|
+
} = this;
|
|
139
|
+
return isShow && createVNode("div", {
|
|
140
|
+
"class": ["devui-loading-contanier", isFull ? "devui-loading--full" : ""]
|
|
141
|
+
}, [((_a = $slots.default) == null ? void 0 : _a.call($slots)) || createVNode("div", {
|
|
142
|
+
"class": "devui-loading-wrapper"
|
|
143
|
+
}, [backdrop ? createVNode("div", {
|
|
144
|
+
"class": "devui-loading-mask"
|
|
145
|
+
}, null) : null, createVNode("div", {
|
|
146
|
+
"style": style,
|
|
147
|
+
"class": "devui-loading-area"
|
|
148
|
+
}, [createVNode("div", {
|
|
149
|
+
"class": "devui-busy-default-spinner"
|
|
150
|
+
}, [createVNode("div", {
|
|
151
|
+
"class": "devui-loading-bar1"
|
|
152
|
+
}, null), createVNode("div", {
|
|
153
|
+
"class": "devui-loading-bar2"
|
|
154
|
+
}, null), createVNode("div", {
|
|
155
|
+
"class": "devui-loading-bar3"
|
|
156
|
+
}, null), createVNode("div", {
|
|
157
|
+
"class": "devui-loading-bar4"
|
|
158
|
+
}, null)]), message ? createVNode("span", {
|
|
159
|
+
"class": "devui-loading-text"
|
|
160
|
+
}, [message]) : null])])]);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
const COMPONENT_CONTAINER_SYMBOL = Symbol("dev_component_container");
|
|
164
|
+
function createComponent(Component, props, children = null) {
|
|
165
|
+
const vnode = h(Component, __spreadValues({}, props), children);
|
|
166
|
+
const container = document.createElement("div");
|
|
167
|
+
vnode[COMPONENT_CONTAINER_SYMBOL] = container;
|
|
168
|
+
render(vnode, container);
|
|
169
|
+
return vnode.component;
|
|
170
|
+
}
|
|
171
|
+
function unmountComponent(ComponnetInstance) {
|
|
172
|
+
render(null, ComponnetInstance == null ? void 0 : ComponnetInstance.vnode[COMPONENT_CONTAINER_SYMBOL]);
|
|
173
|
+
}
|
|
174
|
+
const loadingConstructor = defineComponent(Loading);
|
|
175
|
+
const cacheInstance = /* @__PURE__ */ new WeakSet();
|
|
176
|
+
const isEmpty = (val) => {
|
|
177
|
+
if (!val)
|
|
178
|
+
return true;
|
|
179
|
+
if (Array.isArray(val))
|
|
180
|
+
return val.length === 0;
|
|
181
|
+
if (val instanceof Set || val instanceof Map)
|
|
182
|
+
return val.size === 0;
|
|
183
|
+
if (val instanceof Promise)
|
|
184
|
+
return false;
|
|
185
|
+
if (typeof val === "object") {
|
|
186
|
+
try {
|
|
187
|
+
return Object.keys(val).length === 0;
|
|
188
|
+
} catch (e) {
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return false;
|
|
193
|
+
};
|
|
194
|
+
const getType = (vari) => {
|
|
195
|
+
return Object.prototype.toString.call(vari).slice(8, -1).toLowerCase();
|
|
196
|
+
};
|
|
197
|
+
const isPromise = (value) => {
|
|
198
|
+
const type = getType(value);
|
|
199
|
+
switch (type) {
|
|
200
|
+
case "promise":
|
|
201
|
+
return [value];
|
|
202
|
+
case "array":
|
|
203
|
+
if (value.some((val) => getType(val) !== "promise")) {
|
|
204
|
+
console.error(new TypeError("Binding values should all be of type Promise"));
|
|
205
|
+
return "error";
|
|
206
|
+
}
|
|
207
|
+
return value;
|
|
208
|
+
default:
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
const unmount = (el) => {
|
|
213
|
+
cacheInstance.delete(el);
|
|
214
|
+
el.instance.proxy.close();
|
|
215
|
+
unmountComponent(el.instance);
|
|
216
|
+
};
|
|
217
|
+
const toggleLoading = (el, binding) => {
|
|
218
|
+
if (binding.value) {
|
|
219
|
+
const vals = isPromise(binding.value);
|
|
220
|
+
if (vals === "error")
|
|
221
|
+
return;
|
|
222
|
+
el.instance.proxy.open();
|
|
223
|
+
el.appendChild(el.mask);
|
|
224
|
+
cacheInstance.add(el);
|
|
225
|
+
if (vals) {
|
|
226
|
+
Promise.all(vals).catch((err) => {
|
|
227
|
+
console.error(new Error("Promise handling errors"), err);
|
|
228
|
+
}).finally(() => {
|
|
229
|
+
unmount(el);
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
} else {
|
|
233
|
+
unmount(el);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
const removeAttribute = (el) => {
|
|
237
|
+
el.removeAttribute("zindex");
|
|
238
|
+
el.removeAttribute("positiontype");
|
|
239
|
+
el.removeAttribute("backdrop");
|
|
240
|
+
el.removeAttribute("message");
|
|
241
|
+
el.removeAttribute("view");
|
|
242
|
+
el.removeAttribute("loadingtemplateref");
|
|
243
|
+
};
|
|
244
|
+
const handleProps = (el, vprops) => {
|
|
245
|
+
const props = __spreadValues(__spreadValues({}, new LoadingProps()), vprops);
|
|
246
|
+
const loadingTemplateRef = props.loadingTemplateRef;
|
|
247
|
+
const loadingInstance = createComponent(loadingConstructor, __spreadValues({}, props), loadingTemplateRef ? () => loadingTemplateRef : null);
|
|
248
|
+
el.style.position = props.positionType;
|
|
249
|
+
el.options = props;
|
|
250
|
+
el.instance = loadingInstance;
|
|
251
|
+
el.mask = loadingInstance.proxy.$el;
|
|
252
|
+
};
|
|
253
|
+
const loadingDirective = {
|
|
254
|
+
mounted: function(el, binding, vnode) {
|
|
255
|
+
handleProps(el, vnode.props);
|
|
256
|
+
removeAttribute(el);
|
|
257
|
+
!isEmpty(binding.value) && toggleLoading(el, binding);
|
|
70
258
|
},
|
|
71
|
-
|
|
259
|
+
updated: function(el, binding, vnode) {
|
|
260
|
+
if (!isEmpty(binding.value) && cacheInstance.has(el) || isEmpty(binding.value) && !cacheInstance.has(el))
|
|
261
|
+
return;
|
|
262
|
+
!cacheInstance.has(el) && handleProps(el, vnode.props);
|
|
263
|
+
removeAttribute(el);
|
|
264
|
+
toggleLoading(el, binding);
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
const buttonProps = {
|
|
268
|
+
variant: {
|
|
72
269
|
type: String,
|
|
73
|
-
default: "
|
|
270
|
+
default: "outline"
|
|
74
271
|
},
|
|
75
272
|
size: {
|
|
76
273
|
type: String,
|
|
77
274
|
default: "md"
|
|
78
275
|
},
|
|
79
|
-
|
|
80
|
-
type: String
|
|
81
|
-
default: "default"
|
|
82
|
-
},
|
|
83
|
-
bordered: {
|
|
84
|
-
type: Boolean,
|
|
85
|
-
default: false
|
|
276
|
+
color: {
|
|
277
|
+
type: String
|
|
86
278
|
},
|
|
87
279
|
icon: {
|
|
88
280
|
type: String,
|
|
89
281
|
default: ""
|
|
90
282
|
},
|
|
91
|
-
|
|
283
|
+
loading: {
|
|
92
284
|
type: Boolean,
|
|
93
285
|
default: false
|
|
94
286
|
},
|
|
95
|
-
width: {
|
|
96
|
-
type: String
|
|
97
|
-
},
|
|
98
287
|
disabled: {
|
|
99
288
|
type: Boolean,
|
|
100
289
|
default: false
|
|
101
|
-
},
|
|
102
|
-
autofocus: {
|
|
103
|
-
type: Boolean,
|
|
104
|
-
default: false
|
|
105
|
-
},
|
|
106
|
-
onClick: {
|
|
107
|
-
type: Function
|
|
108
290
|
}
|
|
109
291
|
};
|
|
292
|
+
function useButton(props, ctx) {
|
|
293
|
+
const hasContent = computed(() => ctx.slots.default);
|
|
294
|
+
const colorMap = {
|
|
295
|
+
solid: "primary",
|
|
296
|
+
outline: "secondary",
|
|
297
|
+
text: "secondary"
|
|
298
|
+
};
|
|
299
|
+
const defaultColor = colorMap[props.variant];
|
|
300
|
+
const classes = computed(() => ({
|
|
301
|
+
"devui-btn": true,
|
|
302
|
+
[`devui-btn-${props.variant}`]: true,
|
|
303
|
+
[`devui-btn-${props.variant}-${props.color || defaultColor}`]: true,
|
|
304
|
+
[`devui-btn-${props.size}`]: true,
|
|
305
|
+
"devui-btn-icon-wrap": props.icon,
|
|
306
|
+
"devui-btn-icon": props.icon && !hasContent.value && props.variant !== "solid"
|
|
307
|
+
}));
|
|
308
|
+
const iconClass = computed(() => {
|
|
309
|
+
if (!props.icon) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
const origin = "devui-icon-fix icon";
|
|
313
|
+
if (hasContent.value) {
|
|
314
|
+
return `${origin} clear-right-5`;
|
|
315
|
+
} else {
|
|
316
|
+
return origin;
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
return { classes, iconClass };
|
|
320
|
+
}
|
|
110
321
|
var button = "";
|
|
111
322
|
var Button = defineComponent({
|
|
112
323
|
name: "DButton",
|
|
324
|
+
directives: {
|
|
325
|
+
devLoading: loadingDirective
|
|
326
|
+
},
|
|
113
327
|
props: buttonProps,
|
|
328
|
+
emits: ["click"],
|
|
114
329
|
setup(props, ctx) {
|
|
115
|
-
const
|
|
330
|
+
const {
|
|
331
|
+
icon,
|
|
332
|
+
disabled,
|
|
333
|
+
loading: loading2
|
|
334
|
+
} = toRefs(props);
|
|
335
|
+
const {
|
|
336
|
+
classes,
|
|
337
|
+
iconClass
|
|
338
|
+
} = useButton(props, ctx);
|
|
116
339
|
const onClick = (e) => {
|
|
117
|
-
|
|
118
|
-
if (props.showLoading) {
|
|
340
|
+
if (loading2.value) {
|
|
119
341
|
return;
|
|
120
342
|
}
|
|
121
|
-
|
|
343
|
+
ctx.emit("click", e);
|
|
122
344
|
};
|
|
123
|
-
const hasContent = computed(() => ctx.slots.default);
|
|
124
|
-
const btnClass = computed(() => {
|
|
125
|
-
const {
|
|
126
|
-
btnStyle,
|
|
127
|
-
size,
|
|
128
|
-
position,
|
|
129
|
-
bordered,
|
|
130
|
-
icon
|
|
131
|
-
} = props;
|
|
132
|
-
const origin = `devui-btn devui-btn-${btnStyle} devui-btn-${size} devui-btn-${position}`;
|
|
133
|
-
const borderedClass = bordered ? "bordered" : "";
|
|
134
|
-
const btnIcon = !!icon && !hasContent.value && btnStyle !== "primary" ? "d-btn-icon" : "";
|
|
135
|
-
const btnIconWrap = !!icon ? "d-btn-icon-wrap" : "";
|
|
136
|
-
return `${origin} ${borderedClass} ${btnIcon} ${btnIconWrap}`;
|
|
137
|
-
});
|
|
138
|
-
const iconClass = computed(() => {
|
|
139
|
-
if (!props.icon) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
const origin = "devui-icon-fix icon";
|
|
143
|
-
if (hasContent.value) {
|
|
144
|
-
return `${origin} clear-right-5`;
|
|
145
|
-
} else {
|
|
146
|
-
return origin;
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
345
|
return () => {
|
|
150
346
|
var _a, _b;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
disabled,
|
|
155
|
-
showLoading,
|
|
156
|
-
width
|
|
157
|
-
} = props;
|
|
158
|
-
return createVNode("div", mergeProps({
|
|
159
|
-
"class": "devui-btn-host"
|
|
160
|
-
}, ctx.attrs), [createVNode("button", {
|
|
161
|
-
"class": btnClass.value,
|
|
162
|
-
"type": type,
|
|
163
|
-
"disabled": disabled,
|
|
164
|
-
"style": {
|
|
165
|
-
width
|
|
166
|
-
},
|
|
347
|
+
return withDirectives(createVNode("button", {
|
|
348
|
+
"class": classes.value,
|
|
349
|
+
"disabled": disabled.value,
|
|
167
350
|
"onClick": onClick
|
|
168
|
-
}, [
|
|
169
|
-
"name":
|
|
351
|
+
}, [icon.value && createVNode(Icon, {
|
|
352
|
+
"name": icon.value,
|
|
353
|
+
"size": "12px",
|
|
170
354
|
"class": iconClass.value
|
|
171
|
-
}, null)
|
|
172
|
-
"class": "button-content"
|
|
173
|
-
|
|
174
|
-
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])])]);
|
|
355
|
+
}, null), createVNode("span", {
|
|
356
|
+
"class": "button-content"
|
|
357
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)])]), [[resolveDirective("dLoading"), loading2.value]]);
|
|
175
358
|
};
|
|
176
359
|
}
|
|
177
360
|
});
|
|
178
|
-
Button.install = function(app) {
|
|
179
|
-
app.component(Button.name, Button);
|
|
180
|
-
};
|
|
181
361
|
var index = {
|
|
182
362
|
title: "Button \u6309\u94AE",
|
|
183
363
|
category: "\u901A\u7528",
|
|
184
|
-
status: "
|
|
364
|
+
status: "100%",
|
|
185
365
|
install(app) {
|
|
186
|
-
app.
|
|
366
|
+
app.component(Button.name, Button);
|
|
187
367
|
}
|
|
188
368
|
};
|
|
189
369
|
export { Button, buttonProps, index as default };
|