欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

vue-preview縮略圖報(bào)錯(cuò)解決

 更新時(shí)間:2023年08月03日 11:51:12   作者:diuren1205  
這篇文章主要為大家介紹了vue-preview縮略圖報(bào)錯(cuò)解決,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪

vue-preview

因?yàn)橐呀?jīng)更新縮略圖,使用方法已經(jīng)發(fā)生轉(zhuǎn)變,所以才會(huì)找不到$preview

控制臺(tái)錯(cuò)誤信息

"$preview" is not defined on the instance but referenced during render

 vue-preview(官網(wǎng))

npm i vue-preview -S

main.js引用

import VuePreview from 'vue-preview'
// defalut install
Vue.use(VuePreview)

css樣式

.thumbs {
  /deep/ .my-gallery{   //deep深層作用選擇器
        display: flex;
        flex-wrap:wrap;//默認(rèn)換行
        figure{
            width: 30%;
            margin: 5px;
            img{
                width: 100%;
                box-shadow: 0 0 8px #999;
                border-radius: 5px;
        }
    }
}

Examples

<template>
   <div class="thumbs">
        <vue-preview :slides="slide1" @close="handleClose"></vue-preview>
   </div>
</template>
<script>
export default {
    data () {
      return {
        slide1: [
          {
            src:  'https://ss3.bdstatic.com/iPoZeXSm1A5BphGlnYG/skin/414.jpg?2',
            msrc: 'https://ss3.bdstatic.com/iPoZeXSm1A5BphGlnYG/skin/414.jpg?2',
            alt: 'picture1',
            title: 'Image Caption 1',
            w: 600,
            h: 400
          }
        ]
      }
    },
    methods: {
      handleClose () {
        console.log('close event')
      }
    }
  }
</script>

實(shí)際展示

以上就是vue-preview縮略圖報(bào)錯(cuò)解決的詳細(xì)內(nèi)容,更多關(guān)于vue-preview縮略圖報(bào)錯(cuò)的資料請關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

最新評論