text: (window.webpackJsonp=window.webpackJsonp||[]).push([[119],{542:function(t,e,l){"use strict";l.r(e);var a=l(25),v=Object(a.a)({},(function(){var t=this,e=t.$createElement,l=t._self._c||e;return l("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[l("h1",{attrs:{id:"数量选择器-counter"}},[l("a",{staticClass:"header-anchor",attrs:{href:"#数量选择器-counter"}},[t._v("#")]),t._v(" "),l("H2Icon"),t._v(" 数量选择器 Counter")],1),t._v(" "),l("blockquote",[l("p",[t._v("本组件从v0.6.4版本更名为Counter")])]),t._v(" "),l("h2",{attrs:{id:"基础用法"}},[l("a",{staticClass:"header-anchor",attrs:{href:"#基础用法"}},[t._v("#")]),t._v(" 基础用法")]),t._v(" "),l("p",[t._v("通过"),l("code",[t._v("count")]),t._v("属性设置起始数量，默认值为"),l("code",[t._v("1")]),t._v("。")]),t._v(" "),l("p",[t._v("通过"),l("code",[t._v("min")]),t._v("属性设置最小数量，默认值为"),l("code",[t._v("1")]),t._v("。")]),t._v(" "),l("p",[t._v("通过"),l("code",[t._v("max")]),t._v("属性设置最大数量，默认值为"),l("code",[t._v("10000")]),t._v("。")]),t._v(" "),l("p",[t._v(":::img\n"),l("img",{attrs:{src:"/screenshots/counter/1.png",alt:"height=100"}}),t._v("\n:::")]),t._v(" "),l("h3",{attrs:{id:"示例代码"}},[l("a",{staticClass:"header-anchor",attrs:{href:"#示例代码"}},[t._v("#")]),t._v(" 示例代码")]),t._v(" "),l("div",{staticClass:"language-wxml extra-class"},[l("pre",{pre:!0,attrs:{class:"language-text"}},[l("code",[t._v('<l-counter count="1" min="1" max="10"/>\n')])])]),l("h2",{attrs:{id:"设置数量增减步长"}},[l("a",{staticClass:"header-anchor",attrs:{href:"#设置数量增减步长"}},[t._v("#")]),t._v(" 设置数量增减步长")]),t._v(" "),l("p",[t._v("通过"),l("code",[t._v("step")]),t._v("属性设置数量增减步长，默认值为"),l("code",[t._v("1")]),t._v("。")]),t._v(" "),l("p",[t._v(":::img\n"),l("img",{attrs:{src:"/screenshots/counter/2.png",alt:"height=100"}}),t._v("\n:::")]),t._v(" "),l("h3",{attrs:{id:"示例代码-2"}},[l("a",{staticClass:"header-anchor",attrs:{href:"#示例代码-2"}},[t._v("#")]),t._v(" 示例代码")]),t._v(" "),l("div",{staticClass:"language-wxml extra-class"},[l("pre",{pre:!0,attrs:{class:"language-text"}},[l("code",[t._v('<l-counter count="1" min="1" max="10" step="2"/>\n')])])]),l("h2",{attrs:{id:"设置禁用状态"}},[l("a",{staticClass:"header-anchor",attrs:{href:"#设置禁用状态"}},[t._v("#")]),t._v(" 设置禁用状态")]),t._v(" "),l("p",[t._v("通过"),l("code",[t._v("disabled")]),t._v("属性设置数量选择器禁用状态。默认值为"),l("code",[t._v("false")]),t._v("。")]),t._v(" "),l("p",[t._v(":::img\n"),l("img",{attrs:{src:"/screenshots/counter/3.png",alt:"height=100"}}),t._v("\n:::")]),t._v(" "),l("h3",{attrs:{id:"示例代码-3"}},[l("a",{staticClass:"header-anchor",attrs:{href:"#示例代码-3"}},[t._v("#")]),t._v(" 示例代码")]),t._v(" "),l("div",{staticClass:"language-wxml extra-class"},[l("pre",{pre:!0,attrs:{class:"language-text"}},[l("code",[t._v('<l-counter count="1" min="1" max="10" disabled="{{true}}"/>\n')])])]),l("h2",{attrs:{id:"数量选择器属性"}},[l("a",{staticClass:"header-anchor",attrs:{href:"#数量选择器属性"}},[t._v("#")]),t._v(" 数量选择器属性")]),t._v(" "),l("div",{staticClass:"custom-block tip"},[l("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),l("ol",[l("li",[t._v("如果需通过"),l("code",[t._v("l-count-class")]),t._v("或者"),l("code",[t._v("l-class")]),t._v("修改"),l("code",[t._v("height")]),t._v(",请同时设置"),l("code",[t._v("line-height")]),t._v("和"),l("code",[t._v("min-height")]),t._v("并与"),l("code",[t._v("height")]),t._v("大小保持一致。")]),t._v(" "),l("li",[l("code",[t._v("l-disabled-class")]),t._v("与"),l("code",[t._v("l-symbol-class")]),t._v("为互斥关系。")])])]),t._v(" "),l("table",[l("thead",[l("tr",[l("th",{staticStyle:{"text-align":"left"}},[t._v("参数")]),t._v(" "),l("th",{staticStyle:{"text-align":"left"}},[t._v("说明")]),t._v(" "),l("th",{staticStyle:{"text-align":"left"}},[t._v("类型")]),t._v(" "),l("th",{staticStyle:{"text-align":"left"}},[t._v("可选值")]),t._v(" "),l("th",{staticStyle:{"text-align":"left"}},[t._v("默认值")])])]),t._v(" "),l("tbody",[l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("count")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("设置起始数量")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("Number")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("---")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("1")])]),t._v(" "),l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("min")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("设置最小数量")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("Number")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("---")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("1")])]),t._v(" "),l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("max")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("设置最大数量")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("Number")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("---")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("10000")])]),t._v(" "),l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("step")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("设置数量增减步长")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("Number")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("---")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("1")])]),t._v(" "),l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("disabled")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("设置禁用状态")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("Boolean")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("---")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("false")])]),t._v(" "),l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("is-hover")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("是否显示hover效果")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("Boolean")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("---")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("true")])])])]),t._v(" "),l("h2",{attrs:{id:"数量选择器外部样式类"}},[l("a",{staticClass:"header-anchor",attrs:{href:"#数量选择器外部样式类"}},[t._v("#")]),t._v(" 数量选择器外部样式类")]),t._v(" "),l("table",[l("thead",[l("tr",[l("th",{staticStyle:{"text-align":"left"}},[t._v("外部样式类名")]),t._v(" "),l("th",{staticStyle:{"text-align":"left"}},[t._v("说明")]),t._v(" "),l("th",{staticStyle:{"text-align":"left"}},[t._v("备注")])])]),t._v(" "),l("tbody",[l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("l-class")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("设置数量选择器整体容器的外部样式类")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("---")])]),t._v(" "),l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("l-symbol-class")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("设置数量选择器加（减）号容器的外部样式类")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("---")])]),t._v(" "),l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("l-disabled-class")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("设置数量选择器数字容器禁用状态的外部样式类")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("---")])]),t._v(" "),l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("l-count-class")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("设置数量选择器数字容器的外部样式类")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("---")])])])]),t._v(" "),l("h2",{attrs:{id:"数量选择器事件"}},[l("a",{staticClass:"header-anchor",attrs:{href:"#数量选择器事件"}},[t._v("#")]),t._v(" 数量选择器事件")]),t._v(" "),l("table",[l("thead",[l("tr",[l("th",{staticStyle:{"text-align":"left"}},[t._v("事件名称")]),t._v(" "),l("th",{staticStyle:{"text-align":"left"}},[t._v("说明")]),t._v(" "),l("th",{staticStyle:{"text-align":"left"}},[t._v("返回值")]),t._v(" "),l("th",{staticStyle:{"text-align":"left"}},[t._v("备注")])])]),t._v(" "),l("tbody",[l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("bind:lintap")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("点击加（减）号及数字输入框失去焦点触发的事件")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("{count,type}")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("type值为"),l("code",[t._v("reduce")]),t._v("、"),l("code",[t._v("add")]),t._v("和"),l("code",[t._v("blur")])])]),t._v(" "),l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("bind:linout")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("数字超出可选范围触发的事件")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("{type,way}")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("type值为"),l("code",[t._v("overflow_min")]),t._v("、"),l("code",[t._v("overflow_max")]),t._v(",way值为"),l("code",[t._v("icon")]),t._v("、"),l("code",[t._v("input")]),t._v("、"),l("code",[t._v("parameter")])])]),t._v(" "),l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("bind:linchange")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("数字改变时触发的事件")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("{count}")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}})]),t._v(" "),l("tr",[l("td",{staticStyle:{"text-align":"left"}},[t._v("bind:lininput")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("输入数字时触发的事件")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("{value, cursor, keyCode}")]),t._v(" "),l("td",{staticStyle:{"text-align":"left"}},[t._v("该事件在 linchange 之前触发")])])])]),t._v(" "),l("div",{staticClass:"custom-block tip"},[l("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),l("p",[t._v("way值介绍：")]),t._v(" "),l("ol",[l("li",[l("code",[t._v("icon")]),t._v("为点击加（减）号触发的超出事件。")]),t._v(" "),l("li",[l("code",[t._v("input")]),t._v("为输入框数字超出事件。")]),t._v(" "),l("li",[l("code",[t._v("parameter")]),t._v("为输入的参数导致的超出事件。")])])]),t._v(" "),l("RightMenu")],1)}),[],!1,null,null,null);e.default=v.exports}}]);