morghulis 2.0.40 → 2.0.42

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/README.md CHANGED
@@ -1,134 +1,33 @@
1
- # Morghulis
1
+ # button
2
2
 
3
- 一个简洁、高效的Vue 3按钮组件库,提供完整的TypeScript类型支持。
3
+ This template should help get you started developing with Vue 3 in Vite.
4
4
 
5
- ## 特性
5
+ ## Recommended IDE Setup
6
6
 
7
- - 🎨 多种按钮样式:默认、主要、成功、警告、危险、信息
8
- - 📏 多种尺寸:小、中、大
9
- - 🔄 加载状态
10
- - 🚫 禁用状态
11
- - 🔘 圆角按钮
12
- - ⚙️ 完整的TypeScript类型支持和IDE自动补全
13
- - 🧩 支持全局注册和按需引入
7
+ [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
14
8
 
15
- ## 安装
9
+ ## Type Support for `.vue` Imports in TS
16
10
 
17
- ```bash
18
- npm install morghulis
19
- ```
20
-
21
- ## 全局注册
11
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
22
12
 
23
- ```ts
24
- // main.ts
25
- import { createApp } from 'vue'
26
- import App from './App.vue'
27
- import Morghulis from 'morghulis'
13
+ ## Customize configuration
28
14
 
29
- const app = createApp(App)
30
- app.use(Morghulis)
31
- app.mount('#app')
32
- ```
15
+ See [Vite Configuration Reference](https://vite.dev/config/).
33
16
 
34
- ## 按需引入
17
+ ## Project Setup
35
18
 
36
- ```vue
37
- <script setup lang="ts">
38
- import { MButton } from 'morghulis'
39
- </script>
40
-
41
- <template>
42
- <MButton>默认按钮</MButton>
43
- <MButton type="primary">主要按钮</MButton>
44
- </template>
19
+ ```sh
20
+ npm install
45
21
  ```
46
22
 
47
- ## API
48
-
49
- ### 属性
50
-
51
- | 属性名 | 类型 | 默认值 | 描述 |
52
- | --- | --- | --- | --- |
53
- | type | 'default' \| 'primary' \| 'success' \| 'warning' \| 'danger' \| 'info' | 'default' | 按钮类型 |
54
- | size | 'small' \| 'medium' \| 'large' | 'medium' | 按钮尺寸 |
55
- | round | boolean | false | 是否为圆角按钮 |
56
- | plain | boolean | false | 是否为朴素按钮 |
57
- | disabled | boolean | false | 是否禁用 |
58
- | loading | boolean | false | 是否为加载状态 |
59
- | text | string | - | 按钮文本 |
60
- | icon | string | - | 按钮图标类名 |
61
-
62
- ### 事件
63
-
64
- | 事件名 | 类型 | 描述 |
65
- | --- | --- | --- |
66
- | click | (event: MouseEvent) => void | 点击按钮时触发 |
67
-
68
- ### 方法
23
+ ### Compile and Hot-Reload for Development
69
24
 
70
- 可以通过模板ref获取按钮实例并调用其方法:
71
-
72
- ```vue
73
- <script setup lang="ts">
74
- import { ref } from 'vue'
75
- import { MButton } from 'morghulis'
76
-
77
- const buttonRef = ref<InstanceType<typeof MButton> | null>(null)
78
-
79
- const triggerButtonClick = () => {
80
- buttonRef.value?.triggerClick()
81
- }
82
- </script>
83
-
84
- <template>
85
- <MButton ref="buttonRef">按钮</MButton>
86
- </template>
25
+ ```sh
26
+ npm run dev
87
27
  ```
88
28
 
89
- | 方法名 | 描述 |
90
- | --- | --- |
91
- | triggerClick | 模拟按钮点击事件 |
29
+ ### Type-Check, Compile and Minify for Production
92
30
 
93
- ## 示例
94
-
95
- ```vue
96
- <template>
97
- <!-- 基础用法 -->
98
- <MButton>默认按钮</MButton>
99
- <MButton type="primary">主要按钮</MButton>
100
- <MButton type="success">成功按钮</MButton>
101
- <MButton type="warning">警告按钮</MButton>
102
- <MButton type="danger">危险按钮</MButton>
103
- <MButton type="info">信息按钮</MButton>
104
-
105
- <!-- 尺寸 -->
106
- <MButton size="small">小型按钮</MButton>
107
- <MButton>默认按钮</MButton>
108
- <MButton size="large">大型按钮</MButton>
109
-
110
- <!-- 圆角和朴素按钮 -->
111
- <MButton round>圆角按钮</MButton>
112
- <MButton plain>朴素按钮</MButton>
113
-
114
- <!-- 禁用和加载状态 -->
115
- <MButton disabled>禁用按钮</MButton>
116
- <MButton loading>加载中</MButton>
117
-
118
- <!-- 带图标的按钮 -->
119
- <MButton icon="icon-search">搜索</MButton>
120
-
121
- <!-- 点击事件 -->
122
- <MButton @click="handleClick">点击我</MButton>
123
- </template>
124
-
125
- <script setup lang="ts">
126
- const handleClick = (event: MouseEvent) => {
127
- console.log('按钮被点击', event)
128
- }
129
- </script>
31
+ ```sh
32
+ npm run build
130
33
  ```
131
-
132
- ## 许可证
133
-
134
- MIT
@@ -1 +1 @@
1
- .m-button[data-v-191e53ce]{display:inline-flex;justify-content:center;align-items:center;line-height:1;height:32px;white-space:nowrap;cursor:pointer;color:#606266;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;-webkit-user-select:none;user-select:none;vertical-align:middle;-webkit-appearance:none;background-color:#fff;border:1px solid #dcdfe6;padding:8px 15px;font-size:14px;border-radius:4px}.m-button[data-v-191e53ce]:hover{color:#409eff;border-color:#c6e2ff;background-color:#ecf5ff}.m-button[data-v-191e53ce]:active{color:#3a8ee6;border-color:#3a8ee6;outline:none}.m-button--primary[data-v-191e53ce]{color:#fff;background-color:#409eff;border-color:#409eff}.m-button--primary[data-v-191e53ce]:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}.m-button--primary[data-v-191e53ce]:active{background:#3a8ee6;border-color:#3a8ee6;color:#fff}.m-button--success[data-v-191e53ce]{color:#fff;background-color:#67c23a;border-color:#67c23a}.m-button--success[data-v-191e53ce]:hover{background:#85ce61;border-color:#85ce61;color:#fff}.m-button--success[data-v-191e53ce]:active{background:#5daf34;border-color:#5daf34;color:#fff}.m-button--warning[data-v-191e53ce]{color:#fff;background-color:#e6a23c;border-color:#e6a23c}.m-button--warning[data-v-191e53ce]:hover{background:#ebb563;border-color:#ebb563;color:#fff}.m-button--warning[data-v-191e53ce]:active{background:#cf9236;border-color:#cf9236;color:#fff}.m-button--danger[data-v-191e53ce]{color:#fff;background-color:#f56c6c;border-color:#f56c6c}.m-button--danger[data-v-191e53ce]:hover{background:#f78989;border-color:#f78989;color:#fff}.m-button--danger[data-v-191e53ce]:active{background:#dd6161;border-color:#dd6161;color:#fff}.m-button--info[data-v-191e53ce]{color:#fff;background-color:#909399;border-color:#909399}.m-button--info[data-v-191e53ce]:hover{background:#a6a9ad;border-color:#a6a9ad;color:#fff}.m-button--info[data-v-191e53ce]:active{background:#82848a;border-color:#82848a;color:#fff}.m-button--small[data-v-191e53ce]{height:24px;padding:5px 11px;font-size:12px;border-radius:3px}.m-button--large[data-v-191e53ce]{height:40px;padding:12px 19px;font-size:16px;border-radius:4px}.m-button--round[data-v-191e53ce]{border-radius:20px}.m-button--plain[data-v-191e53ce]{background:transparent}.m-button--plain.m-button--primary[data-v-191e53ce]{color:#409eff}.m-button--plain.m-button--success[data-v-191e53ce]{color:#67c23a}.m-button--plain.m-button--warning[data-v-191e53ce]{color:#e6a23c}.m-button--plain.m-button--danger[data-v-191e53ce]{color:#f56c6c}.m-button--plain.m-button--info[data-v-191e53ce]{color:#909399}.m-button--disabled[data-v-191e53ce],.m-button--disabled[data-v-191e53ce]:hover,.m-button--disabled[data-v-191e53ce]:focus,.m-button--disabled[data-v-191e53ce]:active{color:#c0c4cc;cursor:not-allowed;background-image:none;background-color:#fff;border-color:#ebeef5}.m-button--disabled.m-button--primary[data-v-191e53ce],.m-button--disabled.m-button--success[data-v-191e53ce],.m-button--disabled.m-button--warning[data-v-191e53ce],.m-button--disabled.m-button--danger[data-v-191e53ce],.m-button--disabled.m-button--info[data-v-191e53ce]{color:#fff;background-color:#a0cfff;border-color:#a0cfff;opacity:.6}.m-button__loading[data-v-191e53ce]{display:inline-flex;align-items:center;margin-right:5px}.m-button__loading-icon[data-v-191e53ce]{animation:rotating-191e53ce 2s linear infinite}.m-button__icon[data-v-191e53ce]{margin-right:5px}.m-button__icon+.m-button__text[data-v-191e53ce]{margin-left:5px}@keyframes rotating-191e53ce{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
1
+ .m-button[data-v-1d04af69]{display:inline-flex;justify-content:center;align-items:center;line-height:1;height:32px;white-space:nowrap;cursor:pointer;color:#606266;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;-webkit-user-select:none;user-select:none;vertical-align:middle;-webkit-appearance:none;background-color:#fff;border:1px solid #dcdfe6;padding:8px 15px;font-size:14px;border-radius:4px}.m-button[data-v-1d04af69]:hover{color:#409eff;border-color:#c6e2ff;background-color:#ecf5ff}.m-button[data-v-1d04af69]:active{color:#3a8ee6;border-color:#3a8ee6;outline:none}.m-button--primary[data-v-1d04af69]{color:#fff;background-color:#409eff;border-color:#409eff}.m-button--primary[data-v-1d04af69]:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}.m-button--primary[data-v-1d04af69]:active{background:#3a8ee6;border-color:#3a8ee6;color:#fff}.m-button--success[data-v-1d04af69]{color:#fff;background-color:#67c23a;border-color:#67c23a}.m-button--success[data-v-1d04af69]:hover{background:#85ce61;border-color:#85ce61;color:#fff}.m-button--success[data-v-1d04af69]:active{background:#5daf34;border-color:#5daf34;color:#fff}.m-button--warning[data-v-1d04af69]{color:#fff;background-color:#e6a23c;border-color:#e6a23c}.m-button--warning[data-v-1d04af69]:hover{background:#ebb563;border-color:#ebb563;color:#fff}.m-button--warning[data-v-1d04af69]:active{background:#cf9236;border-color:#cf9236;color:#fff}.m-button--danger[data-v-1d04af69]{color:#fff;background-color:#f56c6c;border-color:#f56c6c}.m-button--danger[data-v-1d04af69]:hover{background:#f78989;border-color:#f78989;color:#fff}.m-button--danger[data-v-1d04af69]:active{background:#dd6161;border-color:#dd6161;color:#fff}.m-button--info[data-v-1d04af69]{color:#fff;background-color:#909399;border-color:#909399}.m-button--info[data-v-1d04af69]:hover{background:#a6a9ad;border-color:#a6a9ad;color:#fff}.m-button--info[data-v-1d04af69]:active{background:#82848a;border-color:#82848a;color:#fff}.m-button--small[data-v-1d04af69]{height:24px;padding:5px 11px;font-size:12px;border-radius:3px}.m-button--large[data-v-1d04af69]{height:40px;padding:12px 19px;font-size:16px;border-radius:4px}.m-button--round[data-v-1d04af69]{border-radius:20px}.m-button--plain[data-v-1d04af69]{background:transparent}.m-button--plain.m-button--primary[data-v-1d04af69]{color:#409eff}.m-button--plain.m-button--success[data-v-1d04af69]{color:#67c23a}.m-button--plain.m-button--warning[data-v-1d04af69]{color:#e6a23c}.m-button--plain.m-button--danger[data-v-1d04af69]{color:#f56c6c}.m-button--plain.m-button--info[data-v-1d04af69]{color:#909399}.m-button--disabled[data-v-1d04af69],.m-button--disabled[data-v-1d04af69]:hover,.m-button--disabled[data-v-1d04af69]:focus,.m-button--disabled[data-v-1d04af69]:active{color:#c0c4cc;cursor:not-allowed;background-image:none;background-color:#fff;border-color:#ebeef5}.m-button--disabled.m-button--primary[data-v-1d04af69],.m-button--disabled.m-button--success[data-v-1d04af69],.m-button--disabled.m-button--warning[data-v-1d04af69],.m-button--disabled.m-button--danger[data-v-1d04af69],.m-button--disabled.m-button--info[data-v-1d04af69]{color:#fff;background-color:#a0cfff;border-color:#a0cfff;opacity:.6}.m-button__loading[data-v-1d04af69]{display:inline-flex;align-items:center;margin-right:5px}.m-button__loading-icon[data-v-1d04af69]{animation:rotating-1d04af69 2s linear infinite}.m-button__icon[data-v-1d04af69]{margin-right:5px}.m-button__icon+.m-button__text[data-v-1d04af69]{margin-left:5px}@keyframes rotating-1d04af69{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
@@ -1,29 +1,69 @@
1
- import { defineComponent as f, computed as b, createElementBlock as s, openBlock as a, normalizeClass as r, createCommentVNode as c, createElementVNode as i, renderSlot as g, createTextVNode as _, toDisplayString as k } from "vue";
2
- const y = ["disabled"], B = {
3
- key: 0,
4
- class: "m-button__loading"
5
- }, h = {
6
- key: 1,
7
- class: "m-button__icon"
8
- }, C = {
9
- key: 2,
10
- class: "m-button__text"
11
- }, v = /* @__PURE__ */ f({
1
+ import { defineComponent as m, computed as b, createElementBlock as a, openBlock as s, normalizeClass as c, createCommentVNode as d, createElementVNode as i, renderSlot as g, createTextVNode as p, toDisplayString as k } from "vue";
2
+ const y = m({
12
3
  name: "MButton",
13
- __name: "MButton",
14
4
  props: {
15
- type: { default: "default" },
16
- size: { default: "medium" },
17
- round: { type: Boolean, default: !1 },
18
- plain: { type: Boolean, default: !1 },
19
- disabled: { type: Boolean, default: !1 },
20
- text: {},
21
- loading: { type: Boolean, default: !1 },
22
- icon: {}
5
+ /**
6
+ * 按钮类型
7
+ * @values default, primary, success, warning, danger, info
8
+ */
9
+ type: {
10
+ type: String,
11
+ default: "default"
12
+ },
13
+ /**
14
+ * 按钮尺寸
15
+ * @values small, medium, large
16
+ */
17
+ size: {
18
+ type: String,
19
+ default: "medium"
20
+ },
21
+ /**
22
+ * 是否为圆角按钮
23
+ */
24
+ round: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
28
+ /**
29
+ * 是否为朴素按钮
30
+ */
31
+ plain: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ /**
36
+ * 是否禁用按钮
37
+ */
38
+ disabled: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ /**
43
+ * 按钮文本
44
+ */
45
+ text: {
46
+ type: String,
47
+ default: void 0
48
+ },
49
+ /**
50
+ * 是否显示加载状态
51
+ */
52
+ loading: {
53
+ type: Boolean,
54
+ default: !1
55
+ },
56
+ /**
57
+ * 按钮图标类名
58
+ */
59
+ icon: {
60
+ type: String,
61
+ default: void 0
62
+ }
23
63
  },
24
64
  emits: ["click"],
25
- setup(o, { expose: d, emit: n }) {
26
- const t = o, l = n, m = b(() => [
65
+ setup(t, { emit: e, expose: n }) {
66
+ const o = b(() => [
27
67
  "m-button",
28
68
  `m-button--${t.type}`,
29
69
  `m-button--${t.size}`,
@@ -33,60 +73,82 @@ const y = ["disabled"], B = {
33
73
  "m-button--disabled": t.disabled,
34
74
  "m-button--loading": t.loading
35
75
  }
36
- ]), p = (e) => {
37
- t.disabled || t.loading || l("click", e);
76
+ ]), l = (u) => {
77
+ t.disabled || t.loading || e("click", u);
38
78
  };
39
- return d({
79
+ return n({
80
+ /**
81
+ * 触发按钮点击事件
82
+ */
40
83
  triggerClick: () => {
41
- !t.disabled && !t.loading && l("click", new MouseEvent("click"));
84
+ !t.disabled && !t.loading && e("click", new MouseEvent("click"));
42
85
  }
43
- }), (e, u) => (a(), s("button", {
44
- class: r(m.value),
45
- disabled: e.disabled,
46
- onClick: p
47
- }, [
48
- e.loading ? (a(), s("span", B, u[0] || (u[0] = [
49
- i("svg", {
50
- class: "m-button__loading-icon",
51
- viewBox: "0 0 1024 1024",
52
- xmlns: "http://www.w3.org/2000/svg",
53
- width: "16",
54
- height: "16"
55
- }, [
56
- i("path", {
57
- d: "M512 64c-247.42 0-448 200.58-448 448s200.58 448 448 448 448-200.58 448-448-200.58-448-448-448zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z",
58
- fill: "#e6e6e6"
59
- }),
60
- i("path", {
61
- d: "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372V140z",
62
- fill: "currentColor"
63
- })
64
- ], -1)
65
- ]))) : c("", !0),
66
- e.icon && !e.loading ? (a(), s("span", h, [
67
- i("i", {
68
- class: r(e.icon)
69
- }, null, 2)
70
- ])) : c("", !0),
71
- e.$slots.default || e.text ? (a(), s("span", C, [
72
- g(e.$slots, "default", {}, () => [
73
- _(k(e.text), 1)
74
- ], !0)
75
- ])) : c("", !0)
76
- ], 10, y));
86
+ }), {
87
+ buttonClass: o,
88
+ handleClick: l
89
+ };
77
90
  }
78
- }), w = (o, d) => {
79
- const n = o.__vccOpts || o;
80
- for (const [t, l] of d)
81
- n[t] = l;
91
+ }), _ = (t, e) => {
92
+ const n = t.__vccOpts || t;
93
+ for (const [o, l] of e)
94
+ n[o] = l;
82
95
  return n;
83
- }, M = /* @__PURE__ */ w(v, [["__scopeId", "data-v-191e53ce"]]), z = (o) => {
84
- o.component("MButton", M);
85
- }, x = {
86
- install: z
96
+ }, C = ["disabled"], h = {
97
+ key: 0,
98
+ class: "m-button__loading"
99
+ }, B = {
100
+ key: 1,
101
+ class: "m-button__icon"
102
+ }, v = {
103
+ key: 2,
104
+ class: "m-button__text"
105
+ };
106
+ function $(t, e, n, o, l, u) {
107
+ return s(), a("button", {
108
+ class: c(t.buttonClass),
109
+ disabled: t.disabled,
110
+ onClick: e[0] || (e[0] = (...f) => t.handleClick && t.handleClick(...f))
111
+ }, [
112
+ t.loading ? (s(), a("span", h, e[1] || (e[1] = [
113
+ i("svg", {
114
+ class: "m-button__loading-icon",
115
+ viewBox: "0 0 1024 1024",
116
+ xmlns: "http://www.w3.org/2000/svg",
117
+ width: "16",
118
+ height: "16"
119
+ }, [
120
+ i("path", {
121
+ d: "M512 64c-247.42 0-448 200.58-448 448s200.58 448 448 448 448-200.58 448-448-200.58-448-448-448zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z",
122
+ fill: "#e6e6e6"
123
+ }),
124
+ i("path", {
125
+ d: "M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372V140z",
126
+ fill: "currentColor"
127
+ })
128
+ ], -1)
129
+ ]))) : d("", !0),
130
+ t.icon && !t.loading ? (s(), a("span", B, [
131
+ i("i", {
132
+ class: c(t.icon)
133
+ }, null, 2)
134
+ ])) : d("", !0),
135
+ t.$slots.default || t.text ? (s(), a("span", v, [
136
+ g(t.$slots, "default", {}, () => [
137
+ p(k(t.text), 1)
138
+ ], !0)
139
+ ])) : d("", !0)
140
+ ], 10, C);
141
+ }
142
+ const r = /* @__PURE__ */ _(y, [["render", $], ["__scopeId", "data-v-1d04af69"]]), w = (t) => {
143
+ t.component("MButton", r);
144
+ }, z = (t) => {
145
+ w(t);
146
+ }, S = {
147
+ install: z,
148
+ MButton: r
87
149
  };
88
150
  export {
89
- M as MButton,
90
- x as default,
151
+ r as MButton,
152
+ S as default,
91
153
  z as install
92
154
  };
package/package.json CHANGED
@@ -1,23 +1,39 @@
1
1
  {
2
2
  "name": "morghulis",
3
- "version": "2.0.40",
4
- "private": false,
3
+ "version": "2.0.42",
4
+ "description": "一个Vue 3按钮组件库,支持TypeScript和IDE自动补全",
5
5
  "type": "module",
6
- "main": "./dist/morghulis.es.js",
7
- "module": "./dist/morghulis.es.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": "./dist/morghulis.es.js",
6
+ "main": "dist/morghulis.es.js",
7
+ "module": "dist/morghulis.es.js",
8
+ "types": "dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/index.d.ts",
12
+ "import": "./dist/morghulis.es.js",
13
+ "require": "./dist/morghulis.es.js"
14
+ }
15
+ },
10
16
  "files": [
11
17
  "dist"
12
18
  ],
13
19
  "scripts": {
14
20
  "dev": "vite",
15
- "build": "vite build && npm run build:types",
16
- "build:types": "cp ./src/morghulis.d.ts ./dist/index.d.ts",
21
+ "build": "run-p type-check build-only",
17
22
  "preview": "vite preview",
23
+ "build-only": "vite build",
18
24
  "type-check": "vue-tsc --build",
19
25
  "prepublishOnly": "npm run build"
20
26
  },
27
+ "keywords": [
28
+ "vue",
29
+ "vue3",
30
+ "component",
31
+ "button",
32
+ "typescript",
33
+ "ui"
34
+ ],
35
+ "author": "",
36
+ "license": "MIT",
21
37
  "dependencies": {
22
38
  "vue": "^3.5.13"
23
39
  },
@@ -29,18 +45,13 @@
29
45
  "npm-run-all2": "^7.0.2",
30
46
  "typescript": "~5.8.0",
31
47
  "vite": "^6.2.4",
32
- "vite-plugin-dts": "^3.0.0",
33
48
  "vite-plugin-vue-devtools": "^7.7.2",
34
49
  "vue-tsc": "^2.2.8"
35
50
  },
36
51
  "peerDependencies": {
37
52
  "vue": "^3.0.0"
38
53
  },
39
- "keywords": [
40
- "vue",
41
- "button",
42
- "component",
43
- "ui"
44
- ],
45
- "license": "MIT"
54
+ "publishConfig": {
55
+ "access": "public"
56
+ }
46
57
  }
package/dist/index.d.ts DELETED
@@ -1,60 +0,0 @@
1
- import { App, DefineComponent } from 'vue'
2
-
3
- export interface MButtonProps {
4
- /**
5
- * 按钮类型
6
- * @default 'default'
7
- */
8
- type?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'
9
- /**
10
- * 按钮尺寸
11
- * @default 'medium'
12
- */
13
- size?: 'small' | 'medium' | 'large'
14
- /**
15
- * 是否为圆角按钮
16
- * @default false
17
- */
18
- round?: boolean
19
- /**
20
- * 是否为朴素按钮
21
- * @default false
22
- */
23
- plain?: boolean
24
- /**
25
- * 是否禁用
26
- * @default false
27
- */
28
- disabled?: boolean
29
- /**
30
- * 按钮文本
31
- */
32
- text?: string
33
- /**
34
- * 按钮加载状态
35
- * @default false
36
- */
37
- loading?: boolean
38
- /**
39
- * 自定义图标
40
- */
41
- icon?: string
42
- }
43
-
44
- export interface MButtonExpose {
45
- /**
46
- * 模拟点击按钮
47
- */
48
- triggerClick: () => void
49
- }
50
-
51
- export const MButton: DefineComponent<MButtonProps>
52
-
53
- export function install(app: App): void
54
-
55
- declare const _default: {
56
- install: typeof install
57
- MButton: typeof MButton
58
- }
59
-
60
- export default _default