nly-adminlte-vue
Version:
nly adminlte3 components
218 lines (217 loc) • 8.55 kB
JSON
{
"name": "@nly-adminlte-vue/form-input",
"version": "1.0.0",
"meta": {
"title": "Form Input",
"subtitle": "输入框",
"description": "输入框, 支持多种类型的 input 输入框",
"components": [
{
"component": "NlyFormInput",
"props": [
{
"prop": "isNavbar",
"description": "设置true为放在navbar中的input,带有css class form-control-navbar"
},
{
"prop": "value",
"description": "输入框的值, `v-model` 会把值传给value"
},
{
"prop": "formatter",
"description": "格式化输入的值, 即格式化value。 应传入函数, 会对输入的值进行函数指定的格式转换"
},
{
"prop": "lazyFormatter",
"description": "在设置formatter的情况下, 可以开启 `lazy-formatter` 实现懒加载格式转化模式"
},
{
"prop": "trim",
"description": "去除value值前后的空格"
},
{
"prop": "lazy",
"description": "设置lazy的时候, `v-model`获取的值将由事件 change/blur 触发, 而不再是事件 input, lazy的效果等同于v-model.lazy, 注意 `v-model.lazy' 不适用于input组件"
},
{
"prop": "disabled",
"description": "禁用 input 输入框"
},
{
"prop": "size",
"description": "大小, 可选 sm, lg"
},
{
"prop": "col",
"description": "在没有其他props的情况下, 所有列等宽, 放在class='row'的元素下有效"
},
{
"prop": "xs",
"description": "在XS及以上断点的宽度, 可选1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, auto"
},
{
"prop": "sm",
"description": "在SM及以上断点的宽度, 可选1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, auto"
},
{
"prop": "md",
"description": "在MD及以上断点的宽度, 可选1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, auto"
},
{
"prop": "lg",
"description": "在LG及以上断点的宽度, 可选1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, auto"
},
{
"prop": "xl",
"description": "在XL及以上断点的宽度, 可选1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, auto"
},
{
"prop": "offsetXs",
"description": "在XS及以上断点的偏移量, 可选0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11"
},
{
"prop": "offsetSm",
"description": "在SM及以上断点的偏移量, 可选0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11"
},
{
"prop": "offsetMd",
"description": "在MD及以上断点的偏移量, 可选0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11"
},
{
"prop": "offsetLg",
"description": "在LG及以上断点的偏移量, 可选0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11"
},
{
"prop": "offsetXl",
"description": "在XL及以上断点的偏移量, 可选0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11"
},
{
"prop": "orderXs",
"description": "在XS及以上断点的排序, 可选0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"
},
{
"prop": "orderSm",
"description": "在SM及以上断点的排序, 可选0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"
},
{
"prop": "orderMd",
"description": "在MD及以上断点的排序, 可选0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"
},
{
"prop": "orderLg",
"description": "在LG及以上断点的排序, 可选0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"
},
{
"prop": "orderXl",
"description": "在XL及以上断点的排序, 可选0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"
},
{
"prop": "type",
"description": "类型, 默认text, 不传默认text。可选text, password, email, number, url, tel, search, range, color, date, time, datetime, datetime-local, month, week"
},
{
"prop": "colorDefault",
"description": "类型, 默认text, 不传默认text。可选text, password, email, number, url, tel, search, range, color, date, time, datetime, datetime-local, month, week"
},
{
"prop": "type",
"description": "类型, 默认text, 不传默认text。可选text, password, email, number, url, tel, search, range, color, date, time, datetime, datetime-local, month, week"
},
{
"prop": "debounce",
"description": "防抖时间间隔"
},
{
"prop": "max",
"description": "输入值的最大范围, 设置 prop type=number和range才有效"
},
{
"prop": "min",
"description": "输入值的最小范围, 设置 type=number和range才有效"
},
{
"prop": "maxlength",
"description": "输入值的最大长度"
},
{
"prop": "step",
"description": "有效间隔, 设置 type=number和range才有效"
},
{
"prop": "list",
"description": "输入时出现预先设定的 datalist 下拉列表 的id, type=password无效"
},
{
"prop": "variant",
"description": "设置type为range时的颜色, 可选 可选 primary, secondary, success, info, warning, danger, light, dark, lightblue, navy, olive, lime, fuchsia, maroon, blue, indigo, purple, pink, red, orange, yellow, green, teal, cyan, white, gray, graydark"
},
{
"prop": "noWheel",
"description": "禁止鼠标滚动增加数字大小",
"version": "0.4.7"
},
{
"prop": "number",
"description": "设置true, 会将执行 parseFloat(value), 将value转为float。请注意设置对应的类型,否则报错",
"version": "0.4.7"
}
],
"events": [
{
"event": "input",
"description": "用户交互触发事件,当 input 中的值格式化之后发生变化,且更新了 v-model 的值之后触发的事件,但是格式化时不应该包括 `trim` 和 `number` prop",
"args": [
{
"arg": "value",
"type": [
"String",
"Number"
],
"description": "触发并返回当前 input 框中的值"
}
]
},
{
"event": "change",
"description": "用户交互触发事件,当 input 中的值格式化之后发生变化,且更新了 v-model 的值之后触发的事件,但是格式化时不应该包括 `trim` 和 `number` prop",
"args": [
{
"arg": "value",
"type": [
"String",
"Number"
],
"description": "返回当前输入框的值"
}
]
},
{
"event": "update",
"description": "v-model 值更新之后触发的事件",
"args": [
{
"arg": "value",
"type": [
"String",
"Number"
],
"description": "返回当前输入框的值, 如果值没有变化,事件不会被触发"
}
]
},
{
"event": "blur",
"description": "输入框失去焦距的时候触发的事件",
"args": [
{
"arg": "event",
"type": "FocusEvent",
"description": "原生 blur 事件"
}
]
}
]
}
]
}
}