erp-plus 1.0.1 → 1.0.2
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/types/App.vue.d.ts +3 -0
- package/dist/types/erp-plus.css +1 -0
- package/dist/types/erp-plus.es.js +87 -0
- package/dist/types/erp-plus.umd.js +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/main.d.ts +0 -0
- package/dist/types/packages/Button/Button.vue.d.ts +48 -0
- package/dist/types/packages/Button/index.d.ts +6 -0
- package/dist/types/packages/Button/types.d.ts +24 -0
- package/dist/types/plugins/svgicon.d.ts +5 -0
- package/package.json +2 -2
- package/dist/index.css +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +0 -74
- package/dist/index.umd.js +0 -1
- /package/dist/{vite.svg → types/vite.svg} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.erp-button[data-v-cb037014]{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:8px 16px;font-size:14px;line-height:1.5;border-radius:4px;border:1px solid transparent;cursor:pointer;transition:all .3s;outline:none}.erp-button--default[data-v-cb037014]{background-color:#fff;border-color:#dcdfe6;color:#303133}.erp-button--default[data-v-cb037014]:hover{border-color:#409eff;color:#409eff}.erp-button--primary[data-v-cb037014]{background-color:#409eff;color:#fff}.erp-button--primary[data-v-cb037014]:hover{background-color:#73b8ff}.erp-button--disabled[data-v-cb037014]{opacity:.6;cursor:not-allowed}.erp-button--block[data-v-cb037014]{display:block;width:100%}.erp-button__loading[data-v-cb037014]{display:inline-flex;margin-right:8px;animation:rotate-cb037014 1s linear infinite}.erp-button__loading-icon[data-v-cb037014]{width:16px;height:16px}.erp-button__content[data-v-cb037014]{display:inline-flex;align-items:center}@keyframes rotate-cb037014{0%{transform:rotate(0)}to{transform:rotate(360deg)}}*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;line-height:1.5;color:#303133}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineComponent as c, createElementBlock as d, openBlock as i, normalizeClass as p, createCommentVNode as u, createElementVNode as l, renderSlot as f } from "vue";
|
|
2
|
+
const b = c({
|
|
3
|
+
name: "YwButton",
|
|
4
|
+
props: {
|
|
5
|
+
type: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "default",
|
|
8
|
+
validator: (e) => ["default", "primary", "success", "warning", "danger"].includes(e)
|
|
9
|
+
},
|
|
10
|
+
disabled: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: !1
|
|
13
|
+
},
|
|
14
|
+
loading: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !1
|
|
17
|
+
},
|
|
18
|
+
block: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
emits: ["click"],
|
|
24
|
+
setup(e, { emit: t }) {
|
|
25
|
+
return {
|
|
26
|
+
handleClick: (n) => {
|
|
27
|
+
!e.disabled && !e.loading && t("click", n);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}), m = (e, t) => {
|
|
32
|
+
const o = e.__vccOpts || e;
|
|
33
|
+
for (const [n, s] of t)
|
|
34
|
+
o[n] = s;
|
|
35
|
+
return o;
|
|
36
|
+
}, k = ["disabled"], g = {
|
|
37
|
+
key: 0,
|
|
38
|
+
class: "erp-button__loading"
|
|
39
|
+
}, _ = { class: "erp-button__content" };
|
|
40
|
+
function y(e, t, o, n, s, C) {
|
|
41
|
+
return i(), d("button", {
|
|
42
|
+
class: p([
|
|
43
|
+
"erp-button",
|
|
44
|
+
`erp-button--${e.type}`,
|
|
45
|
+
{
|
|
46
|
+
"erp-button--disabled": e.disabled,
|
|
47
|
+
"erp-button--loading": e.loading,
|
|
48
|
+
"erp-button--block": e.block
|
|
49
|
+
}
|
|
50
|
+
]),
|
|
51
|
+
disabled: e.disabled || e.loading,
|
|
52
|
+
onClick: t[0] || (t[0] = (...r) => e.handleClick && e.handleClick(...r))
|
|
53
|
+
}, [
|
|
54
|
+
e.loading ? (i(), d("span", g, t[1] || (t[1] = [
|
|
55
|
+
l("svg", {
|
|
56
|
+
class: "erp-button__loading-icon",
|
|
57
|
+
viewBox: "0 0 1024 1024"
|
|
58
|
+
}, [
|
|
59
|
+
l("path", {
|
|
60
|
+
d: "M512 1024c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zm0-938.67c-235.64 0-426.67 191.03-426.67 426.67s191.03 426.67 426.67 426.67 426.67-191.03 426.67-426.67-191.03-426.67-426.67-426.67z",
|
|
61
|
+
fill: "#FFF"
|
|
62
|
+
}),
|
|
63
|
+
l("path", {
|
|
64
|
+
d: "M512 1024c-282.77 0-512-229.23-512-512 0-282.77 229.23-512 512-512",
|
|
65
|
+
fill: "currentColor"
|
|
66
|
+
})
|
|
67
|
+
], -1)
|
|
68
|
+
]))) : u("", !0),
|
|
69
|
+
l("span", _, [
|
|
70
|
+
f(e.$slots, "default", {}, void 0, !0)
|
|
71
|
+
])
|
|
72
|
+
], 10, k);
|
|
73
|
+
}
|
|
74
|
+
const a = /* @__PURE__ */ m(b, [["render", y], ["__scopeId", "data-v-cb037014"]]);
|
|
75
|
+
a.install = (e) => {
|
|
76
|
+
e.component("YwButton", a);
|
|
77
|
+
};
|
|
78
|
+
const B = [a], v = {
|
|
79
|
+
install(e) {
|
|
80
|
+
B.forEach((t) => {
|
|
81
|
+
e.use(t);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
export {
|
|
86
|
+
v as default
|
|
87
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("vue")):typeof define=="function"&&define.amd?define(["vue"],o):(t=typeof globalThis<"u"?globalThis:t||self,t.ErpPlus=o(t.Vue))})(this,function(t){"use strict";const o=t.defineComponent({name:"YwButton",props:{type:{type:String,default:"default",validator:e=>["default","primary","success","warning","danger"].includes(e)},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:n}){return{handleClick:s=>{!e.disabled&&!e.loading&&n("click",s)}}}}),i=(e,n)=>{const l=e.__vccOpts||e;for(const[s,a]of n)l[s]=a;return l},r=["disabled"],c={key:0,class:"erp-button__loading"},p={class:"erp-button__content"};function u(e,n,l,s,a,k){return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["erp-button",`erp-button--${e.type}`,{"erp-button--disabled":e.disabled,"erp-button--loading":e.loading,"erp-button--block":e.block}]),disabled:e.disabled||e.loading,onClick:n[0]||(n[0]=(...b)=>e.handleClick&&e.handleClick(...b))},[e.loading?(t.openBlock(),t.createElementBlock("span",c,n[1]||(n[1]=[t.createElementVNode("svg",{class:"erp-button__loading-icon",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{d:"M512 1024c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zm0-938.67c-235.64 0-426.67 191.03-426.67 426.67s191.03 426.67 426.67 426.67 426.67-191.03 426.67-426.67-191.03-426.67-426.67-426.67z",fill:"#FFF"}),t.createElementVNode("path",{d:"M512 1024c-282.77 0-512-229.23-512-512 0-282.77 229.23-512 512-512",fill:"currentColor"})],-1)]))):t.createCommentVNode("",!0),t.createElementVNode("span",p,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],10,r)}const d=i(o,[["render",u],["__scopeId","data-v-cb037014"]]);d.install=e=>{e.component("YwButton",d)};const f=[d];return{install(e){f.forEach(n=>{e.use(n)})}}});
|
|
File without changes
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PropType, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
3
|
+
type: {
|
|
4
|
+
type: PropType<"default" | "primary" | "success" | "warning" | "danger">;
|
|
5
|
+
default: string;
|
|
6
|
+
validator: (val: string) => boolean;
|
|
7
|
+
};
|
|
8
|
+
disabled: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
loading: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
block: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
}>, {
|
|
21
|
+
handleClick: (e: MouseEvent) => void;
|
|
22
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "click"[], "click", PublicProps, Readonly< ExtractPropTypes<{
|
|
23
|
+
type: {
|
|
24
|
+
type: PropType<"default" | "primary" | "success" | "warning" | "danger">;
|
|
25
|
+
default: string;
|
|
26
|
+
validator: (val: string) => boolean;
|
|
27
|
+
};
|
|
28
|
+
disabled: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
loading: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
block: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
}>> & Readonly<{
|
|
41
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
type: "default" | "primary" | "success" | "warning" | "danger";
|
|
44
|
+
disabled: boolean;
|
|
45
|
+
loading: boolean;
|
|
46
|
+
block: boolean;
|
|
47
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
48
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export declare const buttonProps: {
|
|
3
|
+
type: {
|
|
4
|
+
type: PropType<"default" | "primary" | "success" | "warning" | "danger">;
|
|
5
|
+
default: string;
|
|
6
|
+
validator: (val: string) => boolean;
|
|
7
|
+
};
|
|
8
|
+
disabled: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
loading: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
block: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type ButtonProps = ExtractPropTypes<typeof buttonProps>;
|
|
22
|
+
export interface ButtonEmits {
|
|
23
|
+
(e: 'click', event: MouseEvent): void;
|
|
24
|
+
}
|
package/package.json
CHANGED
package/dist/index.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";.custom-input .el-input__wrapper{padding:5px 12px!important;border-radius:2px!important;border:1px solid #e5e5eb!important;box-shadow:none!important}.custom-input .el-input__wrapper .el-input__inner{height:20px!important;font-size:14px!important}.custom-input .el-input__wrapper .el-input-number{width:100%!important;text-align:left!important}.custom-input .el-input__wrapper.is-focus{border:1px solid #1951fa!important}.custom-input .el-input__wrapper:hover{border-radius:2px!important;color:#1a1a1a!important}.custom-input .el-input__clear{font-size:0;-webkit-mask:url("data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1752626608214'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3991'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M0%20512a512%20512%200%201%200%201024%200A512%20512%200%200%200%200%20512z%20m631.210667-179.541333a42.666667%2042.666667%200%200%201%2060.330666%2060.416L572.330667%20512l119.210666%20119.125333a42.666667%2042.666667%200%200%201-60.330666%2060.416L512%20572.330667%20392.874667%20691.541333a42.666667%2042.666667%200%200%201-60.330667-60.416L451.669333%20512%20332.544%20392.874667a42.666667%2042.666667%200%201%201%2060.330667-60.416L512%20451.669333l119.210667-119.210666z'%20p-id='3992'%3e%3c/path%3e%3c/svg%3e") no-repeat center;mask:url("data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1752626608214'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3991'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M0%20512a512%20512%200%201%200%201024%200A512%20512%200%200%200%200%20512z%20m631.210667-179.541333a42.666667%2042.666667%200%200%201%2060.330666%2060.416L572.330667%20512l119.210666%20119.125333a42.666667%2042.666667%200%200%201-60.330666%2060.416L512%20572.330667%20392.874667%20691.541333a42.666667%2042.666667%200%200%201-60.330667-60.416L451.669333%20512%20332.544%20392.874667a42.666667%2042.666667%200%201%201%2060.330667-60.416L512%20451.669333l119.210667-119.210666z'%20p-id='3992'%3e%3c/path%3e%3c/svg%3e") no-repeat center;-webkit-mask-size:contain;mask-size:contain;background-color:#1a1a1a;width:14px;height:14px;display:inline-block}.custom-input .el-input__clear:hover{background-color:#1951fa}
|
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {}
|
package/dist/index.mjs
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
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
|
-
props: {
|
|
5
|
-
modelValue: {
|
|
6
|
-
type: [String, Number],
|
|
7
|
-
default: ""
|
|
8
|
-
},
|
|
9
|
-
config: {
|
|
10
|
-
type: Object,
|
|
11
|
-
default: () => ({})
|
|
12
|
-
}
|
|
13
|
-
},
|
|
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)
|
|
39
|
-
};
|
|
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;
|
|
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 };
|
|
71
|
-
export {
|
|
72
|
-
w as default,
|
|
73
|
-
P as ywInput
|
|
74
|
-
};
|
package/dist/index.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}})});
|
|
File without changes
|