m-eleplus-crud 0.0.1 → 0.0.2
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.full.js +3 -1
- package/dist/index.full.min.js +6 -6
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +1 -1
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +3 -1
- package/es/components/table/src/table.d.ts +4 -0
- package/es/index.mjs +4 -4
- package/es/packages/components/dialog/index.mjs +2 -2
- package/es/packages/components/dialog/src/dialog.mjs +116 -75
- package/es/packages/components/dialog/src/dialog.mjs.map +1 -1
- package/es/packages/components/dialog/src/dialog2.mjs +75 -116
- package/es/packages/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/packages/components/index.mjs +4 -4
- package/es/packages/components/picture/index.mjs +2 -2
- package/es/packages/components/picture/src/picture.mjs +26 -19
- package/es/packages/components/picture/src/picture.mjs.map +1 -1
- package/es/packages/components/picture/src/picture2.mjs +19 -26
- package/es/packages/components/picture/src/picture2.mjs.map +1 -1
- package/es/packages/components/qrcode/index.mjs +2 -2
- package/es/packages/components/qrcode/src/qrcode.mjs +22 -62
- package/es/packages/components/qrcode/src/qrcode.mjs.map +1 -1
- package/es/packages/components/qrcode/src/qrcode2.mjs +62 -22
- package/es/packages/components/qrcode/src/qrcode2.mjs.map +1 -1
- package/es/packages/components/table/index.mjs +2 -2
- package/es/packages/components/table/src/table.mjs +37 -417
- package/es/packages/components/table/src/table.mjs.map +1 -1
- package/es/packages/components/table/src/table2.mjs +419 -37
- package/es/packages/components/table/src/table2.mjs.map +1 -1
- package/lib/components/table/src/table.d.ts +4 -0
- package/lib/index.js +4 -4
- package/lib/packages/components/dialog/index.js +2 -2
- package/lib/packages/components/dialog/src/dialog.js +116 -76
- package/lib/packages/components/dialog/src/dialog.js.map +1 -1
- package/lib/packages/components/dialog/src/dialog2.js +76 -116
- package/lib/packages/components/dialog/src/dialog2.js.map +1 -1
- package/lib/packages/components/index.js +4 -4
- package/lib/packages/components/picture/index.js +2 -2
- package/lib/packages/components/picture/src/picture.js +26 -20
- package/lib/packages/components/picture/src/picture.js.map +1 -1
- package/lib/packages/components/picture/src/picture2.js +20 -26
- package/lib/packages/components/picture/src/picture2.js.map +1 -1
- package/lib/packages/components/qrcode/index.js +2 -2
- package/lib/packages/components/qrcode/src/qrcode.js +23 -66
- package/lib/packages/components/qrcode/src/qrcode.js.map +1 -1
- package/lib/packages/components/qrcode/src/qrcode2.js +66 -23
- package/lib/packages/components/qrcode/src/qrcode2.js.map +1 -1
- package/lib/packages/components/table/index.js +2 -2
- package/lib/packages/components/table/src/table.js +38 -422
- package/lib/packages/components/table/src/table.js.map +1 -1
- package/lib/packages/components/table/src/table2.js +424 -38
- package/lib/packages/components/table/src/table2.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picture.mjs","sources":["../../../../../../../packages/components/picture/src/picture.
|
|
1
|
+
{"version":3,"file":"picture.mjs","sources":["../../../../../../../packages/components/picture/src/picture.vue"],"sourcesContent":["<template>\n <div class=\"m-picture\">\n <el-image\n :src=\"src\"\n :preview-src-list=\"previewSrcList\"\n fit=\"cover\"\n :style=\"{ width: imgWidth, height: imgHeight }\"\n :preview-teleported=\"true\"\n />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { pictureEmits, pictureProps } from './picture'\n\nconst COMPONENT_NAME = 'MPicture'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\ndefineProps(pictureProps)\ndefineEmits(pictureEmits)\n</script>\n"],"names":[],"mappings":";;;;;mCAgBc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,31 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { pictureProps, pictureEmits } from './picture.mjs';
|
|
3
|
-
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
4
2
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
style: normalizeStyle({ width: _ctx.imgWidth, height: _ctx.imgHeight }),
|
|
22
|
-
"preview-teleported": true
|
|
23
|
-
}, null, 8, ["src", "preview-src-list", "style"])
|
|
24
|
-
]);
|
|
25
|
-
};
|
|
3
|
+
const pictureProps = buildProps({
|
|
4
|
+
src: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: true
|
|
7
|
+
},
|
|
8
|
+
previewSrcList: {
|
|
9
|
+
type: Array,
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
imgWidth: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "70px"
|
|
15
|
+
},
|
|
16
|
+
imgHeight: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "70px"
|
|
26
19
|
}
|
|
27
20
|
});
|
|
28
|
-
|
|
21
|
+
const pictureEmits = {};
|
|
29
22
|
|
|
30
|
-
export {
|
|
23
|
+
export { pictureEmits, pictureProps };
|
|
31
24
|
//# sourceMappingURL=picture2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picture2.mjs","sources":["../../../../../../../packages/components/picture/src/picture.
|
|
1
|
+
{"version":3,"file":"picture2.mjs","sources":["../../../../../../../packages/components/picture/src/picture.ts"],"sourcesContent":["import { buildProps } from '@m-eleplus-crud/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const pictureProps = buildProps({\n /**\n * @description 图片url资源\n */\n src: {\n type: String,\n required: true,\n },\n /**\n * @description 预览图片url资源集合\n */\n previewSrcList: {\n type: Array,\n required: true,\n },\n /**\n * @description 图片宽度\n */\n imgWidth: {\n type: String,\n default: '70px',\n },\n /**\n * @description 图片高度\n */\n imgHeight: {\n type: String,\n default: '70px',\n },\n} as const)\nexport type PictureProps = ExtractPropTypes<typeof pictureProps>\n\nexport const pictureEmits = {}\nexport type PictureEmits = typeof pictureEmits\n"],"names":[],"mappings":";;AAIO,MAAM,eAAe,UAAW,CAAA;AAAA,EAIrC,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN,QAAU,EAAA,IAAA;AAAA,GACZ;AAAA,EAIA,cAAgB,EAAA;AAAA,IACd,IAAM,EAAA,KAAA;AAAA,IACN,QAAU,EAAA,IAAA;AAAA,GACZ;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,MAAA;AAAA,GACX;AACF,CAAU,EAAA;AAGH,MAAM,eAAe;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Qrcode from './src/
|
|
2
|
-
export { qrcodeEmits, qrcodeProps } from './src/
|
|
1
|
+
import Qrcode from './src/qrcode2.mjs';
|
|
2
|
+
export { qrcodeEmits, qrcodeProps } from './src/qrcode.mjs';
|
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
4
4
|
|
|
5
5
|
const MQrcode = withInstall(Qrcode);
|
|
@@ -1,67 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { qrcodeProps, qrcodeEmits } from './qrcode2.mjs';
|
|
4
|
-
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
2
|
+
import { isString } from '@vue/shared';
|
|
5
3
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (props.align === "right") {
|
|
23
|
-
return "flex-end";
|
|
24
|
-
}
|
|
25
|
-
return "center";
|
|
26
|
-
});
|
|
27
|
-
watch(
|
|
28
|
-
() => props.text,
|
|
29
|
-
(newVal) => {
|
|
30
|
-
if (!newVal)
|
|
31
|
-
return;
|
|
32
|
-
setTimeout(() => {
|
|
33
|
-
qrcodeRef.value.innerHTML = "";
|
|
34
|
-
new Qrcode$1(qrcodeRef.value, {
|
|
35
|
-
text: newVal,
|
|
36
|
-
width: props.qrcodeWidth,
|
|
37
|
-
height: props.qrcodeHeight
|
|
38
|
-
});
|
|
39
|
-
const img = qrcodeRef.value.querySelector("img");
|
|
40
|
-
img.onclick = () => {
|
|
41
|
-
emit("click", newVal);
|
|
42
|
-
};
|
|
43
|
-
}, 0);
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
immediate: true
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
return (_ctx, _cache) => {
|
|
50
|
-
return openBlock(), createElementBlock(
|
|
51
|
-
"div",
|
|
52
|
-
{
|
|
53
|
-
ref_key: "qrcodeRef",
|
|
54
|
-
ref: qrcodeRef,
|
|
55
|
-
class: "m-qrcode-box",
|
|
56
|
-
style: normalizeStyle("justify-content: " + alignComputed.value)
|
|
57
|
-
},
|
|
58
|
-
null,
|
|
59
|
-
4
|
|
60
|
-
);
|
|
61
|
-
};
|
|
4
|
+
const qrcodeProps = buildProps({
|
|
5
|
+
text: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true
|
|
8
|
+
},
|
|
9
|
+
align: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "left"
|
|
12
|
+
},
|
|
13
|
+
qrcodeWidth: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 70
|
|
16
|
+
},
|
|
17
|
+
qrcodeHeight: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 70
|
|
62
20
|
}
|
|
63
21
|
});
|
|
64
|
-
|
|
22
|
+
const qrcodeEmits = {
|
|
23
|
+
click: (val) => isString(val)
|
|
24
|
+
};
|
|
65
25
|
|
|
66
|
-
export {
|
|
26
|
+
export { qrcodeEmits, qrcodeProps };
|
|
67
27
|
//# sourceMappingURL=qrcode.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qrcode.mjs","sources":["../../../../../../../packages/components/qrcode/src/qrcode.
|
|
1
|
+
{"version":3,"file":"qrcode.mjs","sources":["../../../../../../../packages/components/qrcode/src/qrcode.ts"],"sourcesContent":["import { buildProps, isString } from '@m-eleplus-crud/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const qrcodeProps = buildProps({\n /**\n * @description 二维码内容\n */\n text: {\n type: String,\n required: true,\n },\n /**\n * @description 对齐方式\n */\n align: {\n type: String,\n default: 'left',\n },\n /**\n * @description qrcode宽度\n */\n qrcodeWidth: {\n type: Number,\n default: 70,\n },\n /**\n * @description qrcode高度\n */\n qrcodeHeight: {\n type: Number,\n default: 70,\n },\n} as const)\nexport type QrcodeProps = ExtractPropTypes<typeof qrcodeProps>\n\nexport const qrcodeEmits = {\n click: (val: string) => isString(val),\n}\nexport type QrcodeEmits = typeof qrcodeEmits\n"],"names":[],"mappings":";;;AAIO,MAAM,cAAc,UAAW,CAAA;AAAA,EAIpC,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,QAAU,EAAA,IAAA;AAAA,GACZ;AAAA,EAIA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EAIA,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AACF,CAAU,EAAA;AAGH,MAAM,WAAc,GAAA;AAAA,EACzB,KAAO,EAAA,CAAC,GAAgB,KAAA,QAAA,CAAS,GAAG,CAAA;AACtC;;;;"}
|
|
@@ -1,27 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent, ref, computed, watch, openBlock, createElementBlock, normalizeStyle } from 'vue';
|
|
2
|
+
import Qrcode$1 from 'qrcodejs2-fix';
|
|
3
|
+
import { qrcodeProps, qrcodeEmits } from './qrcode.mjs';
|
|
4
|
+
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
|
3
5
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
const COMPONENT_NAME = "MQrcode";
|
|
7
|
+
const __default__ = defineComponent({
|
|
8
|
+
name: COMPONENT_NAME
|
|
9
|
+
});
|
|
10
|
+
const _sfc_main = defineComponent({
|
|
11
|
+
...__default__,
|
|
12
|
+
props: qrcodeProps,
|
|
13
|
+
emits: qrcodeEmits,
|
|
14
|
+
setup(__props, { emit: __emit }) {
|
|
15
|
+
const props = __props;
|
|
16
|
+
const emit = __emit;
|
|
17
|
+
const qrcodeRef = ref();
|
|
18
|
+
const alignComputed = computed(() => {
|
|
19
|
+
if (!props.align || props.align === "left") {
|
|
20
|
+
return "flex-start";
|
|
21
|
+
}
|
|
22
|
+
if (props.align === "right") {
|
|
23
|
+
return "flex-end";
|
|
24
|
+
}
|
|
25
|
+
return "center";
|
|
26
|
+
});
|
|
27
|
+
watch(
|
|
28
|
+
() => props.text,
|
|
29
|
+
(newVal) => {
|
|
30
|
+
if (!newVal)
|
|
31
|
+
return;
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
qrcodeRef.value.innerHTML = "";
|
|
34
|
+
new Qrcode$1(qrcodeRef.value, {
|
|
35
|
+
text: newVal,
|
|
36
|
+
width: props.qrcodeWidth,
|
|
37
|
+
height: props.qrcodeHeight
|
|
38
|
+
});
|
|
39
|
+
const img = qrcodeRef.value.querySelector("img");
|
|
40
|
+
img.onclick = () => {
|
|
41
|
+
emit("click", newVal);
|
|
42
|
+
};
|
|
43
|
+
}, 0);
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
immediate: true
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
return (_ctx, _cache) => {
|
|
50
|
+
return openBlock(), createElementBlock(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
ref_key: "qrcodeRef",
|
|
54
|
+
ref: qrcodeRef,
|
|
55
|
+
class: "m-qrcode-box",
|
|
56
|
+
style: normalizeStyle("justify-content: " + alignComputed.value)
|
|
57
|
+
},
|
|
58
|
+
null,
|
|
59
|
+
4
|
|
60
|
+
);
|
|
61
|
+
};
|
|
20
62
|
}
|
|
21
63
|
});
|
|
22
|
-
|
|
23
|
-
click: (val) => isString(val)
|
|
24
|
-
};
|
|
64
|
+
var Qrcode = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "qrcode.vue"]]);
|
|
25
65
|
|
|
26
|
-
export {
|
|
66
|
+
export { Qrcode as default };
|
|
27
67
|
//# sourceMappingURL=qrcode2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qrcode2.mjs","sources":["../../../../../../../packages/components/qrcode/src/qrcode.
|
|
1
|
+
{"version":3,"file":"qrcode2.mjs","sources":["../../../../../../../packages/components/qrcode/src/qrcode.vue"],"sourcesContent":["<template>\n <div\n ref=\"qrcodeRef\"\n class=\"m-qrcode-box\"\n :style=\"'justify-content: ' + alignComputed\"\n />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\n// @ts-ignore\nimport Qrcode from 'qrcodejs2-fix'\nimport { qrcodeEmits, qrcodeProps } from './qrcode'\n\nconst COMPONENT_NAME = 'MQrcode'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(qrcodeProps)\nconst emit = defineEmits(qrcodeEmits)\n\nconst qrcodeRef = ref<any>()\n\nconst alignComputed = computed(() => {\n if (!props.align || props.align === 'left') {\n return 'flex-start'\n }\n if (props.align === 'right') {\n return 'flex-end'\n }\n return 'center'\n})\n\nwatch(\n () => props.text as string,\n (newVal: string) => {\n if (!newVal) return\n setTimeout(() => {\n qrcodeRef.value.innerHTML = ''\n new Qrcode(qrcodeRef.value, {\n text: newVal,\n width: props.qrcodeWidth,\n height: props.qrcodeHeight,\n })\n const img = qrcodeRef.value.querySelector('img')\n img.onclick = () => {\n emit('click', newVal)\n }\n }, 0)\n },\n {\n immediate: true,\n }\n)\n</script>\n"],"names":["Qrcode"],"mappings":";;;;;;mCAec,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;AAEA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAA,MAAM,YAAY,GAAS,EAAA,CAAA;AAErB,IAAA,MAAA,aAAA,GAAgB,SAAS,MAAM;AACnC,MAAA,IAAI,CAAC,KAAA,CAAM,KAAS,IAAA,KAAA,CAAM,UAAU,MAAQ,EAAA;AACnC,QAAA,OAAA,YAAA,CAAA;AAAA,OACT;AACI,MAAA,IAAA,KAAA,CAAM,UAAU,OAAS,EAAA;AACpB,QAAA,OAAA,UAAA,CAAA;AAAA,OACT;AACO,MAAA,OAAA,QAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,IAAA;AAAA,MACZ,CAAC,MAAmB,KAAA;AAClB,QAAA,IAAI,CAAC,MAAA;AAAQ,UAAA,OAAA;AACb,QAAA,UAAA,CAAW,MAAM;AACf,UAAA,SAAA,CAAU,MAAM,SAAY,GAAA,EAAA,CAAA;AACxB,UAAA,IAAAA,QAAA,CAAO,UAAU,KAAO,EAAA;AAAA,YAC1B,IAAM,EAAA,MAAA;AAAA,YACN,OAAO,KAAM,CAAA,WAAA;AAAA,YACb,QAAQ,KAAM,CAAA,YAAA;AAAA,WACf,CAAA,CAAA;AACD,UAAA,MAAM,GAAM,GAAA,SAAA,CAAU,KAAM,CAAA,aAAA,CAAc,KAAK,CAAA,CAAA;AAC/C,UAAA,GAAA,CAAI,UAAU,MAAM;AAClB,YAAA,IAAA,CAAK,SAAS,MAAM,CAAA,CAAA;AAAA,WACtB,CAAA;AAAA,WACC,CAAC,CAAA,CAAA;AAAA,OACN;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Table from './src/
|
|
2
|
-
export { tableEmits, tableProps } from './src/
|
|
1
|
+
import Table from './src/table2.mjs';
|
|
2
|
+
export { tableEmits, tableProps } from './src/table.mjs';
|
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
4
4
|
|
|
5
5
|
const MTable = withInstall(Table);
|