2 lines
7.2 KiB
JavaScript
2 lines
7.2 KiB
JavaScript
|
/*! Buefy v0.7.4 | MIT License | github.com/buefy/buefy */
|
||
|
!(function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}})("undefined"!=typeof self?self:this,(function(){return (function(e){function t(i){if(n[i])return n[i].exports;var a=n[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=278)})({0:function(e,t){e.exports=function(e,t,n,i,a){var r,l=e=e||{},o=typeof e.default;"object"!==o&&"function"!==o||(r=e,l=e.default);var u="function"==typeof l?l.options:l;t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns),i&&(u._scopeId=i);var s;if(a?(s=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=s):n&&(s=n),s){var d=u.functional,c=d?u.render:u.beforeCreate;d?u.render=function(e,t){return s.call(t),c(e,t)}:u.beforeCreate=c?[].concat(c,s):[s]}return{esModule:r,exports:l,options:u}}},109:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return r}));var i="undefined"==typeof window,a=i?Object:window.HTMLElement,r=i?Object:window.File},12:function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r}));var i=function(e){"undefined"!=typeof window&&window.Vue&&window.Vue.use(e)},a=function(e,t){e.component(t.name,t)},r=function(e,t,n){e.prototype[t]=n}},13:function(e,t,n){"use strict";var i={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultDialogConfirmText:null,defaultDialogCancelText:null,defaultSnackbarDuration:3500,defaultSnackbarPosition:null,defaultToastDuration:2e3,defaultToastPosition:null,detaultNotificationDuration:2e3,defaultNotificationPosition:null,defaultTooltipType:"is-primary",defaultTooltipAnimated:!1,defaultInputAutocomplete:"on",defaultDateFormatter:null,defaultDateParser:null,defaultDateCreator:null,defaultDayNames:null,defaultMonthNames:null,defaultFirstDayOfWeek:null,defaultUnselectableDaysOfWeek:null,defaultTimeFormatter:null,defaultTimeParser:null,defaultModalCanCancel:null,defaultModalScroll:null,defaultDatepickerMobileNative:!0,defaultTimepickerMobileNative:!0,defaultNoticeQueue:!0,defaultInputHasCounter:!0,defaultUseHtml5Validation:!0};t.a=i},244:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(245),a=n.n(i),r=n(12);n.d(t,"Upload",(function(){return a.a}));var l={install:function(e){Object(r.a)(e,a.a)}};Object(r.c)(l),t.default=l},245:function(e,t,n){var i=n(0)(n(246),n(247),null,null,null);e.exports=i.exports},246:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(42),a=n(109);t.default={name:"BUpload",mixins:[i.a],inheritAttrs:!1,props:{value:{type:[Object,Function,a.a,Array]},multiple:Boolean,disabled:Boolean,accept:String,dragDrop:Boolean,type:{type:String,default:"is-primary"},native:{type:Boolean,default:!1}},data:function(){return{newValue:this.value,dragDropFocus:!1,_elementRef:"input"}},watch:{value:function(e){this.newValue=e,(!this.newValue||Array.isArray(this.newValue)&&0===this.newValue.length)&&(this.$refs.input.value=null),!this.isValid&&!this.dragDrop&&this.checkHtml5Validity()}},methods:{onFileChange:function(e){if(!this.disabled&&!this.loading){this.dragDrop&&this.updateDragDropFocus(!1);var t=e.target.files||e.dataTransfer.files;if(0===t.length){if(!this.newValue)return;this.newValue=null}else if(this.multiple){var n=!1;!this.native&&this.newValue||(this.newValue=[],n=!0);for(var i=0;i<t.length;i++){var a
|