PageSourceSearch

https://skabandy.ru/local/client-app/dist/scripts/CommentsForm-chunk-BbL0ZCan.js

js skabandy.ru collected 2026-10-02 17:09:42 UTC 3,038 bytes, 1 lines download raw bytes

1import{d as e,M as t,_ as s,g as a,o as r,c as o,i as n,v as i,a as m,j as d,A as l,F as u,u as c,x as f}from"./index-CBUZHXhO.js";import{u as h,a as p,r as x,c as _}from"./index-chunk-DypLcrz9.js";import v from"./InputText-chunk-BaFsd2oM.js";import b from"./InputTextarea-chunk-BHY5jzHX.js";import"./index-chunk-ChBQHJZ6.js";import"./InputTemplate-chunk-D0418roW.js";import"./IconSVG-chunk-DZ6eoNR-.js";const $=e({name:"CommentsForm",components:{InputText:v,InputTextarea:b},props:{id:{type:String}},setup(){const e=t({}),{withMessage:s}=_,{requestCommentForm:a}=h();return{withMessage:s,externalResults:e,v$:p({$externalResults:e}),requestCommentForm:a}},data(){return{isFinished:!1,formData:{news_id:this.id,name:"",text:""}}},validations(){return{formData:{name:{required:this.withMessage("Поле обязательно для заполнения",x)},text:{required:this.withMessage("Поле обязательно для заполнения",x)}}}},methods:{sendForm(){this.v$.$validate().then((e=>{e&&this.requestCommentForm({...this.formData}).then((()=>{this.formData={news_id:this.id,name:"",text:""},this.v$.formData.$reset(),this.isFinished=!0,setTimeout((()=>{this.isFinished=!1}),1e4)})).catch((e=>{const t={formData:{name:e}};Object.assign(this.externalResults,t);const s=this.$watch("formData",(()=>{this.v$.$clearExternalResults(),s()}),{deep:!0})}))}))}}}),F={class:"form__items"},D={class:"form__bottom"},j=["disabled"],k={class:"form-send form-send--example"},I=(e=>(c("data-v-2548f3c1"),e=e(),f(),e))((()=>m("div",{class:"form-send__info"},[m("div",{class:"form__title"}," Ваш комментарий отправлен "),m("div",{class:"form-send__text"}," После прохождения модерации ваш комментарий будет опубликован ")],-1))),g={class:"form__bottom"};const T=s($,[["render",function(e,t,s,c,f,h){const p=a("InputText"),x=a("InputTextarea");return r(),o(u,null,[n(m("form",{class:"form form--example",onSubmit:t[2]||(t[2]=l(((...t)=>e.sendForm&&e.sendForm(...t)),["prevent"]))},[m("div",F,[d(p,{id:"name-input",modelValue:e.formData.name,"onUpdate:modelValue":t[0]||(t[0]=t=>e.formData.name=t),class:"form__item",errors:e.v$.formData.name.$errors,autocomplete:"given-name",placeholder:"Ваше имя"},null,8,["modelValue","errors"]),d(x,{id:"text-input",modelValue:e.formData.text,"onUpdate:modelValue":t[1]||(t[1]=t=>e.formData.text=t),class:"form__item",errors:e.v$.formData.text.$errors,placeholder:"Ваш комментарий"},null,8,["modelValue","errors"])]),m("div",D,[m("button",{class:"form__submit btn btn-color btn-color--dark btn--size-l",type:"submit",disabled:e.v$.$error&&e.v$.$dirty}," Добавить ",8,j)])],544),[[i,!e.isFinished]]),n(m("div",k,[I,m("div",g,[m("button",{class:"form__submit btn btn-color btn-color--dark btn--size-l",onClick:t[3]||(t[3]=t=>e.isFinished=!1)}," Добавить новый комментарий ")])],512),[[i,e.isFinished]])],64)}],["__scopeId","data-v-2548f3c1"]]);export{T 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.