mali-applet-ui 1.0.190 → 1.1.0

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.js CHANGED
@@ -3,7 +3,7 @@ import MaliToast from './modal/toast'
3
3
  import MaliModal from './modal/modal'
4
4
  import MaliLoading from './modal/loading'
5
5
  import MaliStorage from './storage'
6
- import * as MaliUtils from './utils'
6
+ import MaliUtils from './utils'
7
7
 
8
8
  const MaliUI = {
9
9
  config,
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.190",
3
+ "version": "1.1.0",
4
4
  "description": "vue2 码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",
7
7
  "style",
8
+ "types",
8
9
  "config",
9
10
  "utils",
10
11
  "modal",
@@ -29,6 +30,9 @@
29
30
  "serve:mp-dingtalk": "npm run run-before && cross-env NODE_ENV=development UNI_OUTPUT_DIR=dist/dev/mp-dingtalk uniapp-cli custom mp-dingtalk",
30
31
  "run-before": "node script/run-before.js"
31
32
  },
33
+ "dependencies": {
34
+ "xe-utils": "^3.5.7"
35
+ },
32
36
  "devDependencies": {
33
37
  "@dcloudio/uni-app-plus": "^2.0.1-36420220922003",
34
38
  "@dcloudio/uni-h5": "^2.0.1-36420220922003",
@@ -0,0 +1,25 @@
1
+
2
+ // import Vue from 'vue'
3
+ import { MaliUtils, MlUtilsCore } from './utils'
4
+ import { MaliStorage, MlStorageCore } from './storage'
5
+
6
+ export const MaliUI: {
7
+ version: string
8
+ // config(options: ConfigOptions): any
9
+ // install(app: Vue): void
10
+ MaliUtils: MlUtilsCore
11
+ // MaliToast: typeof MaliToast
12
+ // MaliModal: typeof MaliModal
13
+ // MaliLoading: typeof MaliLoading
14
+ MaliStorage: MlStorageCore
15
+ }
16
+
17
+ export {
18
+ MaliUtils,
19
+ // MaliToast,
20
+ // MaliModal,
21
+ // MaliLoading,
22
+ MaliStorage
23
+ }
24
+
25
+ export default MaliUI
@@ -0,0 +1,7 @@
1
+ export interface MlStorageCore {
2
+ setItem(key: string, value: any, options?: any): void
3
+ getItem<T>(key: string): T | null
4
+ removeItem(key: string): void
5
+ }
6
+
7
+ export const MaliStorage: MlStorageCore
@@ -0,0 +1,8 @@
1
+ import 'xe-utils'
2
+ import { XEUtilsMethods } from 'xe-utils/ctor'
3
+
4
+ export interface MlUtilsCore extends XEUtilsMethods {
5
+ [key: string]: any
6
+ }
7
+
8
+ export const MaliUtils: MlUtilsCore
package/utils/index.js CHANGED
@@ -1,4 +1,16 @@
1
- export * from './applet'
2
- export * from './date'
3
- export * from './number'
4
- export * from './file'
1
+ import XEUtils from 'xe-utils'
2
+
3
+ import * as appletFns from './applet'
4
+ import * as dateFns from './date'
5
+ import * as numberFns from './number'
6
+ import * as fileFns from './file'
7
+
8
+ const MaliUtils = {
9
+ ...XEUtils,
10
+ ...appletFns,
11
+ ...dateFns,
12
+ ...numberFns,
13
+ ...fileFns
14
+ }
15
+
16
+ export default MaliUtils