luyoumin-ui 0.0.7 → 0.0.8
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/lib/luyoumin-ui.es.js +59 -0
- package/lib/luyoumin-ui.umd.js +1 -0
- package/lib/packages/button/index.d.ts +78 -0
- package/lib/packages/index.d.ts +7 -0
- package/lib/packages/withInstall.d.ts +5 -0
- package/lib/style.css +1 -0
- package/package.json +12 -20
- package/dist/luyoumin-ui.es.js +0 -44
- package/dist/luyoumin-ui.es.js.map +0 -1
- package/dist/luyoumin-ui.umd.js +0 -2
- package/dist/luyoumin-ui.umd.js.map +0 -1
- package/dist/style.css +0 -1
- package/index.d.ts +0 -10
- /package/{dist/src/components/JsonExportExcel.vue.d.ts → lib/packages/button/src/index.vue.d.ts} +0 -0
- /package/{dist → lib}/src/main.d.ts +0 -0
- /package/{dist → lib}/vite.config.d.ts +0 -0
- /package/{dist → lib}/vite.svg +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineComponent as a, onMounted as r, toRaw as p, openBlock as i, createElementBlock as f } from "vue";
|
|
2
|
+
const d = /* @__PURE__ */ a({
|
|
3
|
+
__name: "index",
|
|
4
|
+
props: {
|
|
5
|
+
title: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: () => "file name"
|
|
8
|
+
},
|
|
9
|
+
jsonData: {
|
|
10
|
+
type: Array,
|
|
11
|
+
default: () => []
|
|
12
|
+
},
|
|
13
|
+
fields: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default: () => {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(o) {
|
|
20
|
+
const t = o;
|
|
21
|
+
r(() => {
|
|
22
|
+
console.log("插件-组件-初始化");
|
|
23
|
+
});
|
|
24
|
+
const { jsonData: n, fields: e, title: c } = p(t), l = () => {
|
|
25
|
+
console.log("export-click=====111", n), console.log("export-click=====222", e), console.log("export-click=====333", c);
|
|
26
|
+
};
|
|
27
|
+
return (x, j) => (i(), f("div", {
|
|
28
|
+
class: "muk-btn primary",
|
|
29
|
+
onClick: l
|
|
30
|
+
}, "download"));
|
|
31
|
+
}
|
|
32
|
+
}), m = (o, t) => {
|
|
33
|
+
const n = o.__vccOpts || o;
|
|
34
|
+
for (const [e, c] of t)
|
|
35
|
+
n[e] = c;
|
|
36
|
+
return n;
|
|
37
|
+
}, u = /* @__PURE__ */ m(d, [["__scopeId", "data-v-48590d9a"]]), _ = (o, t) => {
|
|
38
|
+
if (o.install = (n) => {
|
|
39
|
+
for (const e of [o, ...Object.values(t ?? {})])
|
|
40
|
+
n.component(e.name, e);
|
|
41
|
+
}, t)
|
|
42
|
+
for (const [n, e] of Object.entries(t))
|
|
43
|
+
o[n] = e;
|
|
44
|
+
return o;
|
|
45
|
+
}, k = _(u), s = {
|
|
46
|
+
TButton: k
|
|
47
|
+
}, y = (o) => {
|
|
48
|
+
for (const t in s)
|
|
49
|
+
o.component(t, s[t]);
|
|
50
|
+
}, g = (o) => {
|
|
51
|
+
y(o);
|
|
52
|
+
}, b = {
|
|
53
|
+
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
54
|
+
install: g
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
k as TButton,
|
|
58
|
+
b as default
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(n,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.LuyouminUi={},n.Vue))})(this,function(n,o){"use strict";const i=((t,e)=>{if(t.install=c=>{for(const s of[t,...Object.values(e??{})])c.component(s.name,s)},e)for(const[c,s]of Object.entries(e))t[c]=s;return t})(((t,e)=>{const c=t.__vccOpts||t;for(const[s,l]of e)c[s]=l;return c})(o.defineComponent({__name:"index",props:{title:{type:String,default:()=>"file name"},jsonData:{type:Array,default:()=>[]},fields:{type:Object,default:()=>{}}},setup(t){const e=t;o.onMounted(()=>{console.log("插件-组件-初始化")});const{jsonData:c,fields:s,title:l}=o.toRaw(e),a=()=>{console.log("export-click=====111",c),console.log("export-click=====222",s),console.log("export-click=====333",l)};return(k,g)=>(o.openBlock(),o.createElementBlock("div",{class:"muk-btn primary",onClick:a},"download"))}}),[["__scopeId","data-v-48590d9a"]])),f={TButton:i},p=t=>{for(const e in f)t.component(e,f[e])},r={install:t=>{p(t)}};n.TButton=i,n.default=r,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
declare const TButton: ({
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
3
|
+
title: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: () => string;
|
|
6
|
+
};
|
|
7
|
+
jsonData: {
|
|
8
|
+
type: ArrayConstructor;
|
|
9
|
+
default: () => never[];
|
|
10
|
+
};
|
|
11
|
+
fields: {
|
|
12
|
+
type: ObjectConstructor;
|
|
13
|
+
default: () => void;
|
|
14
|
+
};
|
|
15
|
+
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
title: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: () => string;
|
|
19
|
+
};
|
|
20
|
+
jsonData: {
|
|
21
|
+
type: ArrayConstructor;
|
|
22
|
+
default: () => never[];
|
|
23
|
+
};
|
|
24
|
+
fields: {
|
|
25
|
+
type: ObjectConstructor;
|
|
26
|
+
default: () => void;
|
|
27
|
+
};
|
|
28
|
+
}>>, {
|
|
29
|
+
title: string;
|
|
30
|
+
jsonData: unknown[];
|
|
31
|
+
fields: Record<string, any>;
|
|
32
|
+
}, true, {}, {}, {
|
|
33
|
+
P: {};
|
|
34
|
+
B: {};
|
|
35
|
+
D: {};
|
|
36
|
+
C: {};
|
|
37
|
+
M: {};
|
|
38
|
+
Defaults: {};
|
|
39
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
40
|
+
title: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
default: () => string;
|
|
43
|
+
};
|
|
44
|
+
jsonData: {
|
|
45
|
+
type: ArrayConstructor;
|
|
46
|
+
default: () => never[];
|
|
47
|
+
};
|
|
48
|
+
fields: {
|
|
49
|
+
type: ObjectConstructor;
|
|
50
|
+
default: () => void;
|
|
51
|
+
};
|
|
52
|
+
}>>, {}, {}, {}, {}, {
|
|
53
|
+
title: string;
|
|
54
|
+
jsonData: unknown[];
|
|
55
|
+
fields: Record<string, any>;
|
|
56
|
+
}>;
|
|
57
|
+
__isFragment?: undefined;
|
|
58
|
+
__isTeleport?: undefined;
|
|
59
|
+
__isSuspense?: undefined;
|
|
60
|
+
} & import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
61
|
+
title: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: () => string;
|
|
64
|
+
};
|
|
65
|
+
jsonData: {
|
|
66
|
+
type: ArrayConstructor;
|
|
67
|
+
default: () => never[];
|
|
68
|
+
};
|
|
69
|
+
fields: {
|
|
70
|
+
type: ObjectConstructor;
|
|
71
|
+
default: () => void;
|
|
72
|
+
};
|
|
73
|
+
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
74
|
+
title: string;
|
|
75
|
+
jsonData: unknown[];
|
|
76
|
+
fields: Record<string, any>;
|
|
77
|
+
}, {}, string, {}> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin) & Record<string, any>;
|
|
78
|
+
export default TButton;
|
package/lib/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.muk-btn[data-v-48590d9a]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;outline:none;background:#fff;text-align:center;border:1px solid transparent;border-radius:4px;cursor:pointer;padding:10px 20px}.large[data-v-48590d9a]{width:240px;height:50px;font-size:16px}.moddle[data-v-48590d9a]{width:180px;height:50px;font-size:16px}.small[data-v-48590d9a]{width:100px;height:32px}.mini[data-v-48590d9a]{width:60px;height:32px}.default[data-v-48590d9a]{border-color:#e4e4e4;color:#666}.primary[data-v-48590d9a]{border-color:#6848c7;background:#7861b7;color:#fff}.plain[data-v-48590d9a]{border-color:#87ceeb;color:#87ceeb;background:lighten(skyblue,50%)}.gray[data-v-48590d9a]{border-color:#ccc;background:#ccc;color:#fff}
|
package/package.json
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "luyoumin-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Ui component library based on Vue3",
|
|
5
|
+
"author": "luyoumin",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"private": false,
|
|
8
|
+
"main": "lib/luyoumin-ui.umd.cjs",
|
|
9
|
+
"module": "lib/luyoumin-ui.umd.cjs",
|
|
10
|
+
"types": "lib/index.d.ts",
|
|
5
11
|
"type": "module",
|
|
6
12
|
"files": [
|
|
7
|
-
"
|
|
8
|
-
"
|
|
13
|
+
"package.json",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE",
|
|
16
|
+
"lib",
|
|
17
|
+
"global.d.ts"
|
|
9
18
|
],
|
|
10
|
-
"main": "./dist/luyoumin-ui.umd.js",
|
|
11
|
-
"module": "./dist/luyoumin-ui.es.js",
|
|
12
|
-
"style": "./dist/style.css",
|
|
13
|
-
"types": "./index.d.ts",
|
|
14
|
-
"exports": {
|
|
15
|
-
".": {
|
|
16
|
-
"types": "./index.d.ts",
|
|
17
|
-
"import": "./dist/luyoumin-ui.es.js",
|
|
18
|
-
"require": "./dist/luyoumin-ui.umd.js"
|
|
19
|
-
},
|
|
20
|
-
"./dist/style.css": {
|
|
21
|
-
"import": "./dist/style.css",
|
|
22
|
-
"require": "./dist/style.css"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
19
|
"scripts": {
|
|
26
20
|
"dev": "vite",
|
|
27
21
|
"build": "vue-tsc && vite build"
|
|
@@ -29,8 +23,6 @@
|
|
|
29
23
|
"keywords": [
|
|
30
24
|
"luyoumin-ui"
|
|
31
25
|
],
|
|
32
|
-
"author": "luyoumin",
|
|
33
|
-
"license": "ISC",
|
|
34
26
|
"repository": {
|
|
35
27
|
"type": "git",
|
|
36
28
|
"url": "https://github.com/renleiabc/luyoumin-ui.git"
|
package/dist/luyoumin-ui.es.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { defineComponent as a, onMounted as s, toRaw as r, openBlock as l, createElementBlock as p } from "vue";
|
|
2
|
-
const d = /* @__PURE__ */ a({
|
|
3
|
-
__name: "JsonExportExcel",
|
|
4
|
-
props: {
|
|
5
|
-
title: {
|
|
6
|
-
type: String,
|
|
7
|
-
default: () => "file name"
|
|
8
|
-
},
|
|
9
|
-
jsonData: {
|
|
10
|
-
type: Array,
|
|
11
|
-
default: () => []
|
|
12
|
-
},
|
|
13
|
-
fields: {
|
|
14
|
-
type: Object,
|
|
15
|
-
default: () => {
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
setup(t) {
|
|
20
|
-
const o = t;
|
|
21
|
-
s(() => {
|
|
22
|
-
}), r(o);
|
|
23
|
-
const n = () => {
|
|
24
|
-
};
|
|
25
|
-
return (e, c) => (l(), p("div", {
|
|
26
|
-
class: "muk-btn primary",
|
|
27
|
-
onClick: n
|
|
28
|
-
}, "download"));
|
|
29
|
-
}
|
|
30
|
-
}), f = (t, o) => {
|
|
31
|
-
const n = t.__vccOpts || t;
|
|
32
|
-
for (const [e, c] of o)
|
|
33
|
-
n[e] = c;
|
|
34
|
-
return n;
|
|
35
|
-
}, i = /* @__PURE__ */ f(d, [["__scopeId", "data-v-dd3ab85f"]]), m = [i], _ = (t) => {
|
|
36
|
-
m.forEach((o) => {
|
|
37
|
-
t.component(o.name, o);
|
|
38
|
-
});
|
|
39
|
-
}, x = { install: _ };
|
|
40
|
-
export {
|
|
41
|
-
i as JsonExportExcel,
|
|
42
|
-
x as default
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=luyoumin-ui.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"luyoumin-ui.es.js","sources":["../src/components/JsonExportExcel.vue","../lib/main.ts"],"sourcesContent":["<template>\n <div class=\"muk-btn primary\" @click=\"handleClick\">download</div>\n</template>\n\n<script setup lang=\"ts\" name=\"JsonExportExcel\">\n import { onMounted, toRaw } from 'vue';\n const props = defineProps({\n title: {\n type: String,\n default: () => 'file name'\n },\n jsonData: {\n type: Array,\n default: () => []\n },\n fields: {\n type: Object,\n default: () => {}\n }\n })\n onMounted(() => {\n console.log('插件-组件-初始化');\n })\n const { jsonData, fields, title } = toRaw(props);\n const handleClick = () => {\n console.log('export-click=====111', jsonData);\n console.log('export-click=====222', fields);\n console.log('export-click=====333', title);\n }\n</script>\n\n<style scoped>\n .muk-btn {appearance: none;border: none;outline: none;background: #fff;text-align: center;border: 1px solid transparent;\n border-radius: 4px;cursor: pointer;padding: 10px 20px;}\n .large {width: 240px;height: 50px;font-size: 16px;}\n .moddle {width: 180px;height: 50px;font-size: 16px;}\n .small {width: 100px;height: 32px;}\n .mini {width: 60px;height: 32px;}\n .default {border-color: #e4e4e4;color: #666;}\n .primary {border-color: rgb(104, 72, 199);background: rgb(120, 97, 183);color: #fff;}\n .plain {border-color: skyblue;color: skyblue;background: lighten(skyblue, 50%);}\n .gray {border-color: #ccc;background: #ccc;color: #fff;}\n</style>","import JsonExportExcel from '../src/components/JsonExportExcel.vue';\n// 按需引入\nexport { JsonExportExcel };\nconst components = [JsonExportExcel];\n\n// 批量组件注册\n// const install = {\n// install(App: any) {\n// components.forEach((item) => {\n// console.log('🚀 ~ components.forEach ~ item:', item);\n// App.component(item.name, item);\n// });\n// }\n// };\nconst install = (App: any) => {\n components.forEach(item => {\n App.component(item.name, item);\n })\n}\n\n\n// export default install;\nexport default {install};"],"names":["props","__props","onMounted","toRaw","handleClick","components","JsonExportExcel","install","App","item","main"],"mappings":";;;;;;;;;;;;;;;;;;;AAMI,UAAMA,IAAQC;AAcd,IAAAC,EAAU,MAAM;AAAA,IAAA,CAEf,GACmCC,EAAMH,CAAK;AAC/C,UAAMI,IAAc,MAAM;AAAA,IAAA;;;;;;;;;;;iECrBxBC,IAAa,CAACC,CAAe,GAW7BC,IAAU,CAACC,MAAa;AAC1B,EAAAH,EAAW,QAAQ,CAAQI,MAAA;AACnB,IAAAD,EAAA,UAAUC,EAAK,MAAMA,CAAI;AAAA,EAAA,CAChC;AACL,GAIeC,IAAA,EAAC,SAAAH,EAAO;"}
|
package/dist/luyoumin-ui.umd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.LuyouminUi={},t.Vue))})(this,function(t,e){"use strict";const c=((n,o)=>{const s=n.__vccOpts||n;for(const[i,a]of o)s[i]=a;return s})(e.defineComponent({__name:"JsonExportExcel",props:{title:{type:String,default:()=>"file name"},jsonData:{type:Array,default:()=>[]},fields:{type:Object,default:()=>{}}},setup(n){const o=n;e.onMounted(()=>{}),e.toRaw(o);const s=()=>{};return(i,a)=>(e.openBlock(),e.createElementBlock("div",{class:"muk-btn primary",onClick:s},"download"))}}),[["__scopeId","data-v-dd3ab85f"]]),l=[c],r={install:n=>{l.forEach(o=>{n.component(o.name,o)})}};t.JsonExportExcel=c,t.default=r,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
2
|
-
//# sourceMappingURL=luyoumin-ui.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"luyoumin-ui.umd.js","sources":["../src/components/JsonExportExcel.vue","../lib/main.ts"],"sourcesContent":["<template>\n <div class=\"muk-btn primary\" @click=\"handleClick\">download</div>\n</template>\n\n<script setup lang=\"ts\" name=\"JsonExportExcel\">\n import { onMounted, toRaw } from 'vue';\n const props = defineProps({\n title: {\n type: String,\n default: () => 'file name'\n },\n jsonData: {\n type: Array,\n default: () => []\n },\n fields: {\n type: Object,\n default: () => {}\n }\n })\n onMounted(() => {\n console.log('插件-组件-初始化');\n })\n const { jsonData, fields, title } = toRaw(props);\n const handleClick = () => {\n console.log('export-click=====111', jsonData);\n console.log('export-click=====222', fields);\n console.log('export-click=====333', title);\n }\n</script>\n\n<style scoped>\n .muk-btn {appearance: none;border: none;outline: none;background: #fff;text-align: center;border: 1px solid transparent;\n border-radius: 4px;cursor: pointer;padding: 10px 20px;}\n .large {width: 240px;height: 50px;font-size: 16px;}\n .moddle {width: 180px;height: 50px;font-size: 16px;}\n .small {width: 100px;height: 32px;}\n .mini {width: 60px;height: 32px;}\n .default {border-color: #e4e4e4;color: #666;}\n .primary {border-color: rgb(104, 72, 199);background: rgb(120, 97, 183);color: #fff;}\n .plain {border-color: skyblue;color: skyblue;background: lighten(skyblue, 50%);}\n .gray {border-color: #ccc;background: #ccc;color: #fff;}\n</style>","import JsonExportExcel from '../src/components/JsonExportExcel.vue';\n// 按需引入\nexport { JsonExportExcel };\nconst components = [JsonExportExcel];\n\n// 批量组件注册\n// const install = {\n// install(App: any) {\n// components.forEach((item) => {\n// console.log('🚀 ~ components.forEach ~ item:', item);\n// App.component(item.name, item);\n// });\n// }\n// };\nconst install = (App: any) => {\n components.forEach(item => {\n App.component(item.name, item);\n })\n}\n\n\n// export default install;\nexport default {install};"],"names":["props","__props","onMounted","toRaw","handleClick","components","JsonExportExcel","main","App","item"],"mappings":"8fAMI,MAAMA,EAAQC,EAcdC,EAAAA,UAAU,IAAM,CAAA,CAEf,EACmCC,EAAAA,MAAMH,CAAK,EAC/C,MAAMI,EAAc,IAAM,CAAA,gJCrBxBC,EAAa,CAACC,CAAe,EAmBpBC,EAAA,CAAC,QARCC,GAAa,CAC1BH,EAAW,QAAgBI,GAAA,CACnBD,EAAA,UAAUC,EAAK,KAAMA,CAAI,CAAA,CAChC,CACL,CAIuB"}
|
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.muk-btn[data-v-dd3ab85f]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;outline:none;background:#fff;text-align:center;border:1px solid transparent;border-radius:4px;cursor:pointer;padding:10px 20px}.large[data-v-dd3ab85f]{width:240px;height:50px;font-size:16px}.moddle[data-v-dd3ab85f]{width:180px;height:50px;font-size:16px}.small[data-v-dd3ab85f]{width:100px;height:32px}.mini[data-v-dd3ab85f]{width:60px;height:32px}.default[data-v-dd3ab85f]{border-color:#e4e4e4;color:#666}.primary[data-v-dd3ab85f]{border-color:#6848c7;background:#7861b7;color:#fff}.plain[data-v-dd3ab85f]{border-color:#87ceeb;color:#87ceeb;background:lighten(skyblue,50%)}.gray[data-v-dd3ab85f]{border-color:#ccc;background:#ccc;color:#fff}
|
package/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { App } from 'vue';
|
|
2
|
-
|
|
3
|
-
export interface InstallOptions {
|
|
4
|
-
/** @default `ElIcon` */
|
|
5
|
-
prefix?: string;
|
|
6
|
-
}
|
|
7
|
-
// eslint-disable-next-line no-unused-vars
|
|
8
|
-
declare const _default: (app: App, { prefix }?: InstallOptions) => void;
|
|
9
|
-
export default _default;
|
|
10
|
-
export { default as JsonExportExcel } from './dist/src/components/JsonExportExcel.vue';
|
/package/{dist/src/components/JsonExportExcel.vue.d.ts → lib/packages/button/src/index.vue.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{dist → lib}/vite.svg
RENAMED
|
File without changes
|