UNPKG

vue-directive-preview-image

Version:
37 lines (30 loc) 696 B
# vue-directive-preview-image ## descript ``` a vue directive to preview image in PC and Mobile ``` ## Project setup ``` npm install vue-directive-preview-image --save ``` ### main.js ``` import VueDirectivePreviewImage from 'vue-directive-preview-image' Vue.use(VueDirectivePreviewImage, options) ``` ### If you're using the Vue framework ``` Vue.use(VueDirectivePreviewImage) ``` ### If you're using the nuxt framework ``` Vue.use(VueDirectivePreviewImage, '__nuxt') ``` ### Use this directive ``` <img v-preview-img src="url" /> ``` ### When your preview image needs to be transformed ``` <img v-preview-img src="url" previewSrc="previewUrl" /> ```