fix
This commit is contained in:
parent
c1470a73e9
commit
822093253b
File diff suppressed because one or more lines are too long
|
|
@ -152,9 +152,13 @@ export const viEvalProps = (
|
|||
|
||||
if (typeof val === "function") {
|
||||
script.props[name].fn = val;
|
||||
val = (...args: any[]) => {
|
||||
if (script) return script.props?.[name].fn(...args);
|
||||
};
|
||||
val = new Function(
|
||||
`// [${meta.item.name}] ${name}: ${meta.item.id}
|
||||
const { ${Object.keys(arg).join(", ")} } = this;
|
||||
const fn = ${val.toString()}
|
||||
return fn(...arguments);
|
||||
`
|
||||
).bind(arg);
|
||||
}
|
||||
|
||||
arg[name] = val;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ export const createViLocal = (
|
|||
deps?: any[];
|
||||
}) => {
|
||||
const isEditor =
|
||||
["localhost", "prasi.avolut.com"].includes(location.hostname) &&
|
||||
(["prasi.avolut.com"].includes(location.hostname) ||
|
||||
location.host === "localhost:4550") &&
|
||||
location.pathname.startsWith("/ed/");
|
||||
let id = meta.item.id;
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,10 @@ export const Vi: FC<{
|
|||
return pathname;
|
||||
|
||||
try {
|
||||
if (["prasi.avolut.com"].includes(location.hostname)) {
|
||||
if (
|
||||
["prasi.avolut.com"].includes(location.hostname) ||
|
||||
location.host === "localhost:4550"
|
||||
) {
|
||||
if (vi.site.api_url) {
|
||||
if (!vi.site_url) {
|
||||
vi.site_url = new URL(vi.site.api_url);
|
||||
|
|
|
|||
Loading…
Reference in New Issue