morghulis 2.0.53 → 2.0.54
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/index.d.ts +6 -4
- package/package.json +3 -5
- package/src/morghulis-types.d.ts +40 -0
package/index.d.ts
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
//
|
2
|
-
export type ButtonType =
|
3
|
-
export type ButtonSize = 'large' | 'default' | 'small';
|
1
|
+
// 按钮类型
|
2
|
+
export type ButtonType = "default" | "primary" | "success" | "warning" | "danger" | "info" | "text"
|
4
3
|
|
5
|
-
//
|
4
|
+
// 按钮尺寸
|
5
|
+
export type ButtonSize = "large" | "default" | "small"
|
6
|
+
|
7
|
+
// 组件定义
|
6
8
|
export type MButton = {
|
7
9
|
// 属性
|
8
10
|
type?: ButtonType
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "morghulis",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.54",
|
4
4
|
"description": "一个Vue 3按钮组件库,支持TypeScript和IDE自动补全",
|
5
5
|
"type": "module",
|
6
6
|
"main": "dist/morghulis.es.js",
|
@@ -10,10 +10,7 @@
|
|
10
10
|
".": {
|
11
11
|
"types": [
|
12
12
|
"./index.d.ts",
|
13
|
-
"./
|
14
|
-
"./typings/volar.d.ts",
|
15
|
-
"./typings/jetbrains.d.ts",
|
16
|
-
"./typings/direct.d.ts"
|
13
|
+
"./src/morghulis-types.d.ts"
|
17
14
|
],
|
18
15
|
"import": "./dist/morghulis.es.js",
|
19
16
|
"require": "./dist/morghulis.es.js"
|
@@ -23,6 +20,7 @@
|
|
23
20
|
"files": [
|
24
21
|
"dist",
|
25
22
|
"index.d.ts",
|
23
|
+
"src/morghulis-types.d.ts",
|
26
24
|
"typings"
|
27
25
|
],
|
28
26
|
"scripts": {
|
@@ -0,0 +1,40 @@
|
|
1
|
+
// MButton组件的类型定义
|
2
|
+
|
3
|
+
// 按钮类型
|
4
|
+
export type MButtonType = "default" | "primary" | "success" | "warning" | "danger" | "info" | "text"
|
5
|
+
|
6
|
+
// 按钮尺寸
|
7
|
+
export type MButtonSize = "large" | "default" | "small"
|
8
|
+
|
9
|
+
// 按钮属性
|
10
|
+
export type MButton = {
|
11
|
+
// 属性
|
12
|
+
type?: MButtonType
|
13
|
+
size?: MButtonSize
|
14
|
+
plain?: boolean
|
15
|
+
round?: boolean
|
16
|
+
circle?: boolean
|
17
|
+
disabled?: boolean
|
18
|
+
loading?: boolean
|
19
|
+
icon?: string
|
20
|
+
text?: string
|
21
|
+
|
22
|
+
// 事件
|
23
|
+
onClick?: (event: MouseEvent) => void
|
24
|
+
}
|
25
|
+
|
26
|
+
// 安装方法
|
27
|
+
export function install(app: any): void
|
28
|
+
|
29
|
+
// 默认导出
|
30
|
+
export default {
|
31
|
+
MButton,
|
32
|
+
install
|
33
|
+
}
|
34
|
+
|
35
|
+
// 添加到Vue全局组件
|
36
|
+
declare module '@vue/runtime-core' {
|
37
|
+
export interface GlobalComponents {
|
38
|
+
MButton: MButton
|
39
|
+
}
|
40
|
+
}
|