fy-components-test 1.0.2 → 1.0.3

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,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -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
  };
@@ -0,0 +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 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/index.d.ts CHANGED
@@ -1,3 +1,10 @@
1
- export * from './src/index'
2
- import MiaomaComponents from './src/index'
3
- export default MiaomaComponents
1
+ import { App } from 'vue';
2
+ import { default as MButton } from './components/MButton/MButton.vue';
3
+ import { default as MText } from './components/MText/Mtext.vue';
4
+
5
+ export declare const install: (app: App) => void;
6
+ export { MButton, MText };
7
+ declare const _default: {
8
+ install: (app: App) => void;
9
+ };
10
+ export default _default;
package/dist/style.css CHANGED
@@ -0,0 +1 @@
1
+ .m-button[data-v-80d70ab0]{margin:0 5px}
@@ -0,0 +1,10 @@
1
+ import { default as MButton } from '../components/MButton/MButton.vue';
2
+ import { default as MText } from '../components/MText/Mtext.vue';
3
+
4
+
5
+ declare module 'vue' {
6
+ export interface GlobalComponents {
7
+ MButton: typeof MButton
8
+ MText: typeof MText
9
+ }
10
+ }
@@ -0,0 +1,11 @@
1
+ /*
2
+ * @FileDescription:
3
+ * @Author: czh
4
+ * @Date: 2026-04-09 16:49:27
5
+ * @LastEditors: czh
6
+ * @LastEditTime: 2026-04-09 17:25:45
7
+ * @FilePath: \ai-ui\packages\components\typings\test.d.ts
8
+ */
9
+ export namespace MButtonProps {
10
+ export const type: string;
11
+ }
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.3",
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",
package/dist/index.umd.js DELETED
@@ -1 +0,0 @@
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,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;