UNPKG

beehole-store-server

Version:

www.bee-hole.com

1 lines 2.79 kB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3576b988","chunk-2d0e5ed4"],{"93eb":function(t,e,o){},9722:function(t,e,o){"use strict";o.r(e);var i=o("2dd7"),a=o("8f91");e["default"]={name:"CreateForm",props:{shop_id:0},components:{AntModal:i["a"]},data:function(){return{open:!1,attachmentRefName:"addUploaderFile",editAttachmentRefName:"editUploaderFile",formId:"",labelCol:{span:4},wrapperCol:{span:14},loading:!1,total:0,id:void 0,formTitle:"",contentEditorEdit:"",form:{domain_id:void 0,domain:void 0},rules:{domain:[{required:!0,message:"域名不能为空",trigger:"blur"}]}}},filters:{},created:function(){},computed:{},watch:{},mounted:function(){},methods:{cancel:function(){this.open=!1,this.reset(),this.$emit("close")},reset:function(){this.form={type:"https",domain_id:void 0,domain:""}},handleAdd:function(){this.reset(),this.open=!0,this.formTitle="添加域名"},handleUpdate:function(t){var e=this;this.reset();var o=t.domain_id;Object(a["b"])(o).then((function(t){e.open=!0,e.form=t,e.formTitle="修改域名"}))},submitForm:function(){var t=this,e=this;e.shop_id&&(this.form.shop_id=e.shop_id),this.$refs.form.validate((function(o){if(!o)return!1;void 0!==t.form.domain_id?Object(a["e"])(t.form).then((function(e){t.$message.success("修改成功",3),t.open=!1,t.$emit("ok"),t.$emit("close")})):Object(a["e"])(t.form).then((function(o){e.$message.success("新增成功",3),e.open=!1,e.$emit("ok"),t.$emit("close")}))}))}}}},b318:function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t._self._c;return e("a-drawer",{attrs:{width:"650",title:t.formTitle,"label-col":4,"wrapper-col":14,visible:t.open,"body-style":{height:"calc(100vh - 100px)",overflow:"auto"}},on:{close:t.cancel}},[e("a-form-model",{ref:"form",attrs:{model:t.form,rules:t.rules,layout:"vertical"}},[e("a-form-model-item",{attrs:{label:"域名",prop:"domain"}},[e("a-input-group",{attrs:{compact:""}},[e("a-select",{model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},[e("a-select-option",{attrs:{value:"https"}},[t._v(" https ")]),e("a-select-option",{attrs:{value:"http"}},[t._v(" http ")])],1),e("a-input",{staticStyle:{width:"80%"},attrs:{placeholder:"请输入"},model:{value:t.form.domain,callback:function(e){t.$set(t.form,"domain",e)},expression:"form.domain"}})],1)],1),e("div",{staticClass:"bottom-control",staticStyle:{"z-index":"9999"}},[e("a-space",[e("a-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v(" 保存 ")]),e("a-button",{on:{click:t.cancel}},[t._v(" 取消 ")])],1)],1)],1)],1)},a=[],n=o("5530"),r=o("9722"),s=Object(n["a"])({},r["default"]),c=s,l=(o("b6b9"),o("2877")),d=Object(l["a"])(c,i,a,!1,null,"66cb32e2",null);e["default"]=d.exports},b6b9:function(t,e,o){"use strict";o("93eb")}}]);