phecda-vue 1.3.0 → 1.3.1
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 -2
- package/dist/index.js +12 -9
- package/dist/index.mjs +14 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -97,7 +97,7 @@ declare const getAntDRules: typeof getNaiveUIRules;
|
|
|
97
97
|
declare function getNutUIRules<M, O extends object>(Model: M, options?: O): any;
|
|
98
98
|
declare const getVantRules: typeof getNutUIRules;
|
|
99
99
|
|
|
100
|
-
declare const
|
|
100
|
+
declare const createLayer: <T>(wrapComp: Component<T>, props?: Partial<T>, modelKey?: string) => <P>(comp: Component<P>, props?: P) => void;
|
|
101
101
|
|
|
102
102
|
declare function createTable<P extends {
|
|
103
103
|
$props: any;
|
|
@@ -127,4 +127,4 @@ declare class PV {
|
|
|
127
127
|
off<Key extends keyof PhecdaEvents>(type: Key, handler?: (arg: PhecdaEvents[Key]) => void): void;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
export { EXPRESS_RE, FN_RE, GetDevUIRules, PV, PhecdaEmitter, PublicOnly, ReplaceInstanceValues, SchemaToObj, createFilter, createForm, createFormData,
|
|
130
|
+
export { EXPRESS_RE, FN_RE, GetDevUIRules, PV, PhecdaEmitter, PublicOnly, ReplaceInstanceValues, SchemaToObj, createFilter, createForm, createFormData, createLayer, createPhecda, createPipe, createTable, emitter, getActivePhecda, getAntDRules, getElementPlusRules, getNaiveUIRules, getNutUIRules, getReactiveMap, getVantRules, initialize, phecdaSymbol, setActivePhecda, useEvent, useO, usePatch, useR, useV };
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ __export(src_exports, {
|
|
|
35
35
|
createFilter: () => createFilter,
|
|
36
36
|
createForm: () => createForm,
|
|
37
37
|
createFormData: () => createFormData,
|
|
38
|
-
|
|
38
|
+
createLayer: () => createLayer,
|
|
39
39
|
createPhecda: () => createPhecda,
|
|
40
40
|
createPipe: () => createPipe,
|
|
41
41
|
createTable: () => createTable,
|
|
@@ -447,8 +447,11 @@ function createForm(compSet, form, formItem, options = {}) {
|
|
|
447
447
|
__name(generateChildVNode, "generateChildVNode");
|
|
448
448
|
function generateVNode(props) {
|
|
449
449
|
const { property } = props;
|
|
450
|
-
|
|
451
|
-
|
|
450
|
+
const item = props.config[property];
|
|
451
|
+
return (0, import_vue5.h)(compSet[item._component], {
|
|
452
|
+
...item,
|
|
453
|
+
onVnodeMounted: (vnode) => item._mount?.(vnode),
|
|
454
|
+
onVnodeUnmounted: (vnode) => item._unmount?.(vnode),
|
|
452
455
|
[`${modelKey}`]: props.data[property],
|
|
453
456
|
[`onUpdate:${modelKey}`]: (v) => {
|
|
454
457
|
if (onUpdate)
|
|
@@ -659,13 +662,13 @@ function getNutUIRules(Model, options = {}) {
|
|
|
659
662
|
__name(getNutUIRules, "getNutUIRules");
|
|
660
663
|
var getVantRules = getNutUIRules;
|
|
661
664
|
|
|
662
|
-
// src/components/
|
|
665
|
+
// src/components/createLayer.ts
|
|
663
666
|
var import_vue7 = require("vue");
|
|
664
|
-
var
|
|
667
|
+
var createLayer = /* @__PURE__ */ __name(function(modalWrapper, props = {}, modelKey = "modelValue") {
|
|
665
668
|
let isMounted = false;
|
|
666
|
-
const isShow = (0, import_vue7.
|
|
669
|
+
const isShow = (0, import_vue7.shallowRef)(true);
|
|
667
670
|
const content = (0, import_vue7.shallowRef)();
|
|
668
|
-
const propsRef = (0, import_vue7.
|
|
671
|
+
const propsRef = (0, import_vue7.shallowRef)({});
|
|
669
672
|
const wrapper = (0, import_vue7.defineComponent)({
|
|
670
673
|
setup() {
|
|
671
674
|
return () => (0, import_vue7.h)(modalWrapper, {
|
|
@@ -691,7 +694,7 @@ var createModal = /* @__PURE__ */ __name(function(modalWrapper, props = {}, mode
|
|
|
691
694
|
isShow.value = true;
|
|
692
695
|
}
|
|
693
696
|
};
|
|
694
|
-
}, "
|
|
697
|
+
}, "createLayer");
|
|
695
698
|
|
|
696
699
|
// src/components/createTable.ts
|
|
697
700
|
var import_vue8 = require("vue");
|
|
@@ -797,7 +800,7 @@ __name(PV, "PV");
|
|
|
797
800
|
createFilter,
|
|
798
801
|
createForm,
|
|
799
802
|
createFormData,
|
|
800
|
-
|
|
803
|
+
createLayer,
|
|
801
804
|
createPhecda,
|
|
802
805
|
createPipe,
|
|
803
806
|
createTable,
|
package/dist/index.mjs
CHANGED
|
@@ -390,8 +390,11 @@ function createForm(compSet, form, formItem, options = {}) {
|
|
|
390
390
|
__name(generateChildVNode, "generateChildVNode");
|
|
391
391
|
function generateVNode(props) {
|
|
392
392
|
const { property } = props;
|
|
393
|
-
|
|
394
|
-
|
|
393
|
+
const item = props.config[property];
|
|
394
|
+
return h(compSet[item._component], {
|
|
395
|
+
...item,
|
|
396
|
+
onVnodeMounted: (vnode) => item._mount?.(vnode),
|
|
397
|
+
onVnodeUnmounted: (vnode) => item._unmount?.(vnode),
|
|
395
398
|
[`${modelKey}`]: props.data[property],
|
|
396
399
|
[`onUpdate:${modelKey}`]: (v) => {
|
|
397
400
|
if (onUpdate)
|
|
@@ -602,13 +605,13 @@ function getNutUIRules(Model, options = {}) {
|
|
|
602
605
|
__name(getNutUIRules, "getNutUIRules");
|
|
603
606
|
var getVantRules = getNutUIRules;
|
|
604
607
|
|
|
605
|
-
// src/components/
|
|
606
|
-
import { defineComponent as defineComponent2, h as h2,
|
|
607
|
-
var
|
|
608
|
+
// src/components/createLayer.ts
|
|
609
|
+
import { defineComponent as defineComponent2, h as h2, render, shallowRef } from "vue";
|
|
610
|
+
var createLayer = /* @__PURE__ */ __name(function(modalWrapper, props = {}, modelKey = "modelValue") {
|
|
608
611
|
let isMounted = false;
|
|
609
|
-
const isShow =
|
|
612
|
+
const isShow = shallowRef(true);
|
|
610
613
|
const content = shallowRef();
|
|
611
|
-
const propsRef =
|
|
614
|
+
const propsRef = shallowRef({});
|
|
612
615
|
const wrapper = defineComponent2({
|
|
613
616
|
setup() {
|
|
614
617
|
return () => h2(modalWrapper, {
|
|
@@ -634,10 +637,10 @@ var createModal = /* @__PURE__ */ __name(function(modalWrapper, props = {}, mode
|
|
|
634
637
|
isShow.value = true;
|
|
635
638
|
}
|
|
636
639
|
};
|
|
637
|
-
}, "
|
|
640
|
+
}, "createLayer");
|
|
638
641
|
|
|
639
642
|
// src/components/createTable.ts
|
|
640
|
-
import { defineComponent as defineComponent3, h as h3, onMounted as onMounted2, ref as
|
|
643
|
+
import { defineComponent as defineComponent3, h as h3, onMounted as onMounted2, ref as ref3 } from "vue";
|
|
641
644
|
function createTable(compSet, table, tableColumn, data) {
|
|
642
645
|
const TableColumn = defineComponent3({
|
|
643
646
|
name: "PhecdaTableColumn",
|
|
@@ -671,7 +674,7 @@ function createTable(compSet, table, tableColumn, data) {
|
|
|
671
674
|
}
|
|
672
675
|
},
|
|
673
676
|
setup(props, ctx) {
|
|
674
|
-
const dom =
|
|
677
|
+
const dom = ref3();
|
|
675
678
|
onMounted2(() => {
|
|
676
679
|
ctx.expose({
|
|
677
680
|
...dom.value
|
|
@@ -739,7 +742,7 @@ export {
|
|
|
739
742
|
createFilter,
|
|
740
743
|
createForm,
|
|
741
744
|
createFormData,
|
|
742
|
-
|
|
745
|
+
createLayer,
|
|
743
746
|
createPhecda,
|
|
744
747
|
createPipe,
|
|
745
748
|
createTable,
|