add auto generate example js
This commit is contained in:
@@ -1,30 +1,4 @@
|
||||
<template>
|
||||
<div class="page-image-pewview">
|
||||
<h1 class="page-title">Image Preview</h1>
|
||||
|
||||
<h2 class="page-sub-title">基础用法</h2>
|
||||
<zan-button @click="previewImage">click me</zan-button>
|
||||
<zan-button @click="previewImage2">click me</zan-button>
|
||||
</div>
|
||||
</template>
|
||||
<template><section class="demo-image-preview"><h1 class="demo-title">image-preview</h1></section></template>
|
||||
|
||||
<script>
|
||||
import { ImagePreview } from 'src/index';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
preview: true
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
previewImage() {
|
||||
ImagePreview('https://img.yzcdn.cn/upload_files/2017/03/03/FjVBWm29JBob2gj9RC86MOD38RNf.jpg');
|
||||
},
|
||||
previewImage2() {
|
||||
ImagePreview('https://img.yzcdn.cn/upload_files/2017/03/03/FseigsLj7DceULRKWhXsIsrkq1vT.jpg');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
import Vue from "vue";import ExampleBlock from "../components/example-block";Vue.component("example-block", ExampleBlock);</script>
|
||||
Reference in New Issue
Block a user