text: (window.webpackJsonp=window.webpackJsonp||[]).push([[21],{119:function(t,o,s){"use strict";var n=s(69);s.n(n).a},120:function(t,o,s){"use strict";var n,e=s(206),i=(s(51),{name:"EzToast",props:{autoClose:{type:[Boolean,Number],default:2,validator:function(t){return!1===t||"number"==typeof t}},closeButton:{type:Object,default:function(){return{text:"关闭",closeCallback:void 0}}},enableHtml:{type:Boolean,default:!1},position:{type:String,default:"top",validator:function(t){return["top","middle","bottom"].indexOf(t)>=0}}},computed:{toastPosition:function(){return Object(e.a)({},"position-".concat(this.position),!0)}},mounted:function(){this.updateStyle(),this.exeAutoClose()},methods:{updateStyle:function(){var t=this;this.$nextTick(function(){t.$refs.line.style.height="".concat(t.$refs.toast.getBoundingClientRect().height,"px")})},exeAutoClose:function(){var t=this;this.autoClose&&setTimeout(function(){t.toastClose()},1e3*this.autoClose)},toastClose:function(){this.$el.remove(),this.$emit("close"),this.$destroy()},clickClose:function(){this.toastClose(),this.closeButton&&"function"==typeof this.closeButton.closeCallback&&this.closeButton.closeCallback(this)}}}),a=(s(119),s(1)),c=Object(a.a)(i,function(){var t=this,o=t.$createElement,s=t._self._c||o;return s("div",{staticClass:"wrapper",class:t.toastPosition},[s("div",{ref:"toast",staticClass:"ez-toast"},[s("div",{staticClass:"message"},[t.enableHtml?s("div",{domProps:{innerHTML:t._s(t.$slots.default[0])}}):t._t("default")],2),t._v(" "),s("span",{ref:"line",staticClass:"line"}),t._v(" "),t.closeButton?s("span",{staticClass:"close",on:{click:t.clickClose}},[t._v(t._s(t.closeButton.text))]):t._e()])])},[],!1,null,"348852c9",null).exports;o.a={install:function(t,o){t.prototype.$toast=function(o,s){n&&"function"==typeof n&&n.close(),n=function(t){var o=t.Vue,s=t.message,n=t.propsData,e=t.onClose,i=new(o.extend(c))({propsData:n});return i.$slots.default=[s],i.$mount(),i.$on("close",e),document.body.appendChild(i.$el),i}({Vue:t,message:o,propsData:s,onClose:function(){n=null}})}}}},207:function(t,o,s){},271:function(t,o,s){"use strict";var n=s(207);s.n(n).a},278:function(t,o,s){"use strict";s.r(o);s(24);var n=s(120),e=s(71);s(0).a.use(n.a);var i={components:{"ez-button":e.a},data:function(){return{content:'\n<ez-button @click="showToast1">上方弹出</ez-button>\n<ez-button @click="showToast2">中间弹出</ez-button>\n<ez-button @click="showToast3">下方弹出</ez-button>\n\nmethods: {\n  showToast1() {\n    this.$toast("点击弹出文字提示", {\n     });\n  },\n  showToast2() {\n     this.$toast("点击弹出文字提示", {\n      position: "middle"\n     });\n  },\n  showToast3() {\n    this.$toast("点击弹出文字提示", {\n       position: "bottom"\n     });\n  }\n}\n      '.replace(/^ {8}/gm,"").trim()}},methods:{showToast1:function(){this.$toast("点击弹出文字提示",{})},showToast2:function(){this.$toast("点击弹出文字提示",{position:"middle"})},showToast3:function(){this.$toast("点击弹出文字提示",{position:"bottom"})}}},a=(s(271),s(1)),c=Object(a.a)(i,function(){var t=this,o=t.$createElement,s=t._self._c||o;return s("div",{staticStyle:{"padding-top":"4px"}},[s("h3",[t._v("this.$toast 基本用法")]),t._v(" "),t._m(0),t._v(" "),s("div",{staticClass:"box"},[s("div",{staticClass:"row"},[s("ez-button",{on:{click:t.showToast1}},[t._v("上方弹出")]),t._v(" "),s("ez-button",{on:{click:t.showToast2}},[t._v("中间弹出")]),t._v(" "),s("ez-button",{on:{click:t.showToast3}},[t._v("下方弹出")])],1)]),t._v(" "),t._m(1),t._v(" "),s("pre",[s("code",[t._v(t._s(t.content))])])])},[function(){var t=this.$createElement,o=this._self._c||t;return o("p",[o("strong",[this._v("预览")])])},function(){var t=this.$createElement,o=this._self._c||t;return o("p",[o("strong",[this._v("代码")])])}],!1,null,"7b729050",null);o.default=c.exports},69:function(t,o,s){}}]);