mali-applet-ui 0.1.78 → 0.1.80

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.
@@ -1,7 +1,12 @@
1
1
  <template>
2
2
  <view class="ml-card">
3
- <view v-if="title" class="ml-card-header">
4
- <view class="ml-card-title">{{ title }}</view>
3
+ <view v-if="title || showHeader" class="ml-card-header">
4
+ <view class="ml-card-title">
5
+ <slot name="title">{{ title }}</slot>
6
+ </view>
7
+ <view class="ml-card-extra">
8
+ <slot name="extra"></slot>
9
+ </view>
5
10
  </view>
6
11
  <view class="ml-card-body">
7
12
  <slot></slot>
@@ -16,7 +21,8 @@ export default {
16
21
  virtualHost: true
17
22
  },
18
23
  props: {
19
- title: String
24
+ title: String,
25
+ showHeader: Boolean
20
26
  }
21
27
  }
22
28
  </script>
@@ -24,14 +30,16 @@ export default {
24
30
  <style lang="scss">
25
31
  .ml-card {
26
32
  margin-bottom: 20rpx;
33
+ border-radius: $ml-border-radius;
27
34
  background: #fff;
28
35
  .ml-card-header {
29
36
  display: flex;
30
37
  flex-direction: row;
31
38
  align-items: center;
32
39
  min-height: 80rpx;
33
- padding: 0 10rpx;
40
+ padding: 20rpx;
34
41
  .ml-card-title {
42
+ flex-grow: 1;
35
43
  position: relative;
36
44
  padding-left: 20rpx;
37
45
  &:before {
@@ -44,6 +52,12 @@ export default {
44
52
  background: $uni-color-primary;
45
53
  }
46
54
  }
55
+ .ml-card-extra {
56
+ flex-shrink: 0;
57
+ }
58
+ }
59
+ .ml-card-body {
60
+ padding: 20rpx;
47
61
  }
48
62
  }
49
63
  </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <text class="ml-icon" :class="[className || '', status ? `ss-${status}` : '', name ? `${prefix}${name}` : '', {'is-roll': roll}]" @click="clickEvent"></text>
2
+ <text class="ml-icon" :class="[className || '', status ? `ss-${status}` : '', name ? `${prefix}${name}` : '', {'is-roll': roll}]" :style="styles" @click="clickEvent"></text>
3
3
  </template>
4
4
 
5
5
  <script>
@@ -12,6 +12,7 @@ export default {
12
12
  name: String,
13
13
  status: String,
14
14
  roll: Boolean,
15
+ fontSize: String,
15
16
  className: String
16
17
  },
17
18
  data () {
@@ -19,6 +20,11 @@ export default {
19
20
  prefix: 'mlicon-'
20
21
  }
21
22
  },
23
+ computed: {
24
+ styles () {
25
+ return this.fontSize ? `font-size: ${this.fontSize};` : ''
26
+ }
27
+ },
22
28
  methods: {
23
29
  clickEvent (e) {
24
30
  this.$emit('click', { $event: e })
@@ -87,7 +87,7 @@ export default {
87
87
  right: 0;
88
88
  top: 0;
89
89
  line-height: 24rpx;
90
- width: 38rpx;
90
+ min-width: 38rpx;
91
91
  text-align: left;
92
92
  }
93
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",