Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textarea #159

Open
ChrisCindy opened this issue Nov 2, 2024 · 0 comments
Open

textarea #159

ChrisCindy opened this issue Nov 2, 2024 · 0 comments
Labels
bug Something isn't working flutter impl p2

Comments

@ChrisCindy
Copy link
Contributor

ChrisCindy commented Nov 2, 2024

Related Uni App Components

props problem
disabled not work, when set to true, it can still input
maxlength not work, it can input more than maxlength set
auto-height not work, as the content length grows, the textarea can be scrolled but the height is not changed
focus not work
cursor not work
selection-start not work
selection-end not work
confirm-hold not work
confirm-type not work
inputmode not work

Code example

<template>
	<view>
		<page-head :title="title"></page-head>
		<view class="uni-title uni-common-pl">输入区域高度自适应,不会出现滚动条</view>
		<view class="uni-textarea">
			<textarea
        :value="value"
        @focus="onFocus"
        @input="onInput"
        @blur="onBlur"
        @linechange="onLinechange"
        auto-height
        maxlength="10"
        placeholder="请输入内容"
        placeholder-class="blueColor"
        cursor="2"
        cursor-color="#F76260"
        focus
      />
			</view>
			<view class="uni-title uni-common-pl">占位符字体是红色的textarea</view>
			<view class="uni-textarea">
				<textarea placeholder-style="color:#F76260" placeholder="占位符字体是红色的"/>
			</view>
		</view>
</template>
<script>
	export default {
		data() {
			return {
        value: "呵呵呵呵",
				title: 'textarea',
				focus: false
			}
		},
		methods: {
      onLinechange: function (e) {
        console.log('linechange', e.detail.lineCount)
      },
      onFocus: function (e) {
        console.log('focus', e.detail.value)
      },
      onInput: function (e) {
        console.log('input', e.detail.value)
      },
			onBlur: function (e) {
				console.log('blur', e.detail.value)
			}
		}
	}
</script>

<style>
.blueColor {
  color: #007aff;
}
</style>

Expected results

No response

Actual results

No response

@ChrisCindy ChrisCindy added the bug Something isn't working label Nov 2, 2024
@andycall andycall added the p2 label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flutter impl p2
Projects
None yet
Development

No branches or pull requests

2 participants