vant/v1/async_18.6d7fe8fd.js
2024-04-20 08:49:23 +00:00

1 line
2.4 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{122:function(n,t,e){"use strict";var o=e(61);e.n(o).a},123:function(n,t,e){(n.exports=e(12)(!1)).push([n.i,".demo-image-preview .van-button {\n margin-left: 15px;\n}\n.van-image-preview img {\n -webkit-user-drag: none;\n}\n",""])},209:function(n,t,e){"use strict";e.r(t);var o=e(10),i=["https://img.yzcdn.cn/public_files/2017/09/05/3bd347e44233a868c99cf0fe560232be.jpg","https://img.yzcdn.cn/public_files/2017/09/05/c0dab461920687911536621b345a0bc9.jpg","https://img.yzcdn.cn/public_files/2017/09/05/4e3ea0898b1c2c416eec8c11c5360833.jpg","https://img.yzcdn.cn/public_files/2017/09/05/fd08f07665ed67d50e11b32a21ce0682.jpg"],c={i18n:{"zh-CN":{button1:"预览图片",button2:"指定初始位置",button3:"异步关闭",componentCall:"组件调用",index:function(n){return"第"+(n+1)+"页"}},"en-US":{button1:"Show Images",button2:"Custom Start Position",button3:"Async Close",componentCall:"Component Call",index:function(n){return"Page: "+n}}},data:function(){return{show:!1,images:i,index:0}},methods:{componentCall:function(){this.show=!0},onChange:function(n){this.index=n},showImagePreview:function(n,t){var e=Object(o.a)({images:i,asyncClose:!!t,startPosition:"number"==typeof n?n:0});t&&setTimeout(function(){e.close()},t)}}},s=(e(122),e(7)),a=Object(s.a)(c,function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("demo-section",[e("demo-block",{attrs:{title:n.$t("basicUsage")}},[e("van-button",{on:{click:n.showImagePreview}},[n._v(n._s(n.$t("button1")))])],1),e("demo-block",{attrs:{title:n.$t("button2")}},[e("van-button",{on:{click:function(t){return n.showImagePreview(1)}}},[n._v(n._s(n.$t("button2")))])],1),e("demo-block",{attrs:{title:n.$t("button3")}},[e("van-button",{on:{click:function(t){return n.showImagePreview(0,1e3)}}},[n._v(n._s(n.$t("button3")))])],1),e("demo-block",{attrs:{title:n.$t("componentCall")}},[e("van-button",{on:{click:n.componentCall}},[n._v(n._s(n.$t("componentCall")))]),e("van-image-preview",{attrs:{images:n.images},on:{change:n.onChange},scopedSlots:n._u([{key:"index",fn:function(){return[n._v(n._s(n.$t("index",n.index)))]},proxy:!0}]),model:{value:n.show,callback:function(t){n.show=t},expression:"show"}})],1)],1)},[],!1,null,null,null);t.default=a.exports},61:function(n,t,e){var o=e(123);"string"==typeof o&&(o=[[n.i,o,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};e(13)(o,i);o.locals&&(n.exports=o.locals)}}]);