12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <view>
- <u-overlay :show="imageShow" @click="imageClose" :opacity="0.9">
- <view class="flex warp">
- <view class="rect" @tap.stop>
- <image :src="imageUrl" mode="scaleToFill"></image>
- </view>
- </view>
- </u-overlay>
- </view>
- </template>
- <script>
- export default {
- name: "image-show",
- props: {
- imageShow: {
- type: [Boolean],
- default: false
- },
- imageUrl: {
- type: [String, Number],
- default: ''
- }
- },
- data() {
- return {
- };
- },
- methods:{
- imageClose(){
- console.log('关闭');
- this.$emit('close')
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .warp {
- width: 100%;
- height: 100%;
- }
- .rect {
- width: 100%;
- max-height: 700rpx;
- background-color: #fff;
- }
-
- image{
- width: 100%;
- }
- </style>
|