1import{b as g,g as b}from"./index-fVbF8cuZ.js";import{_ as w,r as i,a as c,c as x,o as f,d as s,w as n,e as a,b as v,g as B,t as y}from"./index-CQgO_FlU.js";const V={props:{id:{}},watch:{"form.name"(e){this.useButton=e===this.row.name},"form.description"(e){this.useButton=e===this.row.description},useButton(){this.$store.commit("UPDATE_PERMISSIONISSAVE",!this.useButton)}},data(){return{rules:{name:[{required:!0,trigger:"none",message:this.$t("message.10021")}]},form:{name:"",description:""},row:{},isLoading:!1,useButton:!0}},mounted(){this.getData()},methods:{getData(){b(this.id).then(e=>{this.row=e.data;const{name:t,description:m}=e.data;this.form={name:t,description:m}})},confirm(){this.$refs.form.validate(e=>{e&&g(this.id,{...this.form,id:this.row.id}).then(t=>{this.row=t.data,this.useButton=!0,this.$notify({title:this.$t("success"),message:this.$t("message.20001"),type:"success",duration:2e3})})})}}},D={style:{display:"flex","flex-direction":"column"}};function I(e,t,m,S,o,p){const d=i("kk-input"),u=i("kk-form-item"),_=i("kk-form"),h=i("kk-button"),l=c("maxLength"),k=c("focus");return f(),x("div",D,[s(_,{model:o.form,rules:o.rules,ref:"form"},{default:n(()=>[a((f(),v(u,{prop:"name",label:e.$t("admin.RoleName")},{default:n(()=>[a(s(d,{modelValue:o.form.name,"onUpdate:modelValue":t[0]||(t[0]=r=>o.form.name=r)},null,8,["modelValue"]),[[l,60]])],void 0,!0),_:1},8,["label"])),[[k]]),s(u,{label:e.$t("description")},{default:n(()=>[a(s(d,{type:"textarea",autosize:{minRows:3,maxRows:5},modelValue:o.form.description,"onUpdate:modelValue":t[1]||(t[1]=r=>o.form.description=r)},null,8,["modelValue"]),[[l,200]])],void 0,!0),_:1},8,["label"])],void 0,!0),_:1},8,["model","rules"]),s(h,{style:{"margin-top":"20px","margin-bottom":"20px",width:"100px"},type:"primary",onClick:p.confirm,loading:o.isLoading,disabled:o.useButton},{default:n(()=>[B(y(e.$t("save")),1)],void 0,!0),_:1},8,["onClick","loading","disabled"])])}const L=w(V,[["render",I],["__scopeId","data-v-6c015ffd"]]);export{L as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.