@king-one/antdv 1.0.55 → 1.0.56

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @king-one/antdv
2
2
 
3
+ ## 1.0.56
4
+
5
+ ### Patch Changes
6
+
7
+ - feat:使用 tsx 重构 pro-modal 组件
8
+
3
9
  ## 1.0.55
4
10
 
5
11
  ### Patch Changes
@@ -1,18 +1,31 @@
1
- import { defineComponent as p } from "vue";
2
- import { Modal as t } from "ant-design-vue";
3
- import { ProModalProps as a } from "./types.mjs";
4
- const l = p({
5
- props: a,
6
- setup(r, { slots: e }) {
7
- const d = defineModel({ required: !0, type: Boolean });
8
- return () => /* @__PURE__ */ React.createElement(t, { "v-model:open": d.value, "v-bind": r.modalProps }, {
1
+ import { defineComponent as p, computed as r } from "vue";
2
+ import { Modal as u } from "ant-design-vue";
3
+ import { useNamespace as f } from "../../../hooks/use-namespace/index.mjs";
4
+ import { ProModalProps as s } from "./types.mjs";
5
+ const M = p({
6
+ props: s,
7
+ emits: ["update:modelValue", "onCancel", "onConfirm"],
8
+ setup(a, { slots: o, emit: n }) {
9
+ const { b: l } = f("pro-modal"), t = r(() => l()), m = r({
10
+ get() {
11
+ return a.modelValue;
12
+ },
13
+ set(e) {
14
+ n("update:modelValue", e);
15
+ }
16
+ }), d = () => {
17
+ n("onConfirm");
18
+ }, c = () => {
19
+ n("onCancel");
20
+ };
21
+ return () => /* @__PURE__ */ React.createElement(u, { "v-model:open": m.value, ...a.modalProps, onOk: d, onCancel: c, "wrap-class-name": t.value }, {
9
22
  default: () => {
10
- var o;
11
- return (o = e.default) == null ? void 0 : o.call(e);
23
+ var e;
24
+ return (e = o.default) == null ? void 0 : e.call(o);
12
25
  }
13
26
  });
14
27
  }
15
28
  });
16
29
  export {
17
- l as default
30
+ M as default
18
31
  };
@@ -1,11 +1,12 @@
1
- const o = {
1
+ const e = {
2
2
  modalProps: {
3
3
  type: Object
4
4
  },
5
- aProps: {
6
- type: Object
5
+ modelValue: {
6
+ type: Boolean,
7
+ required: !0
7
8
  }
8
9
  };
9
10
  export {
10
- o as ProModalProps
11
+ e as ProModalProps
11
12
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),u=require("ant-design-vue"),d=require("./types.js"),a=n.defineComponent({props:d.ProModalProps,setup(r,{slots:e}){const t=defineModel({required:!0,type:Boolean});return()=>React.createElement(u.Modal,{"v-model:open":t.value,"v-bind":r.modalProps},{default:()=>{var o;return(o=e.default)==null?void 0:o.call(e)}})}});exports.default=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),s=require("ant-design-vue"),p=require("../../../hooks/use-namespace/index.js"),m=require("./types.js"),i=a.defineComponent({props:m.ProModalProps,emits:["update:modelValue","onCancel","onConfirm"],setup(t,{slots:n,emit:o}){const{b:u}=p.useNamespace("pro-modal"),r=a.computed(()=>u()),l=a.computed({get(){return t.modelValue},set(e){o("update:modelValue",e)}}),c=()=>{o("onConfirm")},d=()=>{o("onCancel")};return()=>React.createElement(s.Modal,{"v-model:open":l.value,...t.modalProps,onOk:c,onCancel:d,"wrap-class-name":r.value},{default:()=>{var e;return(e=n.default)==null?void 0:e.call(n)}})}});exports.default=i;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={modalProps:{type:Object},aProps:{type:Object}};exports.ProModalProps=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={modalProps:{type:Object},modelValue:{type:Boolean,required:!0}};exports.ProModalProps=e;
@@ -1 +1 @@
1
- @font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=51204) format("woff2"),url(fonts/iconfont.woff?t=36957) format("woff"),url(fonts/iconfont.ttf?t=94638) format("truetype")}.king-icon{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-king-title-icon:before{content:"\e680"}
1
+ @font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=47158) format("woff2"),url(fonts/iconfont.woff?t=75839) format("woff"),url(fonts/iconfont.ttf?t=46563) format("truetype")}.king-icon{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-king-title-icon:before{content:"\e680"}
@@ -1 +1 @@
1
- :root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399;--king-transition-duration:0.3s}.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-content{width:-moz-fit-content;width:fit-content}.king-scrollbar .king-scrollbar-rail{position:absolute}.king-scrollbar .king-scrollbar-rail--vertical{right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail--horizontal{bottom:2px;height:5px;left:2px;right:2px}.king-scrollbar .king-scrollbar-rail__scrollbar--vertical{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}.king-scrollbar .king-scrollbar-rail__scrollbar--horizontal{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;height:100%;cursor:pointer}.v-vl-items{width:-moz-fit-content;width:fit-content}.king-scale-virtual-list{width:100%;height:100%}.king-scale-virtual-list .king-scale-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto}.king-pro-title{border-bottom:1px solid #ccc;font-weight:500}.king-pro-title .icon{margin-right:10px}.king-pro-title--unborder{border:none}.king-pro-modal .ant-modal-content{padding:0}.king-pro-modal .ant-modal-header{height:56px;padding-left:32px;padding-right:24px;display:flex;justify-content:space-between;align-items:center;background:#f1f7ff;border-bottom:1px solid #e6e8ea}.king-pro-modal .ant-modal-body{padding:10px 20px;max-height:65vh;overflow:auto}.king-pro-modal .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}.king-pro-area-select{width:100%}@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=78082) format("woff2"),url(fonts/iconfont.woff?t=90226) format("woff"),url(fonts/iconfont.ttf?t=24346) format("truetype")}.king-icon{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-king-title-icon:before{content:"\e680"}
1
+ :root{--king-color-white:#ffffff;--king-color-primary:#409eff;--king-color-success:#67c23a;--king-color-warning:#e6a23c;--king-color-danger:#f56c6c;--king-color-error:#f56c6c;--king-color-info:#909399;--king-transition-duration:0.3s}.king-button--primary{--king-button-text-color:var(--king-color-primary)}.king-button--success{--king-button-text-color:var(--king-color-success)}.king-button--warning{--king-button-text-color:var(--king-color-warning)}.king-button--danger{--king-button-text-color:var(--king-color-danger)}.king-button--error{--king-button-text-color:var(--king-color-error)}.king-button--info{--king-button-text-color:var(--king-color-info)}.king-button{color:var(--king-button-text-color)}.king-scrollbar{overflow:hidden;position:relative;z-index:auto;height:100%;width:100%}.king-scrollbar .king-scrollbar-container{width:100%;overflow:scroll;height:100%;min-height:inherit;max-height:inherit;scrollbar-width:none}.king-scrollbar .king-scrollbar-content{width:-moz-fit-content;width:fit-content}.king-scrollbar .king-scrollbar-rail{position:absolute}.king-scrollbar .king-scrollbar-rail--vertical{right:0;width:5px;top:2px;bottom:2px;right:4px}.king-scrollbar .king-scrollbar-rail--horizontal{bottom:2px;height:5px;left:2px;right:2px}.king-scrollbar .king-scrollbar-rail__scrollbar--vertical{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;width:100%;cursor:pointer}.king-scrollbar .king-scrollbar-rail__scrollbar--horizontal{background:rgba(0,0,0,.25);position:absolute;border-radius:5px;height:100%;cursor:pointer}.v-vl-items{width:-moz-fit-content;width:fit-content}.king-scale-virtual-list{width:100%;height:100%}.king-scale-virtual-list .king-scale-vittual-wrapper{width:-moz-fit-content;width:fit-content;margin:0 auto}.king-pro-title{border-bottom:1px solid #ccc;font-weight:500}.king-pro-title .icon{margin-right:10px}.king-pro-title--unborder{border:none}.king-pro-modal .ant-modal-content{padding:0}.king-pro-modal .ant-modal-header{height:56px;padding-left:32px;padding-right:24px;display:flex;justify-content:space-between;align-items:center;background:#f1f7ff;border-bottom:1px solid #e6e8ea}.king-pro-modal .ant-modal-body{padding:10px 20px;max-height:65vh;overflow:auto}.king-pro-modal .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}.king-pro-area-select{width:100%}@font-face{font-family:iconfont;src:url(fonts/iconfont.woff2?t=55301) format("woff2"),url(fonts/iconfont.woff?t=45771) format("woff"),url(fonts/iconfont.ttf?t=13290) format("truetype")}.king-icon{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-king-title-icon:before{content:"\e680"}
@@ -6,19 +6,21 @@ export declare const KProModal: SFCWithInstall<DefineComponent<{
6
6
  readonly modalProps: {
7
7
  readonly type: PropType<Omit< ModalFuncProps, "open">>;
8
8
  };
9
- readonly aProps: {
10
- readonly type: PropType<{
11
- name: string;
12
- }>;
9
+ readonly modelValue: {
10
+ readonly type: BooleanConstructor;
11
+ readonly required: true;
13
12
  };
14
- }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
13
+ }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("onCancel" | "update:modelValue" | "onConfirm")[], "onCancel" | "update:modelValue" | "onConfirm", PublicProps, Readonly< ExtractPropTypes<{
15
14
  readonly modalProps: {
16
15
  readonly type: PropType<Omit< ModalFuncProps, "open">>;
17
16
  };
18
- readonly aProps: {
19
- readonly type: PropType<{
20
- name: string;
21
- }>;
17
+ readonly modelValue: {
18
+ readonly type: BooleanConstructor;
19
+ readonly required: true;
22
20
  };
23
- }>>, {}, {}>>;
21
+ }>> & {
22
+ onOnCancel?: ((...args: any[]) => any) | undefined;
23
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
24
+ onOnConfirm?: ((...args: any[]) => any) | undefined;
25
+ }, {}, {}>>;
24
26
  export default KProModal;
@@ -4,19 +4,21 @@ declare const _default: DefineComponent<{
4
4
  readonly modalProps: {
5
5
  readonly type: PropType<Omit< ModalFuncProps, "open">>;
6
6
  };
7
- readonly aProps: {
8
- readonly type: PropType<{
9
- name: string;
10
- }>;
7
+ readonly modelValue: {
8
+ readonly type: BooleanConstructor;
9
+ readonly required: true;
11
10
  };
12
- }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
11
+ }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("onCancel" | "update:modelValue" | "onConfirm")[], "onCancel" | "update:modelValue" | "onConfirm", PublicProps, Readonly< ExtractPropTypes<{
13
12
  readonly modalProps: {
14
13
  readonly type: PropType<Omit< ModalFuncProps, "open">>;
15
14
  };
16
- readonly aProps: {
17
- readonly type: PropType<{
18
- name: string;
19
- }>;
15
+ readonly modelValue: {
16
+ readonly type: BooleanConstructor;
17
+ readonly required: true;
20
18
  };
21
- }>>, {}, {}>;
19
+ }>> & {
20
+ onOnCancel?: ((...args: any[]) => any) | undefined;
21
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
22
+ onOnConfirm?: ((...args: any[]) => any) | undefined;
23
+ }, {}, {}>;
22
24
  export default _default;
@@ -5,10 +5,9 @@ export declare const ProModalProps: {
5
5
  readonly modalProps: {
6
6
  readonly type: PropType<Omit<ModalType, "open">>;
7
7
  };
8
- readonly aProps: {
9
- readonly type: PropType<{
10
- name: string;
11
- }>;
8
+ readonly modelValue: {
9
+ readonly type: BooleanConstructor;
10
+ readonly required: true;
12
11
  };
13
12
  };
14
13
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@king-one/antdv",
3
3
  "type": "module",
4
- "version": "1.0.55",
4
+ "version": "1.0.56",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "license": "ISC",