From 152d294b0e73861d4a8a7d3c0b57ffd7db48cc28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Huchet?= Date: Fri, 2 Mar 2018 11:55:59 +0100 Subject: [PATCH] Translation in english --- README.md | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index c6991b8..0294439 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Vue preview plugin -> 一个Vue集成[PhotoSwipe](https://github.com/dimsemenov/PhotoSwipe)图片预览插件 +> 一 A Vue Integrated [PhotoSwipe](https://github.com/dimsemenov/PhotoSwipe) Image Preview Plugin ![](https://img.shields.io/npm/dm/vue-preview.svg) ![](https://img.shields.io/npm/v/vue-preview.svg) @@ -17,13 +17,12 @@ npm i vue-preview -S ## Usage -使用须知: +Notice: + - This plugin currently support vue2.0 and above + - `img` tag class can not be removed -* 插件目前仅支持vue2.0以上版本 -* img标签上的class不能去掉 +If you are using `vue-cli` generated projects, you may need to modify the `webpack.base.conf.js` file loaders and add a loader. The reason is the plugin uses ES6 syntax, so you need to compile the code. -如果你是使用vue-cli生成的项目,可能需要你修改`webpack.base.conf.js`文件中的loaders,添加一个loader。 -原因:插件编写中使用了es6的语法,需要进行代码编译 ``` javascript { test: /vue-preview.src.*?js$/, @@ -40,7 +39,7 @@ Vue.use(VuePreview) ### Examples -``` +```html @@ -64,19 +63,19 @@ export default { ``` -### Mothods +### Methods -插件提供以下两个方法,```vm```代表组件实例 +The plugin provides the following two methods, `vm` represents a component instance: #### vm.$preview.open(index, list, options) -参数说明: +Parameters Description: -| 参数 | 说明 | 类型 | 必需 -| :--: | :--: | :--: | :--: -| index |当前图片的索引值| Number | 是 -| list |图片列表 | Array | 是 -| options |预览插件的配置选项([参考PhotoSwipe配置](http://photoswipe.com/documentation/options.html)) | Object | 否 +| Parameters | Description | Type | Required +| :--- | :--- | :--- | :--- +| index |The index of the current image | Number | Yes +| list |Image list | Array | Yes +| options |Configuration options for Preview Plugin ([see PhotoSwipe Configuration](http://photoswipe.com/documentation/options.html)) | Object | No #### vm.$preview.close()