mali-applet-ui 0.0.91 → 0.0.93

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.
@@ -20,13 +20,16 @@ export default {
20
20
  },
21
21
  openType: String,
22
22
  width: String,
23
+ height: String,
23
24
  redirect: Boolean,
24
25
  url: String,
25
26
  className: String
26
27
  },
27
28
  computed: {
28
29
  styles () {
29
- return this.width ? `width:${this.width};` : ''
30
+ const wStyle = this.width ? `width:${this.width};` : ''
31
+ const hStyle = this.height ? `height:${this.height};line-height:${this.height};` : ''
32
+ return `${wStyle}${hStyle}`
30
33
  }
31
34
  },
32
35
  methods: {
@@ -78,7 +81,7 @@ export default {
78
81
  }
79
82
  &.type-button {
80
83
  width: 100%;
81
- padding: 0 20rpx;
84
+ padding: 0 30rpx;
82
85
  height: 70rpx;
83
86
  line-height: 70rpx;
84
87
  border: 1px solid #e5e5e5;
@@ -2,7 +2,8 @@
2
2
  <view
3
3
  class="ml-col"
4
4
  :class="[className || '', span && !width ? `span-${span}` : '', align ? `align-${align}` : '', verticalAling ? `vertical-${verticalAling}` : '', {'is-light': light, 'is-flex': verticalAling || flex, 'is-fixed': width || shrink, 'is-important': important}]"
5
- :style="styles">
5
+ :style="styles"
6
+ @click="clickEvent">
6
7
  <slot></slot>
7
8
  </view>
8
9
  </template>
@@ -28,6 +29,11 @@ export default {
28
29
  styles () {
29
30
  return this.width ? `width: ${this.width};` : ''
30
31
  }
32
+ },
33
+ methods: {
34
+ clickEvent (e) {
35
+ this.$emit('click', { $event: e })
36
+ }
31
37
  }
32
38
  }
33
39
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-row" :class="[className || '', status ? `status-${status}` : '', {'is-vertical': vertical}]">
2
+ <view class="ml-row" :class="[className || '', status ? `status-${status}` : '', {'is-vertical': vertical}]" @click="clickEvent">
3
3
  <slot></slot>
4
4
  </view>
5
5
  </template>
@@ -14,7 +14,12 @@ export default {
14
14
  vertical: Boolean,
15
15
  status: String,
16
16
  className: String
17
- }
17
+ },
18
+ methods: {
19
+ clickEvent (e) {
20
+ this.$emit('click', { $event: e })
21
+ }
22
+ }
18
23
  }
19
24
  </script>
20
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.0.91",
3
+ "version": "0.0.93",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",