luyoumin-ui 0.0.8 → 0.0.9

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.
@@ -0,0 +1,53 @@
1
+ import { defineComponent as l, onMounted as r, toRaw as p, ref as d, openBlock as s, createElementBlock as c, createElementVNode as i, createCommentVNode as f } from "vue";
2
+ const _ = { style: { position: "relative" } }, m = {
3
+ key: 0,
4
+ class: "float-box"
5
+ }, u = /* @__PURE__ */ l({
6
+ __name: "JsonExportExcel",
7
+ props: {
8
+ title: {
9
+ type: String,
10
+ default: () => "file name"
11
+ },
12
+ jsonData: {
13
+ type: Array,
14
+ default: () => []
15
+ },
16
+ fields: {
17
+ type: Object,
18
+ default: () => {
19
+ }
20
+ }
21
+ },
22
+ setup(t) {
23
+ const e = t;
24
+ r(() => {
25
+ }), p(e);
26
+ const o = d(!1), n = () => {
27
+ o.value = !o.value;
28
+ };
29
+ return (a, k) => (s(), c("div", _, [
30
+ i("div", {
31
+ class: "muk-btn primary",
32
+ onClick: n
33
+ }, "download"),
34
+ o.value ? (s(), c("div", m, "你好你好你好")) : f("", !0)
35
+ ]));
36
+ }
37
+ }), v = (t, e) => {
38
+ const o = t.__vccOpts || t;
39
+ for (const [n, a] of e)
40
+ o[n] = a;
41
+ return o;
42
+ }, x = /* @__PURE__ */ v(u, [["__scopeId", "data-v-7a4f9d97"]]), y = [x], h = {
43
+ install(t) {
44
+ y.forEach((e) => {
45
+ t.component(e.name, e);
46
+ });
47
+ }
48
+ };
49
+ export {
50
+ x as JsonExportExcel,
51
+ h as default
52
+ };
53
+ //# sourceMappingURL=luyoumin-ui.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"luyoumin-ui.es.js","sources":["../src/components/JsonExportExcel.vue","../lib/main.ts"],"sourcesContent":["<template>\n <div style=\"position: relative;\">\n <div class=\"muk-btn primary\" @click=\"handleClick\">download</div>\n <div v-if=\"showFloat\" class=\"float-box\">你好你好你好</div>\n </div>\n</template>\n\n<script setup lang=\"ts\" name=\"JsonExportExcel\">\n import { onMounted, toRaw, ref } 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 showFloat = ref(false);\n const handleClick = () => {\n showFloat.value = !showFloat.value;\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 .float-box {position: fixed;top: 100px;left: 100px;font-size: 200x;color: black;font-weight: bold;}\n</style>","import JsonExportExcel from '../src/components/JsonExportExcel.vue';\n// 按需引入\nexport { JsonExportExcel };\nconst components = [JsonExportExcel];\n\n// 批量组件注册\nconst 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};\n\nexport default install;\n"],"names":["props","__props","onMounted","toRaw","showFloat","ref","handleClick","components","JsonExportExcel","install","App","item"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AASI,UAAMA,IAAQC;AAcd,IAAAC,EAAU,MAAM;AAAA,IAAA,CAEf,GACmCC,EAAMH,CAAK;AACzC,UAAAI,IAAYC,EAAI,EAAK,GACrBC,IAAc,MAAM;AACZ,MAAAF,EAAA,QAAQ,CAACA,EAAU;AAAA,IAAA;;;;;;;;;;;;;;iEC1B/BG,IAAa,CAACC,CAAe,GAG7BC,IAAU;AAAA,EACd,QAAQC,GAAU;AACL,IAAAH,EAAA,QAAQ,CAACI,MAAS;AAEvB,MAAAD,EAAA,UAAUC,EAAK,MAAMA,CAAI;AAAA,IAAA,CAC9B;AAAA,EACH;AACF;"}
@@ -0,0 +1,2 @@
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 i={style:{position:"relative"}},r={key:0,class:"float-box"},l=((o,n)=>{const s=o.__vccOpts||o;for(const[c,a]of n)s[c]=a;return s})(e.defineComponent({__name:"JsonExportExcel",props:{title:{type:String,default:()=>"file name"},jsonData:{type:Array,default:()=>[]},fields:{type:Object,default:()=>{}}},setup(o){const n=o;e.onMounted(()=>{}),e.toRaw(n);const s=e.ref(!1),c=()=>{s.value=!s.value};return(a,_)=>(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",{class:"muk-btn primary",onClick:c},"download"),s.value?(e.openBlock(),e.createElementBlock("div",r,"你好你好你好")):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-7a4f9d97"]]),d=[l],f={install(o){d.forEach(n=>{o.component(n.name,n)})}};t.JsonExportExcel=l,t.default=f,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
2
+ //# sourceMappingURL=luyoumin-ui.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"luyoumin-ui.umd.js","sources":["../src/components/JsonExportExcel.vue","../lib/main.ts"],"sourcesContent":["<template>\n <div style=\"position: relative;\">\n <div class=\"muk-btn primary\" @click=\"handleClick\">download</div>\n <div v-if=\"showFloat\" class=\"float-box\">你好你好你好</div>\n </div>\n</template>\n\n<script setup lang=\"ts\" name=\"JsonExportExcel\">\n import { onMounted, toRaw, ref } 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 showFloat = ref(false);\n const handleClick = () => {\n showFloat.value = !showFloat.value;\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 .float-box {position: fixed;top: 100px;left: 100px;font-size: 200x;color: black;font-weight: bold;}\n</style>","import JsonExportExcel from '../src/components/JsonExportExcel.vue';\n// 按需引入\nexport { JsonExportExcel };\nconst components = [JsonExportExcel];\n\n// 批量组件注册\nconst 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};\n\nexport default install;\n"],"names":["props","__props","onMounted","toRaw","showFloat","ref","handleClick","components","JsonExportExcel","install","App","item"],"mappings":"0jBASI,MAAMA,EAAQC,EAcdC,EAAAA,UAAU,IAAM,CAAA,CAEf,EACmCC,EAAAA,MAAMH,CAAK,EACzC,MAAAI,EAAYC,MAAI,EAAK,EACrBC,EAAc,IAAM,CACZF,EAAA,MAAQ,CAACA,EAAU,KAAA,2QC1B/BG,EAAa,CAACC,CAAe,EAG7BC,EAAU,CACd,QAAQC,EAAU,CACLH,EAAA,QAASI,GAAS,CAEvBD,EAAA,UAAUC,EAAK,KAAMA,CAAI,CAAA,CAC9B,CACH,CACF"}
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .muk-btn[data-v-7a4f9d97]{-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-7a4f9d97]{width:240px;height:50px;font-size:16px}.moddle[data-v-7a4f9d97]{width:180px;height:50px;font-size:16px}.small[data-v-7a4f9d97]{width:100px;height:32px}.mini[data-v-7a4f9d97]{width:60px;height:32px}.default[data-v-7a4f9d97]{border-color:#e4e4e4;color:#666}.primary[data-v-7a4f9d97]{border-color:#6848c7;background:#7861b7;color:#fff}.plain[data-v-7a4f9d97]{border-color:#87ceeb;color:#87ceeb;background:lighten(skyblue,50%)}.gray[data-v-7a4f9d97]{border-color:#ccc;background:#ccc;color:#fff}.float-box[data-v-7a4f9d97]{position:fixed;top:100px;left:100px;font-size:200x;color:#000;font-weight:700}
package/package.json CHANGED
@@ -1,21 +1,30 @@
1
1
  {
2
2
  "name": "luyoumin-ui",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Ui component library based on Vue3",
5
5
  "author": "luyoumin",
6
6
  "license": "MIT",
7
7
  "private": false,
8
- "main": "lib/luyoumin-ui.umd.cjs",
9
- "module": "lib/luyoumin-ui.umd.cjs",
10
- "types": "lib/index.d.ts",
8
+ "main": "./dist/luyoumin-ui.umd.js",
9
+ "module": "./dist/luyoumin-ui.es.js",
10
+ "style": "./dist/style.css",
11
+ "types": "./index.d.ts",
11
12
  "type": "module",
12
13
  "files": [
13
- "package.json",
14
- "README.md",
15
- "LICENSE",
16
- "lib",
17
- "global.d.ts"
14
+ "dist",
15
+ "index.d.ts"
18
16
  ],
17
+ "exports": {
18
+ ".": {
19
+ "types": "./index.d.ts",
20
+ "import": "./dist/luyoumin-ui.es.js",
21
+ "require": "./dist/luyoumin-ui.umd.js"
22
+ },
23
+ "./dist/style.css": {
24
+ "import": "./dist/style.css",
25
+ "require": "./dist/style.css"
26
+ }
27
+ },
19
28
  "scripts": {
20
29
  "dev": "vite",
21
30
  "build": "vue-tsc && vite build"
@@ -1,59 +0,0 @@
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
- };
@@ -1 +0,0 @@
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"}})});
@@ -1,78 +0,0 @@
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;
@@ -1,7 +0,0 @@
1
- import { default as TButton } from './button';
2
-
3
- export { TButton };
4
- declare const _default: {
5
- install: any;
6
- };
7
- export default _default;
@@ -1,5 +0,0 @@
1
- import { Plugin } from 'vue';
2
-
3
- type SFCWithInstall<T> = T & Plugin;
4
- export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E) => SFCWithInstall<T> & E;
5
- export {};
package/lib/style.css DELETED
@@ -1 +0,0 @@
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}
File without changes
File without changes
File without changes