vue-devui 1.0.0-rc.0 → 1.0.0-rc.11
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 +78 -116
- package/alert/index.es.js +74 -45
- package/alert/index.umd.js +1 -1
- package/alert/style.css +1 -1
- package/auto-complete/index.es.js +8190 -296
- package/auto-complete/index.umd.js +29 -1
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +153 -146
- package/avatar/index.umd.js +1 -1
- package/avatar/style.css +1 -1
- package/badge/index.es.js +34 -5
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +5741 -127
- package/button/index.umd.js +27 -1
- package/button/style.css +1 -1
- package/card/index.es.js +63 -35
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +8068 -255
- package/checkbox/index.umd.js +27 -1
- package/checkbox/style.css +1 -1
- package/{accordion → collapse}/index.d.ts +0 -0
- package/collapse/index.es.js +379 -0
- package/collapse/index.umd.js +1 -0
- package/{anchor → collapse}/package.json +1 -1
- package/collapse/style.css +1 -0
- package/countdown/index.es.js +5 -7
- package/countdown/index.umd.js +1 -1
- package/date-picker/index.es.js +8167 -288
- package/date-picker/index.umd.js +27 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +31 -4
- package/drawer/index.umd.js +1 -1
- package/drawer/style.css +1 -1
- package/dropdown/index.es.js +297 -181
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +525 -154
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +1048 -1176
- package/form/index.umd.js +16 -16
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +42 -21
- package/fullscreen/index.umd.js +1 -1
- package/fullscreen/style.css +1 -1
- package/grid/index.es.js +101 -86
- package/grid/index.umd.js +1 -1
- package/grid/style.css +1 -1
- package/icon/index.es.js +197 -56
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.es.js +55 -31
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +8074 -144
- package/input/index.umd.js +27 -1
- package/input/style.css +1 -1
- package/input-number/index.es.js +269 -183
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.es.js +40 -25
- package/layout/index.umd.js +1 -1
- package/layout/style.css +1 -1
- package/loading/index.es.js +74 -35
- package/loading/index.umd.js +1 -1
- package/loading/style.css +1 -1
- package/modal/index.es.js +412 -204
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +307 -57
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/ButtonGroup.js +3 -0
- package/nuxt/components/CheckboxButton.js +3 -0
- package/nuxt/components/CheckboxGroup.js +3 -0
- package/nuxt/components/Collapse.js +3 -0
- package/nuxt/components/CollapseItem.js +3 -0
- package/nuxt/components/DropdownPropsKey.js +3 -0
- package/nuxt/components/FORM_ITEM_TOKEN.js +3 -0
- package/nuxt/components/FORM_TOKEN.js +3 -0
- package/nuxt/components/Icon.js +1 -0
- package/nuxt/components/IconGroup.js +3 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/LoadingOptions.js +3 -0
- package/nuxt/components/Option.js +3 -0
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/RadioButton.js +3 -0
- package/nuxt/components/TABLE_TOKEN.js +3 -0
- package/nuxt/components/Tab.js +3 -0
- package/nuxt/components/TimeSelect.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/autoCompleteProps.js +3 -0
- package/nuxt/components/avatarProps.js +3 -0
- package/nuxt/components/buttonGroupInjectionKey.js +3 -0
- package/nuxt/components/buttonGroupProps.js +3 -0
- package/nuxt/components/cardProps.js +3 -0
- package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
- package/nuxt/components/checkboxGroupProps.js +3 -0
- package/nuxt/components/checkboxProps.js +3 -0
- package/nuxt/components/colProps.js +3 -0
- package/nuxt/components/colPropsBaseClass.js +3 -0
- package/nuxt/components/colPropsBaseStyle.js +3 -0
- package/nuxt/components/collapseItemProps.js +3 -0
- package/nuxt/components/collapseProps.js +3 -0
- package/nuxt/components/countdownProps.js +3 -0
- package/nuxt/components/editableSelectProps.js +3 -0
- package/nuxt/components/formItemProps.js +3 -0
- package/nuxt/components/formProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +3 -0
- package/nuxt/components/imagePreviewProps.js +3 -0
- package/nuxt/components/inputProps.js +3 -0
- package/nuxt/components/loadingProps.js +3 -0
- package/nuxt/components/modalProps.js +3 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/progressProps.js +3 -0
- package/nuxt/components/rateProps.js +3 -0
- package/nuxt/components/resultProps.js +3 -0
- package/nuxt/components/rowProps.js +3 -0
- package/nuxt/components/screenSizes.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/nuxt/components/skeletonProps.js +3 -0
- package/nuxt/components/sliderProps.js +3 -0
- package/nuxt/components/splitterProps.js +3 -0
- package/nuxt/components/statisticProps.js +3 -0
- package/nuxt/components/svgIconProps.js +3 -0
- package/nuxt/components/switchProps.js +3 -0
- package/nuxt/components/tableProps.js +3 -0
- package/nuxt/components/tabsProps.js +3 -0
- package/nuxt/components/tagProps.js +3 -0
- package/nuxt/components/textareaProps.js +3 -0
- package/nuxt/components/timeAxisProps.js +3 -0
- package/nuxt/components/treeProps.js +3 -0
- package/overlay/index.es.js +127 -149
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +11 -44
- package/pagination/index.es.js +158 -148
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/panel/style.css +1 -1
- package/popover/index.es.js +317 -246
- package/popover/index.umd.js +15 -15
- package/popover/style.css +1 -1
- package/progress/index.es.js +110 -56
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.es.js +7972 -157
- package/radio/index.umd.js +27 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +77 -55
- package/rate/index.umd.js +1 -1
- package/rate/style.css +1 -1
- package/result/index.es.js +184 -57
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/ripple/index.es.js +47 -42
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +3653 -1122
- package/search/index.umd.js +18 -18
- package/search/style.css +1 -1
- package/select/index.es.js +9170 -596
- package/select/index.umd.js +27 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +63 -41
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.es.js +144 -137
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +469 -349
- package/splitter/index.umd.js +15 -15
- package/splitter/style.css +1 -1
- package/statistic/index.es.js +41 -34
- package/statistic/index.umd.js +1 -1
- package/statistic/style.css +1 -1
- package/status/index.es.js +27 -6
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +7802 -64
- package/switch/index.umd.js +27 -1
- package/switch/style.css +1 -1
- package/table/index.es.js +10459 -1511
- package/table/index.umd.js +27 -1
- package/table/style.css +1 -1
- package/tabs/index.es.js +344 -141
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +49 -24
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/textarea/index.es.js +7921 -83
- package/textarea/index.umd.js +35 -1
- package/textarea/style.css +1 -1
- package/{anchor → time-select}/index.d.ts +0 -0
- package/{color-picker → time-select}/index.es.js +4171 -2898
- package/time-select/index.umd.js +27 -0
- package/{breadcrumb → time-select}/package.json +1 -1
- package/time-select/style.css +1 -0
- package/{back-top → timeline}/index.d.ts +0 -0
- package/timeline/index.es.js +425 -0
- package/timeline/index.umd.js +1 -0
- package/{back-top → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/tooltip/index.es.js +308 -236
- package/tooltip/index.umd.js +15 -15
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +5198 -1850
- package/tree/index.umd.js +18 -18
- package/tree/style.css +1 -1
- package/upload/index.es.js +427 -132
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +12064 -15841
- package/vue-devui.umd.js +30 -20
- package/accordion/index.es.js +0 -720
- package/accordion/index.umd.js +0 -1
- package/accordion/package.json +0 -7
- package/accordion/style.css +0 -1
- package/anchor/index.es.js +0 -263
- package/anchor/index.umd.js +0 -1
- package/anchor/style.css +0 -1
- package/back-top/index.es.js +0 -128
- package/back-top/index.umd.js +0 -1
- package/back-top/style.css +0 -1
- package/breadcrumb/index.d.ts +0 -7
- package/breadcrumb/index.es.js +0 -127
- package/breadcrumb/index.umd.js +0 -1
- package/breadcrumb/style.css +0 -1
- package/carousel/index.d.ts +0 -7
- package/carousel/index.es.js +0 -329
- package/carousel/index.umd.js +0 -1
- package/carousel/package.json +0 -7
- package/carousel/style.css +0 -1
- package/cascader/index.d.ts +0 -7
- package/cascader/index.es.js +0 -5963
- package/cascader/index.umd.js +0 -27
- package/cascader/package.json +0 -7
- package/cascader/style.css +0 -1
- package/color-picker/index.d.ts +0 -7
- package/color-picker/index.umd.js +0 -27
- package/color-picker/package.json +0 -7
- package/color-picker/style.css +0 -1
- package/comment/index.d.ts +0 -7
- package/comment/index.es.js +0 -86
- package/comment/index.umd.js +0 -1
- package/comment/package.json +0 -7
- package/comment/style.css +0 -1
- package/dragdrop/index.d.ts +0 -7
- package/dragdrop/index.es.js +0 -157
- package/dragdrop/index.umd.js +0 -1
- package/dragdrop/package.json +0 -7
- package/gantt/index.d.ts +0 -7
- package/gantt/index.es.js +0 -523
- package/gantt/index.umd.js +0 -1
- package/gantt/package.json +0 -7
- package/gantt/style.css +0 -1
- package/input-icon/index.d.ts +0 -7
- package/input-icon/index.es.js +0 -331
- package/input-icon/index.umd.js +0 -1
- package/input-icon/package.json +0 -7
- package/input-icon/style.css +0 -1
- package/list/index.d.ts +0 -7
- package/list/index.es.js +0 -39
- package/list/index.umd.js +0 -1
- package/list/package.json +0 -7
- package/list/style.css +0 -1
- package/nav-sprite/index.d.ts +0 -7
- package/nav-sprite/index.es.js +0 -68
- package/nav-sprite/index.umd.js +0 -1
- package/nav-sprite/package.json +0 -7
- package/nuxt/components/Accordion.js +0 -3
- package/nuxt/components/Anchor.js +0 -3
- package/nuxt/components/BackTop.js +0 -3
- package/nuxt/components/Breadcrumb.js +0 -3
- package/nuxt/components/Carousel.js +0 -3
- package/nuxt/components/CarouselItem.js +0 -3
- package/nuxt/components/Cascader.js +0 -3
- package/nuxt/components/ColorPicker.js +0 -3
- package/nuxt/components/Comment.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/Gantt.js +0 -3
- package/nuxt/components/InputIcon.js +0 -3
- package/nuxt/components/List.js +0 -3
- package/nuxt/components/ListItem.js +0 -3
- package/nuxt/components/NavSprite.js +0 -2
- package/nuxt/components/QuadrantDiagram.js +0 -3
- package/nuxt/components/ReadTip.js +0 -3
- package/nuxt/components/StepsGuide.js +0 -3
- package/nuxt/components/Sticky.js +0 -2
- package/nuxt/components/TagInput.js +0 -3
- package/nuxt/components/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.js +0 -3
- package/nuxt/components/TimePicker.js +0 -3
- package/nuxt/components/Transfer.js +0 -3
- package/nuxt/components/TreeSelect.js +0 -3
- package/nuxt/components/overlayEmits.js +0 -3
- package/nuxt/components/overlayProps.js +0 -3
- package/quadrant-diagram/index.d.ts +0 -7
- package/quadrant-diagram/index.es.js +0 -5728
- package/quadrant-diagram/index.umd.js +0 -27
- package/quadrant-diagram/package.json +0 -7
- package/quadrant-diagram/style.css +0 -1
- package/read-tip/index.d.ts +0 -7
- package/read-tip/index.es.js +0 -258
- package/read-tip/index.umd.js +0 -1
- package/read-tip/package.json +0 -7
- package/read-tip/style.css +0 -1
- package/steps-guide/index.d.ts +0 -7
- package/steps-guide/index.es.js +0 -239
- package/steps-guide/index.umd.js +0 -1
- package/steps-guide/package.json +0 -7
- package/steps-guide/style.css +0 -1
- package/sticky/index.d.ts +0 -7
- package/sticky/index.es.js +0 -197
- package/sticky/index.umd.js +0 -1
- package/sticky/package.json +0 -7
- package/tag-input/index.d.ts +0 -7
- package/tag-input/index.es.js +0 -329
- package/tag-input/index.umd.js +0 -1
- package/tag-input/package.json +0 -7
- package/tag-input/style.css +0 -1
- package/time-axis/index.d.ts +0 -7
- package/time-axis/index.es.js +0 -299
- package/time-axis/index.umd.js +0 -1
- package/time-axis/package.json +0 -7
- package/time-axis/style.css +0 -1
- package/time-picker/index.d.ts +0 -7
- package/time-picker/index.es.js +0 -1237
- package/time-picker/index.umd.js +0 -1
- package/time-picker/package.json +0 -7
- package/time-picker/style.css +0 -1
- package/transfer/index.d.ts +0 -7
- package/transfer/index.es.js +0 -7608
- package/transfer/index.umd.js +0 -27
- package/transfer/package.json +0 -7
- package/transfer/style.css +0 -1
- package/tree-select/index.d.ts +0 -7
- package/tree-select/index.es.js +0 -623
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/overlay/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(a,l){typeof exports=="object"&&typeof module!="undefined"?l(exports,require("vue"),require("@floating-ui/dom")):typeof define=="function"&&define.amd?define(["exports","vue","@floating-ui/dom"],l):(a=typeof globalThis!="undefined"?globalThis:a||self,l(a.index={},a.Vue,a.dom))})(this,function(a,l,f){"use strict";const b={modelValue:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}};function P(){if(document.documentElement.scrollHeight>document.documentElement.clientHeight){const e=document.documentElement.scrollTop,t=document.documentElement.getAttribute("style");return document.documentElement.style.position="fixed",document.documentElement.style.top=`-${e}px`,document.documentElement.style.width=document.documentElement.style.width||"100%",document.documentElement.style.overflowY="scroll",()=>{t?document.documentElement.setAttribute("style",t):document.documentElement.removeAttribute("style"),document.documentElement.scrollTop=e}}}function k(e,t){let n;const i=s=>{s.preventDefault(),t.emit("click",s),e.closeOnClickOverlay&&t.emit("update:modelValue",!1)},o=()=>{n==null||n()};return l.watch(()=>e.modelValue,s=>{s?e.lockScroll&&(n=P()):o()}),l.onUnmounted(o),{onClick:i}}function y(e,t,n){let i=e;return t&&(i+=`__${t}`),n&&(i+=`--${n}`),i}function g(e,t=!1){const n=t?`.devui-${e}`:`devui-${e}`;return{b:()=>y(n),e:d=>d?y(n,d):"",m:d=>d?y(n,"",d):"",em:(d,c)=>d&&c?y(n,d,c):""}}var j="";const O=l.defineComponent({name:"DFixedOverlay",inheritAttrs:!1,props:b,emits:["update:modelValue","click"],setup(e,t){const{modelValue:n}=l.toRefs(e),i=g("fixed-overlay"),{onClick:o}=k(e,t);return()=>l.createVNode(l.Transition,{name:i.m("fade")},{default:()=>{var s,r;return[n.value&&l.createVNode("div",l.mergeProps({class:i.b()},t.attrs,{onClick:o}),[(r=(s=t.slots).default)==null?void 0:r.call(s)])]}})}}),A={modelValue:{type:Boolean,default:!1},origin:{type:Object,require:!0},position:{type:Array,default:["bottom"]},offset:{type:[Number,Object],default:8},shiftOffset:{type:Number},align:{type:String,default:null},showArrow:{type:Boolean,default:!1},isArrowCenter:{type:Boolean,default:!0}};function L(e){const t=/(auto|scroll|hidden)/;for(let n=e;n=n.parentElement;n.parentElement!==document.body){const i=window.getComputedStyle(n);if(t.test(i.overflow+i.overflowX+i.overflowY))return n}return window}function $(e,t,n,i){let{x:o,y:s}=t;if(!e){const{width:r,height:d}=i;o&&n.includes("start")&&(o=12),o&&n.includes("end")&&(o=Math.round(r-24)),s&&n.includes("start")&&(s=10),s&&n.includes("end")&&(s=d-14)}return{x:o,y:s}}function F(e,t){const n=l.ref(),i=l.ref();let o=null;const s=(d,c,u,m)=>{const{x:w,y:v}=$(e.isArrowCenter,u,c,m.getBoundingClientRect()),h={top:"bottom",right:"left",bottom:"top",left:"right"}[c.split("-")[0]];Object.assign(d.style,{left:w?`${w}px`:"",top:v?`${v}px`:"",right:"",bottom:"",[h]:"-4px"})},r=async()=>{const d=e.origin,c=l.unref(n.value),u=l.unref(i.value),m=[f.offset(e.offset),f.autoPlacement({alignment:e.align,allowedPlacements:e.position})];e.showArrow&&m.push(f.arrow({element:u})),e.shiftOffset!==void 0&&m.push(f.shift());const{x:w,y:v,placement:h,middlewareData:V}=await f.computePosition(d,c,{strategy:"fixed",middleware:m});let p=w,x=v;if(e.shiftOffset!==void 0){const{x:C,y:B}=V.shift;C<0&&(p-=e.shiftOffset),C>0&&(p+=e.shiftOffset),B<0&&(x-=e.shiftOffset),B>0&&(x+=e.shiftOffset)}t("positionChange",h),Object.assign(c.style,{top:`${x}px`,left:`${p}px`}),e.showArrow&&s(u,h,V.arrow,c)};return l.watch(()=>e.modelValue,()=>{e.modelValue&&e.origin?(o=L(e.origin),l.nextTick(r),o==null||o.addEventListener("scroll",r),o!==window&&window.addEventListener("scroll",r),window.addEventListener("resize",r)):(o==null||o.removeEventListener("scroll",r),o!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r))}),l.onUnmounted(()=>{o==null||o.removeEventListener("scroll",r),o!==window&&window.removeEventListener("scroll",r),window.removeEventListener("resize",r)}),{arrowRef:i,overlayRef:n,updatePosition:r}}var N="";const E=l.defineComponent({name:"DFlexibleOverlay",inheritAttrs:!1,props:A,emits:["update:modelValue","positionChange"],setup(e,{slots:t,attrs:n,emit:i,expose:o}){const s=g("flexible-overlay"),{arrowRef:r,overlayRef:d,updatePosition:c}=F(e,i);return o({updatePosition:c}),()=>{var u;return e.modelValue&&l.createVNode("div",l.mergeProps({ref:d,class:s.b()},n),[(u=t.default)==null?void 0:u.call(t),e.showArrow&&l.createVNode("div",{ref:r,class:s.e("arrow")},null)])}}}),S=typeof window!="undefined";var T={title:"Overlay \u906E\u7F69\u5C42",category:"\u901A\u7528",status:"100%",install(e){if(e.component(O.name,O),e.component(E.name,E),S&&!document.getElementById("d-overlay-anchor")){const t=document.createElement("div");t.setAttribute("id","d-overlay-anchor"),t.style.position="fixed",t.style.left="0",t.style.top="0",t.style.zIndex="1000",document.body.appendChild(t)}}};a.FixedOverlay=O,a.FlexibleOverlay=E,a.default=T,a.fixedOverlayProps=b,a.flexibleOverlayProps=A,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"});
|
package/overlay/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-overlay
|
|
1
|
+
.devui-fixed-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1050}.devui-fixed-overlay--fade-enter-active,.devui-fixed-overlay--fade-leave-active{transition:opacity .1s cubic-bezier(0,0,1,1)}.devui-fixed-overlay--fade-enter-from,.devui-fixed-overlay--fade-leave-to{opacity:0}.devui-flexible-overlay{position:fixed;border-radius:var(--devui-border-radius, 4px);background-color:var(--devui-connected-overlay-bg, #ffffff);box-shadow:var(--devui-shadow-length-connected-overlay, 0 4px 8px 0) var(--devui-shadow, rgba(37, 43, 58, .2));z-index:1000}.devui-flexible-overlay__arrow{position:absolute;width:8px;height:8px;transform:rotate(45deg);background-color:inherit}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-devui",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "DevUI components based on Vite and Vue3",
|
|
6
6
|
"keywords": [
|
|
@@ -15,61 +15,28 @@
|
|
|
15
15
|
"jsx",
|
|
16
16
|
"devui"
|
|
17
17
|
],
|
|
18
|
+
"homepage": "https://vue-devui.github.io/",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git@github.com:DevCloudFE/vue-devui.git"
|
|
22
|
+
},
|
|
18
23
|
"main": "vue-devui.umd.js",
|
|
19
24
|
"module": "vue-devui.es.js",
|
|
20
25
|
"style": "style.css",
|
|
21
26
|
"dependencies": {
|
|
22
27
|
"@devui-design/icons": "^1.3.0",
|
|
23
|
-
"@floating-ui/dom": "^0.4.
|
|
28
|
+
"@floating-ui/dom": "^0.4.4",
|
|
24
29
|
"@types/lodash-es": "^4.17.4",
|
|
30
|
+
"@vue/shared": "^3.2.33",
|
|
25
31
|
"@vueuse/core": "^7.7.1",
|
|
26
32
|
"async-validator": "^4.0.2",
|
|
27
|
-
"
|
|
33
|
+
"dayjs": "^1.11.3",
|
|
34
|
+
"devui-theme": "^0.0.1",
|
|
28
35
|
"fs-extra": "^10.0.0",
|
|
29
36
|
"lodash": "^4.17.21",
|
|
30
37
|
"lodash-es": "^4.17.20",
|
|
31
38
|
"mitt": "^3.0.0",
|
|
32
39
|
"vue": "^3.1.1",
|
|
33
40
|
"vue-router": "^4.0.3"
|
|
34
|
-
},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@babel/parser": "^7.15.5",
|
|
37
|
-
"@babel/preset-env": "^7.14.5",
|
|
38
|
-
"@babel/preset-typescript": "^7.14.5",
|
|
39
|
-
"@babel/traverse": "^7.15.4",
|
|
40
|
-
"@commitlint/cli": "^11.0.0",
|
|
41
|
-
"@commitlint/config-conventional": "^11.0.0",
|
|
42
|
-
"@docsearch/css": "^3.0.0-alpha.50",
|
|
43
|
-
"@docsearch/js": "^3.0.0-alpha.50",
|
|
44
|
-
"@types/chalk": "^2.2.0",
|
|
45
|
-
"@types/commander": "^2.12.2",
|
|
46
|
-
"@types/jest": "^26.0.23",
|
|
47
|
-
"@types/ora": "^3.2.0",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^4.27.0",
|
|
49
|
-
"@typescript-eslint/parser": "^4.27.0",
|
|
50
|
-
"@vitejs/plugin-vue": "^1.3.0",
|
|
51
|
-
"@vitejs/plugin-vue-jsx": "^1.1.0",
|
|
52
|
-
"@vue/babel-plugin-jsx": "^1.0.6",
|
|
53
|
-
"@vue/compiler-sfc": "^3.0.5",
|
|
54
|
-
"@vue/test-utils": "^2.0.0-rc.9",
|
|
55
|
-
"@vuedx/typecheck": "^0.4.1",
|
|
56
|
-
"@vuedx/typescript-plugin-vue": "^0.4.1",
|
|
57
|
-
"babel-jest": "^27.0.2",
|
|
58
|
-
"chalk": "^4.1.2",
|
|
59
|
-
"commander": "^8.1.0",
|
|
60
|
-
"devui-cli": "workspace:^0.0.2",
|
|
61
|
-
"inquirer": "^8.1.2",
|
|
62
|
-
"jest": "^27.0.4",
|
|
63
|
-
"ora": "^5.4.1",
|
|
64
|
-
"patch-vue-directive-ssr": "^0.0.1",
|
|
65
|
-
"sass": "^1.32.2",
|
|
66
|
-
"shelljs": "^0.8.4",
|
|
67
|
-
"typescript": "^4.3.2",
|
|
68
|
-
"vite": "^2.4.4",
|
|
69
|
-
"vite-plugin-md": "^0.6.0",
|
|
70
|
-
"vite-svg-loader": "^2.2.0",
|
|
71
|
-
"vitepress": "0.20.1",
|
|
72
|
-
"vitepress-theme-demoblock": "1.3.2",
|
|
73
|
-
"vue-tsc": "^0.2.2"
|
|
74
41
|
}
|
|
75
|
-
}
|
|
42
|
+
}
|
package/pagination/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, onMounted, onUnmounted, withDirectives, createVNode, createTextVNode, resolveDirective, toRefs, watch, resolveComponent, computed, Fragment, mergeProps, nextTick } from "vue";
|
|
2
|
-
const
|
|
2
|
+
const paginationProps = {
|
|
3
3
|
pageSize: {
|
|
4
4
|
type: Number,
|
|
5
5
|
default: 10
|
|
@@ -190,6 +190,29 @@ const clickoutsideDirective = {
|
|
|
190
190
|
delete el[ctx];
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
|
+
function createBem(namespace, element, modifier) {
|
|
194
|
+
let cls = namespace;
|
|
195
|
+
if (element) {
|
|
196
|
+
cls += `__${element}`;
|
|
197
|
+
}
|
|
198
|
+
if (modifier) {
|
|
199
|
+
cls += `--${modifier}`;
|
|
200
|
+
}
|
|
201
|
+
return cls;
|
|
202
|
+
}
|
|
203
|
+
function useNamespace(block, needDot = false) {
|
|
204
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
205
|
+
const b = () => createBem(namespace);
|
|
206
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
207
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
208
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
209
|
+
return {
|
|
210
|
+
b,
|
|
211
|
+
e,
|
|
212
|
+
m,
|
|
213
|
+
em
|
|
214
|
+
};
|
|
215
|
+
}
|
|
193
216
|
var ConfigMenu = defineComponent({
|
|
194
217
|
directives: {
|
|
195
218
|
clickoutside: clickoutsideDirective
|
|
@@ -202,15 +225,15 @@ var ConfigMenu = defineComponent({
|
|
|
202
225
|
setup() {
|
|
203
226
|
const paginationConfig = ref(null);
|
|
204
227
|
const isShowConfig = ref(false);
|
|
228
|
+
const closeConfigMenu = (e) => {
|
|
229
|
+
isShowConfig.value = isShowConfig.value ? false : !!e;
|
|
230
|
+
};
|
|
205
231
|
onMounted(() => {
|
|
206
232
|
on(paginationConfig.value, "click", closeConfigMenu);
|
|
207
233
|
});
|
|
208
234
|
onUnmounted(() => {
|
|
209
235
|
off(paginationConfig.value, "click", closeConfigMenu);
|
|
210
236
|
});
|
|
211
|
-
const closeConfigMenu = (e) => {
|
|
212
|
-
isShowConfig.value = isShowConfig.value ? false : !!e;
|
|
213
|
-
};
|
|
214
237
|
return {
|
|
215
238
|
paginationConfig,
|
|
216
239
|
isShowConfig,
|
|
@@ -227,22 +250,23 @@ var ConfigMenu = defineComponent({
|
|
|
227
250
|
isShowConfig,
|
|
228
251
|
$slots
|
|
229
252
|
} = this;
|
|
253
|
+
const ns = useNamespace("pagination");
|
|
230
254
|
return withDirectives(createVNode("div", {
|
|
231
|
-
"class": "
|
|
255
|
+
"class": ns.e("config"),
|
|
232
256
|
"ref": "paginationConfig"
|
|
233
257
|
}, [createVNode("div", {
|
|
234
|
-
"class": "
|
|
258
|
+
"class": ns.e("setup-icon")
|
|
235
259
|
}, [createVNode("i", {
|
|
236
260
|
"class": "icon-setting",
|
|
237
261
|
"style": "font-weight: bold;"
|
|
238
262
|
}, null)]), isShowConfig && createVNode("div", {
|
|
239
|
-
"class": "
|
|
263
|
+
"class": ns.e("config-container")
|
|
240
264
|
}, [(_a = $slots.default) == null ? void 0 : _a.call($slots), createVNode("div", {
|
|
241
|
-
"class": "
|
|
265
|
+
"class": ns.e("config-item")
|
|
242
266
|
}, [createVNode("div", {
|
|
243
267
|
"class": "config-item-title"
|
|
244
268
|
}, [createTextVNode("\u6BCF\u9875\u6761\u6570")]), createVNode("div", {
|
|
245
|
-
"class": "
|
|
269
|
+
"class": ns.e("number")
|
|
246
270
|
}, [pageSizeOptions.map((v) => {
|
|
247
271
|
return createVNode("div", {
|
|
248
272
|
"class": {
|
|
@@ -279,25 +303,25 @@ var JumpPage = defineComponent({
|
|
|
279
303
|
totalPages,
|
|
280
304
|
cursor
|
|
281
305
|
} = toRefs(props);
|
|
282
|
-
const inputNum = ref(pageIndex.value);
|
|
283
|
-
watch(() => pageIndex.value, (val) => {
|
|
306
|
+
const inputNum = ref(pageIndex == null ? void 0 : pageIndex.value);
|
|
307
|
+
watch(() => pageIndex == null ? void 0 : pageIndex.value, (val) => {
|
|
284
308
|
inputNum.value = val;
|
|
285
309
|
});
|
|
286
|
-
let curPage = pageIndex.value;
|
|
310
|
+
let curPage = pageIndex == null ? void 0 : pageIndex.value;
|
|
287
311
|
const jumpPageChange = (currentPage) => {
|
|
288
312
|
curPage = +currentPage;
|
|
289
313
|
inputNum.value = currentPage;
|
|
290
314
|
if (isNaN(currentPage)) {
|
|
291
315
|
setTimeout(() => {
|
|
292
|
-
inputNum.value = pageIndex.value;
|
|
316
|
+
inputNum.value = pageIndex == null ? void 0 : pageIndex.value;
|
|
293
317
|
}, 300);
|
|
294
318
|
}
|
|
295
319
|
};
|
|
296
320
|
const jump = (e) => {
|
|
297
|
-
if (curPage > totalPages.value) {
|
|
321
|
+
if (curPage > (totalPages == null ? void 0 : totalPages.value)) {
|
|
298
322
|
return;
|
|
299
323
|
}
|
|
300
|
-
if ((e === "btn" || e.key === "Enter") && cursor.value !== curPage) {
|
|
324
|
+
if ((e === "btn" || e.key === "Enter") && (cursor == null ? void 0 : cursor.value) !== curPage) {
|
|
301
325
|
emit("changeCursorEmit", curPage);
|
|
302
326
|
}
|
|
303
327
|
};
|
|
@@ -316,24 +340,26 @@ var JumpPage = defineComponent({
|
|
|
316
340
|
jump,
|
|
317
341
|
showJumpButton
|
|
318
342
|
} = this;
|
|
343
|
+
const ns = useNamespace("pagination");
|
|
344
|
+
const inputProps = {
|
|
345
|
+
class: [ns.e("input"), size ? ns.em("input", size) : ""],
|
|
346
|
+
size,
|
|
347
|
+
modelValue: String(inputNum),
|
|
348
|
+
"onUpdate:modelValue": jumpPageChange,
|
|
349
|
+
onKeydown: jump
|
|
350
|
+
};
|
|
319
351
|
return createVNode("div", {
|
|
320
|
-
"class": "
|
|
352
|
+
"class": ns.e("jump-container")
|
|
321
353
|
}, [
|
|
322
354
|
goToText,
|
|
323
|
-
createVNode(resolveComponent("d-input"),
|
|
324
|
-
"class": ["devui-pagination-input", size ? "devui-pagination-input-" + size : ""],
|
|
325
|
-
"size": size,
|
|
326
|
-
"modelValue": String(inputNum),
|
|
327
|
-
"onUpdate:modelValue": jumpPageChange,
|
|
328
|
-
"onKeydown": jump
|
|
329
|
-
}, null),
|
|
355
|
+
createVNode(resolveComponent("d-input"), inputProps, null),
|
|
330
356
|
goToText === "\u8DF3\u81F3" && "\u9875",
|
|
331
357
|
showJumpButton && createVNode("div", {
|
|
332
|
-
"class": ["
|
|
358
|
+
"class": [ns.e("jump-button"), size ? ns.em("jump-size", size) : ns.em("jump-size", "default")],
|
|
333
359
|
"onClick": jump.bind(null, "btn"),
|
|
334
360
|
"title": goToText
|
|
335
361
|
}, [createVNode("div", {
|
|
336
|
-
"class": "
|
|
362
|
+
"class": ns.e("go")
|
|
337
363
|
}, null)])
|
|
338
364
|
]);
|
|
339
365
|
}
|
|
@@ -360,8 +386,9 @@ var PageNumBtn = defineComponent({
|
|
|
360
386
|
}) {
|
|
361
387
|
const showPageNum = computed(() => handlePages(props.cursor, props.maxItems, props.totalPages));
|
|
362
388
|
const changeCursor = (pageSize) => {
|
|
363
|
-
if (isNaN(pageSize))
|
|
389
|
+
if (isNaN(pageSize)) {
|
|
364
390
|
return;
|
|
391
|
+
}
|
|
365
392
|
const page = pageSize < 1 ? 1 : pageSize > props.totalPages ? props.totalPages : pageSize | 0;
|
|
366
393
|
emit("changeCursorEmit", page);
|
|
367
394
|
};
|
|
@@ -398,32 +425,33 @@ var PageNumBtn = defineComponent({
|
|
|
398
425
|
nextChange,
|
|
399
426
|
showTruePageIndex
|
|
400
427
|
} = this;
|
|
428
|
+
const ns = useNamespace("pagination");
|
|
401
429
|
return createVNode("ul", {
|
|
402
|
-
"class": ["
|
|
430
|
+
"class": [ns.e("list"), size ? ns.m(size) : ""]
|
|
403
431
|
}, [createVNode("li", {
|
|
404
432
|
"onClick": prevChange.bind(null, -1),
|
|
405
433
|
"class": {
|
|
406
|
-
"
|
|
434
|
+
[ns.e("item")]: true,
|
|
407
435
|
disabled: cursor <= 1
|
|
408
436
|
}
|
|
409
437
|
}, [createVNode("a", {
|
|
410
438
|
"innerHTML": preLink,
|
|
411
|
-
"class": "
|
|
439
|
+
"class": ns.e("link")
|
|
412
440
|
}, null)]), !lite && createVNode(Fragment, null, [
|
|
413
441
|
createVNode("li", {
|
|
414
442
|
"onClick": changeCursor.bind(null, 1),
|
|
415
443
|
"class": {
|
|
416
|
-
"
|
|
444
|
+
[ns.e("item")]: true,
|
|
417
445
|
active: cursor === 1
|
|
418
446
|
}
|
|
419
447
|
}, [createVNode("a", {
|
|
420
|
-
"class": "
|
|
448
|
+
"class": ns.e("link")
|
|
421
449
|
}, [createTextVNode("1")])]),
|
|
422
450
|
showPageNum[0] > 2 && createVNode("li", {
|
|
423
451
|
"onClick": prevChange.bind(null, showPageNum[0] - 1),
|
|
424
|
-
"class": "
|
|
452
|
+
"class": ns.e("item")
|
|
425
453
|
}, [createVNode("a", {
|
|
426
|
-
"class": "
|
|
454
|
+
"class": ns.e("link")
|
|
427
455
|
}, [createTextVNode("...")])]),
|
|
428
456
|
(() => {
|
|
429
457
|
const list = [];
|
|
@@ -432,48 +460,48 @@ var PageNumBtn = defineComponent({
|
|
|
432
460
|
"onClick": changeCursor.bind(null, i),
|
|
433
461
|
"key": i,
|
|
434
462
|
"class": {
|
|
435
|
-
"
|
|
463
|
+
[ns.e("item")]: true,
|
|
436
464
|
active: cursor === i
|
|
437
465
|
}
|
|
438
466
|
}, [createVNode("a", {
|
|
439
|
-
"class": "
|
|
467
|
+
"class": ns.e("link")
|
|
440
468
|
}, [i])]));
|
|
441
469
|
}
|
|
442
470
|
return list;
|
|
443
471
|
})(),
|
|
444
472
|
showPageNum[1] < totalPages - 1 && createVNode("li", {
|
|
445
473
|
"onClick": nextChange.bind(null, showPageNum[1] + 1),
|
|
446
|
-
"class": "
|
|
474
|
+
"class": ns.e("item")
|
|
447
475
|
}, [createVNode("a", {
|
|
448
|
-
"class": "
|
|
476
|
+
"class": ns.e("link")
|
|
449
477
|
}, [createTextVNode("...")])]),
|
|
450
478
|
showPageNum[1] < totalPages && createVNode("li", {
|
|
451
479
|
"onClick": changeCursor.bind(null, totalPages),
|
|
452
480
|
"class": {
|
|
453
|
-
"
|
|
481
|
+
[ns.e("item")]: true,
|
|
454
482
|
active: cursor === totalPages
|
|
455
483
|
}
|
|
456
484
|
}, [createVNode("a", {
|
|
457
|
-
"class": "
|
|
485
|
+
"class": ns.e("link")
|
|
458
486
|
}, [totalPages])]),
|
|
459
487
|
showTruePageIndex && cursor > totalPages && totalPages > 0 && createVNode(Fragment, null, [cursor > totalPages + 1 && createVNode("li", {
|
|
460
|
-
"class": "
|
|
488
|
+
"class": [ns.e("item"), "disabled"]
|
|
461
489
|
}, [createVNode("a", {
|
|
462
|
-
"class": "
|
|
490
|
+
"class": ns.e("link")
|
|
463
491
|
}, [createTextVNode("...")])]), createVNode("li", {
|
|
464
|
-
"class": "
|
|
492
|
+
"class": [ns.e("item"), "disabled", "active"]
|
|
465
493
|
}, [createVNode("a", {
|
|
466
|
-
"class": "
|
|
494
|
+
"class": ns.e("link")
|
|
467
495
|
}, [cursor])])])
|
|
468
496
|
]), createVNode("li", {
|
|
469
497
|
"onClick": nextChange.bind(null, -1),
|
|
470
498
|
"class": {
|
|
471
|
-
"
|
|
499
|
+
[ns.e("item")]: true,
|
|
472
500
|
disabled: cursor >= totalPages
|
|
473
501
|
}
|
|
474
502
|
}, [createVNode("a", {
|
|
475
503
|
"innerHTML": nextLink,
|
|
476
|
-
"class": "
|
|
504
|
+
"class": ns.e("link")
|
|
477
505
|
}, null)])]);
|
|
478
506
|
}
|
|
479
507
|
});
|
|
@@ -485,11 +513,35 @@ var Pagination = defineComponent({
|
|
|
485
513
|
JumpPage,
|
|
486
514
|
PageNumBtn
|
|
487
515
|
},
|
|
488
|
-
props:
|
|
516
|
+
props: paginationProps,
|
|
489
517
|
emits: ["pageIndexChange", "pageSizeChange", "update:pageSize", "update:pageIndex"],
|
|
490
518
|
setup(props, {
|
|
491
|
-
emit
|
|
519
|
+
emit,
|
|
520
|
+
slots
|
|
492
521
|
}) {
|
|
522
|
+
const {
|
|
523
|
+
autoHide,
|
|
524
|
+
pageSizeOptions,
|
|
525
|
+
total,
|
|
526
|
+
canChangePageSize,
|
|
527
|
+
lite,
|
|
528
|
+
size,
|
|
529
|
+
pageSizeDirection,
|
|
530
|
+
showPageSelector,
|
|
531
|
+
canViewTotal,
|
|
532
|
+
totalItemText,
|
|
533
|
+
maxItems,
|
|
534
|
+
preLink,
|
|
535
|
+
nextLink,
|
|
536
|
+
showTruePageIndex,
|
|
537
|
+
canJumpPage,
|
|
538
|
+
goToText,
|
|
539
|
+
pageIndex,
|
|
540
|
+
showJumpButton,
|
|
541
|
+
haveConfigMenu
|
|
542
|
+
} = toRefs(props);
|
|
543
|
+
const ns = useNamespace("pagination");
|
|
544
|
+
const totalPages = computed(() => Math.ceil(props.total / props.pageSize));
|
|
493
545
|
const litePageOptions = computed(() => liteSelectOptions(totalPages.value));
|
|
494
546
|
const cursor = computed({
|
|
495
547
|
get() {
|
|
@@ -511,7 +563,6 @@ var Pagination = defineComponent({
|
|
|
511
563
|
emit("update:pageSize", val);
|
|
512
564
|
}
|
|
513
565
|
});
|
|
514
|
-
const totalPages = computed(() => Math.ceil(props.total / props.pageSize));
|
|
515
566
|
const changeCursorEmit = (val) => {
|
|
516
567
|
cursor.value = val;
|
|
517
568
|
emit("pageIndexChange", val);
|
|
@@ -530,113 +581,72 @@ var Pagination = defineComponent({
|
|
|
530
581
|
const litePageIndexChange = (page) => {
|
|
531
582
|
changeCursorEmit(page.value);
|
|
532
583
|
};
|
|
533
|
-
return {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
584
|
+
return () => {
|
|
585
|
+
return autoHide.value && Math.min(...pageSizeOptions.value) > total.value ? null : createVNode("div", {
|
|
586
|
+
"class": ns.b()
|
|
587
|
+
}, [
|
|
588
|
+
canChangePageSize.value && !lite.value && createVNode("div", {
|
|
589
|
+
"class": [ns.e("size"), size.value ? ns.em("size", size.value) : ""]
|
|
590
|
+
}, [createVNode(resolveComponent("d-select"), {
|
|
591
|
+
"options": pageSizeOptions.value,
|
|
592
|
+
"modelValue": currentPageSize.value,
|
|
593
|
+
"onValueChange": pageSizeChange,
|
|
594
|
+
"pageSizeDirection": pageSizeDirection.value
|
|
595
|
+
}, null)]),
|
|
596
|
+
(!lite.value || lite.value && showPageSelector.value) && canViewTotal.value && createVNode("div", {
|
|
597
|
+
"class": ns.e("total-size")
|
|
598
|
+
}, [totalItemText.value, createTextVNode(": "), total.value]),
|
|
599
|
+
lite.value && showPageSelector.value && createVNode("div", {
|
|
600
|
+
"class": ns.e("size")
|
|
601
|
+
}, [createVNode(resolveComponent("d-select"), {
|
|
602
|
+
"options": litePageOptions.value,
|
|
603
|
+
"disabled": total.value === 0,
|
|
604
|
+
"modelValue": cursor.value,
|
|
605
|
+
"onValueChange": litePageIndexChange,
|
|
606
|
+
"pageSizeDirection": pageSizeDirection.value
|
|
607
|
+
}, null)]),
|
|
608
|
+
createVNode(resolveComponent("page-num-btn"), mergeProps({
|
|
609
|
+
cursor: cursor.value,
|
|
610
|
+
totalPages: totalPages.value,
|
|
611
|
+
size: size.value,
|
|
612
|
+
lite: lite.value,
|
|
613
|
+
maxItems: maxItems.value,
|
|
614
|
+
preLink: preLink.value,
|
|
615
|
+
nextLink: nextLink.value,
|
|
616
|
+
showTruePageIndex: showTruePageIndex.value
|
|
617
|
+
}, {
|
|
618
|
+
"onChangeCursorEmit": changeCursorEmit
|
|
619
|
+
}), null),
|
|
620
|
+
canJumpPage.value && !lite.value && createVNode(resolveComponent("jump-page"), mergeProps({
|
|
621
|
+
goToText: goToText.value,
|
|
622
|
+
size: size.value,
|
|
623
|
+
pageIndex: pageIndex.value,
|
|
624
|
+
totalPages: totalPages.value,
|
|
625
|
+
cursor: cursor.value,
|
|
626
|
+
showJumpButton: showJumpButton.value
|
|
627
|
+
}, {
|
|
628
|
+
"onChangeCursorEmit": changeCursorEmit
|
|
629
|
+
}), null),
|
|
630
|
+
lite.value && haveConfigMenu.value && createVNode(resolveComponent("config-menu"), {
|
|
631
|
+
currentPageSize: currentPageSize.value,
|
|
632
|
+
pageSizeChange,
|
|
633
|
+
pageSizeOptions: pageSizeOptions.value
|
|
634
|
+
}, {
|
|
635
|
+
default: () => {
|
|
636
|
+
var _a;
|
|
637
|
+
return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
|
|
638
|
+
}
|
|
639
|
+
})
|
|
640
|
+
]);
|
|
541
641
|
};
|
|
542
|
-
},
|
|
543
|
-
render() {
|
|
544
|
-
const {
|
|
545
|
-
total,
|
|
546
|
-
pageIndex,
|
|
547
|
-
pageSizeOptions,
|
|
548
|
-
pageSizeDirection,
|
|
549
|
-
preLink,
|
|
550
|
-
nextLink,
|
|
551
|
-
size,
|
|
552
|
-
canJumpPage,
|
|
553
|
-
canChangePageSize,
|
|
554
|
-
canViewTotal,
|
|
555
|
-
totalItemText,
|
|
556
|
-
goToText,
|
|
557
|
-
maxItems,
|
|
558
|
-
showJumpButton,
|
|
559
|
-
showTruePageIndex,
|
|
560
|
-
lite,
|
|
561
|
-
showPageSelector,
|
|
562
|
-
haveConfigMenu,
|
|
563
|
-
autoHide,
|
|
564
|
-
$slots,
|
|
565
|
-
cursor,
|
|
566
|
-
totalPages,
|
|
567
|
-
currentPageSize,
|
|
568
|
-
pageSizeChange,
|
|
569
|
-
changeCursorEmit,
|
|
570
|
-
litePageOptions,
|
|
571
|
-
litePageIndexChange
|
|
572
|
-
} = this;
|
|
573
|
-
return autoHide && Math.min(...pageSizeOptions) > total ? null : createVNode("div", {
|
|
574
|
-
"class": "devui-pagination"
|
|
575
|
-
}, [
|
|
576
|
-
canChangePageSize && !lite && createVNode("div", {
|
|
577
|
-
"class": ["devui-page-size", size ? "devui-page-size-" + size : ""]
|
|
578
|
-
}, [createVNode(resolveComponent("d-select"), {
|
|
579
|
-
"options": pageSizeOptions,
|
|
580
|
-
"modelValue": currentPageSize,
|
|
581
|
-
"onValueChange": pageSizeChange,
|
|
582
|
-
"pageSizeDirection": pageSizeDirection
|
|
583
|
-
}, null)]),
|
|
584
|
-
(!lite || lite && showPageSelector) && canViewTotal && createVNode("div", {
|
|
585
|
-
"class": "devui-total-size"
|
|
586
|
-
}, [totalItemText, createTextVNode(": "), total]),
|
|
587
|
-
lite && showPageSelector && createVNode("div", {
|
|
588
|
-
"class": "devui-page-size"
|
|
589
|
-
}, [createVNode(resolveComponent("d-select"), {
|
|
590
|
-
"options": litePageOptions,
|
|
591
|
-
"disabled": total === 0,
|
|
592
|
-
"modelValue": cursor,
|
|
593
|
-
"onValueChange": litePageIndexChange,
|
|
594
|
-
"pageSizeDirection": pageSizeDirection
|
|
595
|
-
}, null)]),
|
|
596
|
-
createVNode(resolveComponent("page-num-btn"), mergeProps({
|
|
597
|
-
cursor,
|
|
598
|
-
totalPages,
|
|
599
|
-
size,
|
|
600
|
-
lite,
|
|
601
|
-
maxItems,
|
|
602
|
-
preLink,
|
|
603
|
-
nextLink,
|
|
604
|
-
showTruePageIndex
|
|
605
|
-
}, {
|
|
606
|
-
"onChangeCursorEmit": changeCursorEmit
|
|
607
|
-
}), null),
|
|
608
|
-
canJumpPage && !lite && createVNode(resolveComponent("jump-page"), mergeProps({
|
|
609
|
-
goToText,
|
|
610
|
-
size,
|
|
611
|
-
pageIndex,
|
|
612
|
-
totalPages,
|
|
613
|
-
cursor,
|
|
614
|
-
showJumpButton
|
|
615
|
-
}, {
|
|
616
|
-
"onChangeCursorEmit": changeCursorEmit
|
|
617
|
-
}), null),
|
|
618
|
-
lite && haveConfigMenu && createVNode(resolveComponent("config-menu"), {
|
|
619
|
-
currentPageSize,
|
|
620
|
-
pageSizeChange,
|
|
621
|
-
pageSizeOptions
|
|
622
|
-
}, {
|
|
623
|
-
default: () => {
|
|
624
|
-
var _a;
|
|
625
|
-
return [(_a = $slots.default) == null ? void 0 : _a.call($slots)];
|
|
626
|
-
}
|
|
627
|
-
})
|
|
628
|
-
]);
|
|
629
642
|
}
|
|
630
643
|
});
|
|
631
|
-
Pagination.install = (app) => {
|
|
632
|
-
app.component(Pagination.name, Pagination);
|
|
633
|
-
};
|
|
634
644
|
var index = {
|
|
635
645
|
title: "Pagination \u5206\u9875",
|
|
636
646
|
category: "\u5BFC\u822A",
|
|
637
647
|
status: "100%",
|
|
638
648
|
install(app) {
|
|
639
|
-
app.
|
|
649
|
+
app.component(Pagination.name, Pagination);
|
|
640
650
|
}
|
|
641
651
|
};
|
|
642
|
-
export { Pagination, index as default };
|
|
652
|
+
export { Pagination, index as default, paginationProps };
|