mali-applet-ui 1.1.30 → 1.1.32

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/i18n/i18n.js CHANGED
@@ -12,7 +12,9 @@ const compMessage = {
12
12
  const sysLang = uni.getSystemInfoSync().language
13
13
  let currLanguage = MaliStorage.getItem('MALI_LANGUAGE') || (/en/i.test(sysLang) ? 'en_US' : 'zh_CN')
14
14
 
15
- const localeMessage = {}
15
+ const localeMessage = {
16
+ ...compMessage
17
+ }
16
18
 
17
19
  const MaliI18n = {
18
20
  getLanguage () {
@@ -45,6 +47,7 @@ const MaliI18n = {
45
47
  }
46
48
 
47
49
  // 组件默认语言
50
+ MaliI18n.setLanguage(currLanguage)
48
51
  MaliI18n.setLocaleMessage(currLanguage, compMessage[currLanguage])
49
52
 
50
53
  export default MaliI18n
@@ -1,14 +1,14 @@
1
1
  <template>
2
2
  <view class="ml-action-menu" @tap.stop="openAction">
3
3
  <slot>
4
- <view class="ml-action-menu-icon mlicon-menu"></view>
4
+ <ml-icon name="menu" className="ml-action-menu-icon" :status="status || 'primary'" />
5
5
  </slot>
6
6
  </view>
7
7
  </template>
8
8
 
9
9
  <script>
10
10
  export default {
11
- name: 'MlListItemMenu',
11
+ name: 'MlActionMenu',
12
12
  props: {
13
13
  options: Array,
14
14
  status: String,
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <view class="ml-list-item-menu" @tap.stop="openAction">
3
- <ml-icon name="menu" :status="status || 'primary'" />
2
+ <view class="ml-list-item-menu">
3
+ <ml-action-menu :status="status" :options="options" @change="changeEvent"></ml-action-menu>
4
4
  </view>
5
5
  </template>
6
6
 
@@ -13,19 +13,8 @@ export default {
13
13
  params: Object
14
14
  },
15
15
  methods: {
16
- openAction () {
17
- uni.showActionSheet({
18
- itemList: this.options.map(item => item.label),
19
- // #ifdef MP-DINGTALK
20
- cancelButtonText: '取消',
21
- // #endif
22
- success: (res) => {
23
- const index = res.tapIndex
24
- const item = this.options[index]
25
- const value = item.value
26
- this.$emit('change', { ...this.params, value, option: item })
27
- }
28
- })
16
+ changeEvent (evntParams) {
17
+ this.$emit('change', { ...evntParams, ...this.params })
29
18
  }
30
19
  }
31
20
  }
@@ -35,6 +24,5 @@ export default {
35
24
  .ml-list-item-menu {
36
25
  display: inline-block;
37
26
  padding: 0 20rpx;
38
- font-size: 36rpx;
39
27
  }
40
28
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.1.30",
3
+ "version": "1.1.32",
4
4
  "description": "vue2 码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",