@shjjs/visual-ui 3.0.29 → 3.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/es/components/Media/components/Image/index.vue.mjs +2 -2
- package/es/components/Media/components/Image/index.vue2.mjs +12 -12
- package/es/components/Media/components/Image/version.mjs +11 -11
- package/es/components/Media/components/ImageDynamic/index.vue.mjs +2 -2
- package/es/components/Media/components/ImageDynamic/index.vue2.mjs +27 -27
- package/es/components/Media/components/ImageDynamic/version.mjs +12 -12
- package/es/components/Scene/components/Default/index.vue.mjs +2 -2
- package/es/components/Scene/components/Default/index.vue2.mjs +14 -14
- package/es/components/Scene/components/Default/version.mjs +24 -6
- package/es/packages/components/Media/components/Image/index.vue.d.ts +1 -0
- package/es/packages/components/Media/components/Image/types.d.ts +2 -2
- package/es/packages/components/Media/components/ImageDynamic/index.vue.d.ts +1 -0
- package/es/packages/components/Media/components/ImageDynamic/types.d.ts +2 -2
- package/es/packages/components/Scene/components/Default/index.vue.d.ts +1 -0
- package/es/packages/components/Scene/components/Default/types.d.ts +2 -0
- package/es/widgets.css +1 -1
- package/package.json +1 -1
- package/umd/index.js +2 -2
- package/umd/widgets.css +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4863bb72"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { upgradeImage as
|
|
3
|
-
const
|
|
4
|
-
...
|
|
1
|
+
import { defineComponent as t, computed as s, createElementBlock as n, openBlock as p, normalizeStyle as m } from "vue";
|
|
2
|
+
import { upgradeImage as u } from "./version.mjs";
|
|
3
|
+
const l = t({ name: "ShjImage" }), g = /* @__PURE__ */ t({
|
|
4
|
+
...l,
|
|
5
5
|
props: {
|
|
6
6
|
option: {}
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
const e =
|
|
10
|
-
return
|
|
8
|
+
setup(r, { expose: i }) {
|
|
9
|
+
const e = s(() => u(r.option)), a = (o) => typeof o == "number" ? `${o}px` : o ?? "center";
|
|
10
|
+
return i({
|
|
11
11
|
refresh: () => {
|
|
12
12
|
},
|
|
13
13
|
refreshView: () => {
|
|
14
14
|
},
|
|
15
15
|
refreshData: () => {
|
|
16
16
|
}
|
|
17
|
-
}), (
|
|
17
|
+
}), (o, c) => (p(), n("div", {
|
|
18
18
|
class: "image",
|
|
19
|
-
style:
|
|
19
|
+
style: m({
|
|
20
20
|
"--image-url": `url('${e.value.base.url}')`,
|
|
21
|
-
"--image-border-radius": e.value.base.borderRadius + "px",
|
|
21
|
+
"--image-border-radius": (e.value.base.borderRadius ?? 0) + "px",
|
|
22
22
|
"--image-repeat": e.value.base.mode === "repeat" ? "repeat" : "no-repeat",
|
|
23
23
|
"--image-size": e.value.base.mode === "repeat" ? "auto" : e.value.base.mode,
|
|
24
|
-
"--image-position-x": e.value.base.positionX
|
|
25
|
-
"--image-position-y": e.value.base.positionY
|
|
24
|
+
"--image-position-x": a(e.value.base.positionX),
|
|
25
|
+
"--image-position-y": a(e.value.base.positionY)
|
|
26
26
|
})
|
|
27
27
|
}, null, 4));
|
|
28
28
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { cloneDeep as
|
|
2
|
-
const r = "2.0.0",
|
|
3
|
-
const
|
|
4
|
-
return
|
|
1
|
+
import { cloneDeep as n } from "lodash";
|
|
2
|
+
const r = "2.0.0", t = (o) => {
|
|
3
|
+
const e = n(o);
|
|
4
|
+
return e.version !== r ? {
|
|
5
5
|
base: {
|
|
6
|
-
url:
|
|
7
|
-
mode:
|
|
8
|
-
positionX:
|
|
9
|
-
positionY:
|
|
10
|
-
borderRadius:
|
|
6
|
+
url: e.url,
|
|
7
|
+
mode: e.mode,
|
|
8
|
+
positionX: e.positionX ?? "center",
|
|
9
|
+
positionY: e.positionY ?? "center",
|
|
10
|
+
borderRadius: e.borderRadius ?? 0
|
|
11
11
|
},
|
|
12
12
|
version: r
|
|
13
|
-
} :
|
|
13
|
+
} : o;
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
16
|
r as VERSION,
|
|
17
|
-
|
|
17
|
+
t as upgradeImage
|
|
18
18
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2305a074"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as a, computed as n, ref as u, onMounted as c, nextTick as l, createElementBlock as d, openBlock as f, normalizeStyle as v } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import "../../../Interaction/components/Tabs/index.mjs";
|
|
@@ -161,52 +161,52 @@ import "../../../Scene/components/Earth/index.mjs";
|
|
|
161
161
|
import "../../../Deleted/components/StaticSwitch/index.mjs";
|
|
162
162
|
import "../../../Deleted/components/RowScroll/index.mjs";
|
|
163
163
|
import "../../../Deleted/components/Wavesurfer/index.mjs";
|
|
164
|
-
import { SHJDatasourceV2 as
|
|
165
|
-
import { SHJParseEvent as
|
|
164
|
+
import { SHJDatasourceV2 as g } from "../../../../commons/plugins/datasource/index.mjs";
|
|
165
|
+
import { SHJParseEvent as e } from "../../../../commons/plugins/event/index.mjs";
|
|
166
166
|
import "lodash";
|
|
167
|
-
import { upgradeImageDynamic as
|
|
168
|
-
import { useWatch as
|
|
169
|
-
const x =
|
|
167
|
+
import { upgradeImageDynamic as b } from "./version.mjs";
|
|
168
|
+
import { useWatch as h } from "./hooks/useWatch.mjs";
|
|
169
|
+
const x = a({ name: "ShjImageDynamic" }), Ir = /* @__PURE__ */ a({
|
|
170
170
|
...x,
|
|
171
171
|
props: {
|
|
172
172
|
option: {},
|
|
173
173
|
sources: {},
|
|
174
174
|
useEvents: {}
|
|
175
175
|
},
|
|
176
|
-
setup(
|
|
177
|
-
const t =
|
|
178
|
-
|
|
179
|
-
sources:
|
|
180
|
-
callback: ({ data:
|
|
176
|
+
setup(r, { expose: s }) {
|
|
177
|
+
const t = n(() => b(r.option)), p = (o) => typeof o == "number" ? `${o}px` : o ?? "center", m = u(""), i = () => {
|
|
178
|
+
g.parse({
|
|
179
|
+
sources: r.sources,
|
|
180
|
+
callback: ({ data: o }) => {
|
|
181
181
|
try {
|
|
182
|
-
|
|
182
|
+
e.parseEvents(r.useEvents, "dataListener", o), m.value = o[0].data[0].src;
|
|
183
183
|
} catch {
|
|
184
|
-
|
|
184
|
+
e.parseEvents(r.useEvents, "dataListener", null), m.value = "";
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
188
|
};
|
|
189
|
-
return
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
return c(() => {
|
|
190
|
+
l(() => {
|
|
191
|
+
i();
|
|
192
192
|
});
|
|
193
|
-
}),
|
|
194
|
-
refresh: () =>
|
|
195
|
-
refreshView: () =>
|
|
196
|
-
refreshData: () =>
|
|
197
|
-
}), (
|
|
193
|
+
}), h({ option: t.value, sources: r.sources }, i), s({
|
|
194
|
+
refresh: () => i(),
|
|
195
|
+
refreshView: () => i(),
|
|
196
|
+
refreshData: () => i()
|
|
197
|
+
}), (o, y) => (f(), d("div", {
|
|
198
198
|
class: "image",
|
|
199
|
-
style:
|
|
200
|
-
"--image-url": `url('${
|
|
201
|
-
"--image-border-radius": t.value.base.borderRadius + "px",
|
|
199
|
+
style: v({
|
|
200
|
+
"--image-url": `url('${m.value}')`,
|
|
201
|
+
"--image-border-radius": (t.value.base.borderRadius ?? 0) + "px",
|
|
202
202
|
"--image-repeat": t.value.base.mode === "repeat" ? "repeat" : "no-repeat",
|
|
203
203
|
"--image-size": t.value.base.mode === "repeat" ? "auto" : t.value.base.mode,
|
|
204
|
-
"--image-position-x": t.value.base.positionX
|
|
205
|
-
"--image-position-y": t.value.base.positionY
|
|
204
|
+
"--image-position-x": p(t.value.base.positionX),
|
|
205
|
+
"--image-position-y": p(t.value.base.positionY)
|
|
206
206
|
})
|
|
207
207
|
}, null, 4));
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
export {
|
|
211
|
-
|
|
211
|
+
Ir as default
|
|
212
212
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { cloneDeep as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
return
|
|
1
|
+
import { cloneDeep as r } from "lodash";
|
|
2
|
+
const n = "2.0.0", t = (o) => {
|
|
3
|
+
const e = r(o);
|
|
4
|
+
return e.version !== n ? {
|
|
5
5
|
base: {
|
|
6
|
-
mode:
|
|
7
|
-
positionX:
|
|
8
|
-
positionY:
|
|
9
|
-
borderRadius:
|
|
6
|
+
mode: e.mode,
|
|
7
|
+
positionX: e.positionX ?? "center",
|
|
8
|
+
positionY: e.positionY ?? "center",
|
|
9
|
+
borderRadius: e.borderRadius ?? 0
|
|
10
10
|
},
|
|
11
|
-
version:
|
|
12
|
-
} :
|
|
11
|
+
version: n
|
|
12
|
+
} : o;
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
n as VERSION,
|
|
16
|
+
t as upgradeImageDynamic
|
|
17
17
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5075cbee"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
r as default
|
|
7
7
|
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { upgradeDefault as
|
|
3
|
-
const
|
|
4
|
-
...
|
|
1
|
+
import { defineComponent as r, computed as d, createElementBlock as i, openBlock as l, normalizeStyle as p } from "vue";
|
|
2
|
+
import { upgradeDefault as g } from "./version.mjs";
|
|
3
|
+
const k = r({ name: "ShjDefault" }), f = /* @__PURE__ */ r({
|
|
4
|
+
...k,
|
|
5
5
|
props: {
|
|
6
6
|
option: {},
|
|
7
7
|
sources: {},
|
|
8
8
|
useEvents: {}
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const e =
|
|
10
|
+
setup(c) {
|
|
11
|
+
const e = d(() => g(c.option)), n = (o) => typeof o == "number" ? `${o}px` : o ?? "center", u = () => {
|
|
12
12
|
try {
|
|
13
|
-
const o = e.value.background.image,
|
|
13
|
+
const o = e.value.background.image, a = e.value.background.color, t = e.value.background.size, s = t === "repeat" || t === "auto" ? "auto" : t;
|
|
14
14
|
return {
|
|
15
|
-
background: o ? `url('${o}')` :
|
|
16
|
-
backgroundSize:
|
|
17
|
-
backgroundPosition:
|
|
18
|
-
backgroundRepeat: t === "auto" ? "repeat" : "no-repeat"
|
|
15
|
+
background: o ? `url('${o}')` : a,
|
|
16
|
+
backgroundSize: s,
|
|
17
|
+
backgroundPosition: `${n(e.value.background.positionX)} ${n(e.value.background.positionY)}`,
|
|
18
|
+
backgroundRepeat: t === "repeat" || t === "auto" ? "repeat" : "no-repeat"
|
|
19
19
|
};
|
|
20
20
|
} catch {
|
|
21
21
|
return {};
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
return (o,
|
|
24
|
+
return (o, a) => (l(), i("div", {
|
|
25
25
|
class: "shj-default",
|
|
26
|
-
style: p(
|
|
26
|
+
style: p(u())
|
|
27
27
|
}, null, 4));
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
f as default
|
|
32
32
|
};
|
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
import { cloneDeep as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
return
|
|
1
|
+
import { cloneDeep as n } from "lodash";
|
|
2
|
+
const e = "2.0.0", i = (r) => {
|
|
3
|
+
const o = n(r) ?? {};
|
|
4
|
+
return o.version !== e ? (o.version = e, {
|
|
5
|
+
...o,
|
|
6
|
+
background: {
|
|
7
|
+
color: o.background?.color ?? "#00000000",
|
|
8
|
+
image: o.background?.image ?? "",
|
|
9
|
+
size: o.background?.size ?? "cover",
|
|
10
|
+
positionX: o.background?.positionX ?? "center",
|
|
11
|
+
positionY: o.background?.positionY ?? "center"
|
|
12
|
+
}
|
|
13
|
+
}) : {
|
|
14
|
+
...r,
|
|
15
|
+
background: {
|
|
16
|
+
color: r.background?.color ?? "#00000000",
|
|
17
|
+
image: r.background?.image ?? "",
|
|
18
|
+
size: r.background?.size ?? "cover",
|
|
19
|
+
positionX: r.background?.positionX ?? "center",
|
|
20
|
+
positionY: r.background?.positionY ?? "center"
|
|
21
|
+
}
|
|
22
|
+
};
|
|
5
23
|
};
|
|
6
24
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
25
|
+
e as VERSION,
|
|
26
|
+
i as upgradeDefault
|
|
9
27
|
};
|
|
@@ -6,6 +6,7 @@ declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
6
6
|
};
|
|
7
7
|
}>, {
|
|
8
8
|
option: import("vue").ComputedRef<IImageOption>;
|
|
9
|
+
formatBackgroundPosition: (value: "left" | "center" | "right" | "top" | "bottom" | number | undefined) => string;
|
|
9
10
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
11
|
option: {
|
|
11
12
|
type: any;
|
|
@@ -2,8 +2,8 @@ export interface IImageOption {
|
|
|
2
2
|
base: {
|
|
3
3
|
url: string;
|
|
4
4
|
mode: string;
|
|
5
|
-
positionX: number;
|
|
6
|
-
positionY: number;
|
|
5
|
+
positionX: "left" | "center" | "right" | number;
|
|
6
|
+
positionY: "top" | "center" | "bottom" | number;
|
|
7
7
|
borderRadius: number;
|
|
8
8
|
};
|
|
9
9
|
version: string;
|
|
@@ -14,6 +14,7 @@ declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
14
14
|
};
|
|
15
15
|
}>, {
|
|
16
16
|
option: import("vue").ComputedRef<IImageDynamicOption>;
|
|
17
|
+
formatBackgroundPosition: (value: "left" | "center" | "right" | "top" | "bottom" | number | undefined) => string;
|
|
17
18
|
url: import("vue").Ref<string, string>;
|
|
18
19
|
init: () => void;
|
|
19
20
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -15,6 +15,7 @@ declare const _sfc_main: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
15
15
|
};
|
|
16
16
|
}>, {
|
|
17
17
|
option: import("vue").ComputedRef<IDefaultOption>;
|
|
18
|
+
formatBackgroundPosition: (value: "left" | "center" | "right" | "top" | "bottom" | number | undefined) => string;
|
|
18
19
|
handleSceneStyle: () => StyleValue | undefined;
|
|
19
20
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
21
|
option: {
|