sun-form-v3 1.0.47 → 1.0.49

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,21 +1,21 @@
1
- import { openBlock as s, createElementBlock as _, Fragment as T, createTextVNode as m, createElementVNode as c, ref as C, resolveComponent as a, isRef as k, unref as t, toDisplayString as v, createBlock as w, withCtx as p, createVNode as y, renderSlot as B, createCommentVNode as I, getCurrentInstance as V, computed as j, onMounted as O, createSlots as $ } from "vue";
2
- const A = /* @__PURE__ */ Object.assign({ name: "testBtn" }, {
1
+ import { openBlock as s, createElementBlock as m, Fragment as k, createTextVNode as w, createElementVNode as i, ref as B, resolveComponent as l, isRef as I, unref as t, toDisplayString as v, createBlock as f, withCtx as d, createVNode as u, renderSlot as V, createCommentVNode as j, getCurrentInstance as O, computed as $, onMounted as A, createSlots as N } from "vue";
2
+ const S = /* @__PURE__ */ Object.assign({ name: "testBtn" }, {
3
3
  __name: "testBtn",
4
4
  setup(o) {
5
- return (d, e) => " testBtn ";
5
+ return (r, e) => " testBtn ";
6
6
  }
7
- }), N = /* @__PURE__ */ c("input", { type: "text" }, null, -1), S = /* @__PURE__ */ Object.assign({ name: "testInput" }, {
7
+ }), z = /* @__PURE__ */ i("input", { type: "text" }, null, -1), D = /* @__PURE__ */ Object.assign({ name: "testInput" }, {
8
8
  __name: "testInput",
9
9
  setup(o) {
10
- return (d, e) => (s(), _(T, null, [
11
- m(" testInput "),
12
- N
10
+ return (r, e) => (s(), m(k, null, [
11
+ w(" testInput "),
12
+ z
13
13
  ], 64));
14
14
  }
15
- }), z = { class: "border-gray-200 border-t border-b" }, D = { class: "select-none" }, F = {
15
+ }), F = { class: "border-gray-200 border-t border-b" }, U = { class: "select-none" }, E = {
16
16
  key: 0,
17
17
  class: "px-3 py-2 bg-white"
18
- }, U = /* @__PURE__ */ Object.assign({ name: "commonCard" }, {
18
+ }, M = /* @__PURE__ */ Object.assign({ name: "commonCard" }, {
19
19
  __name: "index",
20
20
  props: {
21
21
  title: {
@@ -24,36 +24,36 @@ const A = /* @__PURE__ */ Object.assign({ name: "testBtn" }, {
24
24
  }
25
25
  },
26
26
  setup(o) {
27
- let d = o, e = C(!0);
28
- return (n, r) => {
29
- const u = a("ArrowUp"), i = a("el-icon"), g = a("ArrowDown");
30
- return s(), _("div", z, [
31
- c("div", {
27
+ let r = o, e = B(!0);
28
+ return (n, a) => {
29
+ const g = l("ArrowUp"), c = l("el-icon"), _ = l("ArrowDown");
30
+ return s(), m("div", F, [
31
+ i("div", {
32
32
  class: "flex items-center justify-between p-2 bg-gray-100 cursor-pointer text-sm",
33
- onClick: r[0] || (r[0] = (f) => k(e) ? e.value = !t(e) : e = !t(e))
33
+ onClick: a[0] || (a[0] = (y) => I(e) ? e.value = !t(e) : e = !t(e))
34
34
  }, [
35
- c("span", D, v(t(d).title), 1),
36
- c("span", null, [
37
- t(e) ? (s(), w(i, { key: 0 }, {
38
- default: p(() => [
39
- y(u)
35
+ i("span", U, v(t(r).title), 1),
36
+ i("span", null, [
37
+ t(e) ? (s(), f(c, { key: 0 }, {
38
+ default: d(() => [
39
+ u(g)
40
40
  ]),
41
41
  _: 1
42
- })) : (s(), w(i, { key: 1 }, {
43
- default: p(() => [
44
- y(g)
42
+ })) : (s(), f(c, { key: 1 }, {
43
+ default: d(() => [
44
+ u(_)
45
45
  ]),
46
46
  _: 1
47
47
  }))
48
48
  ])
49
49
  ]),
50
- t(e) ? (s(), _("div", F, [
51
- B(n.$slots, "default")
52
- ])) : I("", !0)
50
+ t(e) ? (s(), m("div", E, [
51
+ V(n.$slots, "default")
52
+ ])) : j("", !0)
53
53
  ]);
54
54
  };
55
55
  }
56
- }), E = /* @__PURE__ */ Object.assign({ name: "widget-input" }, {
56
+ }), b = /* @__PURE__ */ Object.assign({ name: "widget-input" }, {
57
57
  __name: "index",
58
58
  props: {
59
59
  designer: {
@@ -65,35 +65,35 @@ const A = /* @__PURE__ */ Object.assign({ name: "testBtn" }, {
65
65
  default: () => ({})
66
66
  }
67
67
  },
68
- setup(o, { expose: d }) {
68
+ setup(o, { expose: r }) {
69
69
  let e = o;
70
- e.designer.setVueIncetance(e.widget.id, V());
71
- let n = j(() => e.widget.props);
72
- const r = (l) => {
70
+ e.designer.setVueIncetance(e.widget.id, O());
71
+ let n = $(() => e.widget.props);
72
+ const a = (p) => {
73
73
  e.designer.eventHandle({
74
74
  eventType: "onChange",
75
- value: l,
75
+ value: p,
76
76
  widget: e.widget
77
77
  });
78
- }, u = (l) => {
78
+ }, g = (p) => {
79
79
  e.designer.eventHandle({
80
80
  eventType: "onInput",
81
- value: l,
81
+ value: p,
82
82
  widget: e.widget
83
83
  });
84
- }, i = () => {
84
+ }, c = () => {
85
85
  e.designer.eventHandle({
86
86
  eventType: "onFocus",
87
87
  value: e.widget.props.value,
88
88
  widget: e.widget
89
89
  });
90
- }, g = (l) => {
90
+ }, _ = (p) => {
91
91
  e.designer.eventHandle({
92
92
  eventType: "onBlur",
93
93
  value: e.widget.props.value,
94
94
  widget: e.widget
95
95
  });
96
- }, f = () => {
96
+ }, y = () => {
97
97
  e.designer.eventHandle({
98
98
  eventType: "onHandle",
99
99
  value: e.widget.props.value,
@@ -103,54 +103,61 @@ const A = /* @__PURE__ */ Object.assign({ name: "testBtn" }, {
103
103
  return e.designer.eventHandle({
104
104
  eventType: "onCreated",
105
105
  widget: e.widget
106
- }), O(() => {
106
+ }), A(() => {
107
107
  e.designer.eventHandle({
108
108
  eventType: "onMounted",
109
109
  widget: e.widget
110
110
  });
111
- }), d({
112
- changeHandle: r
113
- }), (l, x) => {
114
- const b = a("el-button"), h = a("el-input");
115
- return s(), w(h, {
116
- onChange: r,
117
- onInput: u,
118
- onFocus: i,
119
- modelValue: t(n).value,
120
- "onUpdate:modelValue": x[0] || (x[0] = (H) => t(n).value = H),
121
- type: t(n).type,
122
- size: t(n).size,
123
- onBlur: g,
124
- placeholder: t(n).placeholder,
125
- maxlength: t(n).maxlength
126
- }, $({ _: 2 }, [
127
- t(n).prependText ? {
128
- name: "prepend",
129
- fn: p(() => [
130
- m(v(t(n).prependText), 1)
131
- ]),
132
- key: "0"
133
- } : void 0,
134
- t(n).appendText ? {
135
- name: "append",
136
- fn: p(() => [
137
- y(b, { onClick: f }, {
138
- default: p(() => [
139
- m(v(t(n).appendText), 1)
111
+ }), r({
112
+ changeHandle: a
113
+ }), (p, x) => {
114
+ const h = l("el-button"), H = l("el-input"), T = l("common-widget-label-container");
115
+ return s(), f(T, { props: t(n) }, {
116
+ default: d(() => [
117
+ u(H, {
118
+ onChange: a,
119
+ onInput: g,
120
+ onFocus: c,
121
+ modelValue: t(n).value,
122
+ "onUpdate:modelValue": x[0] || (x[0] = (C) => t(n).value = C),
123
+ type: t(n).type,
124
+ size: t(n).size,
125
+ onBlur: _,
126
+ placeholder: t(n).placeholder,
127
+ maxlength: t(n).maxlength
128
+ }, N({ _: 2 }, [
129
+ t(n).prependText ? {
130
+ name: "prepend",
131
+ fn: d(() => [
132
+ w(v(t(n).prependText), 1)
140
133
  ]),
141
- _: 1
142
- })
143
- ]),
144
- key: "1"
145
- } : void 0
146
- ]), 1032, ["modelValue", "type", "size", "placeholder", "maxlength"]);
134
+ key: "0"
135
+ } : void 0,
136
+ t(n).appendText ? {
137
+ name: "append",
138
+ fn: d(() => [
139
+ u(h, { onClick: y }, {
140
+ default: d(() => [
141
+ w(v(t(n).appendText), 1)
142
+ ]),
143
+ _: 1
144
+ })
145
+ ]),
146
+ key: "1"
147
+ } : void 0
148
+ ]), 1032, ["modelValue", "type", "size", "placeholder", "maxlength"])
149
+ ]),
150
+ _: 1
151
+ }, 8, ["props"]);
147
152
  };
148
153
  }
149
- }), M = (o) => {
150
- o.component("testBtn", A), o.component("testInput", S), o.component("commonCard", U), o.component("widget-input", E);
151
- }, q = {
152
- install: M
154
+ });
155
+ console.log(b);
156
+ const R = (o) => {
157
+ o.component("testBtn", S), o.component("testInput", D), o.component("commonCard", M), o.component("widgetInput", b);
158
+ }, G = {
159
+ install: R
153
160
  };
154
161
  export {
155
- q as default
162
+ G as default
156
163
  };
@@ -1 +1 @@
1
- (function(e,r){typeof exports=="object"&&typeof module<"u"?module.exports=r(require("vue")):typeof define=="function"&&define.amd?define(["vue"],r):(e=typeof globalThis<"u"?globalThis:e||self,e.SunFormV3=r(e.Vue))})(this,function(e){"use strict";const r=Object.assign({name:"testBtn"},{__name:"testBtn",setup(o){return(s,t)=>" testBtn "}}),g=e.createElementVNode("input",{type:"text"},null,-1),_=Object.assign({name:"testInput"},{__name:"testInput",setup(o){return(s,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createTextVNode(" testInput "),g],64))}}),f={class:"border-gray-200 border-t border-b"},u={class:"select-none"},w={key:0,class:"px-3 py-2 bg-white"},x=Object.assign({name:"commonCard"},{__name:"index",props:{title:{type:String,default:"标题"}},setup(o){let s=o,t=e.ref(!0);return(n,l)=>{const p=e.resolveComponent("ArrowUp"),i=e.resolveComponent("el-icon"),c=e.resolveComponent("ArrowDown");return e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",{class:"flex items-center justify-between p-2 bg-gray-100 cursor-pointer text-sm",onClick:l[0]||(l[0]=a=>e.isRef(t)?t.value=!e.unref(t):t=!e.unref(t))},[e.createElementVNode("span",u,e.toDisplayString(e.unref(s).title),1),e.createElementVNode("span",null,[e.unref(t)?(e.openBlock(),e.createBlock(i,{key:0},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})):(e.openBlock(),e.createBlock(i,{key:1},{default:e.withCtx(()=>[e.createVNode(c)]),_:1}))])]),e.unref(t)?(e.openBlock(),e.createElementBlock("div",w,[e.renderSlot(n.$slots,"default")])):e.createCommentVNode("",!0)])}}}),y=Object.assign({name:"widget-input"},{__name:"index",props:{designer:{type:Object,default:()=>({})},widget:{type:Object,default:()=>({})}},setup(o,{expose:s}){let t=o;t.designer.setVueIncetance(t.widget.id,e.getCurrentInstance());let n=e.computed(()=>t.widget.props);const l=d=>{t.designer.eventHandle({eventType:"onChange",value:d,widget:t.widget})},p=d=>{t.designer.eventHandle({eventType:"onInput",value:d,widget:t.widget})},i=()=>{t.designer.eventHandle({eventType:"onFocus",value:t.widget.props.value,widget:t.widget})},c=d=>{t.designer.eventHandle({eventType:"onBlur",value:t.widget.props.value,widget:t.widget})},a=()=>{t.designer.eventHandle({eventType:"onHandle",value:t.widget.props.value,widget:t.widget})};return t.designer.eventHandle({eventType:"onCreated",widget:t.widget}),e.onMounted(()=>{t.designer.eventHandle({eventType:"onMounted",widget:t.widget})}),s({changeHandle:l}),(d,m)=>{const h=e.resolveComponent("el-button"),k=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(k,{onChange:l,onInput:p,onFocus:i,modelValue:e.unref(n).value,"onUpdate:modelValue":m[0]||(m[0]=C=>e.unref(n).value=C),type:e.unref(n).type,size:e.unref(n).size,onBlur:c,placeholder:e.unref(n).placeholder,maxlength:e.unref(n).maxlength},e.createSlots({_:2},[e.unref(n).prependText?{name:"prepend",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).prependText),1)]),key:"0"}:void 0,e.unref(n).appendText?{name:"append",fn:e.withCtx(()=>[e.createVNode(h,{onClick:a},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).appendText),1)]),_:1})]),key:"1"}:void 0]),1032,["modelValue","type","size","placeholder","maxlength"])}}});return{install:o=>{o.component("testBtn",r),o.component("testInput",_),o.component("commonCard",x),o.component("widget-input",y)}}});
1
+ (function(e,r){typeof exports=="object"&&typeof module<"u"?module.exports=r(require("vue")):typeof define=="function"&&define.amd?define(["vue"],r):(e=typeof globalThis<"u"?globalThis:e||self,e.SunFormV3=r(e.Vue))})(this,function(e){"use strict";const r=Object.assign({name:"testBtn"},{__name:"testBtn",setup(o){return(l,t)=>" testBtn "}}),_=e.createElementVNode("input",{type:"text"},null,-1),f=Object.assign({name:"testInput"},{__name:"testInput",setup(o){return(l,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createTextVNode(" testInput "),_],64))}}),u={class:"border-gray-200 border-t border-b"},w={class:"select-none"},x={key:0,class:"px-3 py-2 bg-white"},y=Object.assign({name:"commonCard"},{__name:"index",props:{title:{type:String,default:"标题"}},setup(o){let l=o,t=e.ref(!0);return(n,s)=>{const p=e.resolveComponent("ArrowUp"),c=e.resolveComponent("el-icon"),a=e.resolveComponent("ArrowDown");return e.openBlock(),e.createElementBlock("div",u,[e.createElementVNode("div",{class:"flex items-center justify-between p-2 bg-gray-100 cursor-pointer text-sm",onClick:s[0]||(s[0]=m=>e.isRef(t)?t.value=!e.unref(t):t=!e.unref(t))},[e.createElementVNode("span",w,e.toDisplayString(e.unref(l).title),1),e.createElementVNode("span",null,[e.unref(t)?(e.openBlock(),e.createBlock(c,{key:0},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})):(e.openBlock(),e.createBlock(c,{key:1},{default:e.withCtx(()=>[e.createVNode(a)]),_:1}))])]),e.unref(t)?(e.openBlock(),e.createElementBlock("div",x,[e.renderSlot(n.$slots,"default")])):e.createCommentVNode("",!0)])}}}),i=Object.assign({name:"widget-input"},{__name:"index",props:{designer:{type:Object,default:()=>({})},widget:{type:Object,default:()=>({})}},setup(o,{expose:l}){let t=o;t.designer.setVueIncetance(t.widget.id,e.getCurrentInstance());let n=e.computed(()=>t.widget.props);const s=d=>{t.designer.eventHandle({eventType:"onChange",value:d,widget:t.widget})},p=d=>{t.designer.eventHandle({eventType:"onInput",value:d,widget:t.widget})},c=()=>{t.designer.eventHandle({eventType:"onFocus",value:t.widget.props.value,widget:t.widget})},a=d=>{t.designer.eventHandle({eventType:"onBlur",value:t.widget.props.value,widget:t.widget})},m=()=>{t.designer.eventHandle({eventType:"onHandle",value:t.widget.props.value,widget:t.widget})};return t.designer.eventHandle({eventType:"onCreated",widget:t.widget}),e.onMounted(()=>{t.designer.eventHandle({eventType:"onMounted",widget:t.widget})}),l({changeHandle:s}),(d,g)=>{const h=e.resolveComponent("el-button"),C=e.resolveComponent("el-input"),k=e.resolveComponent("common-widget-label-container");return e.openBlock(),e.createBlock(k,{props:e.unref(n)},{default:e.withCtx(()=>[e.createVNode(C,{onChange:s,onInput:p,onFocus:c,modelValue:e.unref(n).value,"onUpdate:modelValue":g[0]||(g[0]=b=>e.unref(n).value=b),type:e.unref(n).type,size:e.unref(n).size,onBlur:a,placeholder:e.unref(n).placeholder,maxlength:e.unref(n).maxlength},e.createSlots({_:2},[e.unref(n).prependText?{name:"prepend",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).prependText),1)]),key:"0"}:void 0,e.unref(n).appendText?{name:"append",fn:e.withCtx(()=>[e.createVNode(h,{onClick:m},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).appendText),1)]),_:1})]),key:"1"}:void 0]),1032,["modelValue","type","size","placeholder","maxlength"])]),_:1},8,["props"])}}});return console.log(i),{install:o=>{o.component("testBtn",r),o.component("testInput",f),o.component("commonCard",y),o.component("widgetInput",i)}}});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sun-form-v3",
3
3
  "private": false,
4
- "version": "1.0.47",
4
+ "version": "1.0.49",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"