ll-plus 2.1.19 → 2.1.20
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/es/components/drawer/src/components/second-confirmation/index.d.ts +1 -3
- package/es/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +1 -3
- package/es/components/modal/index.d.ts +1 -3
- package/es/components/modal/src/modal.d.ts +4 -0
- package/es/components/modal/src/modal.mjs.map +1 -1
- package/es/components/modal/src/modal.vue.d.ts +2 -3
- package/es/components/modal/src/modal.vue2.mjs +9 -3
- package/es/components/modal/src/modal.vue2.mjs.map +1 -1
- package/es/utils/props/runtime.d.ts +2 -2
- package/index.full.js +9 -3
- package/index.full.min.js +9 -9
- package/index.full.min.js.map +1 -1
- package/index.full.min.mjs +9 -9
- package/index.full.min.mjs.map +1 -1
- package/index.full.mjs +9 -3
- package/lib/components/drawer/src/components/second-confirmation/index.d.ts +1 -3
- package/lib/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +1 -3
- package/lib/components/modal/index.d.ts +1 -3
- package/lib/components/modal/src/modal.d.ts +4 -0
- package/lib/components/modal/src/modal.js.map +1 -1
- package/lib/components/modal/src/modal.vue.d.ts +2 -3
- package/lib/components/modal/src/modal.vue2.js +9 -3
- package/lib/components/modal/src/modal.vue2.js.map +1 -1
- package/lib/utils/props/runtime.d.ts +2 -2
- package/package.json +1 -1
- package/theme-chalk/fonts/iconfont.js +1 -1
- package/theme-chalk/fonts/iconfont.json +28 -0
- package/types/packages/components/drawer/src/components/second-confirmation/index.d.ts +1 -3
- package/types/packages/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +1 -3
- package/types/packages/components/modal/index.d.ts +1 -3
- package/types/packages/components/modal/src/modal.d.ts +4 -0
- package/types/packages/components/modal/src/modal.vue.d.ts +2 -3
- package/types/packages/utils/props/runtime.d.ts +2 -2
|
@@ -88,9 +88,7 @@ export declare const LlSecondConfirmation: import("ll-plus/es/utils").SFCWithIns
|
|
|
88
88
|
modal: import("vue").Ref<HTMLElement | undefined>;
|
|
89
89
|
hasScroll: import("vue").Ref<boolean>;
|
|
90
90
|
symbolClass: import("vue").Ref<string>;
|
|
91
|
-
getBindValue: import("vue").ComputedRef<
|
|
92
|
-
[x: number]: unknown;
|
|
93
|
-
}>;
|
|
91
|
+
getBindValue: import("vue").ComputedRef<import("ll-plus/es/index").IResultType>;
|
|
94
92
|
handleCancel: () => void;
|
|
95
93
|
handleOk: () => void;
|
|
96
94
|
handleResize: () => Promise<void>;
|
package/es/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts
CHANGED
|
@@ -87,9 +87,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
87
87
|
modal: import("vue").Ref<HTMLElement | undefined>;
|
|
88
88
|
hasScroll: import("vue").Ref<boolean>;
|
|
89
89
|
symbolClass: import("vue").Ref<string>;
|
|
90
|
-
getBindValue: import("vue").ComputedRef<
|
|
91
|
-
[x: number]: unknown;
|
|
92
|
-
}>;
|
|
90
|
+
getBindValue: import("vue").ComputedRef<import("ll-plus/es/components").IResultType>;
|
|
93
91
|
handleCancel: () => void;
|
|
94
92
|
handleOk: () => void;
|
|
95
93
|
handleResize: () => Promise<void>;
|
|
@@ -43,9 +43,7 @@ export declare const LlModal: import("ll-plus/es/utils").SFCWithInstall<import("
|
|
|
43
43
|
modal: import("vue").Ref<HTMLElement | undefined>;
|
|
44
44
|
hasScroll: import("vue").Ref<boolean>;
|
|
45
45
|
symbolClass: import("vue").Ref<string>;
|
|
46
|
-
getBindValue: import("vue").ComputedRef<
|
|
47
|
-
[x: number]: unknown;
|
|
48
|
-
}>;
|
|
46
|
+
getBindValue: import("vue").ComputedRef<import("./src/modal").IResultType>;
|
|
49
47
|
handleCancel: () => void;
|
|
50
48
|
handleOk: () => void;
|
|
51
49
|
handleResize: () => Promise<void>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { ExtractPropTypes } from 'vue';
|
|
2
2
|
import type Modal from './modal.vue';
|
|
3
3
|
type IType = 'confirm' | 'operate' | 'upload';
|
|
4
|
+
export interface IResultType {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
showFooter?: null;
|
|
7
|
+
}
|
|
4
8
|
export declare const modalProps: {
|
|
5
9
|
readonly open: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
6
10
|
readonly title: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "提示", boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.mjs","sources":["../../../../../packages/components/modal/src/modal.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Modal from './modal.vue'\n\ntype IType = 'confirm' | 'operate' | 'upload'\nexport const modalProps = buildProps({\n /**\n * @description 开启弹窗\n */\n open: {\n type: Boolean,\n default: false\n },\n /**\n * @description 标题\n */\n title: {\n type: String,\n default: '提示'\n },\n /**\n * @description 加载状态\n */\n loading: {\n type: Boolean,\n default: false\n },\n /**\n * @description 弹窗类型\n */\n type: {\n type: definePropType<IType>(String),\n default: 'operate'\n },\n /**\n * @description 弹窗class\n */\n class: {\n type: String,\n default: ''\n },\n /**\n * @description 弹窗外层容器的类名\n */\n wrapClassName: {\n type: String,\n default: ''\n },\n /**\n * @description 确认按钮文字\n */\n confirmText: {\n type: String,\n default: ''\n },\n /**\n * @description 取消按钮文字\n */\n cancelText: {\n type: String,\n default: ''\n },\n /**\n * @description 显示取消按钮\n */\n showCancel: {\n type: Boolean,\n default: true\n },\n /**\n * @description 显示底部\n */\n showFooter: {\n type: Boolean,\n default: true\n }\n} as const)\n\nexport const modalEmits = {\n /**\n * @description 点击取消时触发\n */\n cancel: () => true,\n /**\n * @description 点击确认时触发\n */\n ok: () => true,\n 'update:open': () => true\n} as const\n\n// props\nexport type ModalProps = ExtractPropTypes<typeof modalProps>\n\n// emits\nexport type ModalEmits = typeof modalEmits\n\n// instance\nexport type ModalInstance = InstanceType<typeof Modal>\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"modal.mjs","sources":["../../../../../packages/components/modal/src/modal.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Modal from './modal.vue'\n\ntype IType = 'confirm' | 'operate' | 'upload'\n\nexport interface IResultType {\n [key: string]: unknown\n showFooter?: null\n}\nexport const modalProps = buildProps({\n /**\n * @description 开启弹窗\n */\n open: {\n type: Boolean,\n default: false\n },\n /**\n * @description 标题\n */\n title: {\n type: String,\n default: '提示'\n },\n /**\n * @description 加载状态\n */\n loading: {\n type: Boolean,\n default: false\n },\n /**\n * @description 弹窗类型\n */\n type: {\n type: definePropType<IType>(String),\n default: 'operate'\n },\n /**\n * @description 弹窗class\n */\n class: {\n type: String,\n default: ''\n },\n /**\n * @description 弹窗外层容器的类名\n */\n wrapClassName: {\n type: String,\n default: ''\n },\n /**\n * @description 确认按钮文字\n */\n confirmText: {\n type: String,\n default: ''\n },\n /**\n * @description 取消按钮文字\n */\n cancelText: {\n type: String,\n default: ''\n },\n /**\n * @description 显示取消按钮\n */\n showCancel: {\n type: Boolean,\n default: true\n },\n /**\n * @description 显示底部\n */\n showFooter: {\n type: Boolean,\n default: true\n }\n} as const)\n\nexport const modalEmits = {\n /**\n * @description 点击取消时触发\n */\n cancel: () => true,\n /**\n * @description 点击确认时触发\n */\n ok: () => true,\n 'update:open': () => true\n} as const\n\n// props\nexport type ModalProps = ExtractPropTypes<typeof modalProps>\n\n// emits\nexport type ModalEmits = typeof modalEmits\n\n// instance\nexport type ModalInstance = InstanceType<typeof Modal>\n"],"names":[],"mappings":";;;;AAWO,MAAM,aAAa,UAAW,CAAA;AAAA;AAAA;AAAA;AAAA,EAInC,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA;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Type } from './modal';
|
|
1
2
|
declare const _default: import("vue").DefineComponent<{
|
|
2
3
|
readonly open: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
3
4
|
readonly title: import("ll-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "提示", boolean>;
|
|
@@ -42,9 +43,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
42
43
|
modal: import("vue").Ref<HTMLElement | undefined>;
|
|
43
44
|
hasScroll: import("vue").Ref<boolean>;
|
|
44
45
|
symbolClass: import("vue").Ref<string>;
|
|
45
|
-
getBindValue: import("vue").ComputedRef<
|
|
46
|
-
[x: number]: unknown;
|
|
47
|
-
}>;
|
|
46
|
+
getBindValue: import("vue").ComputedRef<IResultType>;
|
|
48
47
|
handleCancel: () => void;
|
|
49
48
|
handleOk: () => void;
|
|
50
49
|
handleResize: () => Promise<void>;
|
|
@@ -21,9 +21,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
const modal = ref();
|
|
22
22
|
const hasScroll = ref(false);
|
|
23
23
|
const symbolClass = ref(`ll-modal-${(/* @__PURE__ */ new Date()).getTime()}`);
|
|
24
|
-
const getBindValue = computed(() =>
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const getBindValue = computed(() => {
|
|
25
|
+
const result = {
|
|
26
|
+
...omit({ ...attrs }, [...Object.keys(modalProps), "wrapClassName"])
|
|
27
|
+
};
|
|
28
|
+
if (props.showFooter === false) {
|
|
29
|
+
result.footer = null;
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
});
|
|
27
33
|
const handleCancel = () => {
|
|
28
34
|
emits("cancel");
|
|
29
35
|
emits("update:open");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.vue2.mjs","sources":["../../../../../packages/components/modal/src/modal.vue"],"sourcesContent":["<template>\n <Modal\n v-bind=\"getBindValue\"\n ref=\"modal\"\n :open=\"props.open\"\n :title=\"props.title\"\n :wrap-class-name=\"`${bem.b()} ${props.wrapClassName}`\"\n :class=\"[props.class, symbolClass, hasScroll ? bem.is('has-scroll') : '']\"\n @cancel=\"handleCancel\"\n @ok=\"handleOk\"\n >\n <div :class=\"[bem.e('container'), bem.is(props.type)]\">\n <slot />\n </div>\n <template v-if=\"props.showFooter\" #footer>\n <slot name=\"footer\">\n <!-- 确认框 -->\n\n <ll-button\n v-if=\"props.showCancel && props.type !== 'confirm'\"\n :label=\"props.cancelText ? props.cancelText : '取消'\"\n @click=\"handleCancel\"\n >\n </ll-button>\n <ll-button\n type=\"primary\"\n :loading=\"props.loading\"\n :label=\"\n props.confirmText\n ? props.confirmText\n : props.type === 'confirm'\n
|
|
1
|
+
{"version":3,"file":"modal.vue2.mjs","sources":["../../../../../packages/components/modal/src/modal.vue"],"sourcesContent":["<template>\n <Modal\n v-bind=\"getBindValue\"\n ref=\"modal\"\n :open=\"props.open\"\n :title=\"props.title\"\n :wrap-class-name=\"`${bem.b()} ${props.wrapClassName}`\"\n :class=\"[props.class, symbolClass, hasScroll ? bem.is('has-scroll') : '']\"\n @cancel=\"handleCancel\"\n @ok=\"handleOk\"\n >\n <div :class=\"[bem.e('container'), bem.is(props.type)]\">\n <slot />\n </div>\n <template v-if=\"props.showFooter\" #footer>\n <slot name=\"footer\">\n <!-- 确认框 -->\n\n <ll-button\n v-if=\"props.showCancel && props.type !== 'confirm'\"\n :label=\"props.cancelText ? props.cancelText : '取消'\"\n @click=\"handleCancel\"\n >\n </ll-button>\n <ll-button\n type=\"primary\"\n :loading=\"props.loading\"\n :label=\"\n props.confirmText\n ? props.confirmText\n : props.type === 'confirm'\n ? '知道了'\n : '确认'\n \"\n @click=\"handleOk\"\n />\n </slot>\n </template>\n </Modal>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useAttrs, ref, watch, nextTick, computed } from 'vue'\nimport { Modal } from 'ant-design-vue'\nimport { LlButton } from '@ll-plus/components'\nimport { createNamespace } from '@ll-plus/utils'\nimport { omit } from 'lodash-es'\nimport { modalProps, modalEmits } from './modal'\nimport type { IResultType } from './modal'\ndefineOptions({ name: 'LlModal' })\n// 1.props/ref\nconst props = defineProps(modalProps)\n// 2.emits\nconst emits = defineEmits(modalEmits)\n\nconst attrs = useAttrs()\n\nconst bem = createNamespace('modal')\n\nconst modal = ref<HTMLElement>()\nconst hasScroll = ref(false)\nconst symbolClass = ref(`ll-modal-${new Date().getTime()}`)\n\nconst getBindValue = computed(() => {\n const result: IResultType = {\n ...omit({ ...attrs }, [...Object.keys(modalProps), 'wrapClassName'])\n }\n if (props.showFooter === false) {\n result.footer = null\n }\n return result\n})\n\n// 3.methods\nconst handleCancel = () => {\n emits('cancel')\n emits('update:open')\n}\nconst handleOk = () => {\n emits('ok')\n}\nconst handleResize = async () => {\n await nextTick()\n const ele = document.getElementsByClassName(symbolClass.value)[0]\n const modalBody = ele.getElementsByClassName(`ant-modal-body`)[0]\n hasScroll.value = modalBody.scrollHeight > modalBody.clientHeight\n}\n\n// 4.watch/computed\nwatch(\n () => props.open,\n val => {\n if (val) {\n handleResize()\n window.addEventListener('resize', handleResize)\n } else {\n window.removeEventListener('resize', handleResize)\n }\n }\n)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAmDA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAEd,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,GAAA,GAAM,gBAAgB,OAAO,CAAA,CAAA;AAEnC,IAAA,MAAM,QAAQ,GAAiB,EAAA,CAAA;AAC/B,IAAM,MAAA,SAAA,GAAY,IAAI,KAAK,CAAA,CAAA;AAC3B,IAAM,MAAA,WAAA,GAAc,IAAI,CAAY,SAAA,EAAA,iBAAA,IAAI,MAAO,EAAA,OAAA,EAAS,CAAE,CAAA,CAAA,CAAA;AAE1D,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAClC,MAAA,M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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -27,6 +27,6 @@ export declare const buildProp: <Type = never, Value = never, Validator = never,
|
|
|
27
27
|
export type TestProps = Record<string, {
|
|
28
28
|
[epPropKey]: true;
|
|
29
29
|
} | NativePropType | EpPropInput<any, any, any, any, any>>;
|
|
30
|
-
export declare const buildProps: <Props extends Record<string,
|
|
30
|
+
export declare const buildProps: <Props extends Record<string, {
|
|
31
31
|
__epPropKey: true;
|
|
32
|
-
}
|
|
32
|
+
} | NativePropType | EpPropInput<any, any, any, any, any>>>(props: Props) => { [K in keyof Props]: IfEpProp<Props[K], Props[K], IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>>; };
|
package/index.full.js
CHANGED
|
@@ -46511,9 +46511,15 @@
|
|
|
46511
46511
|
const modal = require$$0.ref();
|
|
46512
46512
|
const hasScroll = require$$0.ref(false);
|
|
46513
46513
|
const symbolClass = require$$0.ref(`ll-modal-${(/* @__PURE__ */ new Date()).getTime()}`);
|
|
46514
|
-
const getBindValue = require$$0.computed(() =>
|
|
46515
|
-
|
|
46516
|
-
|
|
46514
|
+
const getBindValue = require$$0.computed(() => {
|
|
46515
|
+
const result = {
|
|
46516
|
+
...omit({ ...attrs }, [...Object.keys(modalProps), "wrapClassName"])
|
|
46517
|
+
};
|
|
46518
|
+
if (props.showFooter === false) {
|
|
46519
|
+
result.footer = null;
|
|
46520
|
+
}
|
|
46521
|
+
return result;
|
|
46522
|
+
});
|
|
46517
46523
|
const handleCancel = () => {
|
|
46518
46524
|
emits("cancel");
|
|
46519
46525
|
emits("update:open");
|