mali-applet-ui 0.1.77 → 0.1.79

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,6 +1,6 @@
1
1
  <template>
2
2
  <view class="ml-drawer" :class="[className || '', `placement-${placement || 'bottom'}`, {'is-visible': visible, 'is-animate': isAnimate}]" @tap="tapMaskEvent">
3
- <view v-if="visible" class="ml-drawer-warpper" @tap.stop>
3
+ <view v-if="visible" class="ml-drawer-warpper" @tap.stop.prevent>
4
4
  <view v-if="showHeader" class="ml-drawer-header">
5
5
  <slot name="header">
6
6
  <view v-if="title" class="ml-drawer-header-title">{{ title }}</view>
@@ -182,13 +182,11 @@ export default {
182
182
  flex-direction: row;
183
183
  align-items: center;
184
184
  padding: 10rpx 20rpx;
185
- min-height: 80rpx;
185
+ min-height: 90rpx;
186
+ font-size: $uni-font-size-lg;
186
187
  }
187
188
  .ml-drawer-header-title {
188
189
  text-align: center;
189
- height: 70rpx;
190
- line-height: 70rpx;
191
- font-size: $uni-font-size-base;
192
190
  overflow: hidden;
193
191
  text-overflow: ellipsis;
194
192
  white-space: nowrap;
@@ -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.77",
3
+ "version": "0.1.79",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",