export default { data() { return { title: 'input', focus: false, inputValue: '', showClearIcon: false, inputClearValue: '', changeValue: '', showPassword: true } }, methods: { onKeyInput: function (event : InputEvent) { this.inputValue = event.detail.value }, replaceInput: function (event : InputEvent) { var value = event.detail.value; if (value == '11') { this.changeValue = '2'; } }, clearInput: function(event: InputEvent) { this.inputClearValue = event.detail.value; if (event.detail.value.length > 0) { this.showClearIcon = true; } else { this.showClearIcon = false; } }, clearIcon: function() { this.inputClearValue = ''; this.showClearIcon = false; }, changePassword: function() { this.showPassword = !this.showPassword; }, // hideKeyboard: function(event: InputEvent) { // if (event.detail.value === '123') { // uni.hideKeyboard(); // } // }, // onFocus() { // this.$mp.page.$getAppWebview().setStyle({ // softinputNavBar: 'none' // }) // }, // onBlur() { // this.$mp.page.$getAppWebview().setStyle({ // softinputNavBar: 'auto' // }) // } } } const GenPagesComponentInputInputStyles = [new Map>>([["common-page-head", new Map([["", new Map([["paddingTop", "35rpx"], ["paddingRight", "35rpx"], ["paddingBottom", "35rpx"], ["paddingLeft", "35rpx"], ["flexDirection", "row"], ["justifyContent", "center"]])]])], ["common-page-head-title-box", new Map([["", new Map([["paddingTop", 0], ["paddingRight", "40rpx"], ["paddingBottom", 0], ["paddingLeft", "40rpx"], ["height", "88rpx"], ["borderBottomWidth", "2rpx"], ["borderBottomStyle", "solid"], ["borderBottomColor", "#D8D8D8"]])]])], ["common-page-head-title", new Map([["", new Map([["lineHeight", "88rpx"], ["fontSize", "30rpx"], ["color", "#BEBEBE"]])]])], ["nvue-page-root", new Map([["", new Map([["backgroundColor", "#F8F8F8"], ["paddingBottom", 20]])]])], ["title", new Map([["", new Map([["paddingTop", 5], ["paddingRight", 13], ["paddingBottom", 5], ["paddingLeft", 13]])]])], ["uni-form-item__title", new Map([["", new Map([["fontSize", 16], ["lineHeight", 24]])]])], ["uni-input-wrapper", new Map([["", new Map([["display", "flex"], ["paddingTop", 8], ["paddingRight", 13], ["paddingBottom", 8], ["paddingLeft", 13], ["flexDirection", "row"], ["flexWrap", "nowrap"], ["backgroundColor", "#FFFFFF"]])]])], ["uni-input", new Map([["", new Map([["height", 28], ["lineHeight", 28], ["fontSize", 15], ["paddingTop", 0], ["paddingRight", 0], ["paddingBottom", 0], ["paddingLeft", 0], ["flex", "1"], ["backgroundColor", "#FFFFFF"]])]])], ["uni-icon", new Map([["", new Map([["width", 24], ["height", 24]])]])]])] @Suppress("UNUSED_PARAMETER") function GenPagesComponentInputInputRender(_ctx: GenPagesComponentInputInput): VNode | null { const _component_page_head = resolveComponent("page-head") return createElementVNode("view", new Map([["class", "nvue-page-root"]]), [ createVNode(_component_page_head, new Map([["title", _ctx.title]]), null, 8 /* PROPS */, ["title"]), createElementVNode("view", new Map([["class", "uni-common-mt"]]), [ createCommentVNode(" \n 可自动聚焦的 input\n \n \n \n "), createCommentVNode(" \n 隐藏 iOS 软键盘上的导航条\n \n \n \n "), createElementVNode("view", new Map([["class", "uni-form-item uni-column"]]), [ createElementVNode("view", new Map([["class", "title"]]), [ createElementVNode("text", new Map([["class", "uni-form-item__title"]]), "键盘右下角按钮显示为搜索") ]), createElementVNode("view", new Map([["class", "uni-input-wrapper"]]), [ createElementVNode("input", new Map([ ["class", "uni-input"], ["confirmType", "search"], ["placeholder", "键盘右下角按钮显示为搜索"] ])) ]) ]), createElementVNode("view", new Map([["class", "uni-form-item uni-column"]]), [ createElementVNode("view", new Map([["class", "title"]]), [ createElementVNode("text", new Map([["class", "uni-form-item__title"]]), "键盘右下角按钮显示为发送") ]), createElementVNode("view", new Map([["class", "uni-input-wrapper"]]), [ createElementVNode("input", new Map([ ["class", "uni-input"], ["confirmType", "send"], ["placeholder", "键盘右下角按钮显示为发送"] ])) ]) ]), createElementVNode("view", new Map([["class", "uni-form-item uni-column"]]), [ createElementVNode("view", new Map([["class", "title"]]), [ createElementVNode("text", new Map([["class", "uni-form-item__title"]]), "控制最大输入长度的 input") ]), createElementVNode("view", new Map([["class", "uni-input-wrapper"]]), [ createElementVNode("input", new Map([ ["class", "uni-input"], ["maxlength", 10], ["placeholder", "最大输入长度为10"] ])) ]) ]), createElementVNode("view", new Map([["class", "uni-form-item uni-column"]]), [ createElementVNode("view", new Map([["class", "title"]]), [ createElementVNode("text", new Map([["class", "uni-form-item__title"]]), "实时获取输入值:" + toDisplayString(_ctx.inputValue), 1 /* TEXT */) ]), createElementVNode("view", new Map([["class", "uni-input-wrapper"]]), [ createElementVNode("input", new Map([ ["class", "uni-input"], ["onInput", _ctx.onKeyInput], ["placeholder", "输入同步到view中"] ]), null, 40 /* PROPS, HYDRATE_EVENTS */, ["onInput"]) ]) ]), createElementVNode("view", new Map([["class", "uni-form-item uni-column"]]), [ createElementVNode("view", new Map([["class", "title"]]), [ createElementVNode("text", new Map([["class", "uni-form-item__title"]]), "控制输入的 input") ]), createElementVNode("view", new Map([["class", "uni-input-wrapper"]]), [ createElementVNode("input", new Map([ ["class", "uni-input"], ["onInput", _ctx.replaceInput], ["value", _ctx.changeValue], ["placeholder", "连续的两个1会变成2"] ]), null, 40 /* PROPS, HYDRATE_EVENTS */, ["onInput", "value"]) ]) ]), createCommentVNode(" \n 控制键盘的 input\n \n \n \n "), createElementVNode("view", new Map([["class", "uni-form-item uni-column"]]), [ createElementVNode("view", new Map([["class", "title"]]), [ createElementVNode("text", new Map([["class", "uni-form-item__title"]]), "数字输入的 input") ]), createElementVNode("view", new Map([["class", "uni-input-wrapper"]]), [ createElementVNode("input", new Map([ ["class", "uni-input"], ["type", "number"], ["placeholder", "这是一个数字输入框"] ])) ]) ]), createElementVNode("view", new Map([["class", "uni-form-item uni-column"]]), [ createElementVNode("view", new Map([["class", "title"]]), [ createElementVNode("text", new Map([["class", "uni-form-item__title"]]), "密码输入的 input") ]), createElementVNode("view", new Map([["class", "uni-input-wrapper"]]), [ createElementVNode("input", new Map([ ["class", "uni-input"], ["password", true], ["type", "text"], ["placeholder", "这是一个密码输入框"] ])) ]) ]), createElementVNode("view", new Map([["class", "uni-form-item uni-column"]]), [ createElementVNode("view", new Map([["class", "title"]]), [ createElementVNode("text", new Map([["class", "uni-form-item__title"]]), "带小数点的 input") ]), createElementVNode("view", new Map([["class", "uni-input-wrapper"]]), [ createElementVNode("input", new Map([ ["class", "uni-input"], ["type", "digit"], ["placeholder", "带小数点的数字键盘"] ])) ]) ]), createCommentVNode(" \n 身份证输入的 input\n \n \n "), createElementVNode("view", new Map([["class", "uni-form-item uni-column"]]), [ createElementVNode("view", new Map([["class", "title"]]), [ createElementVNode("text", new Map([["class", "uni-form-item__title"]]), "控制占位符颜色的 input") ]), createElementVNode("view", new Map([["class", "uni-input-wrapper"]]), [ createElementVNode("input", new Map([ ["class", "uni-input"], ["placeholder-style", "color:#F76260"], ["placeholder", "占位符字体是红色的"] ])) ]) ]), createElementVNode("view", new Map([["class", "uni-form-item uni-column"]]), [ createElementVNode("view", new Map([["class", "title"]]), [ createElementVNode("text", new Map([["class", "uni-form-item__title"]]), "带清除按钮的输入框") ]), createElementVNode("view", new Map([["class", "uni-input-wrapper"]]), [ createElementVNode("input", new Map([ ["class", "uni-input"], ["placeholder", "带清除按钮的输入框"], ["value", _ctx.inputClearValue], ["onInput", _ctx.clearInput] ]), null, 40 /* PROPS, HYDRATE_EVENTS */, ["value", "onInput"]), isTrue(_ctx.showClearIcon) ? createElementVNode("image", new Map([ ["key", 0], ["class", "uni-icon"], ["src", "/static/icons/clear.png"], ["onClick", _ctx.clearIcon] ]), null, 8 /* PROPS */, ["onClick"]) : createCommentVNode("v-if", true) ]) ]), createElementVNode("view", new Map([["class", "uni-form-item uni-column"]]), [ createElementVNode("view", new Map([["class", "title"]]), [ createElementVNode("text", new Map([["class", "uni-form-item__title"]]), "可查看密码的输入框") ]), createElementVNode("view", new Map([["class", "uni-input-wrapper"]]), [ createElementVNode("input", new Map([ ["class", "uni-input"], ["placeholder", "请输入密码"], ["password", _ctx.showPassword] ]), null, 8 /* PROPS */, ["password"]), createElementVNode("image", new Map([ ["class", "uni-icon"], ["src", !_ctx.showPassword ? '/static/icons/eye-active.png': '/static/icons/eye.png'], ["onClick", _ctx.changePassword] ]), null, 8 /* PROPS */, ["src", "onClick"]) ]) ]) ]) ]) }