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遇到换行符'\n'不换行,而是变成空格 #2566

Closed
nicholas9698 opened this issue Sep 16, 2023 · 0 comments · Fixed by #2583
Closed

微信小程序中Textarea遇到换行符'\n'不换行,而是变成空格 #2566

nicholas9698 opened this issue Sep 16, 2023 · 0 comments · Fixed by #2583
Labels

Comments

@nicholas9698
Copy link

NutUI 包名

@nutui/nutui

NutUI 版本号

4.1.5

平台

weapp

重现链接

https://nutui.jd.com/playground/#eyJBcHAudnVlIjoiPHNjcmlwdD5cbiAgaW1wb3J0IHsgdG9SZWZzIH0gZnJvbSAndnVlJztcbiAgZXhwb3J0IGRlZmF1bHQge1xuICAgIHNldHVwKCkge1xuICAgICAgY29uc3Qgc3RhdGUgPSB7XG4gICAgICAgIGFuc3dlcjogJ3Rlc3RcXG50ZXN0J1xuICAgICAgfVxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgLi4udG9SZWZzKHN0YXRlKVxuICAgICAgfVxuICAgIH1cbiAgfVxuPC9zY3JpcHQ+XG48dGVtcGxhdGU+XG5cdDxudXQtdGV4dGFyZWEgcmVhZG9ubHkgdi1tb2RlbDptb2RlbC12YWx1ZT1cImFuc3dlclwiIC8+XG48L3RlbXBsYXRlPiJ9

重现步骤

任意小程序中:

<template>
  <view>
    <nut-textarea readonly v-model:model-value="answer" />
  </view>
</template>
<script>
  import { toRefs } from 'vue';
  export default {
    setup() {
      const state = {
        answer: 'test\ntest'
      }
      return {
        ...toRefs(state)
      }
    }
  }
</script>

期望的结果是什么?

test
test

实际的结果是什么?

test test

环境信息

👽 Taro v3.6.15

Taro CLI 3.6.15 environment info:
System:
OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
Shell: 5.1.16 - /bin/bash
npmPackages:
@tarojs/cli: 3.6.15 => 3.6.15
@tarojs/components: 3.6.15 => 3.6.15
@tarojs/helper: 3.6.15 => 3.6.15
@tarojs/plugin-framework-vue3: 3.6.15 => 3.6.15
@tarojs/plugin-html: 3.6.15 => 3.6.15
@tarojs/plugin-platform-alipay: 3.6.15 => 3.6.15
@tarojs/plugin-platform-h5: 3.6.15 => 3.6.15
@tarojs/plugin-platform-jd: 3.6.15 => 3.6.15
@tarojs/plugin-platform-qq: 3.6.15 => 3.6.15
@tarojs/plugin-platform-swan: 3.6.15 => 3.6.15
@tarojs/plugin-platform-tt: 3.6.15 => 3.6.15
@tarojs/plugin-platform-weapp: 3.6.15 => 3.6.15
@tarojs/runtime: 3.6.15 => 3.6.15
@tarojs/shared: 3.6.15 => 3.6.15
@tarojs/taro: 3.6.15 => 3.6.15
@tarojs/taro-loader: 3.6.15 => 3.6.15
@tarojs/webpack5-runner: 3.6.15 => 3.6.15
babel-preset-taro: 3.6.15 => 3.6.15
eslint-config-taro: 3.6.15 => 3.6.15

其他补充信息

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants