phecda-vue 1.3.1 → 1.3.3

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 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 createLayer: <T>(wrapComp: Component<T>, props?: Partial<T>, modelKey?: string) => <P>(comp: Component<P>, props?: P) => void;
100
+ declare const createLayer: <T>(wrapComp: Component<T>, props?: Partial<T>, modelKey?: string) => <P>(comp: Component<P>, props?: P, modalProps?: Partial<T>) => void;
101
101
 
102
102
  declare function createTable<P extends {
103
103
  $props: any;
package/dist/index.js CHANGED
@@ -664,11 +664,12 @@ var getVantRules = getNutUIRules;
664
664
 
665
665
  // src/components/createLayer.ts
666
666
  var import_vue7 = require("vue");
667
- var createLayer = /* @__PURE__ */ __name(function(modalWrapper, props = {}, modelKey = "modelValue") {
667
+ var createLayer = /* @__PURE__ */ __name(function(modalWrapper, content_props = {}, modelKey = "modelValue") {
668
668
  let isMounted = false;
669
669
  const isShow = (0, import_vue7.shallowRef)(true);
670
670
  const content = (0, import_vue7.shallowRef)();
671
- const propsRef = (0, import_vue7.shallowRef)({});
671
+ const contentProps = (0, import_vue7.shallowRef)({});
672
+ const modalProps = (0, import_vue7.shallowRef)({});
672
673
  const wrapper = (0, import_vue7.defineComponent)({
673
674
  setup() {
674
675
  return () => (0, import_vue7.h)(modalWrapper, {
@@ -676,15 +677,16 @@ var createLayer = /* @__PURE__ */ __name(function(modalWrapper, props = {}, mode
676
677
  [`onUpdate:${modelKey}`]: (v) => {
677
678
  isShow.value = v;
678
679
  },
679
- ...props
680
+ ...modalProps.value
680
681
  }, {
681
- default: () => content.value && (0, import_vue7.h)(content.value, propsRef.value)
682
+ default: () => content.value && (0, import_vue7.h)(content.value, contentProps.value)
682
683
  });
683
684
  }
684
685
  });
685
- return (comp, props2) => {
686
+ return (comp, props, modal_props) => {
686
687
  content.value = comp;
687
- propsRef.value = props2;
688
+ contentProps.value = props;
689
+ modalProps.value = Object.assign({}, content_props, modal_props);
688
690
  if (!isMounted) {
689
691
  const el = document.createElement("div");
690
692
  const vnode = (0, import_vue7.h)(wrapper);
package/dist/index.mjs CHANGED
@@ -607,11 +607,12 @@ var getVantRules = getNutUIRules;
607
607
 
608
608
  // src/components/createLayer.ts
609
609
  import { defineComponent as defineComponent2, h as h2, render, shallowRef } from "vue";
610
- var createLayer = /* @__PURE__ */ __name(function(modalWrapper, props = {}, modelKey = "modelValue") {
610
+ var createLayer = /* @__PURE__ */ __name(function(modalWrapper, content_props = {}, modelKey = "modelValue") {
611
611
  let isMounted = false;
612
612
  const isShow = shallowRef(true);
613
613
  const content = shallowRef();
614
- const propsRef = shallowRef({});
614
+ const contentProps = shallowRef({});
615
+ const modalProps = shallowRef({});
615
616
  const wrapper = defineComponent2({
616
617
  setup() {
617
618
  return () => h2(modalWrapper, {
@@ -619,15 +620,16 @@ var createLayer = /* @__PURE__ */ __name(function(modalWrapper, props = {}, mode
619
620
  [`onUpdate:${modelKey}`]: (v) => {
620
621
  isShow.value = v;
621
622
  },
622
- ...props
623
+ ...modalProps.value
623
624
  }, {
624
- default: () => content.value && h2(content.value, propsRef.value)
625
+ default: () => content.value && h2(content.value, contentProps.value)
625
626
  });
626
627
  }
627
628
  });
628
- return (comp, props2) => {
629
+ return (comp, props, modal_props) => {
629
630
  content.value = comp;
630
- propsRef.value = props2;
631
+ contentProps.value = props;
632
+ modalProps.value = Object.assign({}, content_props, modal_props);
631
633
  if (!isMounted) {
632
634
  const el = document.createElement("div");
633
635
  const vnode = h2(wrapper);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phecda-vue",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "provide store/form/table with phecda function to vue",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -14,7 +14,7 @@
14
14
  "dependencies": {
15
15
  "mitt": "^3.0.0",
16
16
  "vue": "^3.2.45",
17
- "phecda-core": "1.2.0"
17
+ "phecda-core": "1.2.1"
18
18
  },
19
19
  "devDependencies": {
20
20
  "tsup": "^6.5.0"