@king-one/antdv 1.0.33 → 1.0.35

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/es/components/index.mjs +18 -14
  3. package/dist/es/components/pro-area/apis/pro-area.api.mjs +6 -0
  4. package/dist/es/components/pro-area/hooks/use-pro-area.mjs +11 -0
  5. package/dist/es/components/pro-area/index.mjs +13 -0
  6. package/dist/es/components/pro-area/src/ProArea.vue.mjs +4 -0
  7. package/dist/es/components/pro-area/src/ProArea.vue2.mjs +91 -0
  8. package/dist/es/components/pro-area/src/types.mjs +21 -0
  9. package/dist/es/components/pro-area/style/index.mjs +2 -0
  10. package/dist/es/components/pro-modal/hooks/useProModal.mjs +34 -0
  11. package/dist/es/components/pro-modal/index.mjs +14 -0
  12. package/dist/es/components/pro-modal/src/ProModal.vue.mjs +4 -0
  13. package/dist/es/components/pro-modal/src/ProModal.vue2.mjs +39 -0
  14. package/dist/es/components/{pro-dialog → pro-modal}/src/types.mjs +2 -2
  15. package/dist/es/components/pro-modal/style/index.mjs +2 -0
  16. package/dist/es/components/pro-picker/apis/pro-picker.api.mjs +7 -0
  17. package/dist/es/components/pro-picker/index.mjs +10 -0
  18. package/dist/es/components/pro-picker/src/ProPicker.vue.mjs +4 -0
  19. package/dist/es/components/pro-picker/src/ProPicker.vue2.mjs +64 -0
  20. package/dist/es/components/pro-picker/src/types.mjs +23 -0
  21. package/dist/es/index.mjs +40 -30
  22. package/dist/lib/components/index.js +1 -1
  23. package/dist/lib/components/pro-area/apis/pro-area.api.js +1 -0
  24. package/dist/lib/components/pro-area/hooks/use-pro-area.js +1 -0
  25. package/dist/lib/components/pro-area/index.js +1 -0
  26. package/dist/lib/components/{pro-dialog/src/ProDialog.vue.js → pro-area/src/ProArea.vue.js} +1 -1
  27. package/dist/lib/components/pro-area/src/ProArea.vue2.js +1 -0
  28. package/dist/lib/components/pro-area/src/types.js +1 -0
  29. package/dist/lib/components/pro-area/style/index.js +1 -0
  30. package/dist/lib/components/pro-modal/hooks/useProModal.js +1 -0
  31. package/dist/lib/components/pro-modal/index.js +1 -0
  32. package/dist/lib/components/pro-modal/src/ProModal.vue.js +1 -0
  33. package/dist/lib/components/pro-modal/src/ProModal.vue2.js +1 -0
  34. package/dist/lib/components/pro-modal/src/types.js +1 -0
  35. package/dist/lib/components/{pro-dialog → pro-modal}/style/index.js +1 -1
  36. package/dist/lib/components/pro-picker/apis/pro-picker.api.js +1 -0
  37. package/dist/lib/components/pro-picker/index.js +1 -0
  38. package/dist/lib/components/pro-picker/src/ProPicker.vue.js +1 -0
  39. package/dist/lib/components/pro-picker/src/ProPicker.vue2.js +1 -0
  40. package/dist/lib/components/pro-picker/src/types.js +1 -0
  41. package/dist/lib/index.js +1 -1
  42. package/dist/theme-chalk/index.css +1 -1
  43. package/dist/theme-chalk/por-area-select.css +1 -0
  44. package/dist/theme-chalk/pro-modal.css +1 -0
  45. package/dist/types/components/index.d.ts +3 -1
  46. package/dist/types/components/pro-area/apis/pro-area.api.d.ts +3 -0
  47. package/dist/types/components/pro-area/hooks/use-pro-area.d.ts +4 -0
  48. package/dist/types/components/pro-area/index.d.ts +72 -0
  49. package/dist/types/components/pro-area/src/ProArea.vue.d.ts +69 -0
  50. package/dist/types/components/pro-area/src/types.d.ts +42 -0
  51. package/dist/types/components/pro-modal/hooks/useProModal.d.ts +14 -0
  52. package/dist/types/components/pro-modal/index.d.ts +5 -0
  53. package/dist/types/components/{pro-dialog/src/ProDialog.vue.d.ts → pro-modal/src/ProModal.vue.d.ts} +17 -3
  54. package/dist/types/components/{pro-dialog → pro-modal}/src/types.d.ts +2 -2
  55. package/dist/types/components/pro-picker/apis/pro-picker.api.d.ts +5 -0
  56. package/dist/types/components/pro-picker/index.d.ts +59 -0
  57. package/dist/types/components/pro-picker/src/ProPicker.vue.d.ts +57 -0
  58. package/dist/types/components/pro-picker/src/types.d.ts +24 -0
  59. package/package.json +2 -1
  60. package/dist/es/components/pro-dialog/hooks/useProDialog.mjs +0 -34
  61. package/dist/es/components/pro-dialog/index.mjs +0 -13
  62. package/dist/es/components/pro-dialog/src/ProDialog.vue.mjs +0 -4
  63. package/dist/es/components/pro-dialog/src/ProDialog.vue2.mjs +0 -33
  64. package/dist/es/components/pro-dialog/style/index.mjs +0 -2
  65. package/dist/lib/components/pro-dialog/hooks/useProDialog.js +0 -1
  66. package/dist/lib/components/pro-dialog/index.js +0 -1
  67. package/dist/lib/components/pro-dialog/src/ProDialog.vue2.js +0 -1
  68. package/dist/lib/components/pro-dialog/src/types.js +0 -1
  69. package/dist/theme-chalk/pro-dialog.css +0 -1
  70. package/dist/types/components/pro-dialog/hooks/useProDialog.d.ts +0 -14
  71. package/dist/types/components/pro-dialog/index.d.ts +0 -30
