@kp-ui/lowcode 1.0.100 → 1.0.102
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/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kp-ui/lowcode",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.102",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"module": "index.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
+
"vite": "6.3.3",
|
|
10
|
+
"pinia": "3.0.1",
|
|
11
|
+
"vue": "3.5.17",
|
|
12
|
+
"tailwindcss": "3.4.9",
|
|
9
13
|
"@kp-ui/i18n": "0.0.8",
|
|
10
14
|
"ace-builds": "1.42.0",
|
|
11
15
|
"@kp-ui/tool": "1.0.33",
|
|
@@ -1,51 +1,52 @@
|
|
|
1
|
-
import { defineComponent as g, getCurrentInstance as x, useAttrs as b, ref as w, computed as
|
|
2
|
-
import { useLowcode as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { TpfModal as
|
|
1
|
+
import { defineComponent as g, getCurrentInstance as x, useAttrs as b, ref as w, computed as p, onMounted as _, createBlock as V, openBlock as k, unref as s, mergeProps as R, withCtx as u, createVNode as a, nextTick as $ } from "vue";
|
|
2
|
+
import { useLowcode as M } from "../../../hooks/useLowcode.js";
|
|
3
|
+
import B from "../../form-render/SubmitButtonRender.vue.js";
|
|
4
|
+
import T from "../../form-render/index.vue.js";
|
|
5
|
+
import { TpfModal as U } from "tmgc2-share";
|
|
6
6
|
const N = /* @__PURE__ */ g({
|
|
7
7
|
__name: "CustomerModal",
|
|
8
8
|
props: {
|
|
9
9
|
type: {},
|
|
10
10
|
formCode: {}
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
12
|
+
setup(d) {
|
|
13
|
+
const l = x(), o = b() || {}, r = w(!1), t = d, m = p(() => {
|
|
14
14
|
var n, e;
|
|
15
15
|
return {
|
|
16
|
+
$router: l.proxy.$router,
|
|
16
17
|
_id: ((e = (n = o == null ? void 0 : o.row) == null ? void 0 : n.record) == null ? void 0 : e._id) || null,
|
|
17
18
|
type: t.type,
|
|
18
|
-
instance:
|
|
19
|
+
instance: l,
|
|
19
20
|
...o
|
|
20
21
|
};
|
|
21
22
|
}), {
|
|
22
|
-
vfdRef:
|
|
23
|
+
vfdRef: f,
|
|
23
24
|
formConfig: c,
|
|
24
25
|
getComponentJson: v
|
|
25
|
-
} =
|
|
26
|
+
} = M({
|
|
26
27
|
formCode: t.formCode,
|
|
27
28
|
type: t.type
|
|
28
|
-
}), C =
|
|
29
|
-
r.value = !0, await
|
|
29
|
+
}), C = p(() => t.type === "add" ? "新增" : t.type === "edit" ? "编辑" : t.type === "view" ? "查看" : "新增"), y = async () => {
|
|
30
|
+
r.value = !0, await $(), await v([]), console.log("attrs", o);
|
|
30
31
|
};
|
|
31
32
|
return _(() => {
|
|
32
33
|
y();
|
|
33
|
-
}), (n, e) => (k(), V(s(
|
|
34
|
+
}), (n, e) => (k(), V(s(U), R({
|
|
34
35
|
visible: r.value,
|
|
35
36
|
"onUpdate:visible": e[1] || (e[1] = (i) => r.value = i)
|
|
36
37
|
}, n.$attrs, {
|
|
37
38
|
title: C.value
|
|
38
39
|
}), {
|
|
39
|
-
footerRight:
|
|
40
|
+
footerRight: u(() => [a(B, {
|
|
40
41
|
dialogVisible: r.value,
|
|
41
42
|
"onUpdate:dialogVisible": e[0] || (e[0] = (i) => r.value = i),
|
|
42
43
|
options: s(c),
|
|
43
|
-
ctx: s(
|
|
44
|
+
ctx: s(f)
|
|
44
45
|
}, null, 8, ["dialogVisible", "options", "ctx"])]),
|
|
45
|
-
default:
|
|
46
|
+
default: u(() => [a(T, {
|
|
46
47
|
vfCtx: m.value,
|
|
47
48
|
ref_key: "vfdRef",
|
|
48
|
-
ref:
|
|
49
|
+
ref: f
|
|
49
50
|
}, null, 8, ["vfCtx"])]),
|
|
50
51
|
_: 1
|
|
51
52
|
}, 16, ["visible", "title"]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomerModal.vue2.js","sources":["../../../../../src/components/public/CustomerModal/CustomerModal.vue"],"sourcesContent":["<template>\n <TpfModal v-model:visible=\"visible\" v-bind=\"$attrs\" :title=\"title\">\n <VFormRender :vfCtx=\"vfCtx\" ref=\"vfdRef\" />\n <template #footerRight>\n <SubmitButtonRender\n v-model:dialogVisible=\"visible\"\n :options=\"formConfig\"\n :ctx=\"vfdRef\"\n />\n </template>\n </TpfModal>\n</template>\n
|
|
1
|
+
{"version":3,"file":"CustomerModal.vue2.js","sources":["../../../../../src/components/public/CustomerModal/CustomerModal.vue"],"sourcesContent":["<template>\n <TpfModal v-model:visible=\"visible\" v-bind=\"$attrs\" :title=\"title\">\n <VFormRender :vfCtx=\"vfCtx\" ref=\"vfdRef\" />\n <template #footerRight>\n <SubmitButtonRender\n v-model:dialogVisible=\"visible\"\n :options=\"formConfig\"\n :ctx=\"vfdRef\"\n />\n </template>\n </TpfModal>\n</template>\n<script setup lang=\"tsx\">\n import { useLowcode } from '@/hooks/useLowcode';\n import { useAttrs, onMounted, nextTick, computed, getCurrentInstance, ref } from 'vue';\n import SubmitButtonRender from '@/components/form-render/SubmitButtonRender.vue';\n import VFormRender from '@/components/form-render/index.vue';\n import { TpfModal } from 'tmgc2-share';\n\n const instance = getCurrentInstance()!;\n\n const attrs = (useAttrs() || {}) as any;\n const visible = ref(false);\n\n type Props = {\n type: string;\n formCode: string;\n };\n\n const props = withDefaults(defineProps<Props>(), {});\n\n const vfCtx = computed(() => {\n return {\n $router: instance.proxy!.$router,\n _id: attrs?.row?.record?._id || null,\n type: props.type,\n instance,\n ...attrs\n };\n });\n\n const { vfdRef, formConfig, getComponentJson } = useLowcode({\n formCode: props.formCode,\n type: props.type\n });\n\n const title = computed(() => {\n if (props.type === 'add') return '新增';\n if (props.type === 'edit') return '编辑';\n if (props.type === 'view') return '查看';\n return '新增';\n });\n\n const show = async () => {\n visible.value = true;\n await nextTick();\n await getComponentJson([]);\n console.log('attrs', attrs);\n };\n\n onMounted(() => {\n show();\n });\n</script>\n\n<style lang=\"less\" scoped></style>\n"],"names":["instance","getCurrentInstance","attrs","useAttrs","visible","ref","props","__props","vfCtx","computed","$router","proxy","_id","row","record","type","vfdRef","formConfig","getComponentJson","useLowcode","formCode","title","show","value","nextTick","console","log","onMounted","_openBlock","_createBlock","_unref","_mergeProps","$event","$attrs","footerRight","_createVNode","SubmitButtonRender","dialogVisible","options","ctx","VFormRender"],"mappings":";;;;;;;;;;;;AAmBI,UAAMA,IAAWC,EAAkB,GAE7BC,IAASC,EAAQ,KAAM,CAAA,GACvBC,IAAUC,EAAI,EAAK,GAOnBC,IAAQC,GAERC,IAAQC,EAAS,MAAM;;AACzB,aAAO;AAAA,QACHC,SAASV,EAASW,MAAOD;AAAAA,QACzBE,OAAKV,KAAAA,IAAAA,KAAAA,gBAAAA,EAAOW,QAAPX,gBAAAA,EAAYY,WAAZZ,gBAAAA,EAAoBU,QAAO;AAAA,QAChCG,MAAMT,EAAMS;AAAAA,QACZf,UAAAA;AAAAA,QACA,GAAGE;AAAAA;IAEX,CAAC,GAEK;AAAA,MAAEc,QAAAA;AAAAA,MAAQC,YAAAA;AAAAA,MAAYC,kBAAAA;AAAAA,QAAqBC,EAAW;AAAA,MACxDC,UAAUd,EAAMc;AAAAA,MAChBL,MAAMT,EAAMS;AAAAA,IAChB,CAAC,GAEKM,IAAQZ,EAAS,MACfH,EAAMS,SAAS,QAAc,OAC7BT,EAAMS,SAAS,SAAe,OAC9BT,EAAMS,SAAS,SAAe,OAC3B,IACV,GAEKO,IAAO,YAAY;AACrBlB,MAAAA,EAAQmB,QAAQ,IAChB,MAAMC,EAAQ,GACd,MAAMN,EAAiB,CAAA,CAAE,GACzBO,QAAQC,IAAI,SAASxB,CAAK;AAAA,IAC9B;AAEAyB,WAAAA,EAAU,MAAM;AACZL,MAAAA,EAAI;AAAA,IACR,CAAC,cA7DDM,EAAA,GAAAC,EASWC,MATXC,EASW;AAAA,MATO3B,SAASA,EAAAmB;AAAAA,iDAAAnB,EAAOmB,QAAAS;AAAAA,OAAUC,EAAAA,QAAM;AAAA,MAAGZ,OAAOA,EAAAE;AAAAA,IAAK,CAAA,GAAA;AAAA,MAElDW,eACP,MAIE,CAJFC,EAIEC,GAAA;AAAA,QAHUC,eAAejC,EAAAmB;AAAAA,yDAAAnB,EAAOmB,QAAAS;AAAAA,QAC7BM,SAASR,EAAAb,CAAA;AAAA,QACTsB,KAAKT,EAAAd,CAAA;AAAA;iBALd,MAA2C,CAA3CmB,EAA2CK,GAAA;AAAA,QAA7BhC,OAAOA,EAAAe;AAAAA,iBAAW;AAAA,QAAJlB,KAAIW;AAAAA;;;;;"}
|