@chewel611/naive-ui-plus 0.0.42 → 0.0.44
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.js +712 -707
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/es/layout/content/PTabs.css +1 -1
- package/es/layout/content/PTabs.vue.js +1 -1
- package/es/layout/content/PTabs.vue2.js +2 -2
- package/es/layout/store.d.ts +8 -20939
- package/es/layout/store.js +81 -73
- package/es/modal/PModal.d.ts +1 -3
- package/es/modal/PModal.vue.js +49 -51
- package/es/modal/index.d.ts +1 -3
- package/es/modal/typing.d.ts +1 -2
- package/lib/layout/content/PTabs.css +1 -1
- package/lib/layout/content/PTabs.vue.cjs +1 -1
- package/lib/layout/content/PTabs.vue2.cjs +1 -1
- package/lib/layout/store.cjs +1 -1
- package/lib/layout/store.d.ts +8 -20939
- package/lib/modal/PModal.d.ts +1 -3
- package/lib/modal/PModal.vue.cjs +1 -1
- package/lib/modal/index.d.ts +1 -3
- package/lib/modal/typing.d.ts +1 -2
- package/package.json +1 -1
package/lib/modal/PModal.d.ts
CHANGED
|
@@ -6,9 +6,7 @@ declare function __VLS_template(): {
|
|
|
6
6
|
'header-extra'?(_: {}): any;
|
|
7
7
|
default?(_: {}): any;
|
|
8
8
|
footer?(_: {}): any;
|
|
9
|
-
'action-extra'?(_: {
|
|
10
|
-
loading: boolean;
|
|
11
|
-
}): any;
|
|
9
|
+
'action-extra'?(_: {}): any;
|
|
12
10
|
};
|
|
13
11
|
refs: {
|
|
14
12
|
$modal: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
package/lib/modal/PModal.vue.cjs
CHANGED
|
@@ -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 s=require("naive-ui"),e=require("vue"),y=e.defineComponent({__name:"PModal",props:{saveBtnText:{default:"保存"},cancelBtnText:{default:"取消"},hideCancelBtn:{type:Boolean,default:!1},hideSaveBtn:{type:Boolean,default:!1},title:{},width:{default:800},height:{default:500},visible:{type:Boolean},onSave:{},onClose:{},onAfterEnter:{},onAfterLeave:{},onUpdateVisible:{}},emits:["update:visible","update:loading"],setup(r,{expose:f,emit:u}){const i=s.useMessage(),o=e.ref(!1),l=e.ref(!1),d=u,t=r,v=async()=>{try{o.value=!0,t.onSave&&await t.onSave()&&n()}catch(a){i.error(a.message)}finally{o.value=!1}},n=()=>{o.value=!1,l.value=!1,d("update:visible",!1)},h=async()=>{try{l.value=!0,t.onClose?await t.onClose()&&n():n()}catch(a){i.error(a.message)}finally{l.value=!1}};return f({open:()=>{o.value=!1,l.value=!1,d("update:visible",!0)},close:n}),(a,C)=>{const p=s.NText,c=s.NButton,m=s.NSpace;return e.openBlock(),e.createBlock(e.unref(s.NModal),e.mergeProps({ref:"$modal",preset:"card"},a.$attrs,{"header-class":"bg-gray-50",show:t.visible,draggable:!0,closable:!1,"close-on-esc":!1,"mask-closable":!1,bordered:!1,style:{width:`${t.width}px`},onClose:n,onAfterEnter:t.onAfterEnter,onAfterLeave:t.onAfterLeave,onUpdateVisible:t.onUpdateVisible}),{header:e.withCtx(()=>[a.$slots.header?e.renderSlot(a.$slots,"header",{key:0}):t.title?(e.openBlock(),e.createBlock(p,{key:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.title),1)]),_:1})):e.createCommentVNode("",!0)]),"header-extra":e.withCtx(()=>[e.renderSlot(a.$slots,"header-extra")]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"overflow-y-auto overflow-hidden mt-5",style:e.normalizeStyle({maxHeight:`${t.height}px`})},[e.renderSlot(a.$slots,"default")],4)]),footer:e.withCtx(()=>[e.renderSlot(a.$slots,"footer")]),action:e.withCtx(()=>[e.createVNode(m,{justify:"end"},{default:e.withCtx(()=>[t.hideSaveBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:0,type:"primary",loading:o.value,onClick:v},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.saveBtnText),1)]),_:1},8,["loading"])),e.renderSlot(a.$slots,"action-extra"),t.hideCancelBtn?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:1,loading:l.value,onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.cancelBtnText),1)]),_:1},8,["loading"]))]),_:3})]),_:3},16,["show","style","onAfterEnter","onAfterLeave","onUpdateVisible"])}}});exports.default=y;
|
package/lib/modal/index.d.ts
CHANGED
|
@@ -2149,8 +2149,6 @@ export declare const PModalPlugin: {
|
|
|
2149
2149
|
'header-extra'?(_: {}): any;
|
|
2150
2150
|
default?(_: {}): any;
|
|
2151
2151
|
footer?(_: {}): any;
|
|
2152
|
-
'action-extra'?(_: {
|
|
2153
|
-
loading: boolean;
|
|
2154
|
-
}): any;
|
|
2152
|
+
'action-extra'?(_: {}): any;
|
|
2155
2153
|
};
|
|
2156
2154
|
}) & import('vue').Plugin;
|
package/lib/modal/typing.d.ts
CHANGED
|
@@ -7,12 +7,11 @@ export type ModalProps = {
|
|
|
7
7
|
width?: number;
|
|
8
8
|
height?: number;
|
|
9
9
|
visible: boolean;
|
|
10
|
-
loading: boolean;
|
|
11
10
|
onSave?: () => Promise<boolean> | boolean;
|
|
12
11
|
onClose?: () => Promise<boolean> | boolean;
|
|
13
12
|
onAfterEnter?: () => void;
|
|
14
13
|
onAfterLeave?: () => void;
|
|
15
|
-
|
|
14
|
+
onUpdateVisible?: (value: boolean) => void;
|
|
16
15
|
};
|
|
17
16
|
export type ModalMethods = {
|
|
18
17
|
open: () => void;
|