asiaint-lowcode 3.1.98 → 3.1.99
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/README.md +31 -31
- package/dist/asiaint-lowcode.js +5 -5
- package/dist/asiaint-lowcode.umd.cjs +197 -197
- package/dist/index.d.ts +6 -4
- package/dist/lazy/{Card-Dyp8FQTp.js → Card-Bf2pIiZ-.js} +23 -23
- package/dist/lazy/{Cascader-DuWSx-__.js → Cascader-CNpEA7JH.js} +1 -1
- package/dist/lazy/{Checkbox-BzqmvYX4.js → Checkbox-BjqGDG_N.js} +2 -2
- package/dist/lazy/{Collapse-eIEqgaVy.js → Collapse-C52VpZgN.js} +1 -1
- package/dist/lazy/{Component-CRa7cELh.js → Component-CqI8EE2i.js} +1 -1
- package/dist/lazy/{Component-D0YArJ9Z.js → Component-CspcfO_L.js} +1 -1
- package/dist/lazy/{Component-QolkfjWc.js → Component-HmnH9MZg.js} +2 -2
- package/dist/lazy/{Component-r3DCzDzZ.js → Component-P1MUkkoC.js} +2 -2
- package/dist/lazy/{Component-DKk2Djmi.js → Component-zq7f1nLx.js} +2 -2
- package/dist/lazy/{CurdCard-DWx31uFo.js → CurdCard-DRuhrvQg.js} +2 -2
- package/dist/lazy/Custom-DqOW-xRf.js +26 -0
- package/dist/lazy/{DatePicker-ulDSN83q.js → DatePicker-CEApEC0s.js} +1 -1
- package/dist/lazy/DragList-D4d3otNY.js +914 -0
- package/dist/lazy/{FilterSearch-BcHjHbVW.js → FilterSearch-CYw788Cl.js} +2 -2
- package/dist/lazy/{FloatCurd-SWZ6i5OE.js → FloatCurd-CK4W--CY.js} +9 -9
- package/dist/lazy/{FormList-B1_Pfb_1.js → FormList-2JmfN9g6.js} +1 -1
- package/dist/lazy/{Grid-CnRmOyDl.js → Grid-CoV7M_1T.js} +1 -1
- package/dist/lazy/{InfiniteScroll-5i4KeyAW.js → InfiniteScroll-B7MLjRI_.js} +4 -4
- package/dist/lazy/{Inline-CCNQ_4BH.js → Inline-BvGLAP2h.js} +3 -3
- package/dist/lazy/{JsonEdit-NnFr-Cqn.js → JsonEdit-BAZeuRP5.js} +3 -3
- package/dist/lazy/{LogList-BSqSCZ0m.js → LogList-ddUbfnGI.js} +7 -7
- package/dist/lazy/{ObjGroup-BzgoWAnO.js → ObjGroup-D9Gvffbf.js} +1 -1
- package/dist/lazy/{OfferDetails-abmV3AI6.js → OfferDetails-BCr4ziHT.js} +11 -11
- package/dist/lazy/{Pagination-Dcq_Cfmq.js → Pagination-B744gFwk.js} +4 -4
- package/dist/lazy/{Progress-3JVja4cs.js → Progress-RXJZ-8kZ.js} +15 -15
- package/dist/lazy/{Radio-C4RpRsUu.js → Radio-DVTSurd0.js} +3 -3
- package/dist/lazy/{SearchSelect-DryoVIAP.js → SearchSelect-BEsx6JYh.js} +6 -6
- package/dist/lazy/{Select-Des_9BEX.js → Select-BR6R5ebl.js} +2 -2
- package/dist/lazy/{Table-AYMi4kNI.js → Table-C71Pmseo.js} +39 -39
- package/dist/lazy/{Tabs-BiBrav4A.js → Tabs-AS1ALwyu.js} +2 -2
- package/dist/lazy/{TextArea-DpiCN9FH.js → TextArea-CCzXmd5Y.js} +3 -3
- package/dist/lazy/{Wrapper-tmP-CbqH.js → Wrapper-B8s_etaa.js} +2 -2
- package/dist/lazy/{index-ClavMxt3.js → index-CF_LxvPR.js} +7626 -7198
- package/dist/lazy/{useSelect-BKxUX8p7.js → useSelect-B4xF1xtz.js} +1 -1
- package/dist/style.css +2 -2
- package/global.d.ts +10 -10
- package/package.json +36 -36
- package/dist/lazy/Custom-DhXKvs15.js +0 -26
- package/dist/lazy/DragList-DS48P6U5.js +0 -332
package/global.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
declare module 'vue' {
|
|
2
|
-
export interface GlobalComponents {
|
|
3
|
-
FormRender: (typeof import('asiaint-lowcode'))['FormRender']
|
|
4
|
-
FormDesign: (typeof import('asiaint-lowcode'))['FormDesign']
|
|
5
|
-
TableRender: (typeof import('asiaint-lowcode'))['TableRender']
|
|
6
|
-
PageRender: (typeof import('asiaint-lowcode'))['PageRender']
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export {}
|
|
1
|
+
declare module 'vue' {
|
|
2
|
+
export interface GlobalComponents {
|
|
3
|
+
FormRender: (typeof import('asiaint-lowcode'))['FormRender']
|
|
4
|
+
FormDesign: (typeof import('asiaint-lowcode'))['FormDesign']
|
|
5
|
+
TableRender: (typeof import('asiaint-lowcode'))['TableRender']
|
|
6
|
+
PageRender: (typeof import('asiaint-lowcode'))['PageRender']
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export {}
|
package/package.json
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "asiaint-lowcode",
|
|
3
|
-
"version": "3.1.
|
|
4
|
-
"private": false,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "vite build",
|
|
8
|
-
"v": "npm version patch",
|
|
9
|
-
"release": "vite build && npm publish"
|
|
10
|
-
},
|
|
11
|
-
"peerDependencies": {
|
|
12
|
-
"vue": "^3.2.0",
|
|
13
|
-
"element-plus": "^2.6.0"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"element-plus": "^2.8.3",
|
|
17
|
-
"vue": "^3.5.8"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"vite-plugin-dts": "^3.7.3",
|
|
21
|
-
"vite-plugin-libcss": "^1.1.1"
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"dist",
|
|
25
|
-
"global.d.ts"
|
|
26
|
-
],
|
|
27
|
-
"main": "./dist/asiaint-lowcode.js",
|
|
28
|
-
"module": "./dist/asiaint-lowcode.js",
|
|
29
|
-
"types": "dist/index.d.ts",
|
|
30
|
-
"keywords": [
|
|
31
|
-
"component",
|
|
32
|
-
"vue",
|
|
33
|
-
"form",
|
|
34
|
-
"element-ui"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "asiaint-lowcode",
|
|
3
|
+
"version": "3.1.99",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "vite build",
|
|
8
|
+
"v": "npm version patch",
|
|
9
|
+
"release": "vite build && npm publish"
|
|
10
|
+
},
|
|
11
|
+
"peerDependencies": {
|
|
12
|
+
"vue": "^3.2.0",
|
|
13
|
+
"element-plus": "^2.6.0"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"element-plus": "^2.8.3",
|
|
17
|
+
"vue": "^3.5.8"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"vite-plugin-dts": "^3.7.3",
|
|
21
|
+
"vite-plugin-libcss": "^1.1.1"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"global.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"main": "./dist/asiaint-lowcode.js",
|
|
28
|
+
"module": "./dist/asiaint-lowcode.js",
|
|
29
|
+
"types": "dist/index.d.ts",
|
|
30
|
+
"keywords": [
|
|
31
|
+
"component",
|
|
32
|
+
"vue",
|
|
33
|
+
"form",
|
|
34
|
+
"element-ui"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { defineComponent as n, mergeModels as s, useModel as p, openBlock as t, createElementBlock as r, createBlock as u, resolveDynamicComponent as d, mergeProps as c } from "vue";
|
|
2
|
-
import { _ as i } from "./index-ClavMxt3.js";
|
|
3
|
-
const f = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "empty"
|
|
6
|
-
}, _ = /* @__PURE__ */ n({
|
|
7
|
-
__name: "Custom",
|
|
8
|
-
props: /* @__PURE__ */ s({
|
|
9
|
-
componentName: {}
|
|
10
|
-
}, {
|
|
11
|
-
modelValue: {},
|
|
12
|
-
modelModifiers: {}
|
|
13
|
-
}),
|
|
14
|
-
emits: ["update:modelValue"],
|
|
15
|
-
setup(a) {
|
|
16
|
-
const o = p(a, "modelValue");
|
|
17
|
-
return (e, m) => e.componentName ? (t(), u(d(e.componentName), c({
|
|
18
|
-
key: 1,
|
|
19
|
-
modelValue: o.value,
|
|
20
|
-
"onUpdate:modelValue": m[0] || (m[0] = (l) => o.value = l)
|
|
21
|
-
}, e.$attrs), null, 16, ["modelValue"])) : (t(), r("span", f, "请输入全局注册得组件名"));
|
|
22
|
-
}
|
|
23
|
-
}), v = /* @__PURE__ */ i(_, [["__scopeId", "data-v-a013b8cf"]]);
|
|
24
|
-
export {
|
|
25
|
-
v as default
|
|
26
|
-
};
|
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
import { defineComponent as J, reactive as F, ref as T, onBeforeMount as le, onMounted as ie, nextTick as h, onBeforeUnmount as re, watch as c, provide as j, toRefs as q, openBlock as R, createElementBlock as A, normalizeStyle as ne, renderSlot as O, Fragment as se, renderList as ue, createBlock as K, mergeProps as de, withCtx as Q, withDirectives as ce, createVNode as Z, vShow as me, mergeModels as ge, useModel as pe, onUnmounted as ye, unref as X, readonly as Y } from "vue";
|
|
2
|
-
import { w as ve, m as fe, n as he, o as k, T as we, v as xe, p as C, A as be, q as G, x as Be, L as ke, y as Ce, r as De, Y as Le, s as Me, t as P, V as Se, c as ze, j as Re, b as Ie, _ as Ne } from "./index-ClavMxt3.js";
|
|
3
|
-
import "element-plus";
|
|
4
|
-
const $e = /* @__PURE__ */ J({
|
|
5
|
-
__name: "grid-layout",
|
|
6
|
-
props: {
|
|
7
|
-
autoSize: { type: Boolean, default: !0 },
|
|
8
|
-
colNum: { default: 12 },
|
|
9
|
-
rowHeight: { default: 150 },
|
|
10
|
-
maxRows: { default: 1 / 0 },
|
|
11
|
-
margin: { default: () => [10, 10] },
|
|
12
|
-
isDraggable: { type: Boolean, default: !0 },
|
|
13
|
-
isResizable: { type: Boolean, default: !0 },
|
|
14
|
-
isMirrored: { type: Boolean, default: !1 },
|
|
15
|
-
isBounded: { type: Boolean, default: !1 },
|
|
16
|
-
useCssTransforms: { type: Boolean, default: !0 },
|
|
17
|
-
verticalCompact: { type: Boolean, default: !0 },
|
|
18
|
-
restoreOnDrag: { type: Boolean, default: !1 },
|
|
19
|
-
layout: {},
|
|
20
|
-
responsive: { type: Boolean, default: !1 },
|
|
21
|
-
responsiveLayouts: { default: () => ({}) },
|
|
22
|
-
transformScale: { default: 1 },
|
|
23
|
-
breakpoints: { default: () => ({ lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 }) },
|
|
24
|
-
cols: { default: () => ({ lg: 12, md: 10, sm: 6, xs: 4, xxs: 2 }) },
|
|
25
|
-
preventCollision: { type: Boolean, default: !1 },
|
|
26
|
-
useStyleCursor: { type: Boolean, default: !0 }
|
|
27
|
-
},
|
|
28
|
-
emits: [
|
|
29
|
-
"layout-before-mount",
|
|
30
|
-
"layout-mounted",
|
|
31
|
-
"layout-updated",
|
|
32
|
-
"breakpoint-changed",
|
|
33
|
-
"update:layout",
|
|
34
|
-
"layout-ready"
|
|
35
|
-
],
|
|
36
|
-
setup(D, { expose: I, emit: w }) {
|
|
37
|
-
const a = D, d = w, t = F({
|
|
38
|
-
width: -1,
|
|
39
|
-
mergedStyle: {},
|
|
40
|
-
lastLayoutLength: 0,
|
|
41
|
-
isDragging: !1,
|
|
42
|
-
placeholder: {
|
|
43
|
-
x: 0,
|
|
44
|
-
y: 0,
|
|
45
|
-
w: 0,
|
|
46
|
-
h: 0,
|
|
47
|
-
i: ""
|
|
48
|
-
},
|
|
49
|
-
layouts: {},
|
|
50
|
-
// array to store all layouts from different breakpoints
|
|
51
|
-
lastBreakpoint: null,
|
|
52
|
-
// store last active breakpoint
|
|
53
|
-
originalLayout: null
|
|
54
|
-
// store original Layout
|
|
55
|
-
}), L = /* @__PURE__ */ new Map(), o = T(a.layout), m = T(), { observeResize: M, unobserveResize: N } = ve(), i = Se();
|
|
56
|
-
i.on("resizeEvent", s), i.on("dragEvent", u), le(() => {
|
|
57
|
-
d("layout-before-mount", o.value);
|
|
58
|
-
}), ie(() => {
|
|
59
|
-
d("layout-mounted", o.value), h(() => {
|
|
60
|
-
fe(o.value), t.originalLayout = o.value, h(() => {
|
|
61
|
-
W(), m.value && M(m.value, he(E, 16)), k(o.value, a.verticalCompact), d("layout-updated", o.value), x(), E();
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
}), re(() => {
|
|
65
|
-
i.clearAll(), m.value && N(m.value);
|
|
66
|
-
});
|
|
67
|
-
function s(e, n, r, v, g, p) {
|
|
68
|
-
V(e, n, r, v, g, p);
|
|
69
|
-
}
|
|
70
|
-
function u(e, n, r, v, g, p) {
|
|
71
|
-
U(e, n, r, v, g, p);
|
|
72
|
-
}
|
|
73
|
-
c(
|
|
74
|
-
() => t.width,
|
|
75
|
-
(e, n) => {
|
|
76
|
-
h(() => {
|
|
77
|
-
i.emit("updateWidth", e), n === -1 && h(() => {
|
|
78
|
-
d("layout-ready", o.value);
|
|
79
|
-
}), x();
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
), c(
|
|
83
|
-
() => [a.layout, a.layout.length],
|
|
84
|
-
() => {
|
|
85
|
-
o.value = a.layout, H();
|
|
86
|
-
}
|
|
87
|
-
), c(
|
|
88
|
-
() => a.colNum,
|
|
89
|
-
(e) => {
|
|
90
|
-
i.emit("setColNum", e);
|
|
91
|
-
}
|
|
92
|
-
), c(
|
|
93
|
-
() => a.rowHeight,
|
|
94
|
-
(e) => {
|
|
95
|
-
i.emit("setRowHeight", e);
|
|
96
|
-
}
|
|
97
|
-
), c(
|
|
98
|
-
() => a.isDraggable,
|
|
99
|
-
(e) => {
|
|
100
|
-
i.emit("setDraggable", e);
|
|
101
|
-
}
|
|
102
|
-
), c(
|
|
103
|
-
() => a.isResizable,
|
|
104
|
-
(e) => {
|
|
105
|
-
i.emit("setResizable", e);
|
|
106
|
-
}
|
|
107
|
-
), c(
|
|
108
|
-
() => a.isBounded,
|
|
109
|
-
(e) => {
|
|
110
|
-
i.emit("setBounded", e);
|
|
111
|
-
}
|
|
112
|
-
), c(
|
|
113
|
-
() => a.transformScale,
|
|
114
|
-
(e) => {
|
|
115
|
-
i.emit("setTransformScale", e);
|
|
116
|
-
}
|
|
117
|
-
), c(
|
|
118
|
-
() => a.responsive,
|
|
119
|
-
(e) => {
|
|
120
|
-
e || (d("update:layout", t.originalLayout), i.emit("setColNum", a.colNum)), E();
|
|
121
|
-
}
|
|
122
|
-
), c(
|
|
123
|
-
() => a.maxRows,
|
|
124
|
-
(e) => {
|
|
125
|
-
i.emit("setMaxRows", e);
|
|
126
|
-
}
|
|
127
|
-
), c([() => a.margin, () => a.margin[1]], x), j(
|
|
128
|
-
we,
|
|
129
|
-
F({
|
|
130
|
-
...q(a),
|
|
131
|
-
...q(t),
|
|
132
|
-
increaseItem: y,
|
|
133
|
-
decreaseItem: $
|
|
134
|
-
})
|
|
135
|
-
), j(xe, i), I({ state: t, getItem: ee, resizeEvent: V, dragEvent: U, layoutUpdate: H });
|
|
136
|
-
function y(e) {
|
|
137
|
-
L.set(e.i, e);
|
|
138
|
-
}
|
|
139
|
-
function $(e) {
|
|
140
|
-
L.delete(e.i);
|
|
141
|
-
}
|
|
142
|
-
function ee(e) {
|
|
143
|
-
return L.get(e);
|
|
144
|
-
}
|
|
145
|
-
function H() {
|
|
146
|
-
if (!C(o.value) && !C(t.originalLayout)) {
|
|
147
|
-
if (o.value.length !== t.originalLayout.length) {
|
|
148
|
-
const e = oe(o.value, t.originalLayout);
|
|
149
|
-
if (e.length > 0)
|
|
150
|
-
if (o.value.length > t.originalLayout.length)
|
|
151
|
-
t.originalLayout = t.originalLayout.concat(e);
|
|
152
|
-
else {
|
|
153
|
-
const n = new Set(e.map((r) => r.i));
|
|
154
|
-
t.originalLayout = t.originalLayout.filter((r) => !n.has(r.i));
|
|
155
|
-
}
|
|
156
|
-
t.lastLayoutLength = o.value.length, W();
|
|
157
|
-
}
|
|
158
|
-
k(o.value, a.verticalCompact), i.emit("updateWidth", t.width), x(), d("layout-updated", o.value);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
function x() {
|
|
162
|
-
t.mergedStyle = {
|
|
163
|
-
height: te()
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
function E() {
|
|
167
|
-
m.value && (t.width = m.value.offsetWidth), i.emit("resizeEvent");
|
|
168
|
-
}
|
|
169
|
-
function te() {
|
|
170
|
-
if (!a.autoSize) return;
|
|
171
|
-
const e = parseFloat(a.margin[1]);
|
|
172
|
-
return be(o.value) * (a.rowHeight + e) + e + "px";
|
|
173
|
-
}
|
|
174
|
-
let _;
|
|
175
|
-
function U(e, n, r, v, g, p) {
|
|
176
|
-
let l = G(o.value, n);
|
|
177
|
-
C(l) && (l = { h: 0, w: 0, x: 0, y: 0, i: "" }), e === "dragstart" && !a.verticalCompact && (_ = o.value.reduce(
|
|
178
|
-
(B, { i: S, x: f, y: b }) => ({
|
|
179
|
-
...B,
|
|
180
|
-
[S]: { x: f, y: b }
|
|
181
|
-
}),
|
|
182
|
-
{}
|
|
183
|
-
)), e === "dragmove" || e === "dragstart" ? (t.placeholder.i = n, t.placeholder.x = l.x, t.placeholder.y = l.y, t.placeholder.w = p, t.placeholder.h = g, h(() => {
|
|
184
|
-
t.isDragging = !0;
|
|
185
|
-
}), i.emit("updateWidth", t.width)) : h(() => {
|
|
186
|
-
t.isDragging = !1;
|
|
187
|
-
}), o.value = Be(o.value, l, r, v, !0, a.preventCollision), a.restoreOnDrag ? (l.static = !0, k(o.value, a.verticalCompact, _), l.static = !1) : k(o.value, a.verticalCompact), i.emit("compact"), x(), e === "dragend" && (_ = void 0, d("layout-updated", o.value));
|
|
188
|
-
}
|
|
189
|
-
function V(e, n, r, v, g, p) {
|
|
190
|
-
let l = G(o.value, n);
|
|
191
|
-
C(l) && (l = { h: 0, w: 0, x: 0, y: 0, i: "" });
|
|
192
|
-
let B;
|
|
193
|
-
if (a.preventCollision) {
|
|
194
|
-
const S = ke(o.value, { ...l, w: p, h: g }).filter(
|
|
195
|
-
(f) => f.i !== l.i
|
|
196
|
-
);
|
|
197
|
-
if (B = S.length > 0, B) {
|
|
198
|
-
let f = 1 / 0, b = 1 / 0;
|
|
199
|
-
S.forEach((z) => {
|
|
200
|
-
z.x > l.x && (f = Math.min(f, z.x)), z.y > l.y && (b = Math.min(b, z.y));
|
|
201
|
-
}), Number.isFinite(f) && (l.w = f - l.x), Number.isFinite(b) && (l.h = b - l.y);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
B || (l.w = p, l.h = g), e === "resizestart" || e === "resizemove" ? (t.placeholder.i = n, t.placeholder.x = r, t.placeholder.y = v, t.placeholder.w = l.w, t.placeholder.h = l.h, h(() => {
|
|
205
|
-
t.isDragging = !0;
|
|
206
|
-
}), i.emit("updateWidth", t.width)) : e && h(() => {
|
|
207
|
-
t.isDragging = !1;
|
|
208
|
-
}), a.responsive && ae(), k(o.value, a.verticalCompact), i.emit("compact"), x(), e === "resizeend" && d("layout-updated", o.value);
|
|
209
|
-
}
|
|
210
|
-
function ae() {
|
|
211
|
-
const e = Ce(a.breakpoints, t.width);
|
|
212
|
-
if (e === t.lastBreakpoint)
|
|
213
|
-
return;
|
|
214
|
-
const n = De(e, a.cols);
|
|
215
|
-
!C(t.lastBreakpoint) && !t.layouts[t.lastBreakpoint] && (t.layouts[t.lastBreakpoint] = Le(o.value));
|
|
216
|
-
const r = Me(
|
|
217
|
-
t.originalLayout,
|
|
218
|
-
t.layouts,
|
|
219
|
-
a.breakpoints,
|
|
220
|
-
e,
|
|
221
|
-
t.lastBreakpoint,
|
|
222
|
-
n,
|
|
223
|
-
a.verticalCompact
|
|
224
|
-
);
|
|
225
|
-
t.layouts[e] = r, t.lastBreakpoint !== e && d("breakpoint-changed", e, r), o.value = r, d("update:layout", r), t.lastBreakpoint = e, i.emit("setColNum", n);
|
|
226
|
-
}
|
|
227
|
-
function W() {
|
|
228
|
-
t.layouts = Object.assign({}, a.responsiveLayouts);
|
|
229
|
-
}
|
|
230
|
-
function oe(e, n) {
|
|
231
|
-
const r = new Set(n.map((l) => l.i)), v = new Set(e.map((l) => l.i)), g = e.filter((l) => !r.has(l.i)), p = n.filter((l) => !v.has(l.i));
|
|
232
|
-
return g.concat(p);
|
|
233
|
-
}
|
|
234
|
-
return (e, n) => (R(), A("div", {
|
|
235
|
-
ref_key: "wrapper",
|
|
236
|
-
ref: m,
|
|
237
|
-
class: "vgl-layout",
|
|
238
|
-
style: ne(t.mergedStyle)
|
|
239
|
-
}, [
|
|
240
|
-
e.$slots.default ? O(e.$slots, "default", { key: 0 }) : (R(!0), A(se, { key: 1 }, ue(o.value, (r) => (R(), K(P, de({
|
|
241
|
-
key: r.i,
|
|
242
|
-
ref_for: !0
|
|
243
|
-
}, r), {
|
|
244
|
-
default: Q(() => [
|
|
245
|
-
O(e.$slots, "item", { item: r })
|
|
246
|
-
]),
|
|
247
|
-
_: 2
|
|
248
|
-
}, 1040))), 128)),
|
|
249
|
-
ce(Z(P, {
|
|
250
|
-
class: "vgl-item--placeholder",
|
|
251
|
-
x: t.placeholder.x,
|
|
252
|
-
y: t.placeholder.y,
|
|
253
|
-
w: t.placeholder.w,
|
|
254
|
-
h: t.placeholder.h,
|
|
255
|
-
i: t.placeholder.i
|
|
256
|
-
}, null, 8, ["x", "y", "w", "h", "i"]), [
|
|
257
|
-
[me, t.isDragging]
|
|
258
|
-
])
|
|
259
|
-
], 4));
|
|
260
|
-
}
|
|
261
|
-
}), Ee = /* @__PURE__ */ J({
|
|
262
|
-
__name: "DragList",
|
|
263
|
-
props: /* @__PURE__ */ ge({
|
|
264
|
-
children: {},
|
|
265
|
-
rowHeight: {},
|
|
266
|
-
colNum: {},
|
|
267
|
-
maxRows: {},
|
|
268
|
-
isDraggable: { type: Boolean },
|
|
269
|
-
name: {},
|
|
270
|
-
onMoved: {}
|
|
271
|
-
}, {
|
|
272
|
-
gridlayout: { required: !0 },
|
|
273
|
-
gridlayoutModifiers: {}
|
|
274
|
-
}),
|
|
275
|
-
emits: ["update:gridlayout"],
|
|
276
|
-
setup(D, { expose: I }) {
|
|
277
|
-
const w = D, a = pe(D, "gridlayout"), m = {
|
|
278
|
-
getLayout: () => Y(a),
|
|
279
|
-
setItemX: (s, u) => {
|
|
280
|
-
a.value[s].x = u;
|
|
281
|
-
},
|
|
282
|
-
setItemY: (s, u) => {
|
|
283
|
-
a.value[s].y = u;
|
|
284
|
-
},
|
|
285
|
-
setItemVisible: (s, u) => {
|
|
286
|
-
const y = a.value.find(($) => $.i === s);
|
|
287
|
-
y && (y.h = u ? y.contentHeight || 1 : 0);
|
|
288
|
-
},
|
|
289
|
-
type: "draglist"
|
|
290
|
-
}, { ruleModule: M, pageMethodMap: N } = ze(), i = () => {
|
|
291
|
-
if (w.onMoved && M)
|
|
292
|
-
try {
|
|
293
|
-
M[w.onMoved](N, Y(a.value));
|
|
294
|
-
} catch (s) {
|
|
295
|
-
console.error(s + `
|
|
296
|
-
onMoved: ${w.onMoved}`);
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
if (I(m), w.name) {
|
|
300
|
-
const s = Re(w.name, m);
|
|
301
|
-
ye(() => {
|
|
302
|
-
s();
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
return (s, u) => (R(), K(X($e), {
|
|
306
|
-
layout: a.value,
|
|
307
|
-
"onUpdate:layout": u[1] || (u[1] = (y) => a.value = y),
|
|
308
|
-
"col-num": s.colNum || 12,
|
|
309
|
-
"row-height": s.rowHeight || 30,
|
|
310
|
-
"max-rows": s.maxRows,
|
|
311
|
-
margin: [8, 8],
|
|
312
|
-
"is-draggable": s.isDraggable,
|
|
313
|
-
"is-bounded": "",
|
|
314
|
-
"is-resizable": !1,
|
|
315
|
-
"vertical-compact": "",
|
|
316
|
-
"use-css-transforms": ""
|
|
317
|
-
}, {
|
|
318
|
-
default: Q(() => [
|
|
319
|
-
Z(X(Ie), {
|
|
320
|
-
list: s.children,
|
|
321
|
-
gridData: a.value,
|
|
322
|
-
"onUpdate:gridData": u[0] || (u[0] = (y) => a.value = y),
|
|
323
|
-
onGridItemMoved: i
|
|
324
|
-
}, null, 8, ["list", "gridData"])
|
|
325
|
-
]),
|
|
326
|
-
_: 1
|
|
327
|
-
}, 8, ["layout", "col-num", "row-height", "max-rows", "is-draggable"]));
|
|
328
|
-
}
|
|
329
|
-
}), Ve = /* @__PURE__ */ Ne(Ee, [["__scopeId", "data-v-f58dab66"]]);
|
|
330
|
-
export {
|
|
331
|
-
Ve as default
|
|
332
|
-
};
|