vue-devui 1.0.0-rc.8 → 1.0.0-rc.9
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/alert/index.es.js +2 -2
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +282 -84
- package/auto-complete/index.umd.js +3 -5
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +59 -74
- package/avatar/index.umd.js +1 -1
- package/badge/index.es.js +2 -2
- package/badge/index.umd.js +1 -1
- package/button/index.es.js +111 -38
- package/button/index.umd.js +15 -15
- package/button/style.css +1 -1
- package/card/index.es.js +2 -2
- package/card/index.umd.js +1 -1
- package/checkbox/index.es.js +340 -228
- package/checkbox/index.umd.js +1 -1
- package/checkbox/style.css +1 -1
- package/date-picker/index.es.js +264 -63
- package/date-picker/index.umd.js +1 -1
- package/date-picker/style.css +1 -1
- package/drawer/index.es.js +2 -2
- package/drawer/index.umd.js +1 -1
- package/dropdown/index.es.js +104 -48
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +423 -8
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +304 -184
- package/form/index.umd.js +15 -15
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +2 -2
- package/fullscreen/index.umd.js +1 -1
- package/grid/index.es.js +8 -6
- package/grid/index.umd.js +1 -1
- package/icon/index.es.js +109 -13
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -0
- package/image-preview/index.es.js +2 -2
- package/image-preview/index.umd.js +1 -1
- package/input/index.es.js +278 -30
- package/input/index.umd.js +1 -1
- package/input/style.css +1 -1
- package/input-number/index.es.js +272 -199
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/layout/index.es.js +2 -2
- package/layout/index.umd.js +1 -1
- package/loading/index.es.js +2 -2
- package/loading/index.umd.js +1 -1
- package/modal/index.es.js +105 -32
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +105 -32
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/CheckboxButton.js +3 -0
- package/nuxt/components/Icon.js +1 -0
- package/nuxt/components/LABEL_DATA.js +3 -0
- package/nuxt/components/Option.js +3 -0
- package/nuxt/components/iconProps.js +1 -0
- package/nuxt/components/svgIconProps.js +3 -0
- package/overlay/index.es.js +2 -2
- package/overlay/index.umd.js +1 -1
- package/package.json +2 -1
- package/pagination/index.es.js +2 -2
- package/pagination/index.umd.js +1 -1
- package/popover/index.es.js +153 -67
- package/popover/index.umd.js +15 -15
- package/popover/style.css +1 -1
- package/progress/index.es.js +2 -2
- package/progress/index.umd.js +2 -2
- package/radio/index.es.js +139 -143
- package/radio/index.umd.js +1 -1
- package/rate/index.es.js +16 -8
- package/rate/index.umd.js +1 -1
- package/result/index.es.js +108 -12
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/search/index.es.js +316 -60
- package/search/index.umd.js +16 -16
- package/search/style.css +1 -1
- package/select/index.es.js +7334 -574
- package/select/index.umd.js +27 -1
- package/select/style.css +1 -1
- package/skeleton/index.es.js +2 -2
- package/skeleton/index.umd.js +1 -1
- package/slider/index.es.js +2 -2
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +178 -89
- package/splitter/index.umd.js +17 -17
- package/splitter/style.css +1 -1
- package/status/index.es.js +2 -2
- package/status/index.umd.js +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +2 -2
- package/switch/index.umd.js +1 -1
- package/table/index.es.js +1301 -524
- package/table/index.umd.js +18 -18
- package/table/style.css +1 -1
- package/tabs/index.es.js +114 -72
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/tag/index.es.js +6 -7
- package/tag/index.umd.js +1 -1
- package/textarea/index.es.js +5545 -11
- package/textarea/index.umd.js +35 -1
- package/timeline/index.es.js +108 -12
- package/timeline/index.umd.js +1 -1
- package/timeline/style.css +1 -1
- package/tooltip/index.es.js +168 -79
- package/tooltip/index.umd.js +15 -15
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +338 -227
- package/tree/index.umd.js +1 -1
- package/tree/style.css +1 -1
- package/upload/index.es.js +105 -32
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +3269 -1742
- package/vue-devui.umd.js +29 -23
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
package/pagination/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(p,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(p=typeof globalThis!="undefined"?globalThis:p||self,e(p.index={},p.Vue))})(this,function(p,e){"use strict";const w={pageSize:{type:Number,default:10},total:{type:Number,default:0},pageSizeOptions:{type:Array,default:()=>[5,10,20,50]},pageSizeDirection:{type:Array,default:()=>["centerDown","centerUp"]},pageIndex:{type:Number,default:1},maxItems:{type:Number,default:10},preLink:{type:String,default:"<"},nextLink:{type:String,default:">"},size:{type:String,default:""},canJumpPage:{type:Boolean,default:!1},canChangePageSize:{type:Boolean,default:!1},canViewTotal:{type:Boolean,default:!1},totalItemText:{type:String,default:"\u6240\u6709\u6761\u76EE"},goToText:{type:String,default:"\u8DF3\u81F3"},showJumpButton:{type:Boolean,default:!1},showTruePageIndex:{type:Boolean,default:!1},lite:{type:Boolean,default:!1},showPageSelector:{type:Boolean,default:!0},haveConfigMenu:{type:Boolean,default:!1},autoFixPageIndex:{type:Boolean,default:!0},autoHide:{type:Boolean,default:!1},"onUpdate:pageIndex":{type:Function},"onUpdate:pageSize":{type:Function},onPageIndexChange:{type:Function},onPageSizeChange:{type:Function}},L=(t,a,n)=>{const
|
|
1
|
+
(function(p,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(p=typeof globalThis!="undefined"?globalThis:p||self,e(p.index={},p.Vue))})(this,function(p,e){"use strict";const w={pageSize:{type:Number,default:10},total:{type:Number,default:0},pageSizeOptions:{type:Array,default:()=>[5,10,20,50]},pageSizeDirection:{type:Array,default:()=>["centerDown","centerUp"]},pageIndex:{type:Number,default:1},maxItems:{type:Number,default:10},preLink:{type:String,default:"<"},nextLink:{type:String,default:">"},size:{type:String,default:""},canJumpPage:{type:Boolean,default:!1},canChangePageSize:{type:Boolean,default:!1},canViewTotal:{type:Boolean,default:!1},totalItemText:{type:String,default:"\u6240\u6709\u6761\u76EE"},goToText:{type:String,default:"\u8DF3\u81F3"},showJumpButton:{type:Boolean,default:!1},showTruePageIndex:{type:Boolean,default:!1},lite:{type:Boolean,default:!1},showPageSelector:{type:Boolean,default:!0},haveConfigMenu:{type:Boolean,default:!1},autoFixPageIndex:{type:Boolean,default:!0},autoHide:{type:Boolean,default:!1},"onUpdate:pageIndex":{type:Function},"onUpdate:pageSize":{type:Function},onPageIndexChange:{type:Function},onPageSizeChange:{type:Function}},L=(t,a,n)=>{const l=t,c=a;if(c>=n)return[2,n];const s=c-2;let o=l-(s>>1),i=l+(s-1>>1);return o<2&&(o=2,i=c-2),i>n&&(o=n-c+3,i=n),[o,i]};function j(t){return new Array(t||1).fill(0).map((a,n)=>({name:`${n+1}/${t}`,value:n+1}))}function b(t,a,n){document.addEventListener?t&&a&&n&&t.addEventListener(a,n,!1):t&&a&&n&&t.attachEvent("on"+a,n)}function M(t,a,n){document.removeEventListener?t&&a&&n&&t.removeEventListener(a,n,!1):t&&a&&n&&t.detachEvent("on"+a,n)}const D=typeof window!="undefined",f=Symbol("@@clickoutside"),z=new Map;let B,k=0,I=!0;function E(t,a,n){return D&&I&&(I=!1,b(document,"mousedown",l=>{B=l}),b(document,"mouseup",l=>{for(const[c,s]of z)s[f].documentHandler(l,B)})),function(l,c){!n||!a.instance||!l.target||!c.target||t.contains(l.target)||t.contains(c.target)||t===l.target||t[f].bindingFn&&t[f].bindingFn()}}const H={beforeMount:function(t,a,n){k++,z.set(k,t),t[f]={nid:k,documentHandler:E(t,a,n),bindingFn:a.value}},updated:function(t,a,n){t[f].documentHandler=E(t,a,n),t[f].bindingFn=a.value},unmounted:function(t){z.delete(t[f].nid),delete t[f]}};function V(t,a,n){let l=t;return a&&(l+=`__${a}`),n&&(l+=`--${n}`),l}function P(t,a=!1){const n=a?`.devui-${t}`:`devui-${t}`;return{b:()=>V(n),e:i=>i?V(n,i):"",m:i=>i?V(n,"",i):"",em:(i,r)=>i&&r?V(n,i,r):""}}var J=e.defineComponent({directives:{clickoutside:H},props:{currentPageSize:Number,pageSizeChange:Function,pageSizeOptions:Array},setup(){const t=e.ref(null),a=e.ref(!1),n=l=>{a.value=a.value?!1:!!l};return e.onMounted(()=>{b(t.value,"click",n)}),e.onUnmounted(()=>{M(t.value,"click",n)}),{paginationConfig:t,isShowConfig:a,closeConfigMenu:n}},render(){var i;const{closeConfigMenu:t,currentPageSize:a,pageSizeChange:n,pageSizeOptions:l,isShowConfig:c,$slots:s}=this,o=P("pagination");return e.withDirectives(e.createVNode("div",{class:o.e("config"),ref:"paginationConfig"},[e.createVNode("div",{class:o.e("setup-icon")},[e.createVNode("i",{class:"icon-setting",style:"font-weight: bold;"},null)]),c&&e.createVNode("div",{class:o.e("config-container")},[(i=s.default)==null?void 0:i.call(s),e.createVNode("div",{class:o.e("config-item")},[e.createVNode("div",{class:"config-item-title"},[e.createTextVNode("\u6BCF\u9875\u6761\u6570")]),e.createVNode("div",{class:o.e("number")},[l.map(r=>e.createVNode("div",{class:{choosed:r===a},key:r,onClick:n.bind(null,{value:r})},[r]))])])])]),[[e.resolveDirective("clickoutside"),t]])}});const O={goToText:String,size:{type:String,default:""},pageIndex:Number,showJumpButton:Boolean,totalPages:Number,cursor:Number,onChangeCursorEmit:Function};var A=e.defineComponent({props:O,emits:["changeCursorEmit"],setup(t,{emit:a}){const{pageIndex:n,totalPages:l,cursor:c}=e.toRefs(t),s=e.ref(n==null?void 0:n.value);e.watch(()=>n==null?void 0:n.value,d=>{s.value=d});let o=n==null?void 0:n.value;return{inputNum:s,jumpPageChange:d=>{o=+d,s.value=d,isNaN(d)&&setTimeout(()=>{s.value=n==null?void 0:n.value},300)},jump:d=>{o>(l==null?void 0:l.value)||(d==="btn"||d.key==="Enter")&&(c==null?void 0:c.value)!==o&&a("changeCursorEmit",o)}}},render(){const{goToText:t,size:a,inputNum:n,jumpPageChange:l,jump:c,showJumpButton:s}=this,o=P("pagination"),i={class:[o.e("input"),a?o.em("input",a):""],size:a,modelValue:String(n),"onUpdate:modelValue":l,onKeydown:c};return e.createVNode("div",{class:o.e("jump-container")},[t,e.createVNode(e.resolveComponent("d-input"),i,null),t==="\u8DF3\u81F3"&&"\u9875",s&&e.createVNode("div",{class:[o.e("jump-button"),a?o.em("jump-size",a):o.em("jump-size","default")],onClick:c.bind(null,"btn"),title:t},[e.createVNode("div",{class:o.e("go")},null)])])}});const U={size:{type:String,default:""},preLink:String,nextLink:String,lite:Boolean,cursor:Number,maxItems:Number,totalPages:Number,onChangeCursorEmit:Function,showTruePageIndex:Boolean};var $=e.defineComponent({props:U,emits:["changeCursorEmit"],setup(t,{emit:a}){return{showPageNum:e.computed(()=>L(t.cursor,t.maxItems,t.totalPages)),changeCursor:o=>{if(isNaN(o))return;const i=o<1?1:o>t.totalPages?t.totalPages:o|0;a("changeCursorEmit",i)},prevChange:o=>{if(t.cursor>1){const i=o===-1?t.cursor-1:o;a("changeCursorEmit",i)}},nextChange:o=>{if(t.cursor<t.totalPages){const i=o===-1?t.cursor+1:o;a("changeCursorEmit",i)}}}},render(){const{size:t,preLink:a,nextLink:n,lite:l,changeCursor:c,cursor:s,showPageNum:o,prevChange:i,totalPages:r,nextChange:d,showTruePageIndex:x}=this,u=P("pagination");return e.createVNode("ul",{class:[u.e("list"),t?u.m(t):""]},[e.createVNode("li",{onClick:i.bind(null,-1),class:{[u.e("item")]:!0,disabled:s<=1}},[e.createVNode("a",{innerHTML:a,class:u.e("link")},null)]),!l&&e.createVNode(e.Fragment,null,[e.createVNode("li",{onClick:c.bind(null,1),class:{[u.e("item")]:!0,active:s===1}},[e.createVNode("a",{class:u.e("link")},[e.createTextVNode("1")])]),o[0]>2&&e.createVNode("li",{onClick:i.bind(null,o[0]-1),class:u.e("item")},[e.createVNode("a",{class:u.e("link")},[e.createTextVNode("...")])]),(()=>{const S=[];for(let m=o[0];m<=o[1];m++)S.push(e.createVNode("li",{onClick:c.bind(null,m),key:m,class:{[u.e("item")]:!0,active:s===m}},[e.createVNode("a",{class:u.e("link")},[m])]));return S})(),o[1]<r-1&&e.createVNode("li",{onClick:d.bind(null,o[1]+1),class:u.e("item")},[e.createVNode("a",{class:u.e("link")},[e.createTextVNode("...")])]),o[1]<r&&e.createVNode("li",{onClick:c.bind(null,r),class:{[u.e("item")]:!0,active:s===r}},[e.createVNode("a",{class:u.e("link")},[r])]),x&&s>r&&r>0&&e.createVNode(e.Fragment,null,[s>r+1&&e.createVNode("li",{class:[u.e("item"),"disabled"]},[e.createVNode("a",{class:u.e("link")},[e.createTextVNode("...")])]),e.createVNode("li",{class:[u.e("item"),"disabled","active"]},[e.createVNode("a",{class:u.e("link")},[s])])])]),e.createVNode("li",{onClick:d.bind(null,-1),class:{[u.e("item")]:!0,disabled:s>=r}},[e.createVNode("a",{innerHTML:n,class:u.e("link")},null)])])}}),te="",v=e.defineComponent({name:"DPagination",components:{ConfigMenu:J,JumpPage:A,PageNumBtn:$},props:w,emits:["pageIndexChange","pageSizeChange","update:pageSize","update:pageIndex"],setup(t,{emit:a,slots:n}){const{autoHide:l,pageSizeOptions:c,total:s,canChangePageSize:o,lite:i,size:r,pageSizeDirection:d,showPageSelector:x,canViewTotal:u,totalItemText:S,maxItems:m,preLink:R,nextLink:q,showTruePageIndex:K,canJumpPage:G,goToText:Q,pageIndex:W,showJumpButton:X,haveConfigMenu:Y}=e.toRefs(t),h=P("pagination"),C=e.computed(()=>Math.ceil(t.total/t.pageSize)),Z=e.computed(()=>j(C.value)),N=e.computed({get(){return!t.showTruePageIndex&&t.pageIndex>C.value?(a("update:pageIndex",C.value||1),C.value||1):t.pageIndex||1},set(g){a("update:pageIndex",g)}}),T=e.computed({get(){return t.pageSize},set(g){a("update:pageSize",g)}}),y=g=>{N.value=g,a("pageIndexChange",g)},F=g=>{T.value=g.value,t.autoFixPageIndex&&e.nextTick(()=>{N.value>C.value&&y(C.value)}),a("pageSizeChange",g.value)},ee=g=>{y(g.value)};return()=>l.value&&Math.min(...c.value)>s.value?null:e.createVNode("div",{class:h.b()},[o.value&&!i.value&&e.createVNode("div",{class:[h.e("size"),r.value?h.em("size",r.value):""]},[e.createVNode(e.resolveComponent("d-select"),{options:c.value,modelValue:T.value,onValueChange:F,pageSizeDirection:d.value},null)]),(!i.value||i.value&&x.value)&&u.value&&e.createVNode("div",{class:h.e("total-size")},[S.value,e.createTextVNode(": "),s.value]),i.value&&x.value&&e.createVNode("div",{class:h.e("size")},[e.createVNode(e.resolveComponent("d-select"),{options:Z.value,disabled:s.value===0,modelValue:N.value,onValueChange:ee,pageSizeDirection:d.value},null)]),e.createVNode(e.resolveComponent("page-num-btn"),e.mergeProps({cursor:N.value,totalPages:C.value,size:r.value,lite:i.value,maxItems:m.value,preLink:R.value,nextLink:q.value,showTruePageIndex:K.value},{onChangeCursorEmit:y}),null),G.value&&!i.value&&e.createVNode(e.resolveComponent("jump-page"),e.mergeProps({goToText:Q.value,size:r.value,pageIndex:W.value,totalPages:C.value,cursor:N.value,showJumpButton:X.value},{onChangeCursorEmit:y}),null),i.value&&Y.value&&e.createVNode(e.resolveComponent("config-menu"),{currentPageSize:T.value,pageSizeChange:F,pageSizeOptions:c.value},{default:()=>{var g;return[(g=n.default)==null?void 0:g.call(n)]}})])}}),_={title:"Pagination \u5206\u9875",category:"\u5BFC\u822A",status:"100%",install(t){t.component(v.name,v)}};p.Pagination=v,p.default=_,p.paginationProps=w,Object.defineProperty(p,"__esModule",{value:!0}),p[Symbol.toStringTag]="Module"});
|
package/popover/index.es.js
CHANGED
|
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps,
|
|
20
|
+
import { defineComponent, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, toRefs, provide } from "vue";
|
|
21
21
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
22
22
|
function createBem(namespace, element, modifier) {
|
|
23
23
|
let cls = namespace;
|
|
@@ -29,8 +29,8 @@ function createBem(namespace, element, modifier) {
|
|
|
29
29
|
}
|
|
30
30
|
return cls;
|
|
31
31
|
}
|
|
32
|
-
function useNamespace(block) {
|
|
33
|
-
const namespace = `devui-${block}`;
|
|
32
|
+
function useNamespace(block, needDot = false) {
|
|
33
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
34
34
|
const b = () => createBem(namespace);
|
|
35
35
|
const e = (element) => element ? createBem(namespace, element) : "";
|
|
36
36
|
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
@@ -334,6 +334,62 @@ const FlexibleOverlay = defineComponent({
|
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
336
|
});
|
|
337
|
+
const POPPER_TRIGGER_TOKEN = Symbol("popper-trigger");
|
|
338
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
339
|
+
const ns$1 = useNamespace("popper-trigger");
|
|
340
|
+
function wrapContent(content) {
|
|
341
|
+
return h("span", { class: ns$1.b() }, content);
|
|
342
|
+
}
|
|
343
|
+
function getFirstValidChild(nodes) {
|
|
344
|
+
for (const child of nodes) {
|
|
345
|
+
if (isObject(child)) {
|
|
346
|
+
if (child.type === Comment) {
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
if (child.type === "svg" || child.type === Text) {
|
|
350
|
+
return wrapContent(child);
|
|
351
|
+
}
|
|
352
|
+
if (child.type === Fragment) {
|
|
353
|
+
return getFirstValidChild(child.children);
|
|
354
|
+
}
|
|
355
|
+
return child;
|
|
356
|
+
}
|
|
357
|
+
return wrapContent(child);
|
|
358
|
+
}
|
|
359
|
+
return null;
|
|
360
|
+
}
|
|
361
|
+
var PopperTrigger = defineComponent({
|
|
362
|
+
name: "DPopperTrigger",
|
|
363
|
+
setup(_, ctx) {
|
|
364
|
+
const {
|
|
365
|
+
slots,
|
|
366
|
+
attrs
|
|
367
|
+
} = ctx;
|
|
368
|
+
return () => {
|
|
369
|
+
var _a;
|
|
370
|
+
const defaultSlot = (_a = slots.default) == null ? void 0 : _a.call(slots, attrs);
|
|
371
|
+
const triggerRef = inject(POPPER_TRIGGER_TOKEN);
|
|
372
|
+
if (!defaultSlot) {
|
|
373
|
+
return null;
|
|
374
|
+
}
|
|
375
|
+
const firstValidChild = getFirstValidChild(defaultSlot);
|
|
376
|
+
if (!firstValidChild) {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
return withDirectives(cloneVNode(firstValidChild, attrs), [[{
|
|
380
|
+
mounted(el) {
|
|
381
|
+
triggerRef.value = el;
|
|
382
|
+
},
|
|
383
|
+
updated(el) {
|
|
384
|
+
triggerRef.value = el;
|
|
385
|
+
},
|
|
386
|
+
unmounted() {
|
|
387
|
+
triggerRef.value = null;
|
|
388
|
+
}
|
|
389
|
+
}]]);
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
});
|
|
337
393
|
const popoverProps = {
|
|
338
394
|
isOpen: {
|
|
339
395
|
type: Boolean,
|
|
@@ -374,6 +430,10 @@ const popoverProps = {
|
|
|
374
430
|
mouseLeaveDelay: {
|
|
375
431
|
type: Number,
|
|
376
432
|
default: 100
|
|
433
|
+
},
|
|
434
|
+
disabled: {
|
|
435
|
+
type: Boolean,
|
|
436
|
+
default: false
|
|
377
437
|
}
|
|
378
438
|
};
|
|
379
439
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
@@ -1087,7 +1147,7 @@ var lodash = { exports: {} };
|
|
|
1087
1147
|
var objectCtorString = funcToString.call(Object2);
|
|
1088
1148
|
var oldDash = root._;
|
|
1089
1149
|
var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
1090
|
-
var Buffer2 = moduleExports ? context.Buffer : undefined$1,
|
|
1150
|
+
var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
|
|
1091
1151
|
var defineProperty = function() {
|
|
1092
1152
|
try {
|
|
1093
1153
|
var func = getNative(Object2, "defineProperty");
|
|
@@ -1102,7 +1162,7 @@ var lodash = { exports: {} };
|
|
|
1102
1162
|
var metaMap = WeakMap2 && new WeakMap2();
|
|
1103
1163
|
var realNames = {};
|
|
1104
1164
|
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2);
|
|
1105
|
-
var symbolProto =
|
|
1165
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
|
|
1106
1166
|
function lodash2(value) {
|
|
1107
1167
|
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
|
|
1108
1168
|
if (value instanceof LodashWrapper) {
|
|
@@ -1118,7 +1178,7 @@ var lodash = { exports: {} };
|
|
|
1118
1178
|
function object() {
|
|
1119
1179
|
}
|
|
1120
1180
|
return function(proto) {
|
|
1121
|
-
if (!
|
|
1181
|
+
if (!isObject2(proto)) {
|
|
1122
1182
|
return {};
|
|
1123
1183
|
}
|
|
1124
1184
|
if (objectCreate) {
|
|
@@ -1480,7 +1540,7 @@ var lodash = { exports: {} };
|
|
|
1480
1540
|
if (result2 !== undefined$1) {
|
|
1481
1541
|
return result2;
|
|
1482
1542
|
}
|
|
1483
|
-
if (!
|
|
1543
|
+
if (!isObject2(value)) {
|
|
1484
1544
|
return value;
|
|
1485
1545
|
}
|
|
1486
1546
|
var isArr = isArray(value);
|
|
@@ -1827,7 +1887,7 @@ var lodash = { exports: {} };
|
|
|
1827
1887
|
return true;
|
|
1828
1888
|
}
|
|
1829
1889
|
function baseIsNative(value) {
|
|
1830
|
-
if (!
|
|
1890
|
+
if (!isObject2(value) || isMasked(value)) {
|
|
1831
1891
|
return false;
|
|
1832
1892
|
}
|
|
1833
1893
|
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
@@ -1867,7 +1927,7 @@ var lodash = { exports: {} };
|
|
|
1867
1927
|
return result2;
|
|
1868
1928
|
}
|
|
1869
1929
|
function baseKeysIn(object) {
|
|
1870
|
-
if (!
|
|
1930
|
+
if (!isObject2(object)) {
|
|
1871
1931
|
return nativeKeysIn(object);
|
|
1872
1932
|
}
|
|
1873
1933
|
var isProto = isPrototype(object), result2 = [];
|
|
@@ -1912,7 +1972,7 @@ var lodash = { exports: {} };
|
|
|
1912
1972
|
}
|
|
1913
1973
|
baseFor(source, function(srcValue, key) {
|
|
1914
1974
|
stack || (stack = new Stack());
|
|
1915
|
-
if (
|
|
1975
|
+
if (isObject2(srcValue)) {
|
|
1916
1976
|
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
1917
1977
|
} else {
|
|
1918
1978
|
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined$1;
|
|
@@ -1952,7 +2012,7 @@ var lodash = { exports: {} };
|
|
|
1952
2012
|
newValue = objValue;
|
|
1953
2013
|
if (isArguments(objValue)) {
|
|
1954
2014
|
newValue = toPlainObject(objValue);
|
|
1955
|
-
} else if (!
|
|
2015
|
+
} else if (!isObject2(objValue) || isFunction(objValue)) {
|
|
1956
2016
|
newValue = initCloneObject(srcValue);
|
|
1957
2017
|
}
|
|
1958
2018
|
} else {
|
|
@@ -2091,7 +2151,7 @@ var lodash = { exports: {} };
|
|
|
2091
2151
|
return shuffleSelf(array, baseClamp(n, 0, array.length));
|
|
2092
2152
|
}
|
|
2093
2153
|
function baseSet(object, path, value, customizer) {
|
|
2094
|
-
if (!
|
|
2154
|
+
if (!isObject2(object)) {
|
|
2095
2155
|
return object;
|
|
2096
2156
|
}
|
|
2097
2157
|
path = castPath(path, object);
|
|
@@ -2105,7 +2165,7 @@ var lodash = { exports: {} };
|
|
|
2105
2165
|
var objValue = nested[key];
|
|
2106
2166
|
newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
|
|
2107
2167
|
if (newValue === undefined$1) {
|
|
2108
|
-
newValue =
|
|
2168
|
+
newValue = isObject2(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
|
|
2109
2169
|
}
|
|
2110
2170
|
}
|
|
2111
2171
|
assignValue(nested, key, newValue);
|
|
@@ -2555,7 +2615,7 @@ var lodash = { exports: {} };
|
|
|
2555
2615
|
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
|
|
2556
2616
|
}
|
|
2557
2617
|
var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
|
|
2558
|
-
return
|
|
2618
|
+
return isObject2(result2) ? result2 : thisBinding;
|
|
2559
2619
|
};
|
|
2560
2620
|
}
|
|
2561
2621
|
function createCurry(func, bitmask, arity) {
|
|
@@ -2869,7 +2929,7 @@ var lodash = { exports: {} };
|
|
|
2869
2929
|
return objValue;
|
|
2870
2930
|
}
|
|
2871
2931
|
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
|
|
2872
|
-
if (
|
|
2932
|
+
if (isObject2(objValue) && isObject2(srcValue)) {
|
|
2873
2933
|
stack.set(srcValue, objValue);
|
|
2874
2934
|
baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack);
|
|
2875
2935
|
stack["delete"](srcValue);
|
|
@@ -3217,7 +3277,7 @@ var lodash = { exports: {} };
|
|
|
3217
3277
|
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
3218
3278
|
}
|
|
3219
3279
|
function isIterateeCall(value, index2, object) {
|
|
3220
|
-
if (!
|
|
3280
|
+
if (!isObject2(object)) {
|
|
3221
3281
|
return false;
|
|
3222
3282
|
}
|
|
3223
3283
|
var type = typeof index2;
|
|
@@ -3260,7 +3320,7 @@ var lodash = { exports: {} };
|
|
|
3260
3320
|
return value === proto;
|
|
3261
3321
|
}
|
|
3262
3322
|
function isStrictComparable(value) {
|
|
3263
|
-
return value === value && !
|
|
3323
|
+
return value === value && !isObject2(value);
|
|
3264
3324
|
}
|
|
3265
3325
|
function matchesStrictComparable(key, srcValue) {
|
|
3266
3326
|
return function(object) {
|
|
@@ -4142,7 +4202,7 @@ var lodash = { exports: {} };
|
|
|
4142
4202
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
4143
4203
|
}
|
|
4144
4204
|
wait = toNumber(wait) || 0;
|
|
4145
|
-
if (
|
|
4205
|
+
if (isObject2(options)) {
|
|
4146
4206
|
leading = !!options.leading;
|
|
4147
4207
|
maxing = "maxWait" in options;
|
|
4148
4208
|
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
@@ -4312,7 +4372,7 @@ var lodash = { exports: {} };
|
|
|
4312
4372
|
if (typeof func != "function") {
|
|
4313
4373
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
4314
4374
|
}
|
|
4315
|
-
if (
|
|
4375
|
+
if (isObject2(options)) {
|
|
4316
4376
|
leading = "leading" in options ? !!options.leading : leading;
|
|
4317
4377
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
4318
4378
|
}
|
|
@@ -4420,7 +4480,7 @@ var lodash = { exports: {} };
|
|
|
4420
4480
|
return typeof value == "number" && nativeIsFinite(value);
|
|
4421
4481
|
}
|
|
4422
4482
|
function isFunction(value) {
|
|
4423
|
-
if (!
|
|
4483
|
+
if (!isObject2(value)) {
|
|
4424
4484
|
return false;
|
|
4425
4485
|
}
|
|
4426
4486
|
var tag = baseGetTag(value);
|
|
@@ -4432,7 +4492,7 @@ var lodash = { exports: {} };
|
|
|
4432
4492
|
function isLength(value) {
|
|
4433
4493
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
4434
4494
|
}
|
|
4435
|
-
function
|
|
4495
|
+
function isObject2(value) {
|
|
4436
4496
|
var type = typeof value;
|
|
4437
4497
|
return value != null && (type == "object" || type == "function");
|
|
4438
4498
|
}
|
|
@@ -4539,9 +4599,9 @@ var lodash = { exports: {} };
|
|
|
4539
4599
|
if (isSymbol(value)) {
|
|
4540
4600
|
return NAN;
|
|
4541
4601
|
}
|
|
4542
|
-
if (
|
|
4602
|
+
if (isObject2(value)) {
|
|
4543
4603
|
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
4544
|
-
value =
|
|
4604
|
+
value = isObject2(other) ? other + "" : other;
|
|
4545
4605
|
}
|
|
4546
4606
|
if (typeof value != "string") {
|
|
4547
4607
|
return value === 0 ? value : +value;
|
|
@@ -4762,7 +4822,7 @@ var lodash = { exports: {} };
|
|
|
4762
4822
|
var Ctor = object && object.constructor;
|
|
4763
4823
|
if (isArrLike) {
|
|
4764
4824
|
accumulator = isArr ? new Ctor() : [];
|
|
4765
|
-
} else if (
|
|
4825
|
+
} else if (isObject2(object)) {
|
|
4766
4826
|
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
|
|
4767
4827
|
} else {
|
|
4768
4828
|
accumulator = {};
|
|
@@ -5044,7 +5104,7 @@ var lodash = { exports: {} };
|
|
|
5044
5104
|
}
|
|
5045
5105
|
function truncate(string, options) {
|
|
5046
5106
|
var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
|
|
5047
|
-
if (
|
|
5107
|
+
if (isObject2(options)) {
|
|
5048
5108
|
var separator = "separator" in options ? options.separator : separator;
|
|
5049
5109
|
length = "length" in options ? toInteger(options.length) : length;
|
|
5050
5110
|
omission = "omission" in options ? baseToString(options.omission) : omission;
|
|
@@ -5174,13 +5234,13 @@ var lodash = { exports: {} };
|
|
|
5174
5234
|
});
|
|
5175
5235
|
function mixin(object, source, options) {
|
|
5176
5236
|
var props = keys(source), methodNames = baseFunctions(source, props);
|
|
5177
|
-
if (options == null && !(
|
|
5237
|
+
if (options == null && !(isObject2(source) && (methodNames.length || !props.length))) {
|
|
5178
5238
|
options = source;
|
|
5179
5239
|
source = object;
|
|
5180
5240
|
object = this;
|
|
5181
5241
|
methodNames = baseFunctions(source, keys(source));
|
|
5182
5242
|
}
|
|
5183
|
-
var chain2 = !(
|
|
5243
|
+
var chain2 = !(isObject2(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
|
|
5184
5244
|
arrayEach(methodNames, function(methodName) {
|
|
5185
5245
|
var func = source[methodName];
|
|
5186
5246
|
object[methodName] = func;
|
|
@@ -5526,7 +5586,7 @@ var lodash = { exports: {} };
|
|
|
5526
5586
|
lodash2.isNil = isNil;
|
|
5527
5587
|
lodash2.isNull = isNull;
|
|
5528
5588
|
lodash2.isNumber = isNumber;
|
|
5529
|
-
lodash2.isObject =
|
|
5589
|
+
lodash2.isObject = isObject2;
|
|
5530
5590
|
lodash2.isObjectLike = isObjectLike;
|
|
5531
5591
|
lodash2.isPlainObject = isPlainObject;
|
|
5532
5592
|
lodash2.isRegExp = isRegExp;
|
|
@@ -5822,11 +5882,16 @@ function usePopover(props, visible, placement, origin, popoverRef) {
|
|
|
5822
5882
|
return { overlayStyles };
|
|
5823
5883
|
}
|
|
5824
5884
|
function usePopoverEvent(props, visible, origin) {
|
|
5825
|
-
const { trigger, position, mouseEnterDelay, mouseLeaveDelay } = toRefs(props);
|
|
5885
|
+
const { trigger, position, mouseEnterDelay, mouseLeaveDelay, disabled } = toRefs(props);
|
|
5826
5886
|
const isClick = computed(() => trigger.value === "click");
|
|
5827
5887
|
const placement = ref(position.value[0].split("-")[0]);
|
|
5828
5888
|
const isEnter = ref(false);
|
|
5829
|
-
const onClick = () =>
|
|
5889
|
+
const onClick = () => {
|
|
5890
|
+
if (disabled.value) {
|
|
5891
|
+
return;
|
|
5892
|
+
}
|
|
5893
|
+
isClick.value && (visible.value = !visible.value);
|
|
5894
|
+
};
|
|
5830
5895
|
const enter = lodash.exports.debounce(() => {
|
|
5831
5896
|
isEnter.value && (visible.value = true);
|
|
5832
5897
|
}, mouseEnterDelay.value);
|
|
@@ -5834,6 +5899,9 @@ function usePopoverEvent(props, visible, origin) {
|
|
|
5834
5899
|
!isEnter.value && (visible.value = false);
|
|
5835
5900
|
}, mouseLeaveDelay.value);
|
|
5836
5901
|
const onMouseenter = () => {
|
|
5902
|
+
if (disabled.value) {
|
|
5903
|
+
return;
|
|
5904
|
+
}
|
|
5837
5905
|
if (!isClick.value) {
|
|
5838
5906
|
isEnter.value = true;
|
|
5839
5907
|
enter();
|
|
@@ -5845,6 +5913,15 @@ function usePopoverEvent(props, visible, origin) {
|
|
|
5845
5913
|
leave();
|
|
5846
5914
|
}
|
|
5847
5915
|
};
|
|
5916
|
+
const quickLeave = () => {
|
|
5917
|
+
isEnter.value = false;
|
|
5918
|
+
visible.value = false;
|
|
5919
|
+
};
|
|
5920
|
+
watch(disabled, (newVal) => {
|
|
5921
|
+
if (newVal && visible.value) {
|
|
5922
|
+
quickLeave();
|
|
5923
|
+
}
|
|
5924
|
+
});
|
|
5848
5925
|
const handlePositionChange = (pos) => {
|
|
5849
5926
|
placement.value = pos.split("-")[0];
|
|
5850
5927
|
};
|
|
@@ -5963,9 +6040,11 @@ var Popover = defineComponent({
|
|
|
5963
6040
|
name: "DPopover",
|
|
5964
6041
|
inheritAttrs: false,
|
|
5965
6042
|
props: popoverProps,
|
|
6043
|
+
emits: ["show", "hide"],
|
|
5966
6044
|
setup(props, {
|
|
5967
6045
|
slots,
|
|
5968
|
-
attrs
|
|
6046
|
+
attrs,
|
|
6047
|
+
emit
|
|
5969
6048
|
}) {
|
|
5970
6049
|
const {
|
|
5971
6050
|
content,
|
|
@@ -5988,44 +6067,51 @@ var Popover = defineComponent({
|
|
|
5988
6067
|
overlayStyles
|
|
5989
6068
|
} = usePopover(props, visible, placement, origin, popoverRef);
|
|
5990
6069
|
const ns2 = useNamespace("popover");
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
"
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
6070
|
+
provide(POPPER_TRIGGER_TOKEN, origin);
|
|
6071
|
+
watch(visible, (newVal) => {
|
|
6072
|
+
if (newVal) {
|
|
6073
|
+
emit("show");
|
|
6074
|
+
} else {
|
|
6075
|
+
emit("hide");
|
|
6076
|
+
}
|
|
6077
|
+
});
|
|
6078
|
+
return () => createVNode(Fragment, null, [createVNode(PopperTrigger, null, {
|
|
6079
|
+
default: () => {
|
|
6080
|
+
var _a;
|
|
6081
|
+
return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
|
|
6082
|
+
}
|
|
6083
|
+
}), createVNode(Teleport, {
|
|
6084
|
+
"to": "body"
|
|
6085
|
+
}, {
|
|
6086
|
+
default: () => [createVNode(Transition, {
|
|
6087
|
+
"name": showAnimation.value ? ns2.m(`fade-${placement.value}`) : ""
|
|
5998
6088
|
}, {
|
|
5999
|
-
default: () => [createVNode(
|
|
6000
|
-
"
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
"type": popType.value
|
|
6023
|
-
}, null), ((_a2 = slots.content) == null ? void 0 : _a2.call(slots)) || createVNode("span", null, [content.value])];
|
|
6024
|
-
}
|
|
6025
|
-
})]
|
|
6089
|
+
default: () => [createVNode(FlexibleOverlay, mergeProps({
|
|
6090
|
+
"modelValue": visible.value,
|
|
6091
|
+
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
6092
|
+
"ref": popoverRef,
|
|
6093
|
+
"origin": origin.value,
|
|
6094
|
+
"position": position.value,
|
|
6095
|
+
"align": align.value,
|
|
6096
|
+
"offset": offset2.value,
|
|
6097
|
+
"class": [ns2.e("content"), popType.value !== "default" ? "is-icon" : ""],
|
|
6098
|
+
"show-arrow": true,
|
|
6099
|
+
"is-arrow-center": false,
|
|
6100
|
+
"style": overlayStyles.value
|
|
6101
|
+
}, attrs, {
|
|
6102
|
+
"onPositionChange": handlePositionChange,
|
|
6103
|
+
"onMouseenter": onMouseenter,
|
|
6104
|
+
"onMouseleave": onMouseleave
|
|
6105
|
+
}), {
|
|
6106
|
+
default: () => {
|
|
6107
|
+
var _a;
|
|
6108
|
+
return [createVNode(PopoverIcon, {
|
|
6109
|
+
"type": popType.value
|
|
6110
|
+
}, null), ((_a = slots.content) == null ? void 0 : _a.call(slots)) || createVNode("span", null, [content.value])];
|
|
6111
|
+
}
|
|
6026
6112
|
})]
|
|
6027
|
-
})]
|
|
6028
|
-
};
|
|
6113
|
+
})]
|
|
6114
|
+
})]);
|
|
6029
6115
|
}
|
|
6030
6116
|
});
|
|
6031
6117
|
var index = {
|