|
1
|
|
-import{i as c,r as i,c as m,o as f,w as h,d as o,a as y,t as n}from"./vue.esm-bundler.js?ver=1.6.4";const p={class:"flex gap-2 items-center justify-between w-full mb-2.5 -mt-2"},C={class:"setting-label !mb-0"},v={class:"form-note"},b={__name:"Code",props:{field:{type:Object},value:{type:Object},fieldKey:{type:String}},setup(e){const s=e,r=()=>{const l="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";let t="";for(let a=0;a<20;a++)t+=l.charAt(Math.floor(Math.random()*l.length));s.value[s.fieldKey]=t};return c(()=>{}),(l,t)=>{const a=i("el-input"),u=i("el-form-item");return f(),m(u,null,{default:h(()=>[o("div",p,[o("label",C,n(l.$t("Code")),1),o("span",{class:"text-system-dark text-xs cursor-pointer hover:underline dark:text-gray-50",onClick:r},n(l.$t("Generate Random Code")),1)]),y(a,{modelValue:e.value[e.fieldKey],"onUpdate:modelValue":t[0]||(t[0]=d=>e.value[e.fieldKey]=d),placeholder:e.field.placeholder,maxlength:"20",onInput:t[1]||(t[1]=d=>e.value[e.fieldKey]=e.value[e.fieldKey].toUpperCase())},null,8,["modelValue","placeholder"]),o("div",v,[o("p",null,n(l.$t("Customers must enter this code at checkout.")),1)])]),_:1})}}};export{b as default}; |
|
1
|
+import{j as t,v as r,A as e}from"./vue.esm-bundler.js?ver=1.7.0";import{_ as s}from"./_plugin-vue_export-helper.js?ver=1.7.0";const n={},c={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 21.5 20.5"};function l(a,o){return r(),t("svg",c,o[0]||(o[0]=[e("g",{id:"Layer_1-2"},[e("path",{d:"M10.32,19.75h-1.06c-4.01,0-6.02,0-7.26-1.55-1.25-1.55-1.25-4.03-1.25-9.01v-3.23c0-1.92,0-2.88.32-3.6.23-.51.57-.94.98-1.22.58-.4,1.35-.4,2.9-.4.99,0,1.49,0,1.92.2.99.46,1.4,1.58,1.84,2.68l.54,1.34M5.75,4.97h8.54c1.79,0,2.69,0,3.33.53.28.23.52.53.7.87.29.54.38,1.22.42,2.29",style:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5px"}}),e("path",{d:"M3.35,11.33c.43-1.15.65-1.72,1.07-2.08.68-.58,1.66-.48,2.49-.48h9.1c2.48,0,3.72,0,4.33.8,1.06,1.37-.19,3.59-.69,4.93-.9,2.41-1.36,3.61-2.26,4.35-1.37,1.12-3.37.9-5.02.9h-3.68c-3.54,0-5.31,0-6.24-1.1-1.7-2.02.13-5.27.89-7.31Z",style:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5px"}})],-1)]))}const p=s(n,[["render",l]]);export{p as default}; |