@qy_better_lib/pc 0.3.3 → 0.3.5

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent, useAttrs, useSlots, openBlock, createBlock, createCommentVNode } from "vue";
1
+ import { defineComponent, useAttrs, useSlots, openBlock, createBlock, createCommentVNode, createVNode, mergeProps } from "vue";
2
2
  import { ElDialog, ElDrawer } from "element-plus";
3
3
  import { props } from "./props.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -8,39 +8,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  const props2 = __props;
9
9
  const attrs = useAttrs();
10
10
  const slots = useSlots();
11
- const dialog_component = () => /* @__PURE__ */ React.createElement(
12
- ElDialog,
13
- {
14
- ...attrs,
15
- width: props2.size,
16
- showClose: props2.showClose,
17
- draggable: props2.draggable,
18
- modal: props2.modal,
19
- modalStyle: props2.modalStyle
20
- },
21
- {
22
- header: () => slots.header?.(),
23
- default: () => slots.default?.(),
24
- footer: () => slots.footer?.()
25
- }
26
- );
27
- const drawer_component = () => /* @__PURE__ */ React.createElement(
28
- ElDrawer,
29
- {
30
- ...attrs,
31
- size: props2.size,
32
- showClose: props2.showClose,
33
- modal: props2.modal,
34
- modalStyle: props2.modalStyle
35
- },
36
- {
37
- header: () => slots.header?.(),
38
- default: () => slots.default?.(),
39
- footer: () => slots.footer?.()
40
- }
41
- );
11
+ const dialog_component = () => createVNode(ElDialog, mergeProps(attrs, {
12
+ "width": props2.size,
13
+ "showClose": props2.showClose,
14
+ "draggable": props2.draggable,
15
+ "modal": props2.modal,
16
+ "modalStyle": props2.modalStyle
17
+ }), {
18
+ header: () => slots.header?.(),
19
+ default: () => slots.default?.(),
20
+ footer: () => slots.footer?.()
21
+ });
22
+ const drawer_component = () => createVNode(ElDrawer, mergeProps(attrs, {
23
+ "size": props2.size,
24
+ "showClose": props2.showClose,
25
+ "modal": props2.modal,
26
+ "modalStyle": props2.modalStyle
27
+ }), {
28
+ header: () => slots.header?.(),
29
+ default: () => slots.default?.(),
30
+ footer: () => slots.footer?.()
31
+ });
42
32
  return (_ctx, _cache) => {
43
- return _ctx.type === "dialog" ? (openBlock(), createBlock(dialog_component, { key: 0 })) : _ctx.type === "drawer" ? (openBlock(), createBlock(drawer_component, { key: 1 })) : createCommentVNode("", true);
33
+ return _ctx.type === "dialog" ? (openBlock(), createBlock(dialog_component, {
34
+ key: 0
35
+ })) : _ctx.type === "drawer" ? (openBlock(), createBlock(drawer_component, {
36
+ key: 1
37
+ })) : createCommentVNode("", true);
44
38
  };
45
39
  }
46
40
  });
@@ -1,10 +1,12 @@
1
- import { defineComponent, ref, computed, useSlots, openBlock, createBlock } from "vue";
1
+ import { defineComponent, ref, computed, useSlots, openBlock, createBlock, createVNode, resolveComponent, mergeProps } from "vue";
2
2
  import { validateForm } from "../../utils/index.js";
3
3
  import { props } from "./props.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "index",
6
6
  props: props(),
7
- setup(__props, { expose: __expose }) {
7
+ setup(__props, {
8
+ expose: __expose
9
+ }) {
8
10
  const props2 = __props;
9
11
  const form_ref = ref(null);
10
12
  const form_style = computed(() => {
@@ -28,19 +30,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
30
  function reset() {
29
31
  form_ref.value?.resetFields();
30
32
  }
31
- const common_form = () => /* @__PURE__ */ React.createElement(
32
- "el-form",
33
- {
34
- class: "comm-form",
35
- model: props2.model,
36
- rules: props2.form_rules,
37
- ref: form_ref,
38
- ...form_attr.value,
39
- style: form_style.value
40
- },
41
- slots.default?.(),
42
- slots.footer?.()
43
- );
33
+ const common_form = () => createVNode(resolveComponent("el-form"), mergeProps({
34
+ "class": "comm-form",
35
+ "model": props2.model,
36
+ "rules": props2.form_rules,
37
+ "ref": form_ref
38
+ }, form_attr.value, {
39
+ "style": form_style.value
40
+ }), {
41
+ default: () => [slots.default?.(), slots.footer?.()]
42
+ });
44
43
  return (_ctx, _cache) => {
45
44
  return openBlock(), createBlock(common_form);
46
45
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qy_better_lib/pc",
3
3
  "private": false,
4
- "version": "0.3.3",
4
+ "version": "0.3.5",
5
5
  "description": "qy better lib pc compontens",
6
6
  "author": "luhuiming",
7
7
  "license": "MIT",
@@ -59,6 +59,7 @@
59
59
  "@qy_better_lib/hooks": "^0.2.4",
60
60
  "@types/node": "^24.5.0",
61
61
  "@vitejs/plugin-vue": "^6.0.1",
62
+ "@vitejs/plugin-vue-jsx": "^5.1.4",
62
63
  "async-validator": "^4.2.5",
63
64
  "element-plus": "^2.13.2",
64
65
  "magic-string": "^0.30.19",