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 +64 -77
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,87 +1,74 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
59
|
-
type:
|
|
60
|
-
default:
|
|
9
|
+
config: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: () => ({})
|
|
61
12
|
}
|
|
62
13
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
L as default
|
|
72
|
+
w as default,
|
|
73
|
+
P as ywInput
|
|
87
74
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
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"}})});
|