fy-components-test 1.0.2 → 1.0.4

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.d.ts CHANGED
@@ -1,3 +1,148 @@
1
- export * from './src/index'
2
- import MiaomaComponents from './src/index'
3
- export default MiaomaComponents
1
+ import { App } from 'vue';
2
+ import { ComponentOptionsMixin } from 'vue';
3
+ import { ComponentProvideOptions } from 'vue';
4
+ import { DefineComponent } from 'vue';
5
+ import { ExtractPropTypes } from 'vue';
6
+ import { PublicProps } from 'vue';
7
+
8
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
13
+
14
+ declare const _default: {
15
+ install: (app: App) => void;
16
+ };
17
+ export default _default;
18
+
19
+ export declare const install: (app: App) => void;
20
+
21
+ export declare const MButton: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes< {
22
+ type: {
23
+ type: StringConstructor;
24
+ default: string;
25
+ validator: (value: string) => boolean;
26
+ };
27
+ size: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ validator: (value: string) => boolean;
31
+ };
32
+ plain: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
35
+ };
36
+ round: {
37
+ type: BooleanConstructor;
38
+ default: boolean;
39
+ };
40
+ circle: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ disabled: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ loading: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ };
52
+ icon: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
56
+ text: {
57
+ type: StringConstructor;
58
+ default: string;
59
+ };
60
+ autofocus: {
61
+ type: BooleanConstructor;
62
+ default: boolean;
63
+ };
64
+ nativeType: {
65
+ type: StringConstructor;
66
+ default: string;
67
+ validator: (value: string) => boolean;
68
+ };
69
+ tag: {
70
+ type: StringConstructor;
71
+ default: string;
72
+ };
73
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
74
+ click: (...args: any[]) => void;
75
+ }, string, PublicProps, Readonly<ExtractPropTypes< {
76
+ type: {
77
+ type: StringConstructor;
78
+ default: string;
79
+ validator: (value: string) => boolean;
80
+ };
81
+ size: {
82
+ type: StringConstructor;
83
+ default: string;
84
+ validator: (value: string) => boolean;
85
+ };
86
+ plain: {
87
+ type: BooleanConstructor;
88
+ default: boolean;
89
+ };
90
+ round: {
91
+ type: BooleanConstructor;
92
+ default: boolean;
93
+ };
94
+ circle: {
95
+ type: BooleanConstructor;
96
+ default: boolean;
97
+ };
98
+ disabled: {
99
+ type: BooleanConstructor;
100
+ default: boolean;
101
+ };
102
+ loading: {
103
+ type: BooleanConstructor;
104
+ default: boolean;
105
+ };
106
+ icon: {
107
+ type: StringConstructor;
108
+ default: string;
109
+ };
110
+ text: {
111
+ type: StringConstructor;
112
+ default: string;
113
+ };
114
+ autofocus: {
115
+ type: BooleanConstructor;
116
+ default: boolean;
117
+ };
118
+ nativeType: {
119
+ type: StringConstructor;
120
+ default: string;
121
+ validator: (value: string) => boolean;
122
+ };
123
+ tag: {
124
+ type: StringConstructor;
125
+ default: string;
126
+ };
127
+ }>> & Readonly<{
128
+ onClick?: ((...args: any[]) => any) | undefined;
129
+ }>, {
130
+ type: string;
131
+ size: string;
132
+ plain: boolean;
133
+ round: boolean;
134
+ circle: boolean;
135
+ disabled: boolean;
136
+ loading: boolean;
137
+ icon: string;
138
+ text: string;
139
+ autofocus: boolean;
140
+ nativeType: string;
141
+ tag: string;
142
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
143
+ default?(_: {}): any;
144
+ }>;
145
+
146
+ export declare const MText: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
147
+
148
+ export { }
package/dist/index.es.js CHANGED
@@ -1,8 +1,8 @@
1
- import { defineComponent as c, resolveComponent as u, openBlock as o, createBlock as d, withCtx as r, renderSlot as s, createElementBlock as f, Fragment as y, createTextVNode as g, toDisplayString as m } from "vue";
2
- const p = {
1
+ import { defineComponent as d, resolveComponent as i, openBlock as c, createBlock as r, withCtx as f, renderSlot as p, createElementBlock as y, Fragment as m, createTextVNode as g, toDisplayString as b } from "vue";
2
+ const k = {
3
3
  name: "MButton"
4
- }, v = /* @__PURE__ */ c({
5
- ...p,
4
+ }, v = /* @__PURE__ */ d({
5
+ ...k,
6
6
  props: {
7
7
  // 按钮类型
8
8
  type: {
@@ -77,12 +77,13 @@ const p = {
77
77
  },
78
78
  emits: ["click"],
79
79
  setup(t, { emit: e }) {
80
- const n = e, l = (a) => {
81
- n("click", a);
80
+ const a = e, o = (n) => {
81
+ a("click", n);
82
82
  };
83
- return (a, x) => {
84
- const i = u("el-button");
85
- return o(), d(i, {
83
+ return (n, u) => {
84
+ const l = i("el-button");
85
+ return c(), r(l, {
86
+ class: "m-button",
86
87
  type: t.type,
87
88
  size: t.size,
88
89
  plain: t.plain,
@@ -94,33 +95,42 @@ const p = {
94
95
  autofocus: t.autofocus,
95
96
  "native-type": t.nativeType,
96
97
  tag: t.tag,
97
- onClick: l
98
+ onClick: o
98
99
  }, {
99
- default: r(() => [
100
- a.$slots.default ? s(a.$slots, "default", { key: 0 }, void 0, !0) : (o(), f(y, { key: 1 }, [
101
- g(m(t.text), 1)
100
+ default: f(() => [
101
+ n.$slots.default ? p(n.$slots, "default", { key: 0 }, void 0, !0) : (c(), y(m, { key: 1 }, [
102
+ g(b(t.text), 1)
102
103
  ], 64))
103
104
  ]),
104
105
  _: 3
105
106
  }, 8, ["type", "size", "plain", "round", "circle", "disabled", "loading", "icon", "autofocus", "native-type", "tag"]);
106
107
  };
107
108
  }
108
- }), B = (t, e) => {
109
- const n = t.__vccOpts || t;
110
- for (const [l, a] of e)
111
- n[l] = a;
112
- return n;
113
- }, b = /* @__PURE__ */ B(v, [["__scopeId", "data-v-79154a89"]]), k = [
114
- b
115
- ], S = (t) => {
116
- k.forEach((e) => {
109
+ }), s = (t, e) => {
110
+ const a = t.__vccOpts || t;
111
+ for (const [o, n] of e)
112
+ a[o] = n;
113
+ return a;
114
+ }, B = /* @__PURE__ */ s(v, [["__scopeId", "data-v-80d70ab0"]]), x = {
115
+ name: "MText"
116
+ };
117
+ function S(t, e, a, o, n, u) {
118
+ const l = i("el-backtop");
119
+ return c(), r(l, { target: ".page-component__scroll .el-scrollbar__wrap" });
120
+ }
121
+ const _ = /* @__PURE__ */ s(x, [["render", S]]), $ = [
122
+ B,
123
+ _
124
+ ], h = (t) => {
125
+ $.forEach((e) => {
117
126
  e.name && t.component(e.name, e);
118
127
  });
119
- }, h = {
120
- install: S
128
+ }, T = {
129
+ install: h
121
130
  };
122
131
  export {
123
- b as MButton,
124
- h as default,
125
- S as install
132
+ B as MButton,
133
+ _ as MText,
134
+ T as default,
135
+ h as install
126
136
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n.MiaomaComponents={},n.Vue))})(this,function(n,t){"use strict";const u={name:"MButton"},s=t.defineComponent({...u,props:{type:{type:String,default:"primary",validator:e=>["primary","success","warning","danger","info","text"].includes(e)},size:{type:String,default:"default",validator:e=>["large","default","small","mini"].includes(e)},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:String,default:""},text:{type:String,default:""},autofocus:{type:Boolean,default:!1},nativeType:{type:String,default:"button",validator:e=>["button","submit","reset"].includes(e)},tag:{type:String,default:"button"}},emits:["click"],setup(e,{emit:a}){const l=a,i=o=>{l("click",o)};return(o,m)=>{const y=t.resolveComponent("el-button");return t.openBlock(),t.createBlock(y,{type:e.type,size:e.size,plain:e.plain,round:e.round,circle:e.circle,disabled:e.disabled,loading:e.loading,icon:e.icon,autofocus:e.autofocus,"native-type":e.nativeType,tag:e.tag,onClick:i},{default:t.withCtx(()=>[o.$slots.default?t.renderSlot(o.$slots,"default",{key:0},void 0,!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.text),1)],64))]),_:3},8,["type","size","plain","round","circle","disabled","loading","icon","autofocus","native-type","tag"])}}}),d=((e,a)=>{const l=e.__vccOpts||e;for(const[i,o]of a)l[i]=o;return l})(s,[["__scopeId","data-v-79154a89"]]),f=[d],c=e=>{f.forEach(a=>{a.name&&e.component(a.name,a)})},r={install:c};n.MButton=d,n.default=r,n.install=c,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n.MiaomaComponents={},n.Vue))})(this,function(n,t){"use strict";const f={name:"MButton"},p=t.defineComponent({...f,props:{type:{type:String,default:"primary",validator:e=>["primary","success","warning","danger","info","text"].includes(e)},size:{type:String,default:"default",validator:e=>["large","default","small","mini"].includes(e)},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:String,default:""},text:{type:String,default:""},autofocus:{type:Boolean,default:!1},nativeType:{type:String,default:"button",validator:e=>["button","submit","reset"].includes(e)},tag:{type:String,default:"button"}},emits:["click"],setup(e,{emit:o}){const l=o,i=a=>{l("click",a)};return(a,k)=>{const c=t.resolveComponent("el-button");return t.openBlock(),t.createBlock(c,{class:"m-button",type:e.type,size:e.size,plain:e.plain,round:e.round,circle:e.circle,disabled:e.disabled,loading:e.loading,icon:e.icon,autofocus:e.autofocus,"native-type":e.nativeType,tag:e.tag,onClick:i},{default:t.withCtx(()=>[a.$slots.default?t.renderSlot(a.$slots,"default",{key:0},void 0,!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.text),1)],64))]),_:3},8,["type","size","plain","round","circle","disabled","loading","icon","autofocus","native-type","tag"])}}}),d=(e,o)=>{const l=e.__vccOpts||e;for(const[i,a]of o)l[i]=a;return l},s=d(p,[["__scopeId","data-v-80d70ab0"]]),y={name:"MText"};function m(e,o,l,i,a,k){const c=t.resolveComponent("el-backtop");return t.openBlock(),t.createBlock(c,{target:".page-component__scroll .el-scrollbar__wrap"})}const u=d(y,[["render",m]]),g=[s,u],r=e=>{g.forEach(o=>{o.name&&e.component(o.name,o)})},b={install:r};n.MButton=s,n.MText=u,n.default=b,n.install=r,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/style.css CHANGED
@@ -0,0 +1 @@
1
+ .m-button[data-v-80d70ab0]{margin:0 5px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fy-components-test",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "基于 Element Plus 的二次封装组件库",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "scripts": {
21
21
  "dev": "vite",
22
- "build": "vite build",
22
+ "build": "rimraf dist && vite build",
23
23
  "preview": "vite preview"
24
24
  },
25
25
  "dependencies": {
@@ -29,9 +29,10 @@
29
29
  "devDependencies": {
30
30
  "@types/node": "^25.5.2",
31
31
  "@vitejs/plugin-vue": "^5.0.0",
32
+ "rimraf": "^6.1.3",
32
33
  "typescript": "^5.3.0",
33
34
  "vite": "^5.0.0",
34
- "vite-plugin-dts": "^3.7.0"
35
+ "vite-plugin-dts": "^3.9.1"
35
36
  },
36
37
  "keywords": [
37
38
  "vue3",
@@ -1,130 +0,0 @@
1
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
- type: {
3
- type: StringConstructor;
4
- default: string;
5
- validator: (value: string) => boolean;
6
- };
7
- size: {
8
- type: StringConstructor;
9
- default: string;
10
- validator: (value: string) => boolean;
11
- };
12
- plain: {
13
- type: BooleanConstructor;
14
- default: boolean;
15
- };
16
- round: {
17
- type: BooleanConstructor;
18
- default: boolean;
19
- };
20
- circle: {
21
- type: BooleanConstructor;
22
- default: boolean;
23
- };
24
- disabled: {
25
- type: BooleanConstructor;
26
- default: boolean;
27
- };
28
- loading: {
29
- type: BooleanConstructor;
30
- default: boolean;
31
- };
32
- icon: {
33
- type: StringConstructor;
34
- default: string;
35
- };
36
- text: {
37
- type: StringConstructor;
38
- default: string;
39
- };
40
- autofocus: {
41
- type: BooleanConstructor;
42
- default: boolean;
43
- };
44
- nativeType: {
45
- type: StringConstructor;
46
- default: string;
47
- validator: (value: string) => boolean;
48
- };
49
- tag: {
50
- type: StringConstructor;
51
- default: string;
52
- };
53
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
54
- click: (...args: any[]) => void;
55
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
56
- type: {
57
- type: StringConstructor;
58
- default: string;
59
- validator: (value: string) => boolean;
60
- };
61
- size: {
62
- type: StringConstructor;
63
- default: string;
64
- validator: (value: string) => boolean;
65
- };
66
- plain: {
67
- type: BooleanConstructor;
68
- default: boolean;
69
- };
70
- round: {
71
- type: BooleanConstructor;
72
- default: boolean;
73
- };
74
- circle: {
75
- type: BooleanConstructor;
76
- default: boolean;
77
- };
78
- disabled: {
79
- type: BooleanConstructor;
80
- default: boolean;
81
- };
82
- loading: {
83
- type: BooleanConstructor;
84
- default: boolean;
85
- };
86
- icon: {
87
- type: StringConstructor;
88
- default: string;
89
- };
90
- text: {
91
- type: StringConstructor;
92
- default: string;
93
- };
94
- autofocus: {
95
- type: BooleanConstructor;
96
- default: boolean;
97
- };
98
- nativeType: {
99
- type: StringConstructor;
100
- default: string;
101
- validator: (value: string) => boolean;
102
- };
103
- tag: {
104
- type: StringConstructor;
105
- default: string;
106
- };
107
- }>> & Readonly<{
108
- onClick?: ((...args: any[]) => any) | undefined;
109
- }>, {
110
- type: string;
111
- size: string;
112
- plain: boolean;
113
- round: boolean;
114
- circle: boolean;
115
- disabled: boolean;
116
- loading: boolean;
117
- icon: string;
118
- text: string;
119
- autofocus: boolean;
120
- nativeType: string;
121
- tag: string;
122
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
123
- default?(_: {}): any;
124
- }>;
125
- export default _default;
126
- type __VLS_WithTemplateSlots<T, S> = T & {
127
- new (): {
128
- $slots: S;
129
- };
130
- };
@@ -1,9 +0,0 @@
1
- import { App } from 'vue';
2
- import { default as MButton } from './components/MButton.vue';
3
-
4
- export declare const install: (app: App) => void;
5
- export { MButton };
6
- declare const _default: {
7
- install: (app: App) => void;
8
- };
9
- export default _default;
@@ -1 +0,0 @@
1
-
@@ -1,2 +0,0 @@
1
- declare const _default: import('vite').UserConfig;
2
- export default _default;