morghulis 2.0.39 → 2.0.41
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 +17 -118
- package/dist/morghulis.css +1 -1
- package/dist/morghulis.es.js +132 -70
- package/package.json +20 -27
- package/dist/types/index.d.ts +0 -62
package/README.md
CHANGED
@@ -1,134 +1,33 @@
|
|
1
|
-
#
|
1
|
+
# button
|
2
2
|
|
3
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
```
|
37
|
-
|
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
|
-
|
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
|
-
|
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
|
package/dist/morghulis.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.m-button[data-v-
|
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)}}
|
package/dist/morghulis.es.js
CHANGED
@@ -1,29 +1,69 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
const y =
|
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
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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(
|
26
|
-
const
|
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
|
-
]),
|
37
|
-
t.disabled || t.loading ||
|
76
|
+
]), l = (u) => {
|
77
|
+
t.disabled || t.loading || e("click", u);
|
38
78
|
};
|
39
|
-
return
|
79
|
+
return n({
|
80
|
+
/**
|
81
|
+
* 触发按钮点击事件
|
82
|
+
*/
|
40
83
|
triggerClick: () => {
|
41
|
-
!t.disabled && !t.loading &&
|
84
|
+
!t.disabled && !t.loading && e("click", new MouseEvent("click"));
|
42
85
|
}
|
43
|
-
}),
|
44
|
-
|
45
|
-
|
46
|
-
|
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
|
-
}),
|
79
|
-
const n =
|
80
|
-
for (const [
|
81
|
-
n[
|
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
|
-
},
|
84
|
-
|
85
|
-
|
86
|
-
|
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
|
-
|
90
|
-
|
151
|
+
r as MButton,
|
152
|
+
S as default,
|
91
153
|
z as install
|
92
154
|
};
|
package/package.json
CHANGED
@@ -1,34 +1,32 @@
|
|
1
1
|
{
|
2
2
|
"name": "morghulis",
|
3
|
-
"version": "2.0.
|
4
|
-
"
|
3
|
+
"version": "2.0.41",
|
4
|
+
"description": "一个Vue 3按钮组件库,支持TypeScript和IDE自动补全",
|
5
5
|
"type": "module",
|
6
|
-
"main": "
|
7
|
-
"module": "
|
8
|
-
"types": "
|
9
|
-
"typings": "./dist/types/index.d.ts",
|
6
|
+
"main": "dist/morghulis.es.js",
|
7
|
+
"module": "dist/morghulis.es.js",
|
8
|
+
"types": "dist/types/index.d.ts",
|
10
9
|
"files": [
|
11
10
|
"dist"
|
12
11
|
],
|
13
|
-
"exports": {
|
14
|
-
".": {
|
15
|
-
"types": "./dist/types/index.d.ts",
|
16
|
-
"import": "./dist/morghulis.es.js",
|
17
|
-
"default": "./dist/morghulis.es.js"
|
18
|
-
},
|
19
|
-
"./style": {
|
20
|
-
"import": "./dist/morghulis.css",
|
21
|
-
"default": "./dist/morghulis.css"
|
22
|
-
}
|
23
|
-
},
|
24
12
|
"scripts": {
|
25
13
|
"dev": "vite",
|
26
|
-
"build": "
|
27
|
-
"build:types": "mkdir -p dist/types && cp ./src/morghulis.d.ts ./dist/types/index.d.ts",
|
14
|
+
"build": "run-p type-check build-only",
|
28
15
|
"preview": "vite preview",
|
16
|
+
"build-only": "vite build",
|
29
17
|
"type-check": "vue-tsc --build",
|
30
18
|
"prepublishOnly": "npm run build"
|
31
19
|
},
|
20
|
+
"keywords": [
|
21
|
+
"vue",
|
22
|
+
"vue3",
|
23
|
+
"component",
|
24
|
+
"button",
|
25
|
+
"typescript",
|
26
|
+
"ui"
|
27
|
+
],
|
28
|
+
"author": "",
|
29
|
+
"license": "MIT",
|
32
30
|
"dependencies": {
|
33
31
|
"vue": "^3.5.13"
|
34
32
|
},
|
@@ -40,18 +38,13 @@
|
|
40
38
|
"npm-run-all2": "^7.0.2",
|
41
39
|
"typescript": "~5.8.0",
|
42
40
|
"vite": "^6.2.4",
|
43
|
-
"vite-plugin-dts": "^3.0.0",
|
44
41
|
"vite-plugin-vue-devtools": "^7.7.2",
|
45
42
|
"vue-tsc": "^2.2.8"
|
46
43
|
},
|
47
44
|
"peerDependencies": {
|
48
45
|
"vue": "^3.0.0"
|
49
46
|
},
|
50
|
-
"
|
51
|
-
"
|
52
|
-
|
53
|
-
"component",
|
54
|
-
"ui"
|
55
|
-
],
|
56
|
-
"license": "MIT"
|
47
|
+
"publishConfig": {
|
48
|
+
"access": "public"
|
49
|
+
}
|
57
50
|
}
|
package/dist/types/index.d.ts
DELETED
@@ -1,62 +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 type MButtonInstance = InstanceType<typeof MButton>
|
52
|
-
|
53
|
-
export const MButton: DefineComponent<MButtonProps>
|
54
|
-
|
55
|
-
export function install(app: App): void
|
56
|
-
|
57
|
-
declare const _default: {
|
58
|
-
install: typeof install
|
59
|
-
MButton: typeof MButton
|
60
|
-
}
|
61
|
-
|
62
|
-
export default _default
|