@ditari/bsui 1.0.19 → 1.0.21
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/cjs/components/index.cjs.js +1 -1
- package/dist/cjs/components/modal/Modal.cjs.js +1 -1
- package/dist/cjs/components/select/Select.vue.d.ts +1 -1
- package/dist/cjs/components/select/index.d.ts +1 -1
- package/dist/cjs/directive/trim.cjs.js +1 -0
- package/dist/cjs/directive/trim.d.ts +4 -0
- package/dist/esm/components/index.esm.js +33 -32
- package/dist/esm/components/modal/Modal.esm.js +10 -10
- package/dist/esm/components/select/Select.vue.d.ts +1 -1
- package/dist/esm/components/select/index.d.ts +1 -1
- package/dist/esm/directive/trim.d.ts +4 -0
- package/dist/esm/directive/trim.esm.js +10 -0
- package/package.json +1 -1
- package/src/components/index.ts +3 -1
- package/src/components/modal/Modal.tsx +2 -0
- package/src/directive/trim.ts +11 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("pinia"),D=require("pinia-plugin-persistedstate"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("pinia"),D=require("pinia-plugin-persistedstate"),d=require("./components.cjs.js"),l=require("../directive/trim.cjs.js"),q=require("./table/index.cjs.js"),m=require("./select/index.cjs.js"),x=require("./desensitize/index.cjs.js"),$=require("./dic/index.cjs.js"),S=require("./modal/index.cjs.js"),b=require("./form/index.cjs.js"),r=require("./grid/index.cjs.js"),i=require("./layout/index.cjs.js"),s=d,o=function(e,c){Object.keys(s).forEach(a=>{const n=s[a];n.install&&e.use(n)});const t=u.createPinia();t.use(D.createPersistedState({storage:sessionStorage})),e.use(t),e.directive("trim",l.default),e.provide("menuIcon",c.menuIcon)},f={install:o};exports.DTable=q.DTable;exports.DSelect=m.DSelect;exports.DDesensitize=x.DDesensitize;exports.DicReplace=$.DDicReplace;exports.DModal=S.DModal;exports.DForm=b.default;exports.DGrid=r.DGrid;exports.DGridItem=r.DGridItem;exports.DList=i.DList;exports.DMain=i.DMain;exports.DNavTabs=i.DNavTabs;exports.DShow=i.DShow;exports.default=f;exports.install=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("@vueuse/core"),s=require("ant-design-vue"),v=require("../theme/index.cjs.js"),f=`${v.prefixName}-modal`,m=e.defineComponent({name:"DModal",props:{title:{type:String,default:""},visible:{type:Boolean,default:()=>!1},width:{type:Number,default:()=>800}},emits:["update:visible"],setup(u,{slots:t,emit:r}){const l=e.ref(!0),n=e.ref(0);e.watchEffect(()=>{l.value=u.visible});const i=e.ref(void 0);o.useResizeObserver(document.body,()=>{const{height:a}=o.useWindowSize();n.value=a.value<200?a.value:a.value-200,i.value={"max-height":n.value+"px"}});const d=()=>t.footer?t.footer&&(t==null?void 0:t.footer()):null,c=()=>{r("update:visible",l.value)};return()=>e.createVNode(e.Fragment,null,[e.createVNode(s.Modal,{visible:l.value,"onUpdate:visible":a=>l.value=a,title:u.title,centered:!0,"mask-closable":!1,wrapClassName:f,width:u.width,footer:d(),onCancel:c},{default:()=>e.createVNode("div",{class:["content"],style:i.value},[t.default&&t.default(n.value)])})])}});exports.default=m;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("@vueuse/core"),s=require("ant-design-vue"),v=require("../theme/index.cjs.js"),f=`${v.prefixName}-modal`,m=e.defineComponent({name:"DModal",props:{title:{type:String,default:""},visible:{type:Boolean,default:()=>!1},width:{type:Number,default:()=>800}},emits:["update:visible"],setup(u,{slots:t,emit:r}){const l=e.ref(!0),n=e.ref(0);e.watchEffect(()=>{l.value=u.visible,document.body.style.width=""});const i=e.ref(void 0);o.useResizeObserver(document.body,()=>{const{height:a}=o.useWindowSize();n.value=a.value<200?a.value:a.value-200,i.value={"max-height":n.value+"px"}});const d=()=>t.footer?t.footer&&(t==null?void 0:t.footer()):null,c=()=>{r("update:visible",l.value)};return()=>e.createVNode(e.Fragment,null,[e.createVNode(s.Modal,{visible:l.value,"onUpdate:visible":a=>l.value=a,title:u.title,centered:!0,"mask-closable":!1,wrapClassName:f,width:u.width,footer:d(),onCancel:c},{default:()=>e.createVNode("div",{class:["content"],style:i.value},[t.default&&t.default(n.value)])})])}});exports.default=m;
|
|
@@ -25,7 +25,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
25
25
|
required: false;
|
|
26
26
|
default: any;
|
|
27
27
|
};
|
|
28
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
28
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:value")[], "change" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
29
|
value: {
|
|
30
30
|
type: __PropType<any>;
|
|
31
31
|
required: true;
|
|
@@ -24,7 +24,7 @@ export declare const DSelect: import("../../utils/install").SFCWithInstall<impor
|
|
|
24
24
|
required: false;
|
|
25
25
|
default: any;
|
|
26
26
|
};
|
|
27
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
27
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:value")[], "change" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
28
|
value: {
|
|
29
29
|
type: import("vue").PropType<any>;
|
|
30
30
|
required: true;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={mounted(e){e.addEventListener("input",()=>{e.value=e.value.trim().replace(/\s+/g,"")})}};exports.default=t;
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { createPinia as
|
|
2
|
-
import { createPersistedState as
|
|
1
|
+
import { createPinia as m } from "pinia";
|
|
2
|
+
import { createPersistedState as n } from "pinia-plugin-persistedstate";
|
|
3
3
|
import * as c from "./components.esm.js";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import a from "../directive/trim.esm.js";
|
|
5
|
+
import { DTable as v } from "./table/index.esm.js";
|
|
6
|
+
import { DSelect as b } from "./select/index.esm.js";
|
|
7
|
+
import { DDesensitize as T } from "./desensitize/index.esm.js";
|
|
7
8
|
import { DDicReplace as h } from "./dic/index.esm.js";
|
|
8
|
-
import { DModal as
|
|
9
|
-
import { default as
|
|
10
|
-
import { DGrid as
|
|
11
|
-
import { DList as
|
|
12
|
-
const
|
|
13
|
-
Object.keys(
|
|
14
|
-
const
|
|
15
|
-
|
|
9
|
+
import { DModal as M } from "./modal/index.esm.js";
|
|
10
|
+
import { default as R } from "./form/index.esm.js";
|
|
11
|
+
import { DGrid as k, DGridItem as w } from "./grid/index.esm.js";
|
|
12
|
+
import { DList as z, DMain as E, DNavTabs as F, DShow as L } from "./layout/index.esm.js";
|
|
13
|
+
const r = c, f = function(e, i) {
|
|
14
|
+
Object.keys(r).forEach((s) => {
|
|
15
|
+
const t = r[s];
|
|
16
|
+
t.install && e.use(t);
|
|
16
17
|
});
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const o = m();
|
|
19
|
+
o.use(
|
|
20
|
+
n({
|
|
20
21
|
storage: sessionStorage
|
|
21
22
|
})
|
|
22
|
-
),
|
|
23
|
-
},
|
|
24
|
-
install:
|
|
23
|
+
), e.use(o), e.directive("trim", a), e.provide("menuIcon", i.menuIcon);
|
|
24
|
+
}, x = {
|
|
25
|
+
install: f
|
|
25
26
|
};
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
T as DDesensitize,
|
|
29
|
+
R as DForm,
|
|
30
|
+
k as DGrid,
|
|
31
|
+
w as DGridItem,
|
|
32
|
+
z as DList,
|
|
33
|
+
E as DMain,
|
|
34
|
+
M as DModal,
|
|
35
|
+
F as DNavTabs,
|
|
36
|
+
b as DSelect,
|
|
37
|
+
L as DShow,
|
|
38
|
+
v as DTable,
|
|
38
39
|
h as DicReplace,
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
x as default,
|
|
41
|
+
f as install
|
|
41
42
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as m, ref as i, watchEffect as
|
|
1
|
+
import { defineComponent as m, ref as i, watchEffect as c, createVNode as n, Fragment as v } from "vue";
|
|
2
2
|
import { useResizeObserver as s, useWindowSize as p } from "@vueuse/core";
|
|
3
3
|
import { Modal as b } from "ant-design-vue";
|
|
4
4
|
import { prefixName as h } from "../theme/index.esm.js";
|
|
5
|
-
const
|
|
5
|
+
const y = `${h}-modal`, N = /* @__PURE__ */ m({
|
|
6
6
|
name: "DModal",
|
|
7
7
|
props: {
|
|
8
8
|
title: {
|
|
@@ -21,11 +21,11 @@ const w = `${h}-modal`, N = /* @__PURE__ */ m({
|
|
|
21
21
|
emits: ["update:visible"],
|
|
22
22
|
setup(l, {
|
|
23
23
|
slots: e,
|
|
24
|
-
emit:
|
|
24
|
+
emit: d
|
|
25
25
|
}) {
|
|
26
26
|
const a = i(!0), o = i(0);
|
|
27
|
-
|
|
28
|
-
a.value = l.visible;
|
|
27
|
+
c(() => {
|
|
28
|
+
a.value = l.visible, document.body.style.width = "";
|
|
29
29
|
});
|
|
30
30
|
const u = i(void 0);
|
|
31
31
|
s(document.body, () => {
|
|
@@ -36,18 +36,18 @@ const w = `${h}-modal`, N = /* @__PURE__ */ m({
|
|
|
36
36
|
"max-height": o.value + "px"
|
|
37
37
|
};
|
|
38
38
|
});
|
|
39
|
-
const
|
|
40
|
-
|
|
39
|
+
const r = () => e.footer ? e.footer && (e == null ? void 0 : e.footer()) : null, f = () => {
|
|
40
|
+
d("update:visible", a.value);
|
|
41
41
|
};
|
|
42
|
-
return () => n(
|
|
42
|
+
return () => n(v, null, [n(b, {
|
|
43
43
|
visible: a.value,
|
|
44
44
|
"onUpdate:visible": (t) => a.value = t,
|
|
45
45
|
title: l.title,
|
|
46
46
|
centered: !0,
|
|
47
47
|
"mask-closable": !1,
|
|
48
|
-
wrapClassName:
|
|
48
|
+
wrapClassName: y,
|
|
49
49
|
width: l.width,
|
|
50
|
-
footer:
|
|
50
|
+
footer: r(),
|
|
51
51
|
onCancel: f
|
|
52
52
|
}, {
|
|
53
53
|
default: () => n("div", {
|
|
@@ -25,7 +25,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
25
25
|
required: false;
|
|
26
26
|
default: any;
|
|
27
27
|
};
|
|
28
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
28
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:value")[], "change" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
29
|
value: {
|
|
30
30
|
type: __PropType<any>;
|
|
31
31
|
required: true;
|
|
@@ -24,7 +24,7 @@ export declare const DSelect: import("../../utils/install").SFCWithInstall<impor
|
|
|
24
24
|
required: false;
|
|
25
25
|
default: any;
|
|
26
26
|
};
|
|
27
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
27
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:value")[], "change" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
28
|
value: {
|
|
29
29
|
type: import("vue").PropType<any>;
|
|
30
30
|
required: true;
|
package/package.json
CHANGED
package/src/components/index.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { createPersistedState } from "pinia-plugin-persistedstate";
|
|
|
5
5
|
import * as components from "./components";
|
|
6
6
|
export * from "./components";
|
|
7
7
|
|
|
8
|
+
import vTrim from "../directive/trim";
|
|
9
|
+
|
|
8
10
|
export interface MenuIcon {
|
|
9
11
|
componentName: string | "nativeHtml";
|
|
10
12
|
type: string;
|
|
@@ -30,8 +32,8 @@ export const install = function (app: App, opts: Options) {
|
|
|
30
32
|
})
|
|
31
33
|
);
|
|
32
34
|
app.use(pinia);
|
|
35
|
+
app.directive("trim", vTrim);
|
|
33
36
|
app.provide("menuIcon", opts.menuIcon);
|
|
34
|
-
console.log("options", opts);
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
export default {
|