feat: 首次提交
This commit is contained in:
62
pages/component/operate/gallery/gallery.vue
Normal file
62
pages/component/operate/gallery/gallery.vue
Normal file
@ -0,0 +1,62 @@
|
||||
<!--本文件由FirstUI授权予新疆天衡创新研究院有限公司(手机号:1 8 614 0 7 254 9,身份证尾号:5A07X5)专用,请尊重知识产权,勿私下传播,违者追究法律责任。-->
|
||||
<template>
|
||||
<view class="fui-wrap">
|
||||
<view class="fui-page__hd">
|
||||
<view class="fui-page__title fui-align__center" @tap="vip">Gallery <image
|
||||
src="/static/images/index/light/icon_member_3x.png"></image>
|
||||
</view>
|
||||
<view class="fui-page__desc">Gallery 画廊,用于预览图片或其他操作。</view>
|
||||
</view>
|
||||
<view class="fui-page__bd">
|
||||
<fui-button type="gray" btn-size="medium" text="自定义Gallery" bold :margin="['24rpx']"
|
||||
@click="showGallery"></fui-button>
|
||||
<fui-button type="gray" btn-size="medium" text="原生预览" bold @click="previewImage"></fui-button>
|
||||
</view>
|
||||
<fui-gallery :urls="urls" :show="show" @hide="hideGallery"></fui-gallery>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
urls: [{
|
||||
src: '/static/images/common/logo.png',
|
||||
descr: 'First UI 是一套基于uni-app开发的组件化、可复用、易扩展、低耦合的跨平台移动端UI 组件库。'
|
||||
}, {
|
||||
src: '/static/images/component/img_goods_3x.jpg'
|
||||
}, {
|
||||
src: '/static/images/component/img_bg_poster.png'
|
||||
}],
|
||||
show: false,
|
||||
resUrl: this.fui.resUrl()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
vip() {
|
||||
this.fui.href("/pages/my/qa/qa?index=2&title=VIP专属内容")
|
||||
},
|
||||
showGallery() {
|
||||
this.show = true
|
||||
},
|
||||
hideGallery() {
|
||||
this.show = false
|
||||
},
|
||||
previewImage() {
|
||||
uni.previewImage({
|
||||
urls: [`${this.resUrl}/common/logo.png`, `${this.resUrl}/component/img_goods_3x.jpg`]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.fui-page__bd {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user