erp-plus 1.0.0 → 1.0.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.mjs CHANGED
@@ -1,87 +1,74 @@
1
- import { defineComponent as m, computed as r, resolveComponent as V, createBlock as x, openBlock as d, mergeProps as S, unref as p, isRef as $, createSlots as k, renderList as y, withCtx as I, renderSlot as P, normalizeProps as B, guardReactiveProps as N, createElementBlock as b, normalizeClass as w, createElementVNode as z } from "vue";
2
- const E = /* @__PURE__ */ m({
3
- __name: "index",
1
+ import { defineComponent as c, computed as r, resolveComponent as h, createBlock as m, openBlock as i, mergeProps as g, createSlots as f, renderList as V, withCtx as C, renderSlot as B, normalizeProps as I, guardReactiveProps as v } from "vue";
2
+ const $ = c({
3
+ name: "YwInput",
4
4
  props: {
5
- modelValue: {},
6
- config: {}
7
- },
8
- emits: ["update:modelValue", "input", "change", "blur", "focus", "svgClick"],
9
- setup(n, { emit: o }) {
10
- const l = n, t = o, a = r(() => ({
11
- clearable: !0,
12
- placeholder: "请输入",
13
- ...l.config,
14
- modelValue: s.value
15
- })), s = r({
16
- get: () => l.modelValue || "",
17
- set: (e) => t("update:modelValue", e)
18
- }), g = (e) => {
19
- t("input", e);
20
- }, f = (e) => {
21
- t("change", e);
22
- }, h = (e) => {
23
- t("blur", e);
24
- }, v = (e) => {
25
- t("focus", e);
26
- };
27
- return (e, c) => {
28
- const _ = V("el-input");
29
- return d(), x(_, S(p(a), {
30
- modelValue: p(s),
31
- "onUpdate:modelValue": c[0] || (c[0] = (u) => $(s) ? s.value = u : null),
32
- class: "custom-input",
33
- onInput: g,
34
- onChange: f,
35
- onBlur: h,
36
- onFocus: v
37
- }), k({ _: 2 }, [
38
- y(e.$slots, (u, i) => ({
39
- name: i,
40
- fn: I((C) => [
41
- P(e.$slots, i, B(N(C || {})))
42
- ])
43
- }))
44
- ]), 1040, ["modelValue"]);
45
- };
46
- }
47
- }), F = ["xlink:href", "fill"], R = /* @__PURE__ */ m({
48
- __name: "index",
49
- props: {
50
- iconClass: {
51
- type: String,
52
- required: !0
53
- },
54
- className: {
55
- type: String,
5
+ modelValue: {
6
+ type: [String, Number],
56
7
  default: ""
57
8
  },
58
- color: {
59
- type: String,
60
- default: ""
9
+ config: {
10
+ type: Object,
11
+ default: () => ({})
61
12
  }
62
13
  },
63
- setup(n) {
64
- const o = n, l = r(() => o.className ? (console.log(o.className), `svg-icon ${o.className}`) : "svg-icon"), t = r(() => `#icon-${o.iconClass}`);
65
- return (a, s) => (d(), b("svg", {
66
- class: w(l.value),
67
- "aria-hidden": "true"
68
- }, [
69
- z("use", {
70
- "xlink:href": t.value,
71
- fill: n.color
72
- }, null, 8, F)
73
- ], 2));
74
- }
75
- }), L = {
76
- install(n, o) {
77
- const l = o?.prefix || "yw";
78
- n.component(`${l}Input`, E), n.component("SvgIcon", R), n.config.globalProperties.$myComponents = {
79
- version: "1.0.0"
14
+ emits: [
15
+ "update:modelValue",
16
+ "input",
17
+ "change",
18
+ "blur",
19
+ "focus",
20
+ "svgClick"
21
+ ],
22
+ setup(e, { emit: n }) {
23
+ const l = r({
24
+ get: () => e.modelValue,
25
+ set: (o) => n("update:modelValue", o)
26
+ }), t = r(() => ({
27
+ clearable: !0,
28
+ placeholder: "请输入",
29
+ ...e.config,
30
+ modelValue: l.value
31
+ }));
32
+ return {
33
+ inputValue: l,
34
+ mergedProps: t,
35
+ handleInput: (o) => n("input", o),
36
+ handleChange: (o) => n("change", o),
37
+ handleBlur: (o) => n("blur", o),
38
+ handleFocus: (o) => n("focus", o)
80
39
  };
81
40
  }
41
+ }), b = (e, n) => {
42
+ const l = e.__vccOpts || e;
43
+ for (const [t, u] of n)
44
+ l[t] = u;
45
+ return l;
82
46
  };
47
+ function F(e, n, l, t, u, p) {
48
+ const s = h("el-input");
49
+ return i(), m(s, g(e.mergedProps, {
50
+ modelValue: e.inputValue,
51
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => e.inputValue = a),
52
+ class: "custom-input",
53
+ onInput: e.handleInput,
54
+ onChange: e.handleChange,
55
+ onBlur: e.handleBlur,
56
+ onFocus: e.handleFocus
57
+ }), f({ _: 2 }, [
58
+ V(e.$slots, (a, o) => ({
59
+ name: o,
60
+ fn: C((d) => [
61
+ B(e.$slots, o, I(v(d || {})))
62
+ ])
63
+ }))
64
+ ]), 1040, ["modelValue", "onInput", "onChange", "onBlur", "onFocus"]);
65
+ }
66
+ const P = /* @__PURE__ */ b($, [["render", F]]), k = [P], y = (e) => {
67
+ k.forEach((n) => {
68
+ console.log(n.name, "组件名称"), e.component(n.name, n);
69
+ });
70
+ }, w = { install: y };
83
71
  export {
84
- E as Input,
85
- R as SvgIcon,
86
- L as default
72
+ w as default,
73
+ P as ywInput
87
74
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o["erp-plus"]={},o.Vue))})(this,function(o,e){"use strict";const i=e.defineComponent({__name:"index",props:{modelValue:{},config:{}},emits:["update:modelValue","input","change","blur","focus","svgClick"],setup(t,{emit:l}){const c=t,s=l,u=e.computed(()=>({clearable:!0,placeholder:"请输入",...c.config,modelValue:r.value})),r=e.computed({get:()=>c.modelValue||"",set:n=>s("update:modelValue",n)}),h=n=>{s("input",n)},_=n=>{s("change",n)},C=n=>{s("blur",n)},V=n=>{s("focus",n)};return(n,p)=>{const y=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(y,e.mergeProps(e.unref(u),{modelValue:e.unref(r),"onUpdate:modelValue":p[0]||(p[0]=d=>e.isRef(r)?r.value=d:null),class:"custom-input",onInput:h,onChange:_,onBlur:C,onFocus:V}),e.createSlots({_:2},[e.renderList(n.$slots,(d,m)=>({name:m,fn:e.withCtx(S=>[e.renderSlot(n.$slots,m,e.normalizeProps(e.guardReactiveProps(S||{})))])}))]),1040,["modelValue"])}}}),f=["xlink:href","fill"],a=e.defineComponent({__name:"index",props:{iconClass:{type:String,required:!0},className:{type:String,default:""},color:{type:String,default:""}},setup(t){const l=t,c=e.computed(()=>l.className?(console.log(l.className),`svg-icon ${l.className}`):"svg-icon"),s=e.computed(()=>`#icon-${l.iconClass}`);return(u,r)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(c.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":s.value,fill:t.color},null,8,f)],2))}}),g={install(t,l){const c=l?.prefix||"yw";t.component(`${c}Input`,i),t.component("SvgIcon",a),t.config.globalProperties.$myComponents={version:"1.0.0"}}};o.Input=i,o.SvgIcon=a,o.default=g,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(l,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(l=typeof globalThis<"u"?globalThis:l||self,e(l["erp-plus"]={},l.Vue))})(this,function(l,e){"use strict";const c=e.defineComponent({name:"YwInput",props:{modelValue:{type:[String,Number],default:""},config:{type:Object,default:()=>({})}},emits:["update:modelValue","input","change","blur","focus","svgClick"],setup(n,{emit:o}){const u=e.computed({get:()=>n.modelValue,set:t=>o("update:modelValue",t)}),s=e.computed(()=>({clearable:!0,placeholder:"请输入",...n.config,modelValue:u.value}));return{inputValue:u,mergedProps:s,handleInput:t=>o("input",t),handleChange:t=>o("change",t),handleBlur:t=>o("blur",t),handleFocus:t=>o("focus",t)}}}),i=(n,o)=>{const u=n.__vccOpts||n;for(const[s,a]of o)u[s]=a;return u};function f(n,o,u,s,a,g){const p=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(p,e.mergeProps(n.mergedProps,{modelValue:n.inputValue,"onUpdate:modelValue":o[0]||(o[0]=r=>n.inputValue=r),class:"custom-input",onInput:n.handleInput,onChange:n.handleChange,onBlur:n.handleBlur,onFocus:n.handleFocus}),e.createSlots({_:2},[e.renderList(n.$slots,(r,t)=>({name:t,fn:e.withCtx(V=>[e.renderSlot(n.$slots,t,e.normalizeProps(e.guardReactiveProps(V||{})))])}))]),1040,["modelValue","onInput","onChange","onBlur","onFocus"])}const d=i(c,[["render",f]]),h=[d],m={install:n=>{h.forEach(o=>{console.log(o.name,"组件名称"),n.component(o.name,o)})}};l.default=m,l.ywInput=d,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "erp-plus",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "dist/index.umd.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",