mali-ui-plus 0.1.21 → 0.1.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-ui-plus",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "码里云PC端组件库",
5
5
  "scripts": {
6
6
  "release": "npm run lib && node script/release.js && npm publish",
@@ -0,0 +1,5 @@
1
+ import { DefineComponent } from 'vue'
2
+
3
+ export const MlEditor: DefineComponent<{
4
+ modelValue: any
5
+ }>
package/types/index.d.ts CHANGED
@@ -10,9 +10,122 @@ export const MaliStorage: {
10
10
  removeItem(key: string): void
11
11
  }
12
12
 
13
+ export interface ConfigOptions {
14
+ version?: number
15
+ size?: string | null
16
+ // 全局仓库标识
17
+ getStoreId?(params: any): string | number
18
+ // 全局zindex
19
+ zIndex?(): number
20
+ // 权限控制
21
+ checkPermission?(params: any): boolean
22
+ // 审批组件
23
+ approval?: {
24
+ types?: {
25
+ value: number | string
26
+ label: string
27
+ color?: string
28
+ }[]
29
+ },
30
+ // 发票组件
31
+ invoice?: {
32
+ types?: {
33
+ value: number | string
34
+ label: string
35
+ }[]
36
+ },
37
+ // 输入框
38
+ input?: {
39
+ size: string | null
40
+ [key]: any
41
+ },
42
+ // 按钮
43
+ button?: {
44
+ size: string | null
45
+ [key]: any
46
+ },
47
+ // 上传组件
48
+ upload?: {
49
+ fileProps?: {
50
+ fileUrl?: string
51
+ fileType?: string
52
+ fileName?: string
53
+ },
54
+ // 获取附件缩略图方法
55
+ getThumbnailFileUrl?(params: {
56
+ item: any
57
+ params: any
58
+ }): string
59
+ // 获取附件路径方法
60
+ getFileUrl?(params: {
61
+ item: any
62
+ params: any
63
+ }): string
64
+ // 上传附件方法
65
+ uploadFile?(params: {
66
+ file: File,
67
+ params: any
68
+ }): Promise<any>
69
+ // 下载附件方法
70
+ downloadFile?(params: {
71
+ item: any
72
+ params: any
73
+ }): Promise<any>
74
+ // 删除附件方法
75
+ removeFile?(params: {
76
+ item: any
77
+ params: any
78
+ }): Promise<any>
79
+ },
80
+ // 分页组件
81
+ pager?: {
82
+ pageSize?: number
83
+ pageSizes?: number[]
84
+ layouts?: string[]
85
+ [key]: any
86
+ },
87
+ // 高级表格
88
+ grid?: {
89
+ showTool?: boolean
90
+ showHeadMenu?: boolean
91
+ pageProps?: {
92
+ pageSize?: string
93
+ currentPage?: string
94
+ },
95
+ resProps?: {
96
+ card?: string | ((params: {
97
+ response: any
98
+ }) => any)
99
+ result?: string | ((params: {
100
+ response: any
101
+ }) => any[])
102
+ total?: string | ((params: {
103
+ response: any
104
+ }) => number | string)
105
+ }
106
+ [key]: any
107
+ },
108
+ // 基础表格
109
+ table?: {
110
+ showTool?: boolean
111
+ showHeadMenu?: boolean
112
+ [key]: any
113
+ },
114
+ // 金额输入
115
+ amountInput?: {
116
+ digits?: number
117
+ [key]: any
118
+ },
119
+ // 金额格式化
120
+ amountText?: {
121
+ digits?: number
122
+ [key]: any
123
+ }
124
+ }
125
+
13
126
  declare const MaliUI: {
14
127
  version: string
15
- config(options: any): any,
128
+ config(options: ConfigOptions): any,
16
129
  install(app: App): void
17
130
  VXETable: typeof VXETable,
18
131
  MaliUtils: MaliUtils,
@@ -25,6 +138,8 @@ export * from './grid'
25
138
  export * from './cascader'
26
139
  export * from './select'
27
140
  export * from './switch'
141
+ export * from './upload'
142
+ export * from './editor'
28
143
 
29
144
  export * from 'vxe-table'
30
145
  export default MaliUI
@@ -0,0 +1,5 @@
1
+ import { DefineComponent } from 'vue'
2
+
3
+ export const MlUpload: DefineComponent<{
4
+ modelValue: any
5
+ }>