mali-applet-ui 0.0.31 → 0.0.32

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.
@@ -17,11 +17,7 @@ export default {
17
17
  },
18
18
  computed: {
19
19
  styles () {
20
- const rest = {}
21
- if (this.width) {
22
- rest.width = this.width
23
- }
24
- return rest
20
+ return this.width ? `${this.width}` : ''
25
21
  }
26
22
  }
27
23
  }
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <view class="ml-image-swiper">
3
+ <swiper :autoplay="autoplay" :interval="interval" :style="{height: height || '400rpx'}" circular indicator-dots>
4
+ <swiper-item v-for="(item, index) in options" :key="index">
5
+ <image class="ml-image-swiper-img" mode="widthFix" :src="item.url"></image>
6
+ </swiper-item>
7
+ </swiper>
8
+ </view>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: 'MlImageSwiper',
14
+ options: {
15
+ virtualHost: true
16
+ },
17
+ props: {
18
+ value: Number,
19
+ options: Array,
20
+ autoplay: Boolean,
21
+ interval: Number,
22
+ width: String,
23
+ height: String
24
+ }
25
+ }
26
+ </script>
27
+
28
+ <style lang="scss">
29
+ .ml-image-swiper {
30
+ .ml-image-swiper-img {
31
+ width: 100%;
32
+ }
33
+ }
34
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",