Files

1 line
3.7 KiB
JavaScript

import{Z as e,mr as t,wn as n,xt as r}from"./common.js";import{createBlock as i,createElementVNode as a,createTextVNode as o,createVNode as s,defineComponent as c,normalizeClass as l,openBlock as u,ref as d,unref as f,watch as p,withCtx as m}from"vue";import{Input as h,InputNumber as g}from"ant-design-vue";import{useDesign as _}from"@mfish/core/hooks";var v={class:`title`},y={class:`title`},b={class:`title`},x={class:`title`},S={class:`title`},C={class:`title`},w={class:`title`},T={class:`title`},E=t(c({__name:`MfInputNumberConfig`,setup(t){let{prefixCls:c}=_(`input-config`),E=r(),D=d(),O=d(),k=d(!0),A=d(!1),j=d(),M=d(),N=d(),P=d(!1),F=d(),I=d(),L=d();p(()=>E.getCurConfigComponent,e=>{e&&R(e)},{immediate:!0});function R(e){D.value=e.chart.options?.addonBefore,O.value=e.chart.options?.addonAfter,e.chart.options?.bordered!==void 0&&(k.value=e.chart.options?.bordered),A.value=e.chart.options?.disabled||!1,P.value=e.chart.options?.showCount||!1,e.chart.options?.maxlength&&(j.value=e.chart.options.maxlength),e.chart.options?.prefix&&(M.value=e.chart.options.prefix),e.chart.options?.step&&(N.value=e.chart.options.step),e.chart.options?.placeholder&&(F.value=e.chart.options.placeholder),e.chart.options?.max&&(I.value=e.chart.options.max),e.chart.options?.min&&(L.value=e.chart.options.min)}function z(){E.getCurConfigComponent.chart.options.addonBefore=D.value}function B(){E.getCurConfigComponent.chart.options.addonAfter=O.value}function V(){E.getCurConfigComponent.chart.options.bordered=k.value}function H(){E.getCurConfigComponent.chart.options.disabled=A.value}function U(){E.getCurConfigComponent.chart.options.maxlength=j.value}function W(){E.getCurConfigComponent.chart.options.prefix=M.value}function G(){E.getCurConfigComponent.chart.options.step=N.value}function K(){E.getCurConfigComponent.chart.options.placeholder=F.value}function q(){E.getCurConfigComponent.chart.options.max=I.value}function J(){E.getCurConfigComponent.chart.options.min=L.value}return(t,r)=>(u(),i(e,{class:l(f(c))},{default:m(()=>[a(`div`,v,[r[10]||=o(` 提示信息 `,-1),a(`div`,null,[s(f(h),{value:F.value,"onUpdate:value":r[0]||=e=>F.value=e,onChange:K},null,8,[`value`])])]),a(`div`,y,[r[11]||=o(` 最大长度 `,-1),a(`div`,null,[s(f(g),{style:{width:`100%`},value:j.value,"onUpdate:value":r[1]||=e=>j.value=e,onChange:U},null,8,[`value`])])]),a(`div`,b,[r[12]||=o(` 前置标签 `,-1),a(`div`,null,[s(f(h),{value:D.value,"onUpdate:value":r[2]||=e=>D.value=e,onChange:z},null,8,[`value`])])]),a(`div`,x,[r[13]||=o(` 后置标签 `,-1),a(`div`,null,[s(f(h),{value:O.value,"onUpdate:value":r[3]||=e=>O.value=e,onChange:B},null,8,[`value`])])]),a(`div`,S,[r[14]||=a(`span`,{style:{width:`55px`}},`前缀`,-1),a(`div`,null,[s(f(h),{value:M.value,"onUpdate:value":r[4]||=e=>M.value=e,onChange:W},null,8,[`value`])])]),a(`div`,C,[r[15]||=a(`span`,{style:{width:`55px`}},`最大值`,-1),a(`div`,null,[s(f(g),{style:{width:`100%`},value:I.value,"onUpdate:value":r[5]||=e=>I.value=e,onChange:q},null,8,[`value`])])]),a(`div`,w,[r[16]||=a(`span`,{style:{width:`55px`}},`最小值`,-1),a(`div`,null,[s(f(g),{style:{width:`100%`},value:L.value,"onUpdate:value":r[6]||=e=>L.value=e,onChange:J},null,8,[`value`])])]),a(`div`,T,[r[17]||=a(`span`,{style:{width:`55px`}},`步数`,-1),a(`div`,null,[s(f(g),{style:{width:`100%`},value:N.value,"onUpdate:value":r[7]||=e=>N.value=e,onChange:G},null,8,[`value`])])]),s(n,{title:`显示边框`,tooltip:`勾选后显示边框`,checked:k.value,"onUpdate:checked":r[8]||=e=>k.value=e,onChange:V},null,8,[`checked`]),s(n,{title:`是否禁用`,tooltip:`勾选后禁用输入框,默认否`,checked:A.value,"onUpdate:checked":r[9]||=e=>A.value=e,onChange:H},null,8,[`checked`])]),_:1},8,[`class`]))}}),[[`__scopeId`,`data-v-da0016c2`]]);export{E as default};