textarea.uvue 2.6 KB
Newer Older
Y
init  
yurj26 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65






















    export default {
        data() {
            return {
                title: 'textarea',
                focus: false
            }
        },
        methods: {
            bindTextAreaBlur: function (e : TextareaBlurEvent) {
                console.log(e.detail.value)
            }
        }
    }


const GenPagesComponentTextareaTextareaStyles = [new Map<string, Map<string, Map<string, any>>>([["common-page-head", new Map<string, any>([["", new Map<string, any>([["paddingTop", "35rpx"], ["paddingRight", "35rpx"], ["paddingBottom", "35rpx"], ["paddingLeft", "35rpx"], ["flexDirection", "row"], ["justifyContent", "center"]])]])], ["common-page-head-title-box", new Map<string, any>([["", new Map<string, any>([["paddingTop", 0], ["paddingRight", "40rpx"], ["paddingBottom", 0], ["paddingLeft", "40rpx"], ["height", "88rpx"], ["borderBottomWidth", "2rpx"], ["borderBottomStyle", "solid"], ["borderBottomColor", "#D8D8D8"]])]])], ["common-page-head-title", new Map<string, any>([["", new Map<string, any>([["lineHeight", "88rpx"], ["fontSize", "30rpx"], ["color", "#BEBEBE"]])]])]])]
@Suppress("UNUSED_PARAMETER") function GenPagesComponentTextareaTextareaRender(_ctx: GenPagesComponentTextareaTextarea): VNode | null {
const _component_page_head = resolveComponent("page-head")

  return createElementVNode("view", null, [
    createVNode(_component_page_head, new Map<string, any | null>([["title", _ctx.title]]), null, 8 /* PROPS */, ["title"]),
    createElementVNode("view", new Map<string, any | null>([["class", "uni-title uni-common-pl"]]), [
      createElementVNode("text", new Map<string, any | null>([["class", "uni-title-text"]]), " 输入区域高度自适应,不会出现滚动条 ")
    ]),
    createElementVNode("view", new Map<string, any | null>([["class", "uni-textarea-box"]]), [
      createElementVNode("textarea", new Map<string, any | null>([
        ["onBlur", _ctx.bindTextAreaBlur],
        ["auto-height", true],
        ["class", "uni-textarea"]
      ]), null, 40 /* PROPS, HYDRATE_EVENTS */, ["onBlur"])
    ]),
    createElementVNode("view", new Map<string, any | null>([["class", "uni-title uni-common-pl"]]), [
      createElementVNode("text", new Map<string, any | null>([["class", "uni-title-text"]]), " 占位符字体是红色的textarea ")
    ]),
    createElementVNode("view", new Map<string, any | null>([["class", "uni-textarea-box"]]), [
      createElementVNode("textarea", new Map<string, any | null>([
        ["placeholder-style", "color:#F76260"],
        ["placeholder", "占位符字体是红色的"],
        ["class", "uni-textarea"]
      ]))
    ])
  ])
}