import{aw as o,ag as i,y as s,z as l,A as e,P as a,b0 as m,L as d,H as n}from"./chunks/framework.BCBheFgR.js";const k=JSON.parse('{"title":"InputNumber 计数器","description":"","frontmatter":{},"headers":[],"relativePath":"form-config/fields/number.md","filePath":"form-config/fields/number.md"}'),b={name:"form-config/fields/number.md"};function u(p,t,f,h,g,x){const r=i("demo-block");return l(),s("div",null,[t[3]||(t[3]=e("h1",{id:"inputnumber-计数器",tabindex:"-1"},[d("InputNumber 计数器 "),e("a",{class:"header-anchor",href:"#inputnumber-计数器","aria-label":'Permalink to "InputNumber 计数器"'},"​")],-1)),t[4]||(t[4]=e("p",null,"仅允许输入标准的数字值，可定义范围",-1)),t[5]||(t[5]=e("h2",{id:"基础用法",tabindex:"-1"},[d("基础用法 "),e("a",{class:"header-anchor",href:"#基础用法","aria-label":'Permalink to "基础用法"'},"​")],-1)),a(r,{type:"form",config:[{type:"number",name:"number",text:"计数器"}]},{source:n(()=>t[0]||(t[0]=[e("p",null," type为'number' ",-1)])),_:1}),t[6]||(t[6]=e("h2",{id:"禁用状态",tabindex:"-1"},[d("禁用状态 "),e("a",{class:"header-anchor",href:"#禁用状态","aria-label":'Permalink to "禁用状态"'},"​")],-1)),a(r,{type:"form",config:[{type:"number",name:"number",text:"计数器",disabled:()=>!0}]},{source:n(()=>t[1]||(t[1]=[e("p",null," disabled 属性接受一个 Boolean，设置为 true 即可禁用整个组件，也可以接受一个返回 Boolean 的函数，如果你只需要控制数值在某一范围内，可以设置 min 属性和 max 属性，不设置 min 和 max 时，最小值为 0。 ",-1)])),_:1}),t[7]||(t[7]=e("h2",{id:"步数",tabindex:"-1"},[d("步数 "),e("a",{class:"header-anchor",href:"#步数","aria-label":'Permalink to "步数"'},"​")],-1)),t[8]||(t[8]=e("p",null,"允许定义递增递减的步数控制",-1)),a(r,{type:"form",config:[{type:"number",name:"number",text:"计数器",step:10}]},{source:n(()=>t[2]||(t[2]=[e("p",null," 设置 step 属性可以控制步长，接受一个 Number 。 ",-1)])),_:1}),t[9]||(t[9]=m('<h2 id="attributes" tabindex="-1">Attributes <a class="header-anchor" href="#attributes" aria-label="Permalink to &quot;Attributes&quot;">​</a></h2><table tabindex="0"><thead><tr><th>参数</th><th>说明</th><th>类型</th><th>可选值</th><th>默认值</th></tr></thead><tbody><tr><td>name</td><td>绑定值</td><td>string</td><td>—</td><td>—</td></tr><tr><td>placeholder</td><td>输入框占位文本</td><td>string</td><td>—</td><td>—</td></tr><tr><td>text</td><td>表单标签</td><td>string</td><td>—</td><td>—</td></tr><tr><td>disabled</td><td>是否禁用</td><td>boolean / <a href="https://github.com/Tencent/tmagic-editor/blob/master/packages/form/src/schema.ts" target="_blank" rel="noreferrer">FilterFunction</a></td><td>—</td><td>false</td></tr><tr><td>min</td><td>设置计数器允许的最小值</td><td>number</td><td>—</td><td>-Infinity</td></tr><tr><td>max</td><td>设置计数器允许的最大值</td><td>number</td><td>—</td><td>Infinity</td></tr><tr><td>step</td><td>计数器步长</td><td>number</td><td>—</td><td>1</td></tr><tr><td>onChange</td><td>值变化时触发的函数</td><td><a href="https://github.com/Tencent/tmagic-editor/blob/master/packages/form/src/schema.ts" target="_blank" rel="noreferrer">OnChangeHandler</a></td><td>—</td><td>-</td></tr></tbody></table>',2))])}const y=o(b,[["render",u]]);export{k as __pageData,y as default};
