vue 子组件尺寸
可视扩展图像 (vue-expandable-image)
Allows your images to open in full size.
允许您以全尺寸打开图像。
![vue-expandable-image](https://i-blog.csdnimg.cn/blog_migrate/dfce7da6d2e0ea1d3e5bc62977f2cd53.gif)
建立 (Setup)
npm install vue-expandable-image
You have two ways to setup vue-expandable-image
:
您可以通过两种方式设置vue-expandable-image
:
CommonJS(Webpack /浏览器验证) (CommonJS (Webpack/Browserify))
ES6
ES6
import VueExpandableImage from 'vue-expandable-image'
Vue.use(VueExpandableImage)
ES5
ES5
var VueExpandableImage = require('vue-expandable-image')
Vue.use(VueExpandableImage)
包括 (Include)
Include it directly with a <script>
tag. In this case, you don't need to write Vue.use(VueExpandableImage)
, this will be done automatically for you.
将其直接包含在<script>
标记中。 在这种情况下,您无需编写Vue.use(VueExpandableImage)
,这将自动为您完成。
用法 (Usage)
Just replace your <img>
tag with <expandable-image/>
, and it should work!
只需将<img>
标记替换为<expandable-image/>
,它就可以工作!
翻译自: https://vuejsexamples.com/a-vue-component-that-allows-your-images-to-open-in-full-size/
vue 子组件尺寸