@@ -0,0 +1 @@
1
+ .king-pro-area-select{width:100%}
@@ -0,0 +1 @@
1
+ .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}
@@ -1,7 +1,9 @@
1
1
  export * from './form';
2
2
  export * from './collapse-transtion';
3
- export * from './pro-dialog';
3
+ export * from './pro-modal';
4
4
  export * from './pro-title';
5
5
  export * from './scroll-bar';
6
6
  export * from './scale-virtual-list';
7
7
  export * from './pro-tag';
8
+ export * from './pro-picker';
9
+ export * from './pro-area';
@@ -0,0 +1,3 @@
1
+ export declare const proAreaApis: {
2
+ areaTree: () => Promise<any>;
3
+ };
@@ -0,0 +1,4 @@
1
+ import { Ref } from 'vue';
2
+ export declare function useAreaProArea(): {
3
+ ops: Ref<any>;
4
+ };
@@ -0,0 +1,72 @@
1
+ import { SFCWithInstall } from '../utils/install';
2
+ import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
3
+ import { levelType, AreaOptions, FieldNames } from './src/types';
4
+ export * from './src/types';
5
+ export declare const KProArea: SFCWithInstall<DefineComponent<{
6
+ level: {
7
+ readonly type: PropType<levelType>;
8
+ readonly default: 3;
9
+ };
10
+ options: {
11
+ readonly type: PropType< AreaOptions[]>;
12
+ readonly required: true;
13
+ };
14
+ FieldNames: {
15
+ readonly type: PropType<FieldNames>;
16
+ readonly default: () => {
17
+ name: string;
18
+ id: string;
19
+ children: string;
20
+ };
21
+ };
22
+ modelValue: {
23
+ type: PropType<{
24
+ province?: string;
25
+ city?: string;
26
+ county?: string;
27
+ }>;
28
+ required: true;
29
+ };
30
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
31
+ "update:modelValue": (modelValue: {
32
+ province?: string;
33
+ city?: string;
34
+ county?: string;
35
+ }) => void;
36
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
37
+ level: {
38
+ readonly type: PropType<levelType>;
39
+ readonly default: 3;
40
+ };
41
+ options: {
42
+ readonly type: PropType< AreaOptions[]>;
43
+ readonly required: true;
44
+ };
45
+ FieldNames: {
46
+ readonly type: PropType<FieldNames>;
47
+ readonly default: () => {
48
+ name: string;
49
+ id: string;
50
+ children: string;
51
+ };
52
+ };
53
+ modelValue: {
54
+ type: PropType<{
55
+ province?: string;
56
+ city?: string;
57
+ county?: string;
58
+ }>;
59
+ required: true;
60
+ };
61
+ }>> & {
62
+ "onUpdate:modelValue"?: ((modelValue: {
63
+ province?: string;
64
+ city?: string;
65
+ county?: string;
66
+ }) => any) | undefined;
67
+ }, {
68
+ level: 1 | 2 | 3;
69
+ FieldNames: FieldNames;
70
+ }, {}>>;
71
+ export * from './hooks/use-pro-area';
72
+ export default KProArea;
@@ -0,0 +1,69 @@
1
+ import { AreaOptions, FieldNames, levelType } from './types';
2
+ import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
3
+ declare const _default: DefineComponent<{
4
+ level: {
5
+ readonly type: PropType<levelType>;
6
+ readonly default: 3;
7
+ };
8
+ options: {
9
+ readonly type: PropType<AreaOptions[]>;
10
+ readonly required: true;
11
+ };
12
+ FieldNames: {
13
+ readonly type: PropType<FieldNames>;
14
+ readonly default: () => {
15
+ name: string;
16
+ id: string;
17
+ children: string;
18
+ };
19
+ };
20
+ modelValue: {
21
+ type: PropType<{
22
+ province?: string;
23
+ city?: string;
24
+ county?: string;
25
+ }>;
26
+ required: true;
27
+ };
28
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
29
+ "update:modelValue": (modelValue: {
30
+ province?: string;
31
+ city?: string;
32
+ county?: string;
33
+ }) => void;
34
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
35
+ level: {
36
+ readonly type: PropType<levelType>;
37
+ readonly default: 3;
38
+ };
39
+ options: {
40
+ readonly type: PropType<AreaOptions[]>;
41
+ readonly required: true;
42
+ };
43
+ FieldNames: {
44
+ readonly type: PropType<FieldNames>;
45
+ readonly default: () => {
46
+ name: string;
47
+ id: string;
48
+ children: string;
49
+ };
50
+ };
51
+ modelValue: {
52
+ type: PropType<{
53
+ province?: string;
54
+ city?: string;
55
+ county?: string;
56
+ }>;
57
+ required: true;
58
+ };
59
+ }>> & {
60
+ "onUpdate:modelValue"?: ((modelValue: {
61
+ province?: string;
62
+ city?: string;
63
+ county?: string;
64
+ }) => any) | undefined;
65
+ }, {
66
+ level: 1 | 2 | 3;
67
+ FieldNames: FieldNames;
68
+ }, {}>;
69
+ export default _default;
@@ -0,0 +1,42 @@
1
+ import { PropType } from 'vue';
2
+ export type FieldNames = {
3
+ [K in keyof Pick<AreaOptions, 'name' | 'id' | 'children'>]?: string;
4
+ };
5
+ declare const level: readonly [1, 2, 3];
6
+ export type levelType = (typeof level)[number];
7
+ export interface AreaOptions {
8
+ /** 展示文本 */
9
+ name?: string;
10
+ /** 值 */
11
+ id?: string;
12
+ /** 子节点 */
13
+ children?: AreaOptions[];
14
+ [key: PropertyKey]: any;
15
+ }
16
+ export interface ArearModelsType {
17
+ /** 所选的值 */
18
+ modelValue: {
19
+ province?: string;
20
+ city?: string;
21
+ county?: string;
22
+ };
23
+ }
24
+ export declare const ProAreaProps: {
25
+ readonly level: {
26
+ readonly type: PropType<levelType>;
27
+ readonly default: 3;
28
+ };
29
+ readonly options: {
30
+ readonly type: PropType<AreaOptions[]>;
31
+ readonly required: true;
32
+ };
33
+ readonly FieldNames: {
34
+ readonly type: PropType<FieldNames>;
35
+ readonly default: () => {
36
+ name: string;
37
+ id: string;
38
+ children: string;
39
+ };
40
+ };
41
+ };
42
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Ref } from 'vue';
2
+ export interface modalMethods {
3
+ openModal: () => void;
4
+ closeModal: () => void;
5
+ }
6
+ export declare function useProModal(): {
7
+ dialogVisible: Ref<boolean>;
8
+ openModal: () => void;
9
+ closeModal: () => void;
10
+ };
11
+ export declare function usePromodalInit(): [
12
+ (methods: modalMethods) => void,
13
+ modalMethods
14
+ ];
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'vue';
2
+ export * from './hooks/useProModal';
3
+ export * from './src/types';
4
+ export declare const KProModal: Plugin;
5
+ export default KProModal;
@@ -1,7 +1,15 @@
1
1
  import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
