vft 0.0.482 → 0.0.485
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/dist/index.css +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/horizontal-menu/horizontal-menu.vue.d.ts +20 -4
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +29 -29
- package/es/components/horizontal-menu/index.d.ts +20 -4
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/menu/index.d.ts +28 -7
- package/es/components/menu/menu-item-group.vue.d.ts +2 -4
- package/es/components/menu/menu-item.vue.d.ts +1 -17
- package/es/components/menu/menu.vue.d.ts +3 -28
- package/es/components/menu/menu.vue2.js +81 -76
- package/es/components/menu/sub-menu.vue.d.ts +1 -19
- package/es/components/menu/types.d.ts +64 -0
- package/es/components/side-menu/index.d.ts +55 -4
- package/es/components/side-menu/side-menu.vue.d.ts +20 -3
- package/es/components/side-menu/side-menu.vue2.js +166 -139
- package/es/components/side-menu/types.d.ts +13 -2
- package/es/components/super-form/super-form-action.vue2.js +55 -55
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue.d.ts +20 -4
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/index.d.ts +20 -4
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/menu/index.d.ts +28 -7
- package/lib/components/menu/menu-item-group.vue.d.ts +2 -4
- package/lib/components/menu/menu-item.vue.d.ts +1 -17
- package/lib/components/menu/menu.vue.d.ts +3 -28
- package/lib/components/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue.d.ts +1 -19
- package/lib/components/menu/types.d.ts +64 -0
- package/lib/components/side-menu/index.d.ts +55 -4
- package/lib/components/side-menu/side-menu.vue.d.ts +20 -3
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/types.d.ts +13 -2
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/menu.scss +54 -0
- package/theme-style/vft-menu.css +1 -1
- package/web-types.json +1 -1
|
@@ -21,8 +21,16 @@ export interface HorizontalMenuProps {
|
|
|
21
21
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<HorizontalMenuProps>>, {
|
|
22
22
|
isInSubMenu: import("vue").ComputedRef<any>;
|
|
23
23
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
close: (val: {
|
|
25
|
+
index: string;
|
|
26
|
+
indexPath: string[];
|
|
27
|
+
event?: Event;
|
|
28
|
+
}) => void;
|
|
29
|
+
open: (val: {
|
|
30
|
+
index: string;
|
|
31
|
+
indexPath: string[];
|
|
32
|
+
e?: Event;
|
|
33
|
+
}) => void;
|
|
26
34
|
select: (val: {
|
|
27
35
|
route: string;
|
|
28
36
|
indexPath: string[];
|
|
@@ -33,8 +41,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
33
41
|
route: string;
|
|
34
42
|
indexPath: string[];
|
|
35
43
|
}) => any) | undefined;
|
|
36
|
-
onClose?: ((
|
|
37
|
-
|
|
44
|
+
onClose?: ((val: {
|
|
45
|
+
index: string;
|
|
46
|
+
indexPath: string[];
|
|
47
|
+
event?: Event;
|
|
48
|
+
}) => any) | undefined;
|
|
49
|
+
onOpen?: ((val: {
|
|
50
|
+
index: string;
|
|
51
|
+
indexPath: string[];
|
|
52
|
+
e?: Event;
|
|
53
|
+
}) => any) | undefined;
|
|
38
54
|
"onSub-menu-click"?: ((val: any) => any) | undefined;
|
|
39
55
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
40
56
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),G=require("@vft/router"),U=require("@vft/utils"),b=require("../menu/index.cjs");require("@vueuse/core");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const W=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const Y=require("./constants.cjs");function F(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!n.isVNode(t)}const K=n.defineComponent({name:"vft-horizontal-menu"}),Q=n.defineComponent({...K,props:{menus:{},attrMapping:{},openDisabled:{type:Boolean,default:!1},disabledJudgeTurnOver:{type:Boolean,default:!1},subMenuCfg:{default:()=>({})},useRouterJump:{type:Boolean,default:!1},maxRowLength:{type:[Boolean,Number],default:8},defaultActive:{},defaultOpeneds:{},menuOptions:{},enableScroll:{type:Boolean,default:!0},scrollThreshold:{default:10},scrollMaxHeight:{default:"400px"}},emits:["
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),G=require("@vft/router"),U=require("@vft/utils"),b=require("../menu/index.cjs");require("@vueuse/core");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");require("../form/index.cjs");const W=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const Y=require("./constants.cjs");function F(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!n.isVNode(t)}const K=n.defineComponent({name:"vft-horizontal-menu"}),Q=n.defineComponent({...K,props:{menus:{},attrMapping:{},openDisabled:{type:Boolean,default:!1},disabledJudgeTurnOver:{type:Boolean,default:!1},subMenuCfg:{default:()=>({})},useRouterJump:{type:Boolean,default:!1},maxRowLength:{type:[Boolean,Number],default:8},defaultActive:{},defaultOpeneds:{},menuOptions:{},enableScroll:{type:Boolean,default:!0},scrollThreshold:{default:10},scrollMaxHeight:{default:"400px"}},emits:["close","open","select","sub-menu-click"],setup(t,{expose:q,emit:k}){const g=k,v=W.useNamespace("horizontal-menu"),R=n.computed(()=>(e,u,a)=>({"grid-template-rows":`repeat(${Math.min(e?.[u]?.[o.value.children]?.length||0,Number(a||t.maxRowLength?a||t.maxRowLength:e?.[u]?.[o.value.children]?.length))}, auto)`})),o=n.computed(()=>({path:"path",children:"children",title:"title",index:"path",icon:"icon",disabled:"disabled",...t.attrMapping})),I=n.getCurrentInstance(),h=n.useSlots(),O=n.ref(),w=I.appContext.config.globalProperties.$router,M=(e,u,a)=>{const i=e[o.value.path],s=e[o.value.title],l=e?.[o.value.index],x=e?.[o.value.icon],p=!!e?.[o.value.disabled],d=t.disabledJudgeTurnOver?!p:p,m=l||i||u+s;return n.createVNode(b.VftMenuItem,n.mergeProps(e,{key:m,index:String(m),icon:x,route:i,title:s,disabled:t.openDisabled&&d,className:a?"vft-menu-popup-item":"vft-menu-no-popup-item"}),{default:a?h.menuItem?()=>h.menuItem?.({item:e}):null:h.menuTopItem?()=>h.menuTopItem?.({item:e}):null})},A=e=>{g("open",e)},L=e=>{g("close",e)},P=e=>{g("sub-menu-click",e)},j=(e,u)=>!t.enableScroll||!e?e:u>t.scrollThreshold?n.createVNode(b.VftMenuItemGroup,{style:{maxHeight:t.scrollMaxHeight,overflowY:"auto"}},F(e)?e:{default:()=>[e]}):e,T=(e,u,a)=>{const i=e[o.value.path],s=e[o.value.title],l=e?.[o.value.children],x=e?.[o.value.index],p=e?.[o.value.icon],d=e?.menuOrder,m=e?.maxRowLength,V=!!e?.[o.value.disabled],z=t.disabledJudgeTurnOver?!V:V,N=x||i||u+s,y=e.type===Y.MenuTypeEnum.TILE;let S=[];if(y)if(d){const r=d.flat();if(r?.length<l.length){const f=Math.max.apply(null,r);for(let c=f+1;c<l.length;c++)d.push([c])}S=d}else for(let r=0;r<l.length;r++)S.push([r]);return l?.length||e?.render?n.createVNode(b.VftSubMenu,n.mergeProps(t.subMenuCfg,e,{index:String(N),key:N,icon:p,showArrow:e.showArrow??t.subMenuCfg.showArrow,disabled:t.openDisabled&&z,toolTipCfg:{...t.subMenuCfg.toolTipCfg||{},...e.subMenuCfg?.toolTipCfg||{}},teleported:!1,"popper-class":[y?v.e("tile"):"",v.e("normal")]}),{default:()=>[j(e?.render?e?.render:y?S.map((r,f)=>n.createVNode("div",{class:"content-main",key:f},[r.map((c,H)=>{const C=l?.[c]?.[o.value.children],D=l?.[c]?.maxRowLength;return l?.length?n.createVNode("div",{class:"content-col",key:H},[n.createVNode("span",{class:C?.length?"title":""},[l?.[c]?.[o.value.title]]),C?.length?n.createVNode("div",{class:"content",style:R.value(l,c,D||m)},[C.map(($,E)=>M($,E,!0))]):null]):null})])):l.map((r,f)=>r[o.value.children]?.length?T(r,f,!0):M(r,f,!0)),l?.length||0)],title:()=>s}):M(e,u,a)};async function B(e){if(t.useRouterJump){const{go:u}=G.useRouterHelper(w),a=e.route;let i=e.route;e.indexPath.some(l=>U.isUrl(l))&&(i=e.indexPath.slice(-2).join("/"));const s=w.getRoutes().filter(l=>l.path===i)?.[0]?.meta?.linkTarget;u(s?{url:a,winOpenOpt:{target:s}}:a)}g("select",e)}const J=n.computed(()=>O.value?.inSubMenu);return q({isInSubMenu:J}),()=>n.createVNode(b.VftMenu,n.mergeProps(t.menuOptions,{ref:O,onSelect:B,onOpen:A,onClose:L,onSubMenuClick:P,mode:"horizontal",class:v.b(),defaultActive:t.defaultActive,defaultOpeneds:t.defaultOpeneds}),{default:()=>[t.menus?.length?t.menus.map((e,u)=>T(e,u,!1)):null]})}});exports.default=Q;
|
|
@@ -44,8 +44,16 @@ export declare const VftHorizontalMenu: import("vft/es/utils").SFCWithInstall<im
|
|
|
44
44
|
}>, {
|
|
45
45
|
isInSubMenu: import("vue").ComputedRef<any>;
|
|
46
46
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
close: (val: {
|
|
48
|
+
index: string;
|
|
49
|
+
indexPath: string[];
|
|
50
|
+
event?: Event;
|
|
51
|
+
}) => void;
|
|
52
|
+
open: (val: {
|
|
53
|
+
index: string;
|
|
54
|
+
indexPath: string[];
|
|
55
|
+
e?: Event;
|
|
56
|
+
}) => void;
|
|
49
57
|
select: (val: {
|
|
50
58
|
route: string;
|
|
51
59
|
indexPath: string[];
|
|
@@ -99,8 +107,16 @@ export declare const VftHorizontalMenu: import("vft/es/utils").SFCWithInstall<im
|
|
|
99
107
|
route: string;
|
|
100
108
|
indexPath: string[];
|
|
101
109
|
}) => any) | undefined;
|
|
102
|
-
onClose?: ((
|
|
103
|
-
|
|
110
|
+
onClose?: ((val: {
|
|
111
|
+
index: string;
|
|
112
|
+
indexPath: string[];
|
|
113
|
+
event?: Event;
|
|
114
|
+
}) => any) | undefined;
|
|
115
|
+
onOpen?: ((val: {
|
|
116
|
+
index: string;
|
|
117
|
+
indexPath: string[];
|
|
118
|
+
e?: Event;
|
|
119
|
+
}) => any) | undefined;
|
|
104
120
|
"onSub-menu-click"?: ((val: any) => any) | undefined;
|
|
105
121
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
106
122
|
export * from './constants';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../form/index.cjs");const b=require("../icon/index.cjs"),Y=require("@vueuse/core"),s=require("@vft/utils"),T=require("../../utils/error.cjs");require("../config-provider/hooks/use-global-config.cjs");const Be=require("lodash-es"),Z=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const q=require("@vft/constants"),_=require("@vft/use"),ee=require("./utils.cjs"),te=require("../form/hooks/use-form-item.cjs"),ne=require("../form/hooks/use-form-common-props.cjs"),Ve=["role"],Ie=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form"],Se=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form"],ze=e.defineComponent({__name:"input",props:{id:{},size:{default:""},disabled:{type:Boolean},modelValue:{},type:{default:"text"},resize:{},autosize:{type:[Object,Boolean],default:!1},autocomplete:{default:"off"},formatter:{},parser:{},placeholder:{},form:{},readonly:{type:Boolean},clearable:{type:Boolean},showPassword:{type:Boolean},showWordLimit:{type:Boolean},suffixIcon:{},prefixIcon:{},clearIcon:{},containerRole:{},label:{},tabindex:{default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:[Boolean,null,String,Object,Array]}},emits:{[q.UPDATE_MODEL_EVENT]:t=>s.isString(t),input:t=>s.isString(t),change:t=>s.isString(t),suffixClick:t=>s.isString(t),prefixClick:t=>s.isString(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,enter:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},setup(t,{expose:oe,emit:ae}){const l=ae,p=e.useAttrs(),i=e.useSlots(),M=e.computed(()=>{const n={};return t.containerRole==="combobox"&&(n["aria-haspopup"]=p["aria-haspopup"],n["aria-owns"]=p["aria-owns"],n["aria-expanded"]=p["aria-expanded"]),n}),le=e.computed(()=>[t.type==="textarea"?A.b():o.b(),o.m(ie.value),o.is("disabled",m.value),o.is("exceed",fe.value),o.is("focus",c.value),{[o.b("group")]:i.prepend||i.append,[o.bm("group","append")]:i.append,[o.bm("group","prepend")]:i.prepend,[o.m("prefix")]:i.prefix||t.prefixIcon,[o.m("suffix")]:i.suffix||t.suffixIcon||t.clearable||t.showPassword,[o.bm("suffix","password-clear")]:E.value&&z.value},p.class]),se=e.getCurrentInstance(),re=e.computed(()=>[o.e("wrapper"),o.is("focus",c.value)]),r=_.useAttrs({excludeKeys:e.computed(()=>Object.keys(M.value))}),{form:ue,formItem:k}=te.useFormItem(),{inputId:F}=te.useFormItemInputId(se.props,{formItemContext:k}),ie=ne.useFormSize(),m=ne.useFormDisabled(),o=Z.useNamespace("input"),A=Z.useNamespace("textarea"),C=e.shallowRef(),f=e.shallowRef(),c=e.ref(!1),V=e.ref(!1),y=e.ref(!1),w=e.ref(!1),D=e.ref(),I=e.shallowRef(t.inputStyle),h=e.computed(()=>C.value||f.value),S=e.computed(()=>s.singleAttrToObj(t.prefixIcon,"icon",{size:16})),O=e.computed(()=>s.singleAttrToObj(t.suffixIcon,"icon",{size:16})),ce=e.computed(()=>s.singleAttrToObj(t.clearIcon,"icon",{icon:"icon-circle-close",size:16})),R=e.computed(()=>ue?.statusIcon??!1),x=e.computed(()=>k?.validateState||""),K=e.computed(()=>x.value&&{validating:"icon-loading",success:"icon-circle-check",error:"icon-circle-close"}[x.value]),de=e.computed(()=>w.value?{icon:"icon-view",size:16}:{icon:"icon-hide",size:16}),me=e.computed(()=>[p.style,t.inputStyle]),$=e.computed(()=>[t.inputStyle,I.value,{resize:t.resize}]),u=e.computed(()=>Be.isNil(t.modelValue)?"":String(t.modelValue)),E=e.computed(()=>t.clearable&&!m.value&&!t.readonly&&!!u.value&&(c.value||V.value)),z=e.computed(()=>t.showPassword&&!m.value&&!t.readonly&&!!u.value&&(!!u.value||c.value)),v=e.computed(()=>t.showWordLimit&&!!r.value.maxlength&&(t.type==="text"||t.type==="textarea")&&!m.value&&!t.readonly&&!t.showPassword),N=e.computed(()=>Array.from(u.value).length),fe=e.computed(()=>!!v.value&&N.value>Number(r.value.maxlength)),ve=e.computed(()=>!!i.suffix||!!t.suffixIcon||E.value||t.showPassword||v.value||!!x.value&&R.value),[pe,ye]=_.useCursor(C);Y.useResizeObserver(f,n=>{if(!v.value||t.resize!=="both")return;const a=n[0],{width:d}=a.contentRect;D.value={right:`calc(100% - ${d+15+6}px)`}});const B=()=>{if(!(!Y.isClient||t.type!=="textarea"))if(t.autosize){const n=s.isObject(t.autosize)?t.autosize.minRows:void 0,a=s.isObject(t.autosize)?t.autosize.maxRows:void 0;I.value={...ee.calcTextareaHeight(f.value,n,a)}}else I.value={minHeight:ee.calcTextareaHeight(f.value).minHeight}},g=()=>{const n=h.value;!n||n.value===u.value||(n.value=u.value)},P=async n=>{pe();let{value:a}=n.target;if(r.value.maxlength&&a.length>=r.value.maxlength&&(a=a.slice(0,Number(r.value.maxlength))),t.formatter&&(a=t.parser?t.parser(a):a,a=t.formatter(a)),!y.value){if(a===u.value){g();return}l(q.UPDATE_MODEL_EVENT,a),l("input",a),await e.nextTick(),g(),ye()}},j=n=>{l("change",n.target.value)},he=()=>{l("suffixClick",t.modelValue)},xe=()=>{l("prefixClick",t.modelValue)},L=n=>{l("compositionstart",n),y.value=!0},ge=n=>/([(\uAC00-\uD7AF)|\u3130-\u318F])+/.test(n),W=n=>{l("compositionupdate",n);const a=n.target?.value,d=a[a.length-1]||"";y.value=!ge(d)},H=n=>{l("compositionend",n),y.value&&(y.value=!1,P(n))},be=()=>{w.value=!w.value,U()},U=async()=>{await e.nextTick(),h.value?.focus()},ke=()=>h.value?.blur(),G=n=>{c.value=!0,l("focus",n)},J=n=>{c.value=!1,l("blur",n),t.validateEvent&&k?.validate?.("blur").catch(a=>T.debugWarn(a))},Ce=n=>{V.value=!1,l("mouseleave",n)},we=n=>{V.value=!0,l("mouseenter",n)},Q=n=>{const a=n.key;if(n.target.type==="number"&&["e","+","-0","E"].includes(a))return n.returnValue=!1,!1;l("keydown",n)},Ee=()=>{h.value?.select()},X=()=>{l(q.UPDATE_MODEL_EVENT,""),l("change",""),l("clear"),l("input","")};return e.watch(()=>t.modelValue,()=>{e.nextTick(()=>B()),t.validateEvent&&k?.validate?.("change").catch(n=>T.debugWarn(n))}),e.watch(u,()=>g()),e.watch(()=>t.type,async()=>{await e.nextTick(),g(),B()}),e.onMounted(()=>{!t.formatter&&t.parser&&T.debugWarn("VftInput","If you set the parser, you also need to set the formatter."),g(),e.nextTick(B)}),oe({input:C,textarea:f,ref:h,textareaStyle:$,autosize:t.autosize,focus:U,blur:ke,select:Ee,clear:X,resizeTextarea:B}),(n,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps(M.value,{class:le.value,style:me.value,role:t.containerRole,onMouseenter:we,onMouseleave:Ce,onMousewheel:a[1]||(a[1]=d=>t.type==="number"&&c.value?d.preventDefault():null)}),[t.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).be("group","prepend"))},[e.renderSlot(n.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(re.value)},[n.$slots.prefix||S.value?.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("prefix-inner")),onClick:xe},[e.renderSlot(n.$slots,"prefix"),S.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0,pointer:""},S.value,{class:e.unref(o).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(F),ref_key:"input",ref:C,class:e.unref(o).e("inner")},e.unref(r),{type:t.showPassword?w.value?"text":"password":t.type,disabled:e.unref(m),formatter:t.formatter,parser:t.parser,readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.label,placeholder:t.placeholder,style:t.inputStyle,form:t.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q,onKeyup:a[0]||(a[0]=e.withKeys(d=>l("enter"),["enter"]))}),null,16,Ie),ve.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(o).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("suffix-inner")),onClick:he},[!E.value||!z.value||!v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"suffix"),O.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0},O.value,{class:e.unref(o).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:1,pointer:"",class:[e.unref(o).e("icon"),e.unref(o).e("clear")]},ce.value,{onMousedown:e.withModifiers(e.unref(s.noop),["prevent"]),onClick:e.withModifiers(X,["stop"])}),null,16,["class","onMousedown"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:2},de.value,{class:[e.unref(o).e("icon"),e.unref(o).e("password")],onClick:be}),null,16,["class"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(o).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("count-inner"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),3)],2)):e.createCommentVNode("",!0),x.value&&K.value&&R.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),{key:4,icon:K.value,class:e.normalizeClass([e.unref(o).e("icon"),e.unref(o).e("validateIcon"),e.unref(o).is("loading",x.value==="validating")])},null,8,["icon","class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0)],2),n.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).be("group","append"))},[e.renderSlot(n.$slots,"append")],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("textarea",e.mergeProps({id:e.unref(F),ref_key:"textarea",ref:f,class:e.unref(A).e("inner")},e.unref(r),{tabindex:t.tabindex,disabled:e.unref(m),readonly:t.readonly,autocomplete:t.autocomplete,style:$.value,"aria-label":t.label,placeholder:t.placeholder,form:t.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q}),null,16,Se),v.value?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(D.value),class:e.normalizeClass(e.unref(o).e("count"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),7)):e.createCommentVNode("",!0)],64))],16,Ve)),[[e.vShow,t.type!=="hidden"]])}});exports.default=ze;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../form/index.cjs");const b=require("../icon/index.cjs"),Y=require("@vueuse/core"),s=require("@vft/utils"),T=require("../../utils/error.cjs");require("../config-provider/hooks/use-global-config.cjs");const Be=require("lodash-es"),Z=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const q=require("@vft/constants"),_=require("@vft/use"),ee=require("./utils.cjs"),te=require("../form/hooks/use-form-common-props.cjs"),ne=require("../form/hooks/use-form-item.cjs"),Ve=["role"],Ie=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form"],Se=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form"],ze=e.defineComponent({__name:"input",props:{id:{},size:{default:""},disabled:{type:Boolean},modelValue:{},type:{default:"text"},resize:{},autosize:{type:[Object,Boolean],default:!1},autocomplete:{default:"off"},formatter:{},parser:{},placeholder:{},form:{},readonly:{type:Boolean},clearable:{type:Boolean},showPassword:{type:Boolean},showWordLimit:{type:Boolean},suffixIcon:{},prefixIcon:{},clearIcon:{},containerRole:{},label:{},tabindex:{default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:[Boolean,null,String,Object,Array]}},emits:{[q.UPDATE_MODEL_EVENT]:t=>s.isString(t),input:t=>s.isString(t),change:t=>s.isString(t),suffixClick:t=>s.isString(t),prefixClick:t=>s.isString(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,enter:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},setup(t,{expose:oe,emit:ae}){const l=ae,p=e.useAttrs(),i=e.useSlots(),M=e.computed(()=>{const n={};return t.containerRole==="combobox"&&(n["aria-haspopup"]=p["aria-haspopup"],n["aria-owns"]=p["aria-owns"],n["aria-expanded"]=p["aria-expanded"]),n}),le=e.computed(()=>[t.type==="textarea"?A.b():o.b(),o.m(ie.value),o.is("disabled",m.value),o.is("exceed",fe.value),o.is("focus",c.value),{[o.b("group")]:i.prepend||i.append,[o.bm("group","append")]:i.append,[o.bm("group","prepend")]:i.prepend,[o.m("prefix")]:i.prefix||t.prefixIcon,[o.m("suffix")]:i.suffix||t.suffixIcon||t.clearable||t.showPassword,[o.bm("suffix","password-clear")]:E.value&&z.value},p.class]),se=e.getCurrentInstance(),re=e.computed(()=>[o.e("wrapper"),o.is("focus",c.value)]),r=_.useAttrs({excludeKeys:e.computed(()=>Object.keys(M.value))}),{form:ue,formItem:k}=ne.useFormItem(),{inputId:F}=ne.useFormItemInputId(se.props,{formItemContext:k}),ie=te.useFormSize(),m=te.useFormDisabled(),o=Z.useNamespace("input"),A=Z.useNamespace("textarea"),C=e.shallowRef(),f=e.shallowRef(),c=e.ref(!1),V=e.ref(!1),y=e.ref(!1),w=e.ref(!1),D=e.ref(),I=e.shallowRef(t.inputStyle),h=e.computed(()=>C.value||f.value),S=e.computed(()=>s.singleAttrToObj(t.prefixIcon,"icon",{size:16})),O=e.computed(()=>s.singleAttrToObj(t.suffixIcon,"icon",{size:16})),ce=e.computed(()=>s.singleAttrToObj(t.clearIcon,"icon",{icon:"icon-circle-close",size:16})),R=e.computed(()=>ue?.statusIcon??!1),x=e.computed(()=>k?.validateState||""),K=e.computed(()=>x.value&&{validating:"icon-loading",success:"icon-circle-check",error:"icon-circle-close"}[x.value]),de=e.computed(()=>w.value?{icon:"icon-view",size:16}:{icon:"icon-hide",size:16}),me=e.computed(()=>[p.style,t.inputStyle]),$=e.computed(()=>[t.inputStyle,I.value,{resize:t.resize}]),u=e.computed(()=>Be.isNil(t.modelValue)?"":String(t.modelValue)),E=e.computed(()=>t.clearable&&!m.value&&!t.readonly&&!!u.value&&(c.value||V.value)),z=e.computed(()=>t.showPassword&&!m.value&&!t.readonly&&!!u.value&&(!!u.value||c.value)),v=e.computed(()=>t.showWordLimit&&!!r.value.maxlength&&(t.type==="text"||t.type==="textarea")&&!m.value&&!t.readonly&&!t.showPassword),N=e.computed(()=>Array.from(u.value).length),fe=e.computed(()=>!!v.value&&N.value>Number(r.value.maxlength)),ve=e.computed(()=>!!i.suffix||!!t.suffixIcon||E.value||t.showPassword||v.value||!!x.value&&R.value),[pe,ye]=_.useCursor(C);Y.useResizeObserver(f,n=>{if(!v.value||t.resize!=="both")return;const a=n[0],{width:d}=a.contentRect;D.value={right:`calc(100% - ${d+15+6}px)`}});const B=()=>{if(!(!Y.isClient||t.type!=="textarea"))if(t.autosize){const n=s.isObject(t.autosize)?t.autosize.minRows:void 0,a=s.isObject(t.autosize)?t.autosize.maxRows:void 0;I.value={...ee.calcTextareaHeight(f.value,n,a)}}else I.value={minHeight:ee.calcTextareaHeight(f.value).minHeight}},g=()=>{const n=h.value;!n||n.value===u.value||(n.value=u.value)},P=async n=>{pe();let{value:a}=n.target;if(r.value.maxlength&&a.length>=r.value.maxlength&&(a=a.slice(0,Number(r.value.maxlength))),t.formatter&&(a=t.parser?t.parser(a):a,a=t.formatter(a)),!y.value){if(a===u.value){g();return}l(q.UPDATE_MODEL_EVENT,a),l("input",a),await e.nextTick(),g(),ye()}},j=n=>{l("change",n.target.value)},he=()=>{l("suffixClick",t.modelValue)},xe=()=>{l("prefixClick",t.modelValue)},L=n=>{l("compositionstart",n),y.value=!0},ge=n=>/([(\uAC00-\uD7AF)|\u3130-\u318F])+/.test(n),W=n=>{l("compositionupdate",n);const a=n.target?.value,d=a[a.length-1]||"";y.value=!ge(d)},H=n=>{l("compositionend",n),y.value&&(y.value=!1,P(n))},be=()=>{w.value=!w.value,U()},U=async()=>{await e.nextTick(),h.value?.focus()},ke=()=>h.value?.blur(),G=n=>{c.value=!0,l("focus",n)},J=n=>{c.value=!1,l("blur",n),t.validateEvent&&k?.validate?.("blur").catch(a=>T.debugWarn(a))},Ce=n=>{V.value=!1,l("mouseleave",n)},we=n=>{V.value=!0,l("mouseenter",n)},Q=n=>{const a=n.key;if(n.target.type==="number"&&["e","+","-0","E"].includes(a))return n.returnValue=!1,!1;l("keydown",n)},Ee=()=>{h.value?.select()},X=()=>{l(q.UPDATE_MODEL_EVENT,""),l("change",""),l("clear"),l("input","")};return e.watch(()=>t.modelValue,()=>{e.nextTick(()=>B()),t.validateEvent&&k?.validate?.("change").catch(n=>T.debugWarn(n))}),e.watch(u,()=>g()),e.watch(()=>t.type,async()=>{await e.nextTick(),g(),B()}),e.onMounted(()=>{!t.formatter&&t.parser&&T.debugWarn("VftInput","If you set the parser, you also need to set the formatter."),g(),e.nextTick(B)}),oe({input:C,textarea:f,ref:h,textareaStyle:$,autosize:t.autosize,focus:U,blur:ke,select:Ee,clear:X,resizeTextarea:B}),(n,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps(M.value,{class:le.value,style:me.value,role:t.containerRole,onMouseenter:we,onMouseleave:Ce,onMousewheel:a[1]||(a[1]=d=>t.type==="number"&&c.value?d.preventDefault():null)}),[t.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[n.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(o).be("group","prepend"))},[e.renderSlot(n.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(re.value)},[n.$slots.prefix||S.value?.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("prefix-inner")),onClick:xe},[e.renderSlot(n.$slots,"prefix"),S.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0,pointer:""},S.value,{class:e.unref(o).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(F),ref_key:"input",ref:C,class:e.unref(o).e("inner")},e.unref(r),{type:t.showPassword?w.value?"text":"password":t.type,disabled:e.unref(m),formatter:t.formatter,parser:t.parser,readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.label,placeholder:t.placeholder,style:t.inputStyle,form:t.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q,onKeyup:a[0]||(a[0]=e.withKeys(d=>l("enter"),["enter"]))}),null,16,Ie),ve.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(o).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("suffix-inner")),onClick:he},[!E.value||!z.value||!v.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(n.$slots,"suffix"),O.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0},O.value,{class:e.unref(o).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:1,pointer:"",class:[e.unref(o).e("icon"),e.unref(o).e("clear")]},ce.value,{onMousedown:e.withModifiers(e.unref(s.noop),["prevent"]),onClick:e.withModifiers(X,["stop"])}),null,16,["class","onMousedown"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:2},de.value,{class:[e.unref(o).e("icon"),e.unref(o).e("password")],onClick:be}),null,16,["class"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(o).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("count-inner"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),3)],2)):e.createCommentVNode("",!0),x.value&&K.value&&R.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),{key:4,icon:K.value,class:e.normalizeClass([e.unref(o).e("icon"),e.unref(o).e("validateIcon"),e.unref(o).is("loading",x.value==="validating")])},null,8,["icon","class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0)],2),n.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(o).be("group","append"))},[e.renderSlot(n.$slots,"append")],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("textarea",e.mergeProps({id:e.unref(F),ref_key:"textarea",ref:f,class:e.unref(A).e("inner")},e.unref(r),{tabindex:t.tabindex,disabled:e.unref(m),readonly:t.readonly,autocomplete:t.autocomplete,style:$.value,"aria-label":t.label,placeholder:t.placeholder,form:t.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q}),null,16,Se),v.value?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(D.value),class:e.normalizeClass(e.unref(o).e("count"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),7)):e.createCommentVNode("",!0)],64))],16,Ve)),[[e.vShow,t.type!=="hidden"]])}});exports.default=ze;
|
|
@@ -27,7 +27,7 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
27
27
|
type: import("vue").PropType<boolean>;
|
|
28
28
|
};
|
|
29
29
|
horizontalMenuProps: {
|
|
30
|
-
type: import("vue").PropType<Partial<import("./
|
|
30
|
+
type: import("vue").PropType<Partial<import("./types").SubMenuProps>>;
|
|
31
31
|
};
|
|
32
32
|
persistent: {
|
|
33
33
|
type: import("vue").PropType<boolean>;
|
|
@@ -35,6 +35,18 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
35
35
|
disableSubMenuAction: {
|
|
36
36
|
type: import("vue").PropType<boolean>;
|
|
37
37
|
};
|
|
38
|
+
backgroundColor: {
|
|
39
|
+
type: import("vue").PropType<string>;
|
|
40
|
+
};
|
|
41
|
+
textColor: {
|
|
42
|
+
type: import("vue").PropType<string>;
|
|
43
|
+
};
|
|
44
|
+
activeTextColor: {
|
|
45
|
+
type: import("vue").PropType<string>;
|
|
46
|
+
};
|
|
47
|
+
collapseType: {
|
|
48
|
+
type: import("vue").PropType<"menu-title">;
|
|
49
|
+
};
|
|
38
50
|
}>, {
|
|
39
51
|
open: (index: string) => void;
|
|
40
52
|
close: (index: string, indexPath: string[], e?: Event) => void;
|
|
@@ -55,7 +67,7 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
55
67
|
open: (val: {
|
|
56
68
|
index: string;
|
|
57
69
|
indexPath: string[];
|
|
58
|
-
|
|
70
|
+
e?: Event;
|
|
59
71
|
}) => void;
|
|
60
72
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
61
73
|
mode: {
|
|
@@ -86,7 +98,7 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
86
98
|
type: import("vue").PropType<boolean>;
|
|
87
99
|
};
|
|
88
100
|
horizontalMenuProps: {
|
|
89
|
-
type: import("vue").PropType<Partial<import("./
|
|
101
|
+
type: import("vue").PropType<Partial<import("./types").SubMenuProps>>;
|
|
90
102
|
};
|
|
91
103
|
persistent: {
|
|
92
104
|
type: import("vue").PropType<boolean>;
|
|
@@ -94,6 +106,18 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
94
106
|
disableSubMenuAction: {
|
|
95
107
|
type: import("vue").PropType<boolean>;
|
|
96
108
|
};
|
|
109
|
+
backgroundColor: {
|
|
110
|
+
type: import("vue").PropType<string>;
|
|
111
|
+
};
|
|
112
|
+
textColor: {
|
|
113
|
+
type: import("vue").PropType<string>;
|
|
114
|
+
};
|
|
115
|
+
activeTextColor: {
|
|
116
|
+
type: import("vue").PropType<string>;
|
|
117
|
+
};
|
|
118
|
+
collapseType: {
|
|
119
|
+
type: import("vue").PropType<"menu-title">;
|
|
120
|
+
};
|
|
97
121
|
}>> & Readonly<{
|
|
98
122
|
onSelect?: ((menuItem: import("./types").MenuItemClicked, routerResult?: Promise<void | import("vue-router").NavigationFailure> | undefined) => any) | undefined;
|
|
99
123
|
onClose?: ((val: {
|
|
@@ -104,7 +128,7 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
104
128
|
onOpen?: ((val: {
|
|
105
129
|
index: string;
|
|
106
130
|
indexPath: string[];
|
|
107
|
-
|
|
131
|
+
e?: Event;
|
|
108
132
|
}) => any) | undefined;
|
|
109
133
|
"onUpdate:collapse"?: ((val: boolean) => any) | undefined;
|
|
110
134
|
"onSub-menu-click"?: ((val: any) => any) | undefined;
|
|
@@ -368,9 +392,6 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
368
392
|
onMouseleave?: ((event: MouseEvent) => any) | undefined;
|
|
369
393
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
370
394
|
};
|
|
371
|
-
export { type MenuProps } from './menu.vue';
|
|
372
|
-
export { type MenuItemProps } from './menu-item.vue';
|
|
373
|
-
export { type SubMenuProps } from './sub-menu.vue';
|
|
374
395
|
export * from './types';
|
|
375
396
|
export declare const VftMenuItem: import("vft/es/utils").SFCWithInstall<{
|
|
376
397
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
title?: string;
|
|
3
|
-
}
|
|
1
|
+
import type { MenuItemGroupProps } from './types';
|
|
4
2
|
declare function __VLS_template(): {
|
|
5
3
|
title?(_: {}): any;
|
|
6
4
|
default?(_: {}): any;
|
|
7
5
|
};
|
|
8
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MenuItemGroupProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MenuItemGroupProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9
7
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
10
8
|
export default _default;
|
|
11
9
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { RouteLocationRaw } from 'vue-router';
|
|
3
|
-
export interface MenuItemProps {
|
|
4
|
-
/** 唯一标志 */
|
|
5
|
-
index?: string;
|
|
6
|
-
/** Vue Router 路径对象 */
|
|
7
|
-
route?: RouteLocationRaw;
|
|
8
|
-
/** 是否禁用 */
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
icon?: IconProps | string;
|
|
11
|
-
title?: string | number;
|
|
12
|
-
isAloneUse?: boolean;
|
|
13
|
-
divider?: boolean;
|
|
14
|
-
className?: string;
|
|
15
|
-
reverse?: boolean;
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}
|
|
1
|
+
import type { MenuItemProps } from './types';
|
|
18
2
|
declare function __VLS_template(): {
|
|
19
3
|
title?(_: {}): any;
|
|
20
4
|
default?(_: {}): any;
|
|
@@ -1,30 +1,5 @@
|
|
|
1
1
|
import type { NavigationFailure } from 'vue-router';
|
|
2
|
-
import type {
|
|
3
|
-
import type { MenuItemClicked } from './types';
|
|
4
|
-
export interface MenuProps {
|
|
5
|
-
/** 菜单展示模式 */
|
|
6
|
-
mode?: 'horizontal' | 'vertical';
|
|
7
|
-
/** 页面加载时默认激活菜单的 index(menu-item 的index) */
|
|
8
|
-
defaultActive?: string;
|
|
9
|
-
/** 默认打开的 sub-menu 的 index 的数组 */
|
|
10
|
-
defaultOpeneds?: string[];
|
|
11
|
-
/** 是否只保持一个子菜单的展开 */
|
|
12
|
-
uniqueOpened?: boolean;
|
|
13
|
-
/** 是否启用 vue-router 模式。 启用该模式会在激活导航时以 index 作为 path 进行路由跳转 使用 default-active 来设置加载时的激活项 */
|
|
14
|
-
router?: boolean;
|
|
15
|
-
/** 子菜单打开的触发方式,只在 mode 为 horizontal 时有效 */
|
|
16
|
-
menuTrigger?: 'hover' | 'click';
|
|
17
|
-
/** 是否水平折叠收起菜单(仅在 mode 为 vertical 时可用) */
|
|
18
|
-
collapse?: boolean;
|
|
19
|
-
/** 是否开启折叠动画 */
|
|
20
|
-
collapseTransition?: boolean;
|
|
21
|
-
/** 是否省略多余的子项(仅在横向模式生效) */
|
|
22
|
-
ellipsis?: boolean;
|
|
23
|
-
horizontalMenuProps?: Partial<SubMenuProps>;
|
|
24
|
-
persistent?: boolean;
|
|
25
|
-
/** 禁用子菜单的展开收缩行为 */
|
|
26
|
-
disableSubMenuAction?: boolean;
|
|
27
|
-
}
|
|
2
|
+
import type { MenuItemClicked, MenuProps } from './types';
|
|
28
3
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MenuProps>>, {
|
|
29
4
|
open: (index: string) => void;
|
|
30
5
|
close: (index: string, indexPath: string[], e?: Event) => void;
|
|
@@ -45,7 +20,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
45
20
|
open: (val: {
|
|
46
21
|
index: string;
|
|
47
22
|
indexPath: string[];
|
|
48
|
-
|
|
23
|
+
e?: Event;
|
|
49
24
|
}) => void;
|
|
50
25
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MenuProps>>> & Readonly<{
|
|
51
26
|
onSelect?: ((menuItem: MenuItemClicked, routerResult?: Promise<void | NavigationFailure> | undefined) => any) | undefined;
|
|
@@ -57,7 +32,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
57
32
|
onOpen?: ((val: {
|
|
58
33
|
index: string;
|
|
59
34
|
indexPath: string[];
|
|
60
|
-
|
|
35
|
+
e?: Event;
|
|
61
36
|
}) => any) | undefined;
|
|
62
37
|
"onUpdate:collapse"?: ((val: boolean) => any) | undefined;
|
|
63
38
|
"onSub-menu-click"?: ((val: any) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),H=require("../icon/index.cjs"),J=require("@vueuse/core"),y=require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");require("lodash-es");const K=require("../../utils/vue/vnode.cjs");require("../form/index.cjs");const N=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const Q=require("./menu-collapse-transition.vue.cjs"),X=require("./sub-menu.vue2.cjs"),Y=require("./use-menu-css-var.cjs"),Z=require("./utils/menu-bar.cjs"),_=l.defineComponent({name:"vft-menu"}),ee=l.defineComponent({..._,props:{mode:{default:"vertical"},defaultActive:{default:""},defaultOpeneds:{default:()=>[]},uniqueOpened:{type:Boolean},router:{type:Boolean},menuTrigger:{default:"hover"},collapse:{type:Boolean},collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},horizontalMenuProps:{},persistent:{type:Boolean,default:!0},disableSubMenuAction:{type:Boolean,default:!1},backgroundColor:{},textColor:{},activeTextColor:{},collapseType:{}},emits:["update:collapse","sub-menu-click","select","close","open"],setup(t,{expose:P,emit:w}){const m=w,h=N.useNamespace("menu"),A=l.useSlots(),M=l.getCurrentInstance(),q=M.appContext.config.globalProperties.$router,i=l.ref(),x=N.useNamespace("sub-menu"),f=l.ref(-1),a=l.ref(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),s=l.ref(t.defaultActive),r=l.ref({}),b=l.ref({}),R=l.computed(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),E=()=>{const e=s.value&&r.value[s.value];if(!e||t.mode==="horizontal"||t.collapse)return;e.indexPath.forEach(u=>{const o=b.value[u];o&&p(u,o.indexPath)})},p=(e,n,u)=>{a.value.includes(e)||(t.uniqueOpened&&(a.value=a.value.filter(o=>n.includes(o))),a.value.push(e),m("open",{index:e,indexPath:n,e:u}))},g=(e,n,u)=>{const o=a.value.indexOf(e);o!==-1&&a.value.splice(o,1),m("close",{index:e,indexPath:n,event:u})},W=({e,index:n,indexPath:u,isFirstLevel:o=!1})=>{if(!o){const c=a.value.includes(n);s.value=n,t.disableSubMenuAction||(c?g(n,u,e):p(n,u,e))}m("sub-menu-click",{e,index:n,indexPath:u})},V=e=>{(t.mode==="horizontal"||t.collapse)&&(a.value=[]);const{index:n,indexPath:u}=e;if(!(y.isNullOrUndefined(n)||y.isNullOrUndefined(u))){if(t.router&&q){const o=e.route||n,c=q.push(o).then(d=>(d||(s.value=n),d));m("select",e,c)}else s.value=n,m("select",e);y.isMobile()&&setTimeout(()=>{a.value=[]},100)}},C=e=>{const n=r.value,u=n[e]||s.value&&n[s.value]||n[t.defaultActive];u?s.value=u.index:s.value=e},$=()=>{if(!i.value)return-1;const e=Array.from(i.value?.childNodes??[]).filter(S=>S.nodeName!=="#text"||S.nodeValue),n=64,u=Number.parseInt(getComputedStyle(i.value).paddingLeft,10),o=Number.parseInt(getComputedStyle(i.value).paddingRight,10),c=i.value.clientWidth-u-o;let d=0,v=0;return e.forEach((S,G)=>{d+=S.offsetWidth||0,d<=c-n&&(v=G+1)}),v===e.length?-1:v},D=(e,n=33.34)=>{let u;return()=>{u&&clearTimeout(u),u=setTimeout(()=>{e()},n)}};let T=!0;const I=()=>{const e=()=>{f.value=-1,l.nextTick(()=>{f.value=$()})};T?e():D(e)(),T=!1};l.watch(()=>t.defaultActive,e=>{r.value[e]||(s.value=""),C(e)}),l.watch(()=>t.collapse,e=>{e&&(a.value=[])}),l.watch(r.value,E);let z;l.watchEffect(()=>{t.mode==="horizontal"&&t.ellipsis?z=J.useResizeObserver(i,I).stop:z?.()});const O=e=>{b.value[e.index]=e},k=e=>{delete b.value[e.index]},L=e=>{r.value[e.index]=e},U=e=>{delete r.value[e.index]},B=l.ref(!1),j=l.ref(),F=l.ref();return l.provide("rootMenu",l.reactive({props:M.props,openedMenus:a,items:r,subMenus:b,activeIndex:s,isMenuPopup:R,inSubMenu:B,inSubMenuMouseEnterTimer:j,inSubMenuMouseleaveTimer:F,addMenuItem:L,removeMenuItem:U,addSubMenu:O,removeSubMenu:k,openMenu:p,closeMenu:g,handleMenuItemClick:V,handleSubMenuClick:W})),l.provide(`subMenu:${M.uid}`,{addSubMenu:O,removeSubMenu:k,mouseInChild:l.ref(!1),level:0}),l.onMounted(()=>{t.mode==="horizontal"&&new Z.default(M.vnode.el,h.namespace.value)}),P({open:e=>{const{indexPath:n}=b.value[e];n.forEach(u=>p(u,n))},close:g,handleResize:I,menu:i,inSubMenu:B,updateActiveIndex:C,activeIndex:s}),()=>{let e=A.default?.()??[];const n=[];if(t.mode==="horizontal"&&i.value){const c=K.flattedChildren(e),d=f.value===-1?c:c.slice(0,f.value),v=f.value===-1?[]:c.slice(f.value);v?.length&&t.ellipsis&&(e=d,n.push(l.h(X.default,{index:"sub-menu-more",class:x.e("hide-arrow"),...t.horizontalMenuProps},{title:()=>l.h(H.VftIcon,{icon:"icon-menu-line",class:x.e("icon-more")}),default:()=>v})))}const u=Y.useMenuCssVar(M.props,0),o=l.h("ul",{key:String(t.collapse),role:"menubar",ref:i,style:u.value,class:{[h.b()]:!0,[h.m(t.mode)]:!0,[h.m("collapse")]:t.collapse,[h.m(`collapse-type-${t.collapseType}`)]:t.collapseType}},[...e,...n]);return t.collapseTransition&&t.mode==="vertical"?l.h(Q.default,()=>o):o}}});exports.default=ee;
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { IconProps } from 'vft/es/components/icon';
|
|
3
|
-
import type { ClassType } from '../types';
|
|
4
|
-
export interface SubMenuProps {
|
|
5
|
-
index: string;
|
|
6
|
-
showTimeout?: number;
|
|
7
|
-
hideTimeout?: number;
|
|
8
|
-
popperClass?: ClassType;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
popperOffset?: number;
|
|
11
|
-
expandIcon?: string | IconProps;
|
|
12
|
-
collapseIcon?: string | IconProps;
|
|
13
|
-
title?: string;
|
|
14
|
-
icon?: IconProps | string;
|
|
15
|
-
showArrow?: boolean;
|
|
16
|
-
toolTipCfg?: ToolTipProps;
|
|
17
|
-
teleported?: boolean;
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}
|
|
1
|
+
import type { SubMenuProps } from './types';
|
|
20
2
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<SubMenuProps>>, {
|
|
21
3
|
opened: import("vue").ComputedRef<boolean>;
|
|
22
4
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -1,5 +1,66 @@
|
|
|
1
|
+
import type { IconProps } from 'vft/es/components';
|
|
1
2
|
import type { Ref } from 'vue';
|
|
2
3
|
import type { RouteLocationRaw } from 'vue-router';
|
|
4
|
+
import type { ToolTipProps } from 'vft/es/components/tooltip';
|
|
5
|
+
import type { ClassType } from '../types';
|
|
6
|
+
export interface MenuProps {
|
|
7
|
+
/** 菜单展示模式 */
|
|
8
|
+
mode?: 'horizontal' | 'vertical';
|
|
9
|
+
/** 页面加载时默认激活菜单的 index(menu-item 的index) */
|
|
10
|
+
defaultActive?: string;
|
|
11
|
+
/** 默认打开的 sub-menu 的 index 的数组 */
|
|
12
|
+
defaultOpeneds?: string[];
|
|
13
|
+
/** 是否只保持一个子菜单的展开 */
|
|
14
|
+
uniqueOpened?: boolean;
|
|
15
|
+
/** 是否启用 vue-router 模式。 启用该模式会在激活导航时以 index 作为 path 进行路由跳转 使用 default-active 来设置加载时的激活项 */
|
|
16
|
+
router?: boolean;
|
|
17
|
+
/** 子菜单打开的触发方式,只在 mode 为 horizontal 时有效 */
|
|
18
|
+
menuTrigger?: 'hover' | 'click';
|
|
19
|
+
/** 是否水平折叠收起菜单(仅在 mode 为 vertical 时可用) */
|
|
20
|
+
collapse?: boolean;
|
|
21
|
+
/** 是否开启折叠动画 */
|
|
22
|
+
collapseTransition?: boolean;
|
|
23
|
+
/** 是否省略多余的子项(仅在横向模式生效) */
|
|
24
|
+
ellipsis?: boolean;
|
|
25
|
+
horizontalMenuProps?: Partial<SubMenuProps>;
|
|
26
|
+
persistent?: boolean;
|
|
27
|
+
/** 禁用子菜单的展开收缩行为 */
|
|
28
|
+
disableSubMenuAction?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface SubMenuProps {
|
|
31
|
+
index: string;
|
|
32
|
+
showTimeout?: number;
|
|
33
|
+
hideTimeout?: number;
|
|
34
|
+
popperClass?: ClassType;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
popperOffset?: number;
|
|
37
|
+
expandIcon?: string | IconProps;
|
|
38
|
+
collapseIcon?: string | IconProps;
|
|
39
|
+
title?: string;
|
|
40
|
+
icon?: IconProps | string;
|
|
41
|
+
showArrow?: boolean;
|
|
42
|
+
toolTipCfg?: ToolTipProps;
|
|
43
|
+
teleported?: boolean;
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}
|
|
46
|
+
export interface MenuItemGroupProps {
|
|
47
|
+
title?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface MenuItemProps {
|
|
50
|
+
/** 唯一标志 */
|
|
51
|
+
index?: string;
|
|
52
|
+
/** Vue Router 路径对象 */
|
|
53
|
+
route?: RouteLocationRaw;
|
|
54
|
+
/** 是否禁用 */
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
icon?: IconProps | string;
|
|
57
|
+
title?: string | number;
|
|
58
|
+
isAloneUse?: boolean;
|
|
59
|
+
divider?: boolean;
|
|
60
|
+
className?: string;
|
|
61
|
+
reverse?: boolean;
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
}
|
|
3
64
|
export interface MenuItemRegistered {
|
|
4
65
|
index: string;
|
|
5
66
|
indexPath: string[];
|
|
@@ -24,6 +85,7 @@ export interface MenuProps {
|
|
|
24
85
|
router?: boolean;
|
|
25
86
|
/** 子菜单打开的触发方式,只在 mode 为 horizontal 时有效 */
|
|
26
87
|
menuTrigger?: 'hover' | 'click';
|
|
88
|
+
/** 是否收缩 */
|
|
27
89
|
collapse?: boolean;
|
|
28
90
|
/** 是否水平折叠收起菜单(仅在 mode 为 vertical 时可用) */
|
|
29
91
|
backgroundColor?: string;
|
|
@@ -31,6 +93,8 @@ export interface MenuProps {
|
|
|
31
93
|
activeTextColor?: string;
|
|
32
94
|
/** 是否开启折叠动画 */
|
|
33
95
|
collapseTransition?: boolean;
|
|
96
|
+
/** 收缩类型 */
|
|
97
|
+
collapseType?: 'menu-title';
|
|
34
98
|
/** 是否省略多余的子项(仅在横向模式生效) */
|
|
35
99
|
ellipsis?: boolean;
|
|
36
100
|
persistent?: boolean;
|
|
@@ -15,20 +15,31 @@ export declare const VftSideMenu: import("vft/es/utils").SFCWithInstall<import("
|
|
|
15
15
|
type: import("vue").PropType<import("./types").MenuType[]>;
|
|
16
16
|
required: true;
|
|
17
17
|
};
|
|
18
|
+
tooltipCfg: {
|
|
19
|
+
type: import("vue").PropType<Partial<import("vft/es/vft").ToolTipProps>>;
|
|
20
|
+
};
|
|
18
21
|
defaultActive: {
|
|
19
22
|
type: import("vue").PropType<string>;
|
|
20
23
|
};
|
|
21
24
|
defaultOpeneds: {
|
|
22
|
-
type: import("vue").PropType<
|
|
25
|
+
type: import("vue").PropType<string[]>;
|
|
23
26
|
};
|
|
24
27
|
uniqueOpened: {
|
|
25
28
|
type: import("vue").PropType<boolean>;
|
|
26
29
|
default: boolean;
|
|
27
30
|
};
|
|
31
|
+
collapseTransition: {
|
|
32
|
+
type: import("vue").PropType<boolean>;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
28
35
|
disableSubMenuAction: {
|
|
29
36
|
type: import("vue").PropType<boolean>;
|
|
30
37
|
default: boolean;
|
|
31
38
|
};
|
|
39
|
+
collapseType: {
|
|
40
|
+
type: import("vue").PropType<"menu-title">;
|
|
41
|
+
default: undefined;
|
|
42
|
+
};
|
|
32
43
|
isFixedLeft: {
|
|
33
44
|
type: import("vue").PropType<boolean>;
|
|
34
45
|
default: boolean;
|
|
@@ -83,6 +94,18 @@ export declare const VftSideMenu: import("vft/es/utils").SFCWithInstall<import("
|
|
|
83
94
|
type: import("vue").PropType<number | boolean>;
|
|
84
95
|
default: boolean;
|
|
85
96
|
};
|
|
97
|
+
enableScroll: {
|
|
98
|
+
type: import("vue").PropType<boolean>;
|
|
99
|
+
default: boolean;
|
|
100
|
+
};
|
|
101
|
+
scrollThreshold: {
|
|
102
|
+
type: import("vue").PropType<number>;
|
|
103
|
+
default: number;
|
|
104
|
+
};
|
|
105
|
+
scrollMaxHeight: {
|
|
106
|
+
type: import("vue").PropType<string | number>;
|
|
107
|
+
default: number;
|
|
108
|
+
};
|
|
86
109
|
}>, {
|
|
87
110
|
sideRef: import("vue").Ref<any, any>;
|
|
88
111
|
jumpActiveDom: ({ activeDom, offset, delay }?: {
|
|
@@ -96,7 +119,7 @@ export declare const VftSideMenu: import("vft/es/utils").SFCWithInstall<import("
|
|
|
96
119
|
"update:width": (val: string | number) => void;
|
|
97
120
|
dragEnd: (oldIndex: import("sortablejs").SortableEvent, newIndex: import("sortablejs").SortableEvent) => void;
|
|
98
121
|
dragWidthEnd: () => void;
|
|
99
|
-
select: (
|
|
122
|
+
select: (menuItem: import("vft/es/vft").MenuItemClicked, routerResult?: Promise<void | import("vue-router").NavigationFailure> | undefined) => void;
|
|
100
123
|
subMenuClick: (val: any) => void;
|
|
101
124
|
subMenuOpenClick: (val: any) => void;
|
|
102
125
|
menuItemMouseenter: (val: any) => void;
|
|
@@ -118,20 +141,31 @@ export declare const VftSideMenu: import("vft/es/utils").SFCWithInstall<import("
|
|
|
118
141
|
type: import("vue").PropType<import("./types").MenuType[]>;
|
|
119
142
|
required: true;
|
|
120
143
|
};
|
|
144
|
+
tooltipCfg: {
|
|
145
|
+
type: import("vue").PropType<Partial<import("vft/es/vft").ToolTipProps>>;
|
|
146
|
+
};
|
|
121
147
|
defaultActive: {
|
|
122
148
|
type: import("vue").PropType<string>;
|
|
123
149
|
};
|
|
124
150
|
defaultOpeneds: {
|
|
125
|
-
type: import("vue").PropType<
|
|
151
|
+
type: import("vue").PropType<string[]>;
|
|
126
152
|
};
|
|
127
153
|
uniqueOpened: {
|
|
128
154
|
type: import("vue").PropType<boolean>;
|
|
129
155
|
default: boolean;
|
|
130
156
|
};
|
|
157
|
+
collapseTransition: {
|
|
158
|
+
type: import("vue").PropType<boolean>;
|
|
159
|
+
default: boolean;
|
|
160
|
+
};
|
|
131
161
|
disableSubMenuAction: {
|
|
132
162
|
type: import("vue").PropType<boolean>;
|
|
133
163
|
default: boolean;
|
|
134
164
|
};
|
|
165
|
+
collapseType: {
|
|
166
|
+
type: import("vue").PropType<"menu-title">;
|
|
167
|
+
default: undefined;
|
|
168
|
+
};
|
|
135
169
|
isFixedLeft: {
|
|
136
170
|
type: import("vue").PropType<boolean>;
|
|
137
171
|
default: boolean;
|
|
@@ -186,8 +220,20 @@ export declare const VftSideMenu: import("vft/es/utils").SFCWithInstall<import("
|
|
|
186
220
|
type: import("vue").PropType<number | boolean>;
|
|
187
221
|
default: boolean;
|
|
188
222
|
};
|
|
223
|
+
enableScroll: {
|
|
224
|
+
type: import("vue").PropType<boolean>;
|
|
225
|
+
default: boolean;
|
|
226
|
+
};
|
|
227
|
+
scrollThreshold: {
|
|
228
|
+
type: import("vue").PropType<number>;
|
|
229
|
+
default: number;
|
|
230
|
+
};
|
|
231
|
+
scrollMaxHeight: {
|
|
232
|
+
type: import("vue").PropType<string | number>;
|
|
233
|
+
default: number;
|
|
234
|
+
};
|
|
189
235
|
}>> & Readonly<{
|
|
190
|
-
onSelect?: ((
|
|
236
|
+
onSelect?: ((menuItem: import("vft/es/vft").MenuItemClicked, routerResult?: Promise<void | import("vue-router").NavigationFailure> | undefined) => any) | undefined;
|
|
191
237
|
"onUpdate:collapse"?: ((val: boolean) => any) | undefined;
|
|
192
238
|
"onUpdate:width"?: ((val: string | number) => any) | undefined;
|
|
193
239
|
onDragEnd?: ((oldIndex: import("sortablejs").SortableEvent, newIndex: import("sortablejs").SortableEvent) => any) | undefined;
|
|
@@ -201,7 +247,9 @@ export declare const VftSideMenu: import("vft/es/utils").SFCWithInstall<import("
|
|
|
201
247
|
width: string | number;
|
|
202
248
|
collapse: boolean;
|
|
203
249
|
uniqueOpened: boolean;
|
|
250
|
+
collapseTransition: boolean;
|
|
204
251
|
disableSubMenuAction: boolean;
|
|
252
|
+
collapseType: "menu-title";
|
|
205
253
|
isFixedLeft: boolean;
|
|
206
254
|
collapseWidth: string | number;
|
|
207
255
|
menuTopBottomHeight: number;
|
|
@@ -215,6 +263,9 @@ export declare const VftSideMenu: import("vft/es/utils").SFCWithInstall<import("
|
|
|
215
263
|
openMenuCollapse: boolean;
|
|
216
264
|
disabledJudgeTurnOver: boolean;
|
|
217
265
|
defaultOpenedsLevel: number | boolean;
|
|
266
|
+
enableScroll: boolean;
|
|
267
|
+
scrollThreshold: number;
|
|
268
|
+
scrollMaxHeight: string | number;
|
|
218
269
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
219
270
|
export default VftSideMenu;
|
|
220
271
|
export * from './types';
|