mali-applet-ui 0.1.65 → 0.1.67

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,5 +1,5 @@
1
1
  <template>
2
- <view class="ml-list-item" :class="[className || '', itemType ? `type-${itemType}` : '', {'is-vertical': itemVertical}]" :style="styles" @click="clickEvent" @tap="tapEvent">
2
+ <view class="ml-list-item" :class="[className || '', itemType ? `type-${itemType}` : '', {'is-padding': padding, 'is-vertical': itemVertical}]" :style="styles" @click="clickEvent" @tap="tapEvent">
3
3
  <view v-if="itemType === 'checkbox'" class="ml-list-checkbox-icon">
4
4
  <ml-checkbox :value="hasCheckedChecked"></ml-checkbox>
5
5
  </view>
@@ -38,6 +38,10 @@ export default {
38
38
  type: String,
39
39
  default: 'mlicon-arrow-right'
40
40
  },
41
+ padding: {
42
+ type: Boolean,
43
+ default: true
44
+ },
41
45
  url: String,
42
46
  redirect: Boolean,
43
47
  backgroundColor: String,
@@ -106,12 +110,21 @@ export default {
106
110
  display: flex;
107
111
  flex-direction: row;
108
112
  padding: 20rpx;
109
- margin-bottom: 20rpx;
110
113
  border-radius: $ml-border-radius;
111
114
  background: #ffffff;
115
+ &.is-padding {
116
+ margin-bottom: 20rpx;
117
+ }
112
118
  &:last-child {
113
119
  margin-bottom: 0;
114
120
  }
121
+ .ml-list-checkbox-icon,
122
+ .ml-list-radio-icon {
123
+ display: flex;
124
+ flex-direction: row;
125
+ align-items: center;
126
+ flex-shrink: 0;
127
+ }
115
128
  .ml-list-item-content {
116
129
  display: flex;
117
130
  flex-direction: column;
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <view class="ml-list-menu-item" :class="[className || '', itemType ? `type-${itemType}` : '', {'is-vertical': itemVertical}]" @click="clickEvent" @tap="tapEvent">
3
- <view v-if="itemType === 'checkbox'" class="ml-list-checkbox-icon">
3
+ <view v-if="itemType === 'checkbox'" class="ml-list-menu-checkbox-icon">
4
4
  <ml-checkbox :value="hasCheckedChecked"></ml-checkbox>
5
5
  </view>
6
- <view v-else-if="itemType === 'radio'" class="ml-list-radio-icon">
6
+ <view v-else-if="itemType === 'radio'" class="ml-list-menu-radio-icon">
7
7
  <ml-radio :value="hasRadioChecked" :label="value"></ml-radio>
8
8
  </view>
9
9
  <view v-if="prefixIcon && prefixIcon !== 'none'" class="ml-list-menu-item-left-icon">
@@ -116,6 +116,13 @@ export default {
116
116
  &:first-child {
117
117
  border-top: 1px solid #e5e5e5;
118
118
  }
119
+ .ml-list-menu-checkbox-icon,
120
+ .ml-list-menu-radio-icon {
121
+ display: flex;
122
+ flex-direction: row;
123
+ align-items: center;
124
+ flex-shrink: 0;
125
+ }
119
126
  .ml-list-menu-item-content {
120
127
  display: flex;
121
128
  flex-direction: row;
@@ -279,7 +279,7 @@ export default {
279
279
  this.previewStatus = true
280
280
  Promise.all(
281
281
  this.value.map(item => {
282
- return new Promise((resolve, reject) => {
282
+ return new Promise((resolve) => {
283
283
  uni.downloadFile({
284
284
  url: this.getUrl(item),
285
285
  success: (downRes) => {
@@ -296,12 +296,10 @@ export default {
296
296
  })
297
297
  })
298
298
  ).then(res => {
299
- if (typeof wx === 'object') {
300
- wx.previewMedia({
301
- current: index,
302
- sources: res
303
- })
304
- }
299
+ uni.previewImage({
300
+ current: index,
301
+ urls: res.map(item => item.url)
302
+ })
305
303
  this.previewStatus = false
306
304
  })
307
305
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.1.65",
3
+ "version": "0.1.67",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",