phecda-vue 2.1.2 → 2.1.3-alpha.0
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/index.d.ts +2 -9
- package/dist/index.js +0 -76
- package/dist/index.mjs +0 -74
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Events } from 'phecda-core';
|
|
2
2
|
export * from 'phecda-core';
|
|
3
3
|
import * as vue from 'vue';
|
|
4
|
-
import { Ref, App, UnwrapNestedRefs
|
|
4
|
+
import { Ref, App, UnwrapNestedRefs } from 'vue';
|
|
5
5
|
import { Handler } from 'mitt';
|
|
6
6
|
|
|
7
7
|
type ReplaceInstanceValues<I> = {
|
|
@@ -67,13 +67,6 @@ declare function createFilter<Data extends Record<string, any>>(initState?: Obje
|
|
|
67
67
|
delState: (key: string) => void;
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
declare const createLayer: <T>(wrapComp: Component<T>, props?: Partial<T>, modelKey?: string) => <P>(comp: Component<P>, props?: P, modalProps?: Partial<T>) => void;
|
|
71
|
-
|
|
72
|
-
declare const createDialog: <T>(comp: Component<T>, opts?: {
|
|
73
|
-
modelKey?: string;
|
|
74
|
-
props?: Partial<T>;
|
|
75
|
-
}) => (props?: Partial<T>) => void;
|
|
76
|
-
|
|
77
70
|
declare class PV {
|
|
78
71
|
constructor();
|
|
79
72
|
get tag(): any;
|
|
@@ -82,4 +75,4 @@ declare class PV {
|
|
|
82
75
|
off<Key extends keyof Events>(type: Key, handler?: (arg: Events[Key]) => void): void;
|
|
83
76
|
}
|
|
84
77
|
|
|
85
|
-
export { PV, PhecdaEmitter, PhecdaInstance, RE, ReplaceInstanceValues, SchemaToObj,
|
|
78
|
+
export { PV, PhecdaEmitter, PhecdaInstance, RE, ReplaceInstanceValues, SchemaToObj, createFilter, createPhecda, emitter, getActivePhecda, getReactiveMap, initialize, interval, phecdaSymbol, setActivePhecda, useEvent, useO, usePatch, useR, useRaw, useV };
|
package/dist/index.js
CHANGED
|
@@ -30,9 +30,7 @@ var src_exports = {};
|
|
|
30
30
|
__export(src_exports, {
|
|
31
31
|
PV: () => PV,
|
|
32
32
|
RE: () => RE,
|
|
33
|
-
createDialog: () => createDialog,
|
|
34
33
|
createFilter: () => createFilter,
|
|
35
|
-
createLayer: () => createLayer,
|
|
36
34
|
createPhecda: () => createPhecda,
|
|
37
35
|
emitter: () => emitter,
|
|
38
36
|
getActivePhecda: () => getActivePhecda,
|
|
@@ -433,78 +431,6 @@ __name(createFilter, "createFilter");
|
|
|
433
431
|
// src/index.ts
|
|
434
432
|
__reExport(src_exports, require("phecda-core"), module.exports);
|
|
435
433
|
|
|
436
|
-
// src/components/createLayer.ts
|
|
437
|
-
var import_vue5 = require("vue");
|
|
438
|
-
var createLayer = /* @__PURE__ */ __name(function(modalWrapper, content_props = {}, modelKey = "modelValue") {
|
|
439
|
-
let isMounted = false;
|
|
440
|
-
const isShow = (0, import_vue5.shallowRef)(true);
|
|
441
|
-
const content = (0, import_vue5.shallowRef)();
|
|
442
|
-
const contentProps = (0, import_vue5.shallowRef)({});
|
|
443
|
-
const modalProps = (0, import_vue5.shallowRef)({});
|
|
444
|
-
const wrapper = (0, import_vue5.defineComponent)({
|
|
445
|
-
setup() {
|
|
446
|
-
return () => (0, import_vue5.h)(modalWrapper, {
|
|
447
|
-
[modelKey]: isShow.value,
|
|
448
|
-
[`onUpdate:${modelKey}`]: (v) => {
|
|
449
|
-
isShow.value = v;
|
|
450
|
-
},
|
|
451
|
-
...modalProps.value
|
|
452
|
-
}, {
|
|
453
|
-
default: (slot = {}) => content.value && (0, import_vue5.h)(content.value, {
|
|
454
|
-
...contentProps.value,
|
|
455
|
-
...slot
|
|
456
|
-
})
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
return (comp, props, modal_props) => {
|
|
461
|
-
content.value = comp;
|
|
462
|
-
contentProps.value = props;
|
|
463
|
-
modalProps.value = Object.assign({}, content_props, modal_props);
|
|
464
|
-
if (!isMounted) {
|
|
465
|
-
const el = document.createElement("div");
|
|
466
|
-
const vnode = (0, import_vue5.h)(wrapper);
|
|
467
|
-
vnode.appContext = interval.app?._context;
|
|
468
|
-
document.body.appendChild(((0, import_vue5.render)(vnode, el), el));
|
|
469
|
-
isMounted = true;
|
|
470
|
-
} else {
|
|
471
|
-
isShow.value = true;
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
}, "createLayer");
|
|
475
|
-
|
|
476
|
-
// src/components/createDialog.ts
|
|
477
|
-
var import_vue6 = require("vue");
|
|
478
|
-
var createDialog = /* @__PURE__ */ __name(function(comp, opts = {}) {
|
|
479
|
-
let isMounted = false;
|
|
480
|
-
const { modelKey = "modelValue", props = {} } = opts;
|
|
481
|
-
const isShow = (0, import_vue6.shallowRef)(true);
|
|
482
|
-
const contentProps = (0, import_vue6.shallowRef)({});
|
|
483
|
-
const wrapper = (0, import_vue6.defineComponent)({
|
|
484
|
-
setup() {
|
|
485
|
-
return () => (0, import_vue6.h)(comp, {
|
|
486
|
-
[modelKey]: isShow.value,
|
|
487
|
-
[`onUpdate:${modelKey}`]: (v) => {
|
|
488
|
-
isShow.value = v;
|
|
489
|
-
},
|
|
490
|
-
...contentProps.value
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
});
|
|
494
|
-
return (_props = {}) => {
|
|
495
|
-
contentProps.value = Object.assign({}, props, _props);
|
|
496
|
-
if (!isMounted) {
|
|
497
|
-
const el = document.createElement("div");
|
|
498
|
-
const vnode = (0, import_vue6.h)(wrapper);
|
|
499
|
-
vnode.appContext = interval.app?._context;
|
|
500
|
-
document.body.appendChild(((0, import_vue6.render)(vnode, el), el));
|
|
501
|
-
isMounted = true;
|
|
502
|
-
} else {
|
|
503
|
-
isShow.value = true;
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
}, "createDialog");
|
|
507
|
-
|
|
508
434
|
// src/wrapper.ts
|
|
509
435
|
var PV = class {
|
|
510
436
|
constructor() {
|
|
@@ -527,9 +453,7 @@ __name(PV, "PV");
|
|
|
527
453
|
0 && (module.exports = {
|
|
528
454
|
PV,
|
|
529
455
|
RE,
|
|
530
|
-
createDialog,
|
|
531
456
|
createFilter,
|
|
532
|
-
createLayer,
|
|
533
457
|
createPhecda,
|
|
534
458
|
emitter,
|
|
535
459
|
getActivePhecda,
|
package/dist/index.mjs
CHANGED
|
@@ -384,78 +384,6 @@ __name(createFilter, "createFilter");
|
|
|
384
384
|
// src/index.ts
|
|
385
385
|
export * from "phecda-core";
|
|
386
386
|
|
|
387
|
-
// src/components/createLayer.ts
|
|
388
|
-
import { defineComponent, h, render, shallowRef } from "vue";
|
|
389
|
-
var createLayer = /* @__PURE__ */ __name(function(modalWrapper, content_props = {}, modelKey = "modelValue") {
|
|
390
|
-
let isMounted = false;
|
|
391
|
-
const isShow = shallowRef(true);
|
|
392
|
-
const content = shallowRef();
|
|
393
|
-
const contentProps = shallowRef({});
|
|
394
|
-
const modalProps = shallowRef({});
|
|
395
|
-
const wrapper = defineComponent({
|
|
396
|
-
setup() {
|
|
397
|
-
return () => h(modalWrapper, {
|
|
398
|
-
[modelKey]: isShow.value,
|
|
399
|
-
[`onUpdate:${modelKey}`]: (v) => {
|
|
400
|
-
isShow.value = v;
|
|
401
|
-
},
|
|
402
|
-
...modalProps.value
|
|
403
|
-
}, {
|
|
404
|
-
default: (slot = {}) => content.value && h(content.value, {
|
|
405
|
-
...contentProps.value,
|
|
406
|
-
...slot
|
|
407
|
-
})
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
return (comp, props, modal_props) => {
|
|
412
|
-
content.value = comp;
|
|
413
|
-
contentProps.value = props;
|
|
414
|
-
modalProps.value = Object.assign({}, content_props, modal_props);
|
|
415
|
-
if (!isMounted) {
|
|
416
|
-
const el = document.createElement("div");
|
|
417
|
-
const vnode = h(wrapper);
|
|
418
|
-
vnode.appContext = interval.app?._context;
|
|
419
|
-
document.body.appendChild((render(vnode, el), el));
|
|
420
|
-
isMounted = true;
|
|
421
|
-
} else {
|
|
422
|
-
isShow.value = true;
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
}, "createLayer");
|
|
426
|
-
|
|
427
|
-
// src/components/createDialog.ts
|
|
428
|
-
import { defineComponent as defineComponent2, h as h2, render as render2, shallowRef as shallowRef2 } from "vue";
|
|
429
|
-
var createDialog = /* @__PURE__ */ __name(function(comp, opts = {}) {
|
|
430
|
-
let isMounted = false;
|
|
431
|
-
const { modelKey = "modelValue", props = {} } = opts;
|
|
432
|
-
const isShow = shallowRef2(true);
|
|
433
|
-
const contentProps = shallowRef2({});
|
|
434
|
-
const wrapper = defineComponent2({
|
|
435
|
-
setup() {
|
|
436
|
-
return () => h2(comp, {
|
|
437
|
-
[modelKey]: isShow.value,
|
|
438
|
-
[`onUpdate:${modelKey}`]: (v) => {
|
|
439
|
-
isShow.value = v;
|
|
440
|
-
},
|
|
441
|
-
...contentProps.value
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
return (_props = {}) => {
|
|
446
|
-
contentProps.value = Object.assign({}, props, _props);
|
|
447
|
-
if (!isMounted) {
|
|
448
|
-
const el = document.createElement("div");
|
|
449
|
-
const vnode = h2(wrapper);
|
|
450
|
-
vnode.appContext = interval.app?._context;
|
|
451
|
-
document.body.appendChild((render2(vnode, el), el));
|
|
452
|
-
isMounted = true;
|
|
453
|
-
} else {
|
|
454
|
-
isShow.value = true;
|
|
455
|
-
}
|
|
456
|
-
};
|
|
457
|
-
}, "createDialog");
|
|
458
|
-
|
|
459
387
|
// src/wrapper.ts
|
|
460
388
|
var PV = class {
|
|
461
389
|
constructor() {
|
|
@@ -477,9 +405,7 @@ __name(PV, "PV");
|
|
|
477
405
|
export {
|
|
478
406
|
PV,
|
|
479
407
|
RE,
|
|
480
|
-
createDialog,
|
|
481
408
|
createFilter,
|
|
482
|
-
createLayer,
|
|
483
409
|
createPhecda,
|
|
484
410
|
emitter,
|
|
485
411
|
getActivePhecda,
|