Skip to content

Commit 2df0c8b

Browse files
committed
fix(input): [input] fix textarea word wrap style
1 parent 39c21ee commit 2df0c8b

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<template>
2+
<div class="demo-input">
3+
<tiny-input type="textarea" v-model="input" display-only popup-more></tiny-input>
4+
</div>
5+
</template>
6+
7+
<script>
8+
import { TinyInput } from '@opentiny/vue'
9+
10+
export default {
11+
components: {
12+
TinyInput
13+
},
14+
data() {
15+
return {
16+
input:
17+
'表单文本域开启只读模式,\n文本内容超过 5 行自动隐藏。\n表单文本域开启只读模式,\n文本内容超过 5 行自动隐藏。\n表单文本域开启只读模式,\n文本内容超过 5 行自动隐藏。\n表单文本域开启只读模式,\n文本内容超过 5 行自动隐藏。\n表单文本域开启只读模式,\n文本内容超过 5 行自动隐藏'
18+
}
19+
}
20+
}
21+
</script>
22+
23+
<style scoped>
24+
.demo-input .tiny-textarea {
25+
width: 260px;
26+
}
27+
</style>

examples/sites/demos/mobile-first/app/input/webdoc/input.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,20 @@ export default {
508508
'en-US': '<p>bbutton click</p>'
509509
},
510510
codeFiles: ['display-only-content.vue']
511+
},
512+
{
513+
demoId: 'display-only-popup-more',
514+
name: {
515+
'zh-CN': '文本域只读超出显示更多按钮',
516+
'en-US': 'Text field read-only beyond Show more button'
517+
},
518+
desc: {
519+
'zh-CN':
520+
'在只读的基础上增加<code>popup-more</code>属性,可使文本域超出显示更多按钮,点击更多按钮可以查看详细信息。',
521+
'en-US':
522+
'The <code>popup-more</code> attribute is added to enable the text field to exceed the display of more buttons. You can click more buttons to view details.'
523+
},
524+
codeFiles: ['display-only-popup-more.vue']
511525
}
512526
]
513527
}

packages/vue/src/input/src/mobile-first.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@
314314
:close-on-click-modal="false"
315315
@update:visible="state.showDisplayOnlyBox = $event"
316316
>
317-
<div>{{ state.displayOnlyText }}</div>
317+
<pre class="font-[inherit]">{{ state.displayOnlyText }}</pre>
318318
<template #footer>
319319
<tiny-button @click="state.showDisplayOnlyBox = false">{{ t('ui.input.close') }}</tiny-button>
320320
</template>

0 commit comments

Comments
 (0)