@fangzhongya/page 0.0.29 → 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/design/design-drag2.cjs +0 -3
- package/dist/components/design/design-drag2.js +1 -4
- package/dist/components/design/design-resizable2.cjs +3 -2
- package/dist/components/design/design-resizable2.js +5 -4
- package/dist/components/design/resizable.cjs +1 -4
- package/dist/components/design/resizable.js +1 -4
- package/dist/components/design/resizable2.cjs +2 -2
- package/dist/components/design/resizable2.js +2 -2
- package/dist/components/editor/view2.cjs +40 -27
- package/dist/components/editor/view2.js +41 -28
- package/dist/components/generated/index2.cjs +27 -13
- package/dist/components/generated/index2.js +23 -9
- package/dist/components/index.css +157 -59
- package/dist/components/index2.cjs +66 -407
- package/dist/components/index2.js +55 -396
- 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/components/right/custom/index2.cjs +4 -2
- package/dist/components/right/custom/index2.js +5 -3
- package/dist/components/set/border.cjs +4 -0
- package/dist/components/set/border.js +4 -0
- package/dist/components/set/border2.cjs +76 -0
- package/dist/components/set/border2.js +76 -0
- package/dist/components/set/index.cjs +4 -0
- package/dist/components/set/index.js +4 -0
- package/dist/components/set/index2.cjs +199 -0
- package/dist/components/set/index2.js +199 -0
- package/dist/components/set/util.cjs +45 -0
- package/dist/components/set/util.d.ts +16 -0
- package/dist/components/set/util.js +45 -0
- package/dist/components/top/index.cjs +4 -0
- package/dist/components/top/index.js +4 -0
- package/dist/components/top/index2.cjs +414 -0
- package/dist/components/top/index2.js +414 -0
- 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.cjs +2 -2
- package/dist/effect/draggable.js +2 -2
- package/dist/expand/{chunk-ZJCFZ63F.cjs → chunk-DSW4WFHO.cjs} +1 -1
- package/dist/expand/{chunk-I2RMOBDW.js → chunk-JTAMOZ6S.js} +1 -1
- package/dist/expand/components.cjs +4 -4
- package/dist/expand/components.js +2 -2
- 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/viewer/design.cjs +1 -1
- package/dist/viewer/design.js +2 -2
- package/package.json +2 -2
- package/dist/components/design/resizable.css +0 -80
- package/dist/components/output/gener.css +0 -18
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/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,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fangzhongya/page",
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.31",
|
|
6
6
|
"description ": "个人组件设计",
|
|
7
7
|
"author": "fangzhongya ",
|
|
8
8
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@fangzhongya/create": "0.2.50",
|
|
27
27
|
"@fangzhongya/fang-ui": "0.1.79",
|
|
28
28
|
"@fangzhongya/icons": "0.0.51",
|
|
29
|
-
"@fangzhongya/utils": "0.0.
|
|
29
|
+
"@fangzhongya/utils": "0.0.78",
|
|
30
30
|
"@highlightjs/vue-plugin": "^2.1.0",
|
|
31
31
|
"@interactjs/interactjs": "1.10.27",
|
|
32
32
|
"@types/node": "25.0.10",
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/* 关键:移除所有position/left/top/width/height样式定义,由JS控制 */
|
|
3
|
-
.resizable[data-v-2f18084c] {
|
|
4
|
-
position: absolute; /* 仅保留position,其他由JS设置 */
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
touch-action: none;
|
|
7
|
-
}
|
|
8
|
-
.resizable.active[data-v-2f18084c] {
|
|
9
|
-
outline: 1px dashed #6fc0ff;
|
|
10
|
-
}
|
|
11
|
-
.resizable.dragging[data-v-2f18084c] {
|
|
12
|
-
opacity: 0.9;
|
|
13
|
-
cursor: move !important;
|
|
14
|
-
}
|
|
15
|
-
.resizable.resizing[data-v-2f18084c] {
|
|
16
|
-
opacity: 0.9;
|
|
17
|
-
}
|
|
18
|
-
.handle[data-v-2f18084c] {
|
|
19
|
-
position: absolute;
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
background-color: #6fc0ff;
|
|
22
|
-
border: 1px solid white;
|
|
23
|
-
border-radius: 50%;
|
|
24
|
-
width: 8px;
|
|
25
|
-
height: 8px;
|
|
26
|
-
z-index: 1000;
|
|
27
|
-
opacity: 0.7;
|
|
28
|
-
transition: opacity 0.2s;
|
|
29
|
-
}
|
|
30
|
-
.resizable.active .handle[data-v-2f18084c] {
|
|
31
|
-
opacity: 1;
|
|
32
|
-
}
|
|
33
|
-
.handle[data-v-2f18084c]:hover {
|
|
34
|
-
opacity: 1;
|
|
35
|
-
transform: scale(1.2);
|
|
36
|
-
}
|
|
37
|
-
.handle-tl[data-v-2f18084c] {
|
|
38
|
-
top: -6px;
|
|
39
|
-
left: -6px;
|
|
40
|
-
cursor: nwse-resize;
|
|
41
|
-
}
|
|
42
|
-
.handle-tm[data-v-2f18084c] {
|
|
43
|
-
top: -6px;
|
|
44
|
-
left: 50%;
|
|
45
|
-
margin-left: -6px;
|
|
46
|
-
cursor: ns-resize;
|
|
47
|
-
}
|
|
48
|
-
.handle-tr[data-v-2f18084c] {
|
|
49
|
-
top: -6px;
|
|
50
|
-
right: -6px;
|
|
51
|
-
cursor: nesw-resize;
|
|
52
|
-
}
|
|
53
|
-
.handle-mr[data-v-2f18084c] {
|
|
54
|
-
top: 50%;
|
|
55
|
-
right: -6px;
|
|
56
|
-
margin-top: -6px;
|
|
57
|
-
cursor: ew-resize;
|
|
58
|
-
}
|
|
59
|
-
.handle-br[data-v-2f18084c] {
|
|
60
|
-
bottom: -6px;
|
|
61
|
-
right: -6px;
|
|
62
|
-
cursor: nwse-resize;
|
|
63
|
-
}
|
|
64
|
-
.handle-bm[data-v-2f18084c] {
|
|
65
|
-
bottom: -6px;
|
|
66
|
-
left: 50%;
|
|
67
|
-
margin-left: -6px;
|
|
68
|
-
cursor: ns-resize;
|
|
69
|
-
}
|
|
70
|
-
.handle-bl[data-v-2f18084c] {
|
|
71
|
-
bottom: -6px;
|
|
72
|
-
left: -6px;
|
|
73
|
-
cursor: nesw-resize;
|
|
74
|
-
}
|
|
75
|
-
.handle-ml[data-v-2f18084c] {
|
|
76
|
-
top: 50%;
|
|
77
|
-
left: -6px;
|
|
78
|
-
margin-top: -6px;
|
|
79
|
-
cursor: ew-resize;
|
|
80
|
-
}
|
|
@@ -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
|
-
}
|