mali-applet-ui 0.2.53 → 0.2.54

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.
@@ -3,7 +3,10 @@
3
3
  <view v-if="visible" class="ml-modal-warpper" @tap.stop.prevent>
4
4
  <view v-if="showHeader" class="ml-modal-header">
5
5
  <slot name="header">
6
- <view v-if="title" class="ml-modal-header-title">{{ title }}</view>
6
+ <view class="ml-modal-header-title">{{ title }}</view>
7
+ <view v-if="showClose" class="ml-modal-header-close" @click="closeEvent">
8
+ <ml-icon name="close" />
9
+ </view>
7
10
  </slot>
8
11
  </view>
9
12
  <view class="ml-modal-body" :style="bodyStyles">
@@ -34,6 +37,10 @@ export default {
34
37
  default: true
35
38
  },
36
39
  showFooter: Boolean,
40
+ showClose: {
41
+ type: Boolean,
42
+ default: true
43
+ },
37
44
  maskClosable: {
38
45
  type: Boolean,
39
46
  default: true
@@ -101,6 +108,9 @@ export default {
101
108
  this.close()
102
109
  }
103
110
  },
111
+ closeEvent () {
112
+ this.close()
113
+ },
104
114
  cancelEvent () {
105
115
  if (this.cancelClosable) {
106
116
  this.close()
@@ -150,14 +160,25 @@ export default {
150
160
  font-size: $uni-font-size-lg;
151
161
  }
152
162
  .ml-modal-header-title {
163
+ flex-grow: 1;
153
164
  text-align: center;
154
165
  overflow: hidden;
155
166
  text-overflow: ellipsis;
156
167
  white-space: nowrap;
157
168
  }
169
+ .ml-modal-header-close {
170
+ flex-shrink: 0;
171
+ padding-left: 10rpx;
172
+ font-size: 36rpx;
173
+ }
158
174
  .ml-modal-body {
159
175
  padding: 20rpx;
176
+ // #ifdef MP
160
177
  width: 600rpx;
178
+ // #endif
179
+ // #ifdef H5
180
+ min-width: 600rpx;
181
+ // #endif
161
182
  overflow: auto;
162
183
  max-height: 600rpx;
163
184
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.2.53",
3
+ "version": "0.2.54",
4
4
  "description": "码里云小程序组件库",
5
5
  "scripts": {
6
6
  "release": "node script/release.js && npm publish"