2
  import { ModalProps } from 'ant-design-vue';
3
- declare const _default: DefineComponent<{
4
- dialogProps: {
3
+ declare function __VLS_template(): {
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ attrs: Partial<{}>;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: DefineComponent<{
12
+ modalProps: {
5
13
  readonly type: PropType<Omit< ModalProps, "open">>;
6
14
  };
7
15
  modelValue: {
@@ -13,7 +21,7 @@ declare const _default: DefineComponent<{
13
21
  onConfirm: (...args: any[]) => void;
14
22
  "update:modelValue": (modelValue: boolean) => void;
15
23
  }, string, PublicProps, Readonly< ExtractPropTypes<{
16
- dialogProps: {
24
+ modalProps: {
17
25
  readonly type: PropType<Omit< ModalProps, "open">>;
18
26
  };
19
27
  modelValue: {
@@ -25,4 +33,10 @@ declare const _default: DefineComponent<{
25
33
  onOnConfirm?: ((...args: any[]) => any) | undefined;
26
34
  "onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
27
35
  }, {}, {}>;
36
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
37
  export default _default;
38
+ type __VLS_WithTemplateSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -1,7 +1,7 @@
1
1
  import { ModalProps } from 'ant-design-vue';
2
2
  import { PropType } from 'vue';
3
- export declare const proDialogProps: {
4
- readonly dialogProps: {
3
+ export declare const ProModalProps: {
4
+ readonly modalProps: {
5
5
  readonly type: PropType<Omit<ModalProps, "open">>;
6
6
  };
7
7
  };
@@ -0,0 +1,5 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ export declare const proPickerApi: {
3
+ company: (config: AxiosRequestConfig) => Promise<any>;
4
+ user: (config: AxiosRequestConfig) => Promise<any>;
5
+ };
@@ -0,0 +1,59 @@
1
+ import { SFCWithInstall } from '../utils/install';
2
+ import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
3
+ import { ProPickerType } from './src/types';
4
+ export * from './src/types';
5
+ export declare const KProPicker: SFCWithInstall<DefineComponent<{
6
+ type: {
7
+ readonly type: PropType<ProPickerType>;
8
+ readonly default: "company";
9
+ };
10
+ placeholder: {
11
+ readonly type: StringConstructor;
12
+ readonly default: "请选择";
13
+ };
14
+ mode: {
15
+ readonly type: PropType<"multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE">;
16
+ };
17
+ isInit: {
18
+ readonly type: BooleanConstructor;
19
+ };
20
+ delay: {
21
+ readonly type: NumberConstructor;
22
+ readonly default: 200;
23
+ };
24
+ modelValue: {
25
+ type: PropType<string | number | string[] | number[]>;
26
+ };
27
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
28
+ "update:modelValue": (modelValue: string | number | string[] | number[]) => void;
29
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
30
+ type: {
31
+ readonly type: PropType<ProPickerType>;
32
+ readonly default: "company";
33
+ };
34
+ placeholder: {
35
+ readonly type: StringConstructor;
36
+ readonly default: "请选择";
37
+ };
38
+ mode: {
39
+ readonly type: PropType<"multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE">;
40
+ };
41
+ isInit: {
42
+ readonly type: BooleanConstructor;
43
+ };
44
+ delay: {
45
+ readonly type: NumberConstructor;
46
+ readonly default: 200;
47
+ };
48
+ modelValue: {
49
+ type: PropType<string | number | string[] | number[]>;
50
+ };
51
+ }>> & {
52
+ "onUpdate:modelValue"?: ((modelValue: string | number | string[] | number[]) => any) | undefined;
53
+ }, {
54
+ type: "company" | "user";
55
+ placeholder: string;
56
+ isInit: boolean;
57
+ delay: number;
58
+ }, {}>>;
59
+ export default KProPicker;
@@ -0,0 +1,57 @@
1
+ import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
2
+ import { ProPickerType } from './types';
3
+ declare const _default: DefineComponent<{
4
+ type: {
5
+ readonly type: PropType<ProPickerType>;
6
+ readonly default: "company";
7
+ };
8
+ placeholder: {
9
+ readonly type: StringConstructor;
10
+ readonly default: "请选择";
11
+ };
12
+ mode: {
13
+ readonly type: PropType<"multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE">;
14
+ };
15
+ isInit: {
16
+ readonly type: BooleanConstructor;
17
+ };
18
+ delay: {
19
+ readonly type: NumberConstructor;
20
+ readonly default: 200;
21
+ };
22
+ modelValue: {
23
+ type: PropType<string | number | string[] | number[]>;
24
+ };
25
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
26
+ "update:modelValue": (modelValue: string | number | string[] | number[]) => void;
27
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
28
+ type: {
29
+ readonly type: PropType<ProPickerType>;
30
+ readonly default: "company";
31
+ };
32
+ placeholder: {
33
+ readonly type: StringConstructor;
34
+ readonly default: "请选择";
35
+ };
36
+ mode: {
37
+ readonly type: PropType<"multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE">;
38
+ };
39
+ isInit: {
40
+ readonly type: BooleanConstructor;
41
+ };
42
+ delay: {
43
+ readonly type: NumberConstructor;
44
+ readonly default: 200;
45
+ };
46
+ modelValue: {
47
+ type: PropType<string | number | string[] | number[]>;
48
+ };
49
+ }>> & {
50
+ "onUpdate:modelValue"?: ((modelValue: string | number | string[] | number[]) => any) | undefined;
51
+ }, {
52
+ type: "company" | "user";
53
+ placeholder: string;
54
+ isInit: boolean;
55
+ delay: number;
56
+ }, {}>;
57
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import { PropType } from 'vue';
2
+ declare const ProPickers: readonly ["company", "user"];
3
+ export type ProPickerType = (typeof ProPickers)[number];
4
+ export declare const ProPickerProps: {
5
+ readonly type: {
6
+ readonly type: PropType<ProPickerType>;
7
+ readonly default: "company";
8
+ };
9
+ readonly placeholder: {
10
+ readonly type: StringConstructor;
11
+ readonly default: "请选择";
12
+ };
13
+ readonly mode: {
14
+ readonly type: PropType<"multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE">;
15
+ };
16
+ readonly isInit: {
17
+ readonly type: BooleanConstructor;
18
+ };
19
+ readonly delay: {
20
+ readonly type: NumberConstructor;
21
+ readonly default: 200;
22
+ };
23
+ };
24
+ 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.33",
4
+ "version": "1.0.35",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "license": "ISC",
@@ -17,6 +17,7 @@
17
17
  "peerDependencies": {
18
18
  "ant-design-vue": "^4.2.4",
19
19
  "async-validator": "^4.2.5",
20
+ "axios": "^1.6.2",
20
21
  "lodash-es": "^4.17.21",
21
22
  "vue": "^3.4.34"
22
23
  },
@@ -1,34 +0,0 @@
1
- import { ref as s, getCurrentInstance as l, unref as a } from "vue";
2
- function r() {
3
- const e = s(!1), n = () => {
4
- e.value = !0;
5
- }, t = () => {
6
- e.value = !1;
7
- }, i = {
8
- openDialog: n,
9
- closeDialog: t
10
- }, o = l();
11
- return o && o.emit("init", i), { dialogVisible: e, openDialog: n, closeDialog: t };
12
- }
13
- function u() {
14
- const e = s(null), n = () => {
15
- const o = a(e.value);
16
- return o || console.error("useModal instance is undefined!"), o;
17
- };
18
- return [(o) => {
19
- e.value = o;
20
- }, {
21
- openDialog: () => {
22
- var o;
23
- (o = n()) == null || o.openDialog();
24
- },
25
- closeDialog: () => {
26
- var o;
27
- return (o = n()) == null ? void 0 : o.closeDialog();
28
- }
29
- }];
30
- }
31
- export {
32
- r as useProDialog,
33
- u as useProDialogInit
34
- };
@@ -1,13 +0,0 @@
1
- import { withInstall as o } from "../utils/install.mjs";
2
- import "./src/ProDialog.vue.mjs";
3
- import "./style/index.mjs";
4
- import { useProDialog as e, useProDialogInit as f } from "./hooks/useProDialog.mjs";
5
- import { proDialogProps as n } from "./src/types.mjs";
6
- import r from "./src/ProDialog.vue2.mjs";
7
- const a = o(r);
8
- export {
9
- a as KProDialog,
10
- n as proDialogProps,
11
- e as useProDialog,
12
- f as useProDialogInit
13
- };
@@ -1,4 +0,0 @@
1
- import f from "./ProDialog.vue2.mjs";
2
- export {
3
- f as default
4
- };
@@ -1,33 +0,0 @@
1
- import { defineComponent as c, mergeModels as r, useModel as d, computed as f, openBlock as C, createBlock as g, unref as P, mergeProps as k } from "vue";
2
- import { Modal as M } from "ant-design-vue";
3
- import { useNamespace as v } from "../../../hooks/use-namespace/index.mjs";
4
- import { proDialogProps as B } from "./types.mjs";
5
- const b = /* @__PURE__ */ c({
6
- name: "ProDialog",
7
- __name: "ProDialog",
8
- props: /* @__PURE__ */ r(B, {
9
- modelValue: { required: !0, type: Boolean },
10
- modelModifiers: {}
11
- }),
12
- emits: /* @__PURE__ */ r(["onConfirm", "onCancel"], ["update:modelValue"]),
13
- setup(a, { emit: l }) {
14
- const e = l, o = d(a, "modelValue"), { b: m } = v("pro-dialog"), t = f(() => m());
15
- function p() {
16
- e("onConfirm");
17
- }
18
- function i() {
19
- e("onCancel");
20
- }
21
- return (s, n) => (C(), g(P(M), k({
22
- open: o.value,
23
- "onUpdate:open": n[0] || (n[0] = (u) => o.value = u)
24
- }, s.dialogProps, {
25
- "wrap-class-name": t.value,
26
- onOk: p,
27
- onCancel: i
28
- }), null, 16, ["open", "wrap-class-name"]));
29
- }
30
- });
31
- export {
32
- b as default
33
- };
@@ -1,2 +0,0 @@
1
- import "../../base/style/index.mjs";
2
- import "@king-one/antdv/dist/theme-chalk/pro-dialog.css";
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue");function l(){const o=t.ref(!1),n=()=>{o.value=!0},i=()=>{o.value=!1},s={openDialog:n,closeDialog:i},e=t.getCurrentInstance();return e&&e.emit("init",s),{dialogVisible:o,openDialog:n,closeDialog:i}}function a(){const o=t.ref(null),n=()=>{const e=t.unref(o.value);return e||console.error("useModal instance is undefined!"),e};return[e=>{o.value=e},{openDialog:()=>{var e;(e=n())==null||e.openDialog()},closeDialog:()=>{var e;return(e=n())==null?void 0:e.closeDialog()}}]}exports.useProDialog=l;exports.useProDialogInit=a;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../utils/install.js");require("./src/ProDialog.vue.js");require("./style/index.js");const e=require("./hooks/useProDialog.js"),r=require("./src/types.js"),i=require("./src/ProDialog.vue2.js"),t=o.withInstall(i.default);exports.useProDialog=e.useProDialog;exports.useProDialogInit=e.useProDialogInit;exports.proDialogProps=r.proDialogProps;exports.KProDialog=t;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("ant-design-vue"),m=require("../../../hooks/use-namespace/index.js"),g=require("./types.js"),f=e.defineComponent({name:"ProDialog",__name:"ProDialog",props:e.mergeModels(g.proDialogProps,{modelValue:{required:!0,type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["onConfirm","onCancel"],["update:modelValue"]),setup(l,{emit:a}){const o=a,n=e.useModel(l,"modelValue"),{b:t}=m.useNamespace("pro-dialog"),u=e.computed(()=>t());function s(){o("onConfirm")}function i(){o("onCancel")}return(c,r)=>(e.openBlock(),e.createBlock(e.unref(p.Modal),e.mergeProps({open:n.value,"onUpdate:open":r[0]||(r[0]=d=>n.value=d)},c.dialogProps,{"wrap-class-name":u.value,onOk:s,onCancel:i}),null,16,["open","wrap-class-name"]))}});exports.default=f;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o={dialogProps:{type:Object}};exports.proDialogProps=o;
@@ -1 +0,0 @@
1
- .king-pro-dialog .ant-modal-content{padding:0}.king-pro-dialog .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-dialog .ant-modal-body{padding:10px 20px;max-height:65vh;overflow:auto}.king-pro-dialog .ant-modal-footer{height:56px;display:flex;padding:0 16px;justify-content:flex-end;align-items:center;border-top:1px solid #e6e8ea}
@@ -1,14 +0,0 @@
1
- import { Ref } from 'vue';
2
- export interface DialogMethods {
3
- openDialog: () => void;
4
- closeDialog: () => void;
5
- }
6
- export declare function useProDialog(): {
7
- dialogVisible: Ref<boolean>;
8
- openDialog: () => void;
9
- closeDialog: () => void;
10
- };
11
- export declare function useProDialogInit(): [
12
- (methods: DialogMethods) => void,
13
- DialogMethods
14
- ];
@@ -1,30 +0,0 @@
1
- import { SFCWithInstall } from '../utils/install';
2
- import { DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
3
- import { ModalProps } from 'ant-design-vue';
4
- export * from './hooks/useProDialog';
5
- export * from './src/types';
6
- export declare const KProDialog: SFCWithInstall<DefineComponent<{
7
- dialogProps: {
8
- readonly type: PropType<Omit< ModalProps, "open">>;
9
- };
10
- modelValue: {
11
- type: PropType<boolean>;
12
- required: true;
13
- };
14
- }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
15
- onCancel: (...args: any[]) => void;
16
- onConfirm: (...args: any[]) => void;
17
- "update:modelValue": (modelValue: boolean) => void;
18
- }, string, PublicProps, Readonly< ExtractPropTypes<{
19
- dialogProps: {
20
- readonly type: PropType<Omit< ModalProps, "open">>;
21
- };
22
- modelValue: {
23
- type: PropType<boolean>;
24
- required: true;
25
- };
26
- }>> & {
27
- onOnCancel?: ((...args: any[]) => any) | undefined;
28
- onOnConfirm?: ((...args: any[]) => any) | undefined;
29
- "onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
30
- }, {}, {}>>;