徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jiuhaoshenghuo/public/view_admin/js/chunk-e37d966c.02461865.js

1 lines
24 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-e37d966c","chunk-eaa63f38"],{"11b1":function(t,e,i){"use strict";i.r(e);var n=i("f478"),r=i("2f62");function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function o(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var s={name:"goodClass",data:function(){return{list1:[{image:i("30f6"),val:"1-2"},{image:i("8ce3"),val:"2-2"},{image:i("6430"),val:"3-2"},{image:i("8cb4"),val:"2-2-1"},{image:i("616a"),val:"3-2-1"},{image:i("d18a"),val:"4-2"}],list2:[{image:i("cc5c"),val:"1-3"},{image:i("ca2d"),val:"2-3"},{image:i("97f4"),val:"3-3"},{image:i("d18a"),val:"4-3"}],level:2,activeIndex:0,activeStyle:"-1"}},computed:function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(i,!0).forEach((function(e){o(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(i).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},Object(r.e)("admin/layout",["menuCollapse","isMobile"])),created:function(){this.getInfo()},methods:{getInfo:function(){var t=this;Object(n.i)().then((function(e){t.level=e.data.level,t.$refs.carousel.setActiveItem(e.data.index)}))},levelChange:function(t){this.$set(this,"activeIndex",0)},swiperChange:function(t){this.activeIndex=t},onSubmit:function(t){var e=this;Object(n.u)({product_category_diy:{level:this.level,index:this.activeIndex}}).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}))}}},c=(i("a0c5"),i("2877")),l=Object(c.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"goodClass flex"},[i("div",{staticClass:"flex-1"},[i("el-carousel",{ref:"carousel",attrs:{interval:4e3,autoplay:!1,"initial-index":t.activeIndex,type:"card",trigger:"click",height:"700px"},on:{change:t.swiperChange}},t._l(2==t.level?t.list1:t.list2,(function(e,n){return i("el-carousel-item",{key:n},[i("img",{staticClass:"cate-pic",class:t.activeIndex==n?"blue-border":"",attrs:{src:e.image}})])})),1)],1),i("div",{staticClass:"w-400"}),i("div",{staticClass:"right"},[i("div",{staticClass:"main"},[t._m(0),i("div",{staticClass:"main-content bg-fff"},[i("div",{staticClass:"title"},[t._v("页面设置")]),i("div",{staticClass:"form"},[i("div",{staticClass:"form-item mt-20"},[i("div",{staticClass:"form-label"},[t._v("分类等级")]),i("div",{staticClass:"form-value ml-14"},[i("RadioGroup",{on:{"on-change":t.levelChange},model:{value:t.level,callback:function(e){t.level=e},expression:"level"}},[i("Radio",{attrs:{label:2}},[t._v("二级分类")]),i("Radio",{attrs:{label:3}},[t._v("三级分类")])],1)],1)])])])])]),i("Card",{staticClass:"fixed-card",style:{left:t.menuCollapse?t.isMobile?"0":"80px":"200px"},attrs:{bordered:!1,"dis-hover":""}},[i("div",{staticClass:"acea-row row-center-wrapper"},[i("Button",{staticClass:"bnt",attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("保存")])],1)])],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"main-header bg-fff"},[e("div",{staticClass:"main-title"},[e("span",[this._v("商品分类")])])])}],!1,null,"0e56b74e",null);e.default=l.exports},"11c5":function(t,e,i){"use strict";var n=i("544e");i.n(n).a},"30f6":function(t,e,i){t.exports=i.p+"view_admin/img/cate-1-2.ebd4a795.png"},"544e":function(t,e,i){},"616a":function(t,e,i){t.exports=i.p+"view_admin/img/cate-3-2-1.22ab3b4e.png"},6430:function(t,e,i){t.exports=i.p+"view_admin/img/cate-3-2.7875992f.png"},"8cb4":function(t,e,i){t.exports=i.p+"view_admin/img/cate-2-2-1.a11ec2e3.png"},"8ce3":function(t,e,i){t.exports=i.p+"view_admin/img/cate-2-2.ce959110.png"},"97f4":function(t,e,i){t.exports=i.p+"view_admin/img/cate-3-3.8b082f87.png"},a0c5:function(t,e,i){"use strict";var n=i("a696");i.n(n).a},a696:function(t,e,i){},b27c:function(t,e,i){"use strict";i.r(e);var n=i("a34a"),r=i.n(n),a=i("d708"),o=(i("b311"),i("f478")),s=i("2f62"),c=i("d044"),l=i.n(c),u=i("11b1"),d=i("87ef"),f=i("046b");function p(t,e,i,n,r,a,o){try{var s=t[a](o),c=s.value}catch(t){return void i(t)}s.done?e(c):Promise.resolve(c).then(n,r)}function h(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function m(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var v={name:"devise_list",computed:function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?h(i,!0).forEach((function(e){m(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):h(i).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},Object(s.e)("admin/layout",["menuCollapse","isMobile"])),components:{goodClass:u.default,newGoods:d.default,users:f.default},data:function(){return{roterPre:a.a.roterPre,grid:{sm:10,md:12,lg:19},loading:!1,theme3:"light",menuList:[{name:"商城首页",id:1},{name:"商品分类",id:2},{name:"商品详情",id:3},{name:"个人中心",id:4}],columns1:[{title:"页面ID",key:"id",width:80},{title:"模板名称",key:"name",minWidth:100},{title:"添加时间",key:"add_time",minWidth:100},{title:"更新时间",key:"update_time",minWidth:100},{title:"操作",slot:"action",width:200}],list:[],imgUrl:"",modal:!1,BaseURL:a.a.apiBaseURL.replace(/adminapi/,""),cardShow:0,loadingExist:!1,isDiy:1,qrcodeImg:"",diyFrom:{type:1,page:1,limit:10},total:0}},created:function(){this.getList()},mounted:function(){},methods:{getChildData:function(t){this.loadingExist=t},submit:function(){switch(this.cardShow){case 1:this.$refs.category.onSubmit();break;case 2:this.$refs.newGoods.onSubmit();break;case 3:this.$refs.users.onSubmit()}},reast:function(){1==this.cardShow&&this.$refs.category.onSubmit(1)},bindMenuItem:function(t){this.cardShow=t},onCopy:function(){this.$Message.success("复制预览链接成功")},onError:function(){this.$Message.error("复制预览链接失败")},creatQrCode:function(t,e){this.$refs.qrCodeUrl.innerHTML="";var i="";i=e?"".concat(this.BaseURL,"pages/index/index"):"".concat(this.BaseURL,"pages/annex/special/index?id=").concat(t),new l.a(this.$refs.qrCodeUrl,{text:i,width:160,height:160,colorDark:"#000000",colorLight:"#ffffff",correctLevel:l.a.CorrectLevel.H})},routineCode:function(t){var e=this;Object(o.n)(t).then((function(t){e.qrcodeImg=t.data.image})).catch((function(t){e.$Message.error(t)}))},preview:function(t){this.modal=!0,this.creatQrCode(t.id,t.status),this.routineCode(t.id)},getList:function(){var t=this,e=window.localStorage;this.imgUrl=e.getItem("imgUrl");var i=this;this.loading=!0,Object(o.d)(this.diyFrom).then((function(n){t.loading=!1;var r=n.data;t.list=r.list,t.total=r.count,r.list.forEach((function(t){if(1==t.status){i.isDiy=t.is_diy;var n="".concat(i.BaseURL,"pages/annex/special/index?id=").concat(t.id);e.setItem("imgUrl",n),i.imgUrl=n}}))}))},pageChange:function(t){this.diyFrom.page=t,this.getList()},edit:function(t){t.is_diy?this.$router.push({path:this.roterPre+"/pages/diy",query:{id:t.id,name:t.template_name||"moren"}}):(window.localStorage.setItem("pageName",t.template_name),this.$store.dispatch("admin/user/getPageName"),this.$router.push({path:this.roterPre+"/setting/pages/template",query:{id:t.id,name:t.template_name}}))},add:function(){this.$router.push({path:this.roterPre+"/pages/diy",query:{id:0,name:"首页",type:1}})},del:function(t){var e=this,i={title:"删除",num:2e3,url:"diy/del/"+t.id,method:"DELETE",data:{type:1}};this.$modalSure(i).then((function(t){e.getList()})).catch((function(t){e.$Message.error(t.msg)}))},setStatus:function(){var t,e=(t=r.a.mark((function t(e){var i=this;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.$Modal.confirm({title:"提示",content:"<p>是否把该模板设为首页</p>",onOk:function(){Object(o.x)(e.id,{type:1}).then((function(t){var e=i;t.data.status?(i.$Message.success(t.data.msg),i.$Modal.remove(),i.getList()):setTimeout((function(t){e.$Modal.confirm({title:"提示",content:"<p>尚未安装模板,请安装后再试!</p>",loading:!1})}),500)})).catch((function(t){i.$Modal.remove(),i.$Message.error(t.msg)}))}});case 1:case"end":return t.stop()}}),t,this)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var a=t.apply(e,i);function o(t){p(a,n,r,o,s,"next",t)}function s(t){p(a,n,r,o,s,"throw",t)}o(void 0)}))});return function(t){return e.apply(this,arguments)}}(),recovery:function(t){var e=this;Object(o.t)(t.id).then((function(t){e.$Message.success(t.msg),e.getList()}))}}},g=(i("11c5"),i("2877")),y=Object(g.a)(v,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"i-layout-page-header"},[i("PageHeader",{staticClass:"product_tabs",style:"padding-right:"+(t.menuCollapse?105:20)+"px",attrs:{title:t.$route.meta.title,"hidden-breadcrumb":""}},[i("div",{attrs:{slot:"title"},slot:"title"},[i("div",{staticClass:"float-l"},[i("span",{staticClass:"mr20",domProps:{textContent:t._s(t.$route.meta.title)}})])])])],1),i("Row",{staticClass:"ivu-mt box-wrapper acea-row"},[i("Col",{staticClass:"right-wrapper"},[0==t.cardShow?i("Card",{attrs:{bordered:!1,"dis-hover":""}},[0==t.cardShow?i("Row",[t.isDiy?i("Col",{staticStyle:{width:"310px",height:"550px","margin-right":"30px",position:"relative"}},[i("iframe",{ref:"iframe",staticClass:"iframe-box",attrs:{src:t.imgUrl,frameborder:"0"}}),i("div",{staticClass:"mask"})]):t._e(),i("Col",{class:t.isDiy?"tableDiv":"table"},[i("div",{staticClass:"acea-row row-between-wrapper"},[i("Row",{attrs:{type:"flex"}},[i("Col",t._b({},"Col",t.grid,!1),[i("div",{staticClass:"button acea-row row-middle"},[i("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加主题")])],1)])],1)],1),i("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.list,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"region",fn:function(e){var n=e.row;return e.index,[i("div",{staticClass:"font-blue"},[t._v("\n "+t._s(1==n.type?"默认模板":2==n.type?"行业模板":"活动模板")+"\n ")])]}},{key:"action",fn:function(e){var n=e.row,r=e.index;return[n.status||n.is_diy?i("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")]):t._e(),1!=n.id&&n.is_diy?i("div",{staticStyle:{display:"inline-block"}},[n.status||n.is_diy?i("Divider",{attrs:{type:"vertical"}}):t._e(),i("a",{on:{click:function(e){return t.del(n,r)}}},[t._v("删除")])],1):t._e(),1!=n.status?i("div",{staticStyle:{display:"inline-block"}},[n.status||n.is_diy?i("Divider",{attrs:{type:"vertical"}}):t._e(),i("a",{on:{click:function(e){return t.setStatus(n,r)}}},[t._v("设为首页")])],1):t._e(),n.status||n.is_diy?i("div",{staticStyle:{display:"inline-block"}},[i("Divider",{attrs:{type:"vertical"}}),i("a",{staticClass:"copy-data",on:{click:function(e){return t.preview(n)}}},[t._v("预览")])],1):t._e(),n.is_diy?t._e():i("div",{staticStyle:{display:"inline-block"}},[i("Divider",{attrs:{type:"vertical"}}),i("a",{on:{click:function(e){return t.recovery(n,r)}}},[t._v("恢复初始设置")]),i("Divider",{attrs:{type:"vertical"}}),i("a",{on:{click:function(e){return t.del(n,r)}}},[t._v("删除")])],1)]}}],null,!1,1025537223)}),i("div",{staticClass:"acea-row row-right page"},[i("Page",{attrs:{total:t.total,current:t.diyFrom.page,"show-elevator":"","show-total":"","page-size":t.diyFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1):t._e()],1):t._e(),1==t.cardShow?i("goodClass",{ref:"category",on:{parentFun:t.getChildData}}):t._e(),2===t.cardShow?i("newGoods",{ref:"newGoods",on:{parentFun:t.getChildData}}):t._e(),3==t.cardShow?i("users",{ref:"users",on:{parentFun:t.getChildData}}):t._e()],1)],1),i("Card",{directives:[{name:"show",rawName:"v-show",value:1==t.cardShow||2==t.cardShow||3==t.cardShow,expression:"cardShow == 1 || cardShow == 2 || cardShow == 3"}],staticClass:"fixed-card",style:{left:t.menuCollapse?t.isMobile?"0":"80px":"200px"},attrs:{bordered:!1,"dis-hover":""}},[i("div",{staticClass:"acea-row row-center-wrapper"},[i("Button",{staticClass:"bnt",attrs:{type:"primary",loading:t.loadingExist},on:{click:t.submit}},[t._v("保存")]),1==t.cardShow?i("Button",{staticClass:"bnt ml20",on:{click:t.reast}},[t._v("重置")]):t._e()],1)]),i("Modal",{attrs:{title:"预览","footer-hide":""},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[i("div",[i("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"acea-row row-around code"},[i("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[i("div",{ref:"qrCodeUrl",staticClass:"QRpic"}),i("span",{staticClass:"mt10"},[t._v("公众号二维码")])]),i("div",{staticClass:"acea-row row-column-around row-between-wrapper"},[i("div",{staticClass:"QRpic"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.qrcodeImg,expression:"qrcodeImg"}]})]),i("span",{staticClass:"mt10"},[t._v("小程序二维码")])])])])])],1)}),[],!1,null,"4d2124e0",null);e.default=y.exports},b311:function(t,e,i){var n;n=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=6)}([function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var i=t.hasAttribute("readonly");i||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),i||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),r=document.createRange();r.selectNodeContents(t),n.removeAllRanges(),n.addRange(r),e=n.toString()}return e}},function(t,e){function i(){}i.prototype={on:function(t,e,i){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){var n=this;function r(){n.off(t,r),e.apply(i,arguments)}return r._=e,this.on(t,r,i)},emit:function(t){for(var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),n=0,r=i.length;n<r;n++)i[n].fn.apply(i[n].ctx,e);return this},off:function(t,e){var i=this.e||(this.e={}),n=i[t],r=[];if(n&&e)for(var a=0,o=n.length;a<o;a++)n[a].fn!==e&&n[a].fn._!==e&&r.push(n[a]);return r.length?i[t]=r:delete i[t],this}},t.exports=i,t.exports.TinyEmitter=i},function(t,e,i){var n=i(3),r=i(4);t.exports=function(t,e,i){if(!t&&!e&&!i)throw new Error("Missing required arguments");if(!n.string(e))throw new TypeError("Second argument must be a String");if(!n.fn(i))throw new TypeError("Third argument must be a Function");if(n.node(t))return function(t,e,i){return t.addEventListener(e,i),{destroy:function(){t.removeEventListener(e,i)}}}(t,e,i);if(n.nodeList(t))return function(t,e,i){return Array.prototype.forEach.call(t,(function(t){t.addEventListener(e,i)})),{destroy:function(){Array.prototype.forEach.call(t,(function(t){t.removeEventListener(e,i)}))}}}(t,e,i);if(n.string(t))return function(t,e,i){return r(document.body,t,e,i)}(t,e,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var i=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===i||"[object HTMLCollection]"===i)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,i){var n=i(5);function r(t,e,i,r,a){var o=function(t,e,i,r){return function(i){i.delegateTarget=n(i.target,e),i.delegateTarget&&r.call(t,i)}}.apply(this,arguments);return t.addEventListener(i,o,a),{destroy:function(){t.removeEventListener(i,o,a)}}}t.exports=function(t,e,i,n,a){return"function"==typeof t.addEventListener?r.apply(null,arguments):"function"==typeof i?r.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,(function(t){return r(t,e,i,n,a)})))}},function(t,e){var i=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}t.exports=function(t,e){for(;t&&t.nodeType!==i;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i.n(n),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.resolveOptions(e),this.initSelection()}return o(t,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=i+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=r()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=r()(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":a(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}(),c=i(1),l=i.n(c),u=i(2),d=i.n(u),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),h=function(t){function e(t,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.resolveOptions(i),n.listenClick(t),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.a),p(e,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===f(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=d()(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return m("action",t)}},{key:"defaultTarget",value:function(t){var e=m("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return m("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,i=!!document.queryCommandSupported;return e.forEach((function(t){i=i&&!!document.queryCommandSupported(t)})),i}}]),e}();function m(t,e){var i="data-clipboard-"+t;if(e.hasAttribute(i))return e.getAttribute(i)}e.default=h}]).default},t.exports=n()},ca2d:function(t,e,i){t.exports=i.p+"view_admin/img/cate-2-3.e5636195.png"},cc5c:function(t,e,i){t.exports=i.p+"view_admin/img/cate-1-3.1dbcd48b.png"},d18a:function(t,e,i){t.exports=i.p+"view_admin/img/cate-4.9336f9bd.png"}}]);