|
@@ -1,12 +1,17 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
<network v-if="network.show" :num="network.num" :tips="network.tips" />
|
|
|
+ <view v-if="ctrlItem" class="ctrl-but" :style="{ background: ctrlItem.background }" hover-class="navigator-hover"
|
|
|
+ @click.stop="changeItem(ctrlItem)">
|
|
|
+ {{ ctrlItem.showValue }}
|
|
|
+ </view>
|
|
|
<swiper v-if="list.length" class="swiper" :indicator-dots="list.length > 1" :circular="true" indicator-color="#999"
|
|
|
indicator-active-color="#fff">
|
|
|
<swiper-item v-for="(item, index) in list" @click="preview(index)" :key="item.url">
|
|
|
<image class="image" :src="item.url" mode="aspectFit" lazy-load="true" />
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
+ <My_input ref="MyInput" />
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -24,7 +29,8 @@ export default {
|
|
|
show: false,
|
|
|
num: 0,
|
|
|
tips: ""
|
|
|
- }
|
|
|
+ },
|
|
|
+ ctrlItem: null
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -56,6 +62,14 @@ export default {
|
|
|
num,
|
|
|
tips
|
|
|
}
|
|
|
+ },
|
|
|
+ setData(params) {
|
|
|
+ for (const key in params) {
|
|
|
+ this[key] = params[key]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ changeItem(item) {
|
|
|
+ this.$refs.MyInput.openInput(item)
|
|
|
}
|
|
|
},
|
|
|
}
|
|
@@ -76,5 +90,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .ctrl-but {
|
|
|
+ position: absolute;
|
|
|
+ top: 10px;
|
|
|
+ right: 14px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #fff;
|
|
|
+ padding: 4px 6px;
|
|
|
+ border-radius: 4px;
|
|
|
+ z-index: 1;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|