2 lines
989 B
JavaScript
2 lines
989 B
JavaScript
|
|
import{m as p,c as f}from"./index-BTglIPU2.js?v=1773287522785";import{k as v,R as x,r,$ as C,Z as h,_ as o,aa as l,S as i,a0 as y,X as M}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{_ as N}from"./naive-ui--dJnpVcV.js?v=1773287522785";const V={class:"calc-verify-box"},b={class:"mx-12px"},g={class:"w-80px ml-12px"},k=v({__name:"CalcVerify",setup(w,{expose:u}){const{t:d}=x(),a=r(0),s=r(0),n=r(null);function m(){a.value=Math.round(Math.random()*9+1),s.value=Math.round(Math.random()*9+1)}return m(),u({validate(){return new Promise((t,e)=>{n.value!==a.value+s.value&&(p.error(d("Component.Confirm.index_5")),e()),t(!0)})}}),(t,e)=>{const c=N;return C(),h("div",V,[o("div",null,l(t.$t("Component.Confirm.index_4")),1),o("div",b,l(i(a))+" + "+l(i(s)),1),e[1]||(e[1]=o("div",null,"=",-1)),o("div",g,[y(c,{value:i(n),"onUpdate:value":e[0]||(e[0]=_=>M(n)?n.value=_:null),"show-button":!1,placeholder:""},null,8,["value"])])])}}}),S=f(k,[["__scopeId","data-v-366c5492"]]);export{S as C};
|