@fangzhongya/page 0.0.30 → 0.0.31
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/components/control/design.cjs +1 -39
- package/dist/components/control/design.d.ts +0 -3
- package/dist/components/control/design.js +2 -40
- package/dist/components/control/draggable.d.ts +2 -2
- package/dist/components/index.css +18 -0
- package/dist/components/output/gener.cjs +0 -1
- package/dist/components/output/gener.js +0 -1
- package/dist/components/output/gener2.cjs +12 -8
- package/dist/components/output/gener2.js +11 -7
- package/dist/config/util.d.ts +20 -10
- package/dist/design/design.d.ts +1 -1
- package/dist/effect/design.cjs +1 -39
- package/dist/effect/design.d.ts +0 -3
- package/dist/effect/design.js +2 -40
- package/dist/effect/draggable.d.ts +1 -1
- package/dist/effect/effect.d.ts +1 -1
- package/dist/expand/{chunk-IRHQSEMT.cjs → chunk-DSW4WFHO.cjs} +1 -1
- package/dist/expand/{chunk-ZPHCUID5.js → chunk-JTAMOZ6S.js} +1 -1
- package/dist/expand/components.cjs +3 -3
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/render/common.cjs +4 -4
- package/dist/render/common.d.ts +1 -1
- package/dist/render/common.js +4 -4
- package/dist/render/config.cjs +1 -2
- package/dist/render/config.js +1 -2
- package/dist/render/render.d.ts +1 -1
- package/dist/viewer/design.cjs +1 -1
- package/dist/viewer/design.js +2 -2
- package/dist/viewer/draggable.d.ts +1 -1
- package/dist/viewer/viewer.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/output/gener.css +0 -18
|
@@ -138,13 +138,7 @@ function setDesign(obj, params = {}, temps) {
|
|
|
138
138
|
if (generals.includes(obj.name)) {
|
|
139
139
|
return getGeneralDiv(obj, params, temps);
|
|
140
140
|
}
|
|
141
|
-
return
|
|
142
|
-
obj,
|
|
143
|
-
params,
|
|
144
|
-
temps,
|
|
145
|
-
getSlotsDom(obj, params, temps),
|
|
146
|
-
setCompon()
|
|
147
|
-
);
|
|
141
|
+
return getGeneralDiv(obj, params, temps);
|
|
148
142
|
} else {
|
|
149
143
|
return "";
|
|
150
144
|
}
|
|
@@ -202,39 +196,7 @@ function getRender(params = {}, lists, temps) {
|
|
|
202
196
|
return vue.h("div", params.attrs, params.slots);
|
|
203
197
|
}
|
|
204
198
|
}
|
|
205
|
-
function getRenderAssembly(obj, params, temps) {
|
|
206
|
-
return common.assemblyGetRender(
|
|
207
|
-
obj,
|
|
208
|
-
params,
|
|
209
|
-
temps,
|
|
210
|
-
() => {
|
|
211
|
-
return config$1.getDesignSlots(obj, (slots) => {
|
|
212
|
-
return setDesignDag(
|
|
213
|
-
slots,
|
|
214
|
-
obj,
|
|
215
|
-
params,
|
|
216
|
-
temps
|
|
217
|
-
);
|
|
218
|
-
});
|
|
219
|
-
},
|
|
220
|
-
(obj2, config2, slots) => {
|
|
221
|
-
const slot = slots.default();
|
|
222
|
-
if (slot) {
|
|
223
|
-
return vue.h(
|
|
224
|
-
"div",
|
|
225
|
-
{
|
|
226
|
-
class: "assembly-div"
|
|
227
|
-
},
|
|
228
|
-
slot
|
|
229
|
-
);
|
|
230
|
-
} else {
|
|
231
|
-
return vue.h("div", params.attrs, params.slots);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
);
|
|
235
|
-
}
|
|
236
199
|
exports.getGeneralDiv = getGeneralDiv;
|
|
237
200
|
exports.getRender = getRender;
|
|
238
|
-
exports.getRenderAssembly = getRenderAssembly;
|
|
239
201
|
exports.getResizable = getResizable;
|
|
240
202
|
exports.setDesign = setDesign;
|
|
@@ -9,6 +9,3 @@ export declare function getGeneralDiv(obj: ControlDesign, params: ObjAny, temps:
|
|
|
9
9
|
export declare function getRender(params: ObjAny | undefined, lists: Array<ControlDesign> | undefined, temps: Array<TempsObject>): VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
10
10
|
[key: string]: any;
|
|
11
11
|
}>;
|
|
12
|
-
export declare function getRenderAssembly(obj: ControlDesign, params: ObjAny, temps: Array<TempsObject>): string | VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
|
-
import { getTempsArr, useGetCompon,
|
|
2
|
+
import { getTempsArr, useGetCompon, getData } from "../../render/common.js";
|
|
3
3
|
import { getForObject } from "../../render/config.js";
|
|
4
4
|
import { getGridDiv, getDraggableDiv, getResizableDiv } from "./draggable.js";
|
|
5
5
|
import "../design/design-grids.js";
|
|
@@ -136,13 +136,7 @@ function setDesign(obj, params = {}, temps) {
|
|
|
136
136
|
if (generals.includes(obj.name)) {
|
|
137
137
|
return getGeneralDiv(obj, params, temps);
|
|
138
138
|
}
|
|
139
|
-
return
|
|
140
|
-
obj,
|
|
141
|
-
params,
|
|
142
|
-
temps,
|
|
143
|
-
getSlotsDom(obj, params, temps),
|
|
144
|
-
setCompon()
|
|
145
|
-
);
|
|
139
|
+
return getGeneralDiv(obj, params, temps);
|
|
146
140
|
} else {
|
|
147
141
|
return "";
|
|
148
142
|
}
|
|
@@ -200,41 +194,9 @@ function getRender(params = {}, lists, temps) {
|
|
|
200
194
|
return h("div", params.attrs, params.slots);
|
|
201
195
|
}
|
|
202
196
|
}
|
|
203
|
-
function getRenderAssembly(obj, params, temps) {
|
|
204
|
-
return assemblyGetRender(
|
|
205
|
-
obj,
|
|
206
|
-
params,
|
|
207
|
-
temps,
|
|
208
|
-
() => {
|
|
209
|
-
return getDesignSlots(obj, (slots) => {
|
|
210
|
-
return setDesignDag(
|
|
211
|
-
slots,
|
|
212
|
-
obj,
|
|
213
|
-
params,
|
|
214
|
-
temps
|
|
215
|
-
);
|
|
216
|
-
});
|
|
217
|
-
},
|
|
218
|
-
(obj2, config, slots) => {
|
|
219
|
-
const slot = slots.default();
|
|
220
|
-
if (slot) {
|
|
221
|
-
return h(
|
|
222
|
-
"div",
|
|
223
|
-
{
|
|
224
|
-
class: "assembly-div"
|
|
225
|
-
},
|
|
226
|
-
slot
|
|
227
|
-
);
|
|
228
|
-
} else {
|
|
229
|
-
return h("div", params.attrs, params.slots);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
197
|
export {
|
|
235
198
|
getGeneralDiv,
|
|
236
199
|
getRender,
|
|
237
|
-
getRenderAssembly,
|
|
238
200
|
getResizable,
|
|
239
201
|
setDesign
|
|
240
202
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare function getDraggableDiv(slots: Array<ControlDesign>, assembly: ControlDesign, params: ObjAny, callback: Function, key?: string):
|
|
1
|
+
export declare function getDraggableDiv(slots: Array<ControlDesign>, assembly: ControlDesign, params: ObjAny, callback: Function, key?: string): globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}>;
|
|
4
|
-
export declare function getResizableDiv(slots: Array<ControlDesign>, assembly: ControlDesign, params: ObjAny, callback: Function, key?: string):
|
|
4
|
+
export declare function getResizableDiv(slots: Array<ControlDesign>, assembly: ControlDesign, params: ObjAny, callback: Function, key?: string): globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
}>;
|
|
7
7
|
export declare function getGridDiv(obj: ControlDesign, config: ObjAny, params: ObjAny, temps: Array<TempsObject>): {
|
|
@@ -1314,6 +1314,24 @@
|
|
|
1314
1314
|
.fang-page-operate-right-key-box-list-li i {
|
|
1315
1315
|
margin-right: 10px;
|
|
1316
1316
|
}
|
|
1317
|
+
.fang-page-output-gener {
|
|
1318
|
+
width: 100%;
|
|
1319
|
+
height: 100%;
|
|
1320
|
+
display: flex;
|
|
1321
|
+
flex-direction: column;
|
|
1322
|
+
}
|
|
1323
|
+
.fang-page-output-gener-code {
|
|
1324
|
+
flex: 1;
|
|
1325
|
+
width: 100%;
|
|
1326
|
+
}
|
|
1327
|
+
.fang-page-output-gener-code .el-textarea {
|
|
1328
|
+
width: 100%;
|
|
1329
|
+
height: 100%;
|
|
1330
|
+
}
|
|
1331
|
+
.fang-page-output-gener-code .el-textarea textarea {
|
|
1332
|
+
width: 100%;
|
|
1333
|
+
height: 100%;
|
|
1334
|
+
}
|
|
1317
1335
|
|
|
1318
1336
|
/* 关键:移除所有position/left/top/width/height样式定义,由JS控制 */
|
|
1319
1337
|
.resizable {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const gener_vue_vue_type_script_setup_true_lang = require("./gener2.cjs");
|
|
4
|
-
;/* empty css */
|
|
5
4
|
exports.default = gener_vue_vue_type_script_setup_true_lang.default;
|
|
@@ -6,11 +6,10 @@ require("element-plus/es/components/button/style/css");
|
|
|
6
6
|
const vue = require("vue");
|
|
7
7
|
const copy$1 = require("@fangzhongya/utils/window/copy");
|
|
8
8
|
const highlight = require("./highlight.cjs");
|
|
9
|
-
const index = require("./vue/index.cjs");
|
|
9
|
+
const index$1 = require("./vue/index.cjs");
|
|
10
10
|
const copy = require("../../utils/copy.cjs");
|
|
11
|
+
const index = require("../../utils/index.cjs");
|
|
11
12
|
require("element-plus/es/components/message/style/css");
|
|
12
|
-
const _hoisted_1 = { class: "gener" };
|
|
13
|
-
const _hoisted_2 = { class: "code" };
|
|
14
13
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
15
14
|
__name: "gener",
|
|
16
15
|
props: {
|
|
@@ -23,10 +22,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
23
22
|
}
|
|
24
23
|
},
|
|
25
24
|
setup(__props) {
|
|
25
|
+
const cs = index.getClass("output-gener");
|
|
26
26
|
const props = __props;
|
|
27
27
|
const text = vue.ref("");
|
|
28
28
|
const d = copy.deepCopy(props.value);
|
|
29
|
-
index.generVue(d).then((v) => {
|
|
29
|
+
index$1.generVue(d).then((v) => {
|
|
30
30
|
text.value = v;
|
|
31
31
|
});
|
|
32
32
|
function onCopy() {
|
|
@@ -43,7 +43,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
43
43
|
}
|
|
44
44
|
return (_ctx, _cache) => {
|
|
45
45
|
const _component_el_button = es.ElButton;
|
|
46
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
46
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
47
|
+
class: vue.normalizeClass(vue.unref(cs)())
|
|
48
|
+
}, [
|
|
47
49
|
vue.createElementVNode("div", null, [
|
|
48
50
|
vue.createVNode(_component_el_button, {
|
|
49
51
|
onClick: onCopy,
|
|
@@ -55,13 +57,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
55
57
|
_: 1
|
|
56
58
|
})
|
|
57
59
|
]),
|
|
58
|
-
vue.createElementVNode("div",
|
|
60
|
+
vue.createElementVNode("div", {
|
|
61
|
+
class: vue.normalizeClass(vue.unref(cs)("code"))
|
|
62
|
+
}, [
|
|
59
63
|
vue.createVNode(highlight.default, {
|
|
60
64
|
language: "html",
|
|
61
65
|
code: vue.unref(text)
|
|
62
66
|
}, null, 8, ["code"])
|
|
63
|
-
])
|
|
64
|
-
]);
|
|
67
|
+
], 2)
|
|
68
|
+
], 2);
|
|
65
69
|
};
|
|
66
70
|
}
|
|
67
71
|
});
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { ElMessage, ElButton } from "element-plus/es";
|
|
2
2
|
import "element-plus/es/components/base/style/css";
|
|
3
3
|
import "element-plus/es/components/button/style/css";
|
|
4
|
-
import { defineComponent, ref, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, createTextVNode
|
|
4
|
+
import { defineComponent, ref, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createVNode, withCtx, createTextVNode } from "vue";
|
|
5
5
|
import { copy } from "@fangzhongya/utils/window/copy";
|
|
6
6
|
import Highlight from "./highlight.js";
|
|
7
7
|
import { generVue } from "./vue/index.js";
|
|
8
8
|
import { deepCopy } from "../../utils/copy.js";
|
|
9
|
+
import { getClass } from "../../utils/index.js";
|
|
9
10
|
import "element-plus/es/components/message/style/css";
|
|
10
|
-
const _hoisted_1 = { class: "gener" };
|
|
11
|
-
const _hoisted_2 = { class: "code" };
|
|
12
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
12
|
__name: "gener",
|
|
14
13
|
props: {
|
|
@@ -21,6 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
20
|
}
|
|
22
21
|
},
|
|
23
22
|
setup(__props) {
|
|
23
|
+
const cs = getClass("output-gener");
|
|
24
24
|
const props = __props;
|
|
25
25
|
const text = ref("");
|
|
26
26
|
const d = deepCopy(props.value);
|
|
@@ -41,7 +41,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
41
|
}
|
|
42
42
|
return (_ctx, _cache) => {
|
|
43
43
|
const _component_el_button = ElButton;
|
|
44
|
-
return openBlock(), createElementBlock("div",
|
|
44
|
+
return openBlock(), createElementBlock("div", {
|
|
45
|
+
class: normalizeClass(unref(cs)())
|
|
46
|
+
}, [
|
|
45
47
|
createElementVNode("div", null, [
|
|
46
48
|
createVNode(_component_el_button, {
|
|
47
49
|
onClick: onCopy,
|
|
@@ -53,13 +55,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
55
|
_: 1
|
|
54
56
|
})
|
|
55
57
|
]),
|
|
56
|
-
createElementVNode("div",
|
|
58
|
+
createElementVNode("div", {
|
|
59
|
+
class: normalizeClass(unref(cs)("code"))
|
|
60
|
+
}, [
|
|
57
61
|
createVNode(Highlight, {
|
|
58
62
|
language: "html",
|
|
59
63
|
code: unref(text)
|
|
60
64
|
}, null, 8, ["code"])
|
|
61
|
-
])
|
|
62
|
-
]);
|
|
65
|
+
], 2)
|
|
66
|
+
], 2);
|
|
63
67
|
};
|
|
64
68
|
}
|
|
65
69
|
});
|
package/dist/config/util.d.ts
CHANGED
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
* @returns
|
|
4
4
|
*/
|
|
5
5
|
export declare function getLeftList(obj: any): LeftList[];
|
|
6
|
-
export declare function getComponConfig():
|
|
6
|
+
export declare function getComponConfig(): globalThis.ComputedRef<{
|
|
7
|
+
[key: string]: ControlDesign;
|
|
8
|
+
}>;
|
|
7
9
|
/**
|
|
8
10
|
* 获取对应配置
|
|
9
11
|
* @param right
|
|
10
12
|
* @returns
|
|
11
13
|
*/
|
|
12
|
-
export declare function getComponSupport(right: ControlDesign):
|
|
13
|
-
export declare function getComponObj(right: ControlDesign):
|
|
14
|
+
export declare function getComponSupport(right: ControlDesign): SupportObj;
|
|
15
|
+
export declare function getComponObj(right: ControlDesign): ControlDesign;
|
|
14
16
|
/**
|
|
15
17
|
* 通过属性名称获取对应配置
|
|
16
18
|
* @param label 属性名称
|
|
@@ -19,12 +21,12 @@ export declare function getComponObj(right: ControlDesign): any;
|
|
|
19
21
|
* @returns
|
|
20
22
|
*/
|
|
21
23
|
export declare function getCurrency(label: string, type?: string | string[], compon?: string): AttrConfig | undefined;
|
|
22
|
-
export declare function getSupportSlots(right: ControlDesign):
|
|
23
|
-
export declare function getSupportEmits(right: ControlDesign):
|
|
24
|
+
export declare function getSupportSlots(right: ControlDesign): AttrConfig[];
|
|
25
|
+
export declare function getSupportEmits(right: ControlDesign): AttrConfig[];
|
|
24
26
|
export declare function getCompon(v: SupportProps | string, right?: ControlDesign, compon?: string): AttrConfig;
|
|
25
|
-
export declare function getSupportProps(right: ControlDesign):
|
|
26
|
-
export declare function getSupportAttrs(right: ControlDesign):
|
|
27
|
-
export declare function getSupportConfig(right: ControlDesign):
|
|
27
|
+
export declare function getSupportProps(right: ControlDesign): AttrConfig[];
|
|
28
|
+
export declare function getSupportAttrs(right: ControlDesign): AttrConfig[];
|
|
29
|
+
export declare function getSupportConfig(right: ControlDesign): AttrConfig[];
|
|
28
30
|
export declare function isEmpty(v: any): true | undefined;
|
|
29
31
|
export declare function setSlotsScope(obj: ControlDesign, value: string, prop?: string): void;
|
|
30
32
|
/**
|
|
@@ -37,9 +39,17 @@ export declare function getComStyle(obj?: ControlDesign): boolean;
|
|
|
37
39
|
export declare function getComponControl(obj: DesignCompon): ControlDesign;
|
|
38
40
|
export declare function getTemplates(tos?: {
|
|
39
41
|
[key: string]: DesignCompon;
|
|
40
|
-
}, is?: boolean):
|
|
42
|
+
}, is?: boolean): globalThis.Ref<{
|
|
43
|
+
[key: string]: DesignCompon;
|
|
44
|
+
}, {
|
|
45
|
+
[key: string]: DesignCompon;
|
|
46
|
+
}>;
|
|
41
47
|
export declare function deleteGenerated(name: string): void;
|
|
42
|
-
export declare function getGenerated():
|
|
48
|
+
export declare function getGenerated(): globalThis.Ref<{
|
|
49
|
+
[key: string]: DesignCompon;
|
|
50
|
+
}, {
|
|
51
|
+
[key: string]: DesignCompon;
|
|
52
|
+
}>;
|
|
43
53
|
export declare function unGenerated(obj: DesignCompon): void;
|
|
44
54
|
/**
|
|
45
55
|
* 获取不能设置的组件名称
|
package/dist/design/design.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function createDesign(obj: DesignCompon, imports?: ObjAny, components?: {}): import('vue').DefineComponent<{}, () =>
|
|
1
|
+
export declare function createDesign(obj: DesignCompon, imports?: ObjAny, components?: {}): import('vue').DefineComponent<{}, () => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, string[], string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
4
4
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
package/dist/effect/design.cjs
CHANGED
|
@@ -260,13 +260,7 @@ function setDesign(obj, params = {}, temps, cons = {}) {
|
|
|
260
260
|
if (generals.includes(obj.name)) {
|
|
261
261
|
return getGeneralDiv(obj, params, temps, cons);
|
|
262
262
|
}
|
|
263
|
-
return
|
|
264
|
-
obj,
|
|
265
|
-
params,
|
|
266
|
-
temps,
|
|
267
|
-
getSlotsDom(obj, params, temps, cons),
|
|
268
|
-
setCompon(cons)
|
|
269
|
-
);
|
|
263
|
+
return getGeneralDiv(obj, params, temps, cons);
|
|
270
264
|
} else {
|
|
271
265
|
return "";
|
|
272
266
|
}
|
|
@@ -299,38 +293,6 @@ function getRender(params = {}, lists, temps) {
|
|
|
299
293
|
return vue.h("div", params.attrs, params.slots);
|
|
300
294
|
}
|
|
301
295
|
}
|
|
302
|
-
function getRenderAssembly(obj, params, temps) {
|
|
303
|
-
return common.assemblyGetRender(
|
|
304
|
-
obj,
|
|
305
|
-
params,
|
|
306
|
-
temps,
|
|
307
|
-
() => {
|
|
308
|
-
return config$1.getDesignSlots(obj, (slots) => {
|
|
309
|
-
return setDesignDag(
|
|
310
|
-
slots,
|
|
311
|
-
obj,
|
|
312
|
-
params,
|
|
313
|
-
temps
|
|
314
|
-
);
|
|
315
|
-
});
|
|
316
|
-
},
|
|
317
|
-
(obj2, config2, slots) => {
|
|
318
|
-
const slot = slots.default();
|
|
319
|
-
if (slot) {
|
|
320
|
-
return vue.h(
|
|
321
|
-
"div",
|
|
322
|
-
{
|
|
323
|
-
class: "assembly-div"
|
|
324
|
-
},
|
|
325
|
-
slot
|
|
326
|
-
);
|
|
327
|
-
} else {
|
|
328
|
-
return vue.h("div", params.attrs, params.slots);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
);
|
|
332
|
-
}
|
|
333
296
|
exports.getGeneralDiv = getGeneralDiv;
|
|
334
297
|
exports.getRender = getRender;
|
|
335
|
-
exports.getRenderAssembly = getRenderAssembly;
|
|
336
298
|
exports.setDesign = setDesign;
|
package/dist/effect/design.d.ts
CHANGED
|
@@ -6,6 +6,3 @@ export declare function getGeneralDiv(obj: ControlDesign, params: ObjAny, temps:
|
|
|
6
6
|
export declare function getRender(params: ObjAny | undefined, lists: Array<ControlDesign> | undefined, temps: Array<TempsObject>): string | VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
}>;
|
|
9
|
-
export declare function getRenderAssembly(obj: ControlDesign, params: ObjAny, temps: Array<TempsObject>): string | VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}>;
|
package/dist/effect/design.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
|
-
import { getTempsArr, useGetCompon,
|
|
2
|
+
import { getTempsArr, useGetCompon, getData } from "../render/common.js";
|
|
3
3
|
import { getClassId } from "../utils/render.js";
|
|
4
4
|
import { getForObject } from "../render/config.js";
|
|
5
5
|
import { getResizable } from "../components/control/design.js";
|
|
@@ -258,13 +258,7 @@ function setDesign(obj, params = {}, temps, cons = {}) {
|
|
|
258
258
|
if (generals.includes(obj.name)) {
|
|
259
259
|
return getGeneralDiv(obj, params, temps, cons);
|
|
260
260
|
}
|
|
261
|
-
return
|
|
262
|
-
obj,
|
|
263
|
-
params,
|
|
264
|
-
temps,
|
|
265
|
-
getSlotsDom(obj, params, temps, cons),
|
|
266
|
-
setCompon(cons)
|
|
267
|
-
);
|
|
261
|
+
return getGeneralDiv(obj, params, temps, cons);
|
|
268
262
|
} else {
|
|
269
263
|
return "";
|
|
270
264
|
}
|
|
@@ -297,40 +291,8 @@ function getRender(params = {}, lists, temps) {
|
|
|
297
291
|
return h("div", params.attrs, params.slots);
|
|
298
292
|
}
|
|
299
293
|
}
|
|
300
|
-
function getRenderAssembly(obj, params, temps) {
|
|
301
|
-
return assemblyGetRender(
|
|
302
|
-
obj,
|
|
303
|
-
params,
|
|
304
|
-
temps,
|
|
305
|
-
() => {
|
|
306
|
-
return getDesignSlots(obj, (slots) => {
|
|
307
|
-
return setDesignDag(
|
|
308
|
-
slots,
|
|
309
|
-
obj,
|
|
310
|
-
params,
|
|
311
|
-
temps
|
|
312
|
-
);
|
|
313
|
-
});
|
|
314
|
-
},
|
|
315
|
-
(obj2, config, slots) => {
|
|
316
|
-
const slot = slots.default();
|
|
317
|
-
if (slot) {
|
|
318
|
-
return h(
|
|
319
|
-
"div",
|
|
320
|
-
{
|
|
321
|
-
class: "assembly-div"
|
|
322
|
-
},
|
|
323
|
-
slot
|
|
324
|
-
);
|
|
325
|
-
} else {
|
|
326
|
-
return h("div", params.attrs, params.slots);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
);
|
|
330
|
-
}
|
|
331
294
|
export {
|
|
332
295
|
getGeneralDiv,
|
|
333
296
|
getRender,
|
|
334
|
-
getRenderAssembly,
|
|
335
297
|
setDesign
|
|
336
298
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function getDraggableDiv(slots: Array<ControlDesign>, assembly: ControlDesign, params: ObjAny, callback: Function, key?: string):
|
|
1
|
+
export declare function getDraggableDiv(slots: Array<ControlDesign>, assembly: ControlDesign, params: ObjAny, callback: Function, key?: string): globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}>;
|
|
4
4
|
export declare function getGridDiv(obj: ControlDesign, config: ObjAny, params: ObjAny, temps: Array<TempsObject>): {
|
package/dist/effect/effect.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function createEffect(obj: DesignCompon, imports?: ObjAny, components?: {}): import('vue').DefineComponent<{}, () => string |
|
|
1
|
+
export declare function createEffect(obj: DesignCompon, imports?: ObjAny, components?: {}): import('vue').DefineComponent<{}, () => string | globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, string[], string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
4
4
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// expand/config.ts
|
|
2
|
-
var components = ["grid-layout", "grid-item", "
|
|
2
|
+
var components = ["grid-layout", "grid-item", "position", "container"];
|
|
3
3
|
var sideEffects = ["grid-item", "grid-layout"];
|
|
4
4
|
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkDSW4WFHOcjs = require('./chunk-DSW4WFHO.cjs');
|
|
5
5
|
|
|
6
6
|
// node_modules/.pnpm/@fangzhongya+utils@0.0.78/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
|
|
7
7
|
function humpToLine(name) {
|
|
@@ -55,10 +55,10 @@ function namefilter(c, name) {
|
|
|
55
55
|
function getFrom(mc) {
|
|
56
56
|
const p = config.prefix ? config.prefix + "-" : "";
|
|
57
57
|
const filename = p ? mc.replace(new RegExp("^" + p), "") : mc;
|
|
58
|
-
if (
|
|
58
|
+
if (_chunkDSW4WFHOcjs.components.includes(filename)) {
|
|
59
59
|
const from = `${config.name}/assemblys/${filename}`;
|
|
60
60
|
let css;
|
|
61
|
-
if (
|
|
61
|
+
if (_chunkDSW4WFHOcjs.sideEffects.includes(filename)) {
|
|
62
62
|
css = `${config.name}/assemblys/${filename}.css`;
|
|
63
63
|
}
|
|
64
64
|
return {
|
package/dist/expand/config.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkDSW4WFHOcjs = require('./chunk-DSW4WFHO.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.components =
|
|
8
|
+
exports.components = _chunkDSW4WFHOcjs.components; exports.sideEffects = _chunkDSW4WFHOcjs.sideEffects;
|
package/dist/expand/config.js
CHANGED
package/dist/render/common.cjs
CHANGED
|
@@ -201,7 +201,7 @@ function getCompon(obj, config$1, params, temps) {
|
|
|
201
201
|
]);
|
|
202
202
|
} else {
|
|
203
203
|
return vue.h(vue.Fragment, null, [
|
|
204
|
-
arr
|
|
204
|
+
arr?.map((item, index) => {
|
|
205
205
|
const vfors = [
|
|
206
206
|
{
|
|
207
207
|
value: item,
|
|
@@ -264,7 +264,7 @@ function getData(obj, params = {}, temps, config$1 = {}) {
|
|
|
264
264
|
config.getProps(obj, config$1, params, temps);
|
|
265
265
|
config.getEmits(obj, config$1, params, temps);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function getRenderDom(obj, params = {}, temps, getSlots2, setCompon) {
|
|
268
268
|
if (obj) {
|
|
269
269
|
const config2 = {};
|
|
270
270
|
getData(obj, params, temps, config2);
|
|
@@ -280,7 +280,7 @@ function assemblyGetRender(obj, params = {}, temps, getSlots2, setCompon) {
|
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
function getRender(obj, params = {}, temps) {
|
|
283
|
-
return
|
|
283
|
+
return getRenderDom(
|
|
284
284
|
obj,
|
|
285
285
|
params,
|
|
286
286
|
temps,
|
|
@@ -310,9 +310,9 @@ function getRender(obj, params = {}, temps) {
|
|
|
310
310
|
}
|
|
311
311
|
);
|
|
312
312
|
}
|
|
313
|
-
exports.assemblyGetRender = assemblyGetRender;
|
|
314
313
|
exports.getData = getData;
|
|
315
314
|
exports.getRender = getRender;
|
|
315
|
+
exports.getRenderDom = getRenderDom;
|
|
316
316
|
exports.getSlots = getSlots;
|
|
317
317
|
exports.getSlotsArray = getSlotsArray;
|
|
318
318
|
exports.getSlotsDom = getSlotsDom;
|
package/dist/render/common.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare function getData(obj: ControlRender, params: ObjAny | undefined,
|
|
|
24
24
|
* @param obj 数据对象
|
|
25
25
|
* @returns
|
|
26
26
|
*/
|
|
27
|
-
export declare function
|
|
27
|
+
export declare function getRenderDom(obj: ControlRender, params: ObjAny | undefined, temps: Array<TempsObject>, getSlots: Function, setCompon: Function): VNode | string;
|
|
28
28
|
/**
|
|
29
29
|
* 生成 VNode 数据
|
|
30
30
|
* @param obj 数据对象
|
package/dist/render/common.js
CHANGED
|
@@ -199,7 +199,7 @@ function getCompon(obj, config, params, temps) {
|
|
|
199
199
|
]);
|
|
200
200
|
} else {
|
|
201
201
|
return h(Fragment, null, [
|
|
202
|
-
arr
|
|
202
|
+
arr?.map((item, index) => {
|
|
203
203
|
const vfors = [
|
|
204
204
|
{
|
|
205
205
|
value: item,
|
|
@@ -262,7 +262,7 @@ function getData(obj, params = {}, temps, config = {}) {
|
|
|
262
262
|
getProps(obj, config, params, temps);
|
|
263
263
|
getEmits(obj, config, params, temps);
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function getRenderDom(obj, params = {}, temps, getSlots2, setCompon) {
|
|
266
266
|
if (obj) {
|
|
267
267
|
const config = {};
|
|
268
268
|
getData(obj, params, temps, config);
|
|
@@ -278,7 +278,7 @@ function assemblyGetRender(obj, params = {}, temps, getSlots2, setCompon) {
|
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
function getRender(obj, params = {}, temps) {
|
|
281
|
-
return
|
|
281
|
+
return getRenderDom(
|
|
282
282
|
obj,
|
|
283
283
|
params,
|
|
284
284
|
temps,
|
|
@@ -309,9 +309,9 @@ function getRender(obj, params = {}, temps) {
|
|
|
309
309
|
);
|
|
310
310
|
}
|
|
311
311
|
export {
|
|
312
|
-
assemblyGetRender,
|
|
313
312
|
getData,
|
|
314
313
|
getRender,
|
|
314
|
+
getRenderDom,
|
|
315
315
|
getSlots,
|
|
316
316
|
getSlotsArray,
|
|
317
317
|
getSlotsDom,
|
package/dist/render/config.cjs
CHANGED
package/dist/render/config.js
CHANGED
package/dist/render/render.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
2
|
export declare function createRender(obj: RenderCompon, imports?: ObjAny, callback?: (id: string) => RenderCompon | string, components?: {
|
|
3
3
|
[key: string]: Component;
|
|
4
|
-
}): import('vue').DefineComponent<{}, () =>
|
|
4
|
+
}): import('vue').DefineComponent<{}, () => globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, string[], string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
7
7
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
package/dist/viewer/design.cjs
CHANGED
package/dist/viewer/design.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
|
-
import { getSlotsDom, getTempsArr, useGetCompon,
|
|
2
|
+
import { getSlotsDom, getTempsArr, useGetCompon, getRenderDom } from "../render/common.js";
|
|
3
3
|
import { getDraggableDiv } from "./draggable.js";
|
|
4
4
|
function setCons(config, drag, obj) {
|
|
5
5
|
let c = config.class || "";
|
|
@@ -42,7 +42,7 @@ function setCompon(cons) {
|
|
|
42
42
|
function setDesign(obj, params = {}, temps, cons = {}) {
|
|
43
43
|
if (!obj.design?.hide) {
|
|
44
44
|
obj.temps = [...temps];
|
|
45
|
-
return
|
|
45
|
+
return getRenderDom(
|
|
46
46
|
obj,
|
|
47
47
|
params,
|
|
48
48
|
temps,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function getDraggableDiv(slots: Array<ControlDesign>, assembly: ControlDesign, params: ObjAny, callback: Function, key?: string):
|
|
1
|
+
export declare function getDraggableDiv(slots: Array<ControlDesign>, assembly: ControlDesign, params: ObjAny, callback: Function, key?: string): globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}>;
|
package/dist/viewer/viewer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function createViewer(obj: DesignCompon, imports?: ObjAny, components?: {}): import('vue').DefineComponent<{}, () => string |
|
|
1
|
+
export declare function createViewer(obj: DesignCompon, imports?: ObjAny, components?: {}): import('vue').DefineComponent<{}, () => string | globalThis.VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, string[], string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
4
4
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.gener {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
}
|
|
7
|
-
.gener .code {
|
|
8
|
-
flex: 1;
|
|
9
|
-
width: 100%;
|
|
10
|
-
}
|
|
11
|
-
.gener .code .el-textarea {
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
}
|
|
15
|
-
.gener .code .el-textarea textarea {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
}
|