mali-applet-ui 0.1.80 → 0.1.81

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.
Files changed (2) hide show
  1. package/modal/modal.js +13 -2
  2. package/package.json +1 -1
package/modal/modal.js CHANGED
@@ -2,14 +2,19 @@ const MaliModal = {
2
2
  open (option = {}) {
3
3
  return new Promise(resolve => {
4
4
  uni.showModal({
5
- title: option.title || '系统提示',
6
- content: option.content || '',
7
5
  ...option,
6
+ content: option.content || '',
7
+ title: option.title || '系统提示',
8
+ showCancel: option.showCancelButton || false,
9
+ confirmText: option.confirmButtonText || '确认',
10
+ cancelText: option.cancelButtonText || '取消',
8
11
  success (res) {
9
12
  if (res.confirm) {
10
13
  resolve('confirm')
11
14
  } else if (res.cancel) {
12
15
  resolve('cancel')
16
+ } else {
17
+ resolve()
13
18
  }
14
19
  }
15
20
  })
@@ -20,6 +25,8 @@ const MaliModal = {
20
25
  uni.showModal({
21
26
  title: option.title || '系统提示',
22
27
  content: option.content || '',
28
+ showCancel: false,
29
+ confirmText: option.confirmButtonText || '确认',
23
30
  success () {
24
31
  resolve('confirm')
25
32
  }
@@ -32,11 +39,15 @@ const MaliModal = {
32
39
  title: option.title || '系统提示',
33
40
  content: option.content || '',
34
41
  showCancel: true,
42
+ confirmText: option.confirmButtonText || '确认',
43
+ cancelText: option.cancelButtonText || '取消',
35
44
  success (res) {
36
45
  if (res.confirm) {
37
46
  resolve('confirm')
38
47
  } else if (res.cancel) {
39
48
  resolve('cancel')
49
+ } else {
50
+ resolve()
40
51
  }
41
52
  }
42
53
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.1.80",
3
+ "version": "0.1.81",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",