text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["AccountView"],{"461b":function(t,e,a){"use strict";var i=a("ade3"),s=a("67ea"),o=a("4260");class n{constructor(t){Object(i["a"])(this,"guid",void 0),Object(i["a"])(this,"username",void 0),Object(i["a"])(this,"password",void 0),Object(i["a"])(this,"remark",void 0),Object(i["a"])(this,"type",void 0),Object.assign(this,t)}save(){this.guid?s["a"].account.put(this):(this.guid=Object(o["a"])()+"_"+Object(o["f"])(Date.now().toString()),s["a"].account.add(this))}static async getAll(){let t=await s["a"].account.toArray();return t}static async getById(t){return await s["a"].account.where({guid:t}).first()}}e["a"]=n},4779:function(t,e,a){"use strict";a("be7e")},be7e:function(t,e,a){},da70:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"account-info-page"},[a("div",{staticClass:"overflow-container"},[a("header",[a("span",{staticClass:"icon-back",on:{click:function(e){return t.$router.go(-1)}}}),t._v(" "+t._s(t.title)+" ")]),a("div",{staticClass:"name"},[a("div",{staticClass:"title"},[t._v("密码")]),a("ul",[a("li",[a("input",{directives:[{name:"model",rawName:"v-model",value:t.info.username,expression:"info.username"}],attrs:{type:"text",placeholder:"用户名"},domProps:{value:t.info.username},on:{input:function(e){e.target.composing||t.$set(t.info,"username",e.target.value)}}}),a("input",{directives:[{name:"model",rawName:"v-model",value:t.info.password,expression:"info.password"}],attrs:{type:"text",placeholder:"密码"},domProps:{value:t.info.password},on:{input:function(e){e.target.composing||t.$set(t.info,"password",e.target.value)}}})])])]),a("div",{staticClass:"name"},[a("div",{staticClass:"title"},[t._v("备注")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.info.remark,expression:"info.remark"}],attrs:{type:"text"},domProps:{value:t.info.remark},on:{input:function(e){e.target.composing||t.$set(t.info,"remark",e.target.value)}}})]),a("footer",[a("ul",[a("li",[a("button",{on:{click:t.cancel}},[t._v("取消")])]),a("li",[a("button",{on:{click:t.save}},[t._v("保存")])])])])])])},s=[],o=a("461b"),n={props:["type","id"],data(){return{title:"add"==this.type?"新增":"编辑",info:{username:"",password:"",remark:"",type:0}}},async mounted(){"add"!=this.type&&(this.info=await o["a"].getById(this.id))},methods:{cancel(){this.$router.go(-1)},save(){this.info.remark?(new o["a"](this.info).save(),this.$router.go(-1)):this.$Toast.info("网站名不能为空!")}}},r=n,c=(a("4779"),a("2877")),u=Object(c["a"])(r,i,s,!1,null,"0dfa7642",null);e["default"]=u.exports}}]);