morghulis 2.0.36 → 2.0.37

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,64 @@
1
+ import { App, DefineComponent } from 'vue'
2
+
3
+ declare module 'morghulis' {
4
+ export interface MButtonProps {
5
+ /**
6
+ * 按钮类型
7
+ * @default 'default'
8
+ */
9
+ type?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info'
10
+ /**
11
+ * 按钮尺寸
12
+ * @default 'medium'
13
+ */
14
+ size?: 'small' | 'medium' | 'large'
15
+ /**
16
+ * 是否为圆角按钮
17
+ * @default false
18
+ */
19
+ round?: boolean
20
+ /**
21
+ * 是否为朴素按钮
22
+ * @default false
23
+ */
24
+ plain?: boolean
25
+ /**
26
+ * 是否禁用
27
+ * @default false
28
+ */
29
+ disabled?: boolean
30
+ /**
31
+ * 按钮文本
32
+ */
33
+ text?: string
34
+ /**
35
+ * 按钮加载状态
36
+ * @default false
37
+ */
38
+ loading?: boolean
39
+ /**
40
+ * 自定义图标
41
+ */
42
+ icon?: string
43
+ }
44
+
45
+ export interface MButtonExpose {
46
+ /**
47
+ * 模拟点击按钮
48
+ */
49
+ triggerClick: () => void
50
+ }
51
+
52
+ export type MButtonInstance = InstanceType<typeof MButton>
53
+
54
+ export const MButton: DefineComponent<MButtonProps>
55
+
56
+ export function install(app: App): void
57
+
58
+ const _default: {
59
+ install: typeof install
60
+ MButton: typeof MButton
61
+ }
62
+
63
+ export default _default
64
+ }
package/package.json CHANGED
@@ -1,26 +1,25 @@
1
1
  {
2
2
  "name": "morghulis",
3
- "version": "2.0.36",
3
+ "version": "2.0.37",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/morghulis.js",
7
7
  "module": "./dist/morghulis.js",
8
- "types": "./dist/morghulis.d.ts",
9
- "typings": "./dist/morghulis.d.ts",
8
+ "types": "./dist/types/index.d.ts",
10
9
  "files": [
11
10
  "dist"
12
11
  ],
13
12
  "exports": {
14
13
  ".": {
15
14
  "import": "./dist/morghulis.js",
16
- "types": "./dist/morghulis.d.ts"
15
+ "types": "./dist/types/index.d.ts"
17
16
  },
18
17
  "./style": "./dist/morghulis.css"
19
18
  },
20
19
  "scripts": {
21
20
  "dev": "vite",
22
21
  "build": "vite build && npm run build:types",
23
- "build:types": "cp ./src/morghulis.d.ts ./dist/morghulis.d.ts",
22
+ "build:types": "mkdir -p dist/types && cp ./src/morghulis.d.ts ./dist/types/index.d.ts",
24
23
  "preview": "vite preview",
25
24
  "type-check": "vue-tsc --build",
26
25
  "prepublishOnly": "npm run build"
@@ -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 type MButtonInstance = InstanceType<typeof MButton>
52
-
53
- export const MButton: DefineComponent<MButtonProps>
54
-
55
- export function install(app: App): void
56
-
57
- export default {
58
- install,
59
- MButton
60
- }