123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <template>
- <a-modal
- centered
- class="productInfoPicDetail-modal"
- :footer="null"
- :maskClosable="false"
- title="产品图片"
- v-model="isShow"
- @cancle="isShow=false"
- :width="800">
- <a-carousel arrows>
- <div slot="prevArrow" slot-scope="props" class="custom-slick-arrow" style="left: 10px;zIndex: 1">
- <a-icon type="left-circle" />
- </div>
- <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px">
- <a-icon type="right-circle" />
- </div>
- <div><h3>1</h3></div>
- <div><h3>2</h3></div>
- <div><h3>3</h3></div>
- <div><h3>4</h3></div>
- </a-carousel>
- <div class="btn-cont"><a-button id="product-management-detail-modal-back" @click="isShow = false">返回列表</a-button></div>
- </a-modal>
- </template>
- <script>
- // import { dealerProductDetail } from '@/api/dealerProduct'
- export default {
- name: 'ProductInfoPicDetailModal',
- props: {
- openModal: { // 弹框显示状态
- type: Boolean,
- default: false
- },
- itemId: {
- type: [Number, String],
- default: ''
- }
- },
- data () {
- return {
- isShow: this.openModal, // 是否打开弹框
- detailsData: null // 详情数据
- }
- },
- methods: {
- // 获取详情
- getDetail () {
- // dealerProductDetail({ id: this.itemId }).then(res => {
- // if (res.status == 200) {
- // this.detailsData = res.data
- // }else{
- // this.detailsData = null
- // }
- // })
- }
- },
- watch: {
- // 父页面传过来的弹框状态
- openModal (newValue, oldValue) {
- this.isShow = newValue
- },
- // 重定义的弹框状态
- isShow (newValue, oldValue) {
- if (!newValue) {
- this.$emit('close')
- }
- },
- itemId (newValue, oldValue) {
- if (this.isShow && newValue) {
- this.getDetail()
- }
- }
- }
- }
- </script>
- <style lang="less">
- .productInfoPicDetail-modal{
- .ant-modal-body {
- padding: 40px 40px 24px;
- }
- .btn-cont {
- text-align: center;
- margin: 35px 0 10px;
- }
- }
- </style>
- <style scoped>
- /* For demo */
- .ant-carousel >>> .slick-slide {
- text-align: center;
- height: 160px;
- line-height: 160px;
- background: #364d79;
- overflow: hidden;
- }
- .ant-carousel >>> .custom-slick-arrow {
- width: 25px;
- height: 25px;
- font-size: 25px;
- color: #fff;
- background-color: rgba(31, 45, 61, 0.11);
- opacity: 0.3;
- }
- .ant-carousel >>> .custom-slick-arrow:before {
- display: none;
- }
- .ant-carousel >>> .custom-slick-arrow:hover {
- opacity: 0.5;
- }
- .ant-carousel >>> .slick-slide h3 {
- color: #fff;
- }
- </style>
|