2021-12-30 00:44:43 +08:00
|
|
|
::: anchor
|
|
|
|
:::
|
|
|
|
|
2022-02-06 05:20:07 +08:00
|
|
|
::: title 基本介绍
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: describe 当需要录入大量的文本文字。
|
|
|
|
:::
|
|
|
|
|
2021-11-05 00:07:45 +08:00
|
|
|
::: title 基础使用
|
2021-10-24 21:31:42 +08:00
|
|
|
:::
|
|
|
|
|
2022-02-02 03:27:34 +08:00
|
|
|
::: demo 使用 `lay-textarea` 标签, 创建文本域
|
2021-10-13 15:11:32 +08:00
|
|
|
|
|
|
|
<template>
|
|
|
|
<lay-textarea placeholder="请输入描述" v-model="data1"></lay-textarea>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
|
|
|
const data1 = ref("");
|
|
|
|
|
|
|
|
return {
|
|
|
|
data1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
2021-10-26 01:13:23 +08:00
|
|
|
::: title 事件回调
|
2021-10-24 21:31:42 +08:00
|
|
|
:::
|
|
|
|
|
2021-10-13 15:11:32 +08:00
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<lay-textarea placeholder="Input 事件" v-model="data2" @input="input"></lay-textarea>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
|
|
|
const data2 = ref("");
|
|
|
|
|
|
|
|
const input = function( val ) {
|
|
|
|
console.log(val)
|
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
data2,
|
|
|
|
input
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
2021-10-26 01:13:23 +08:00
|
|
|
::: title 禁止输入
|
2021-10-24 21:31:42 +08:00
|
|
|
:::
|
|
|
|
|
2021-10-13 15:11:32 +08:00
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<lay-textarea placeholder="禁止输入" v-model="data3" :disabled="disabled"></lay-textarea>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
|
|
|
const data3 = ref("");
|
|
|
|
const disabled = ref(true)
|
|
|
|
return {
|
|
|
|
data3,
|
|
|
|
disabled
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
2022-01-10 01:17:03 +08:00
|
|
|
::: title Textarea 属性
|
2021-10-24 21:31:42 +08:00
|
|
|
:::
|
2021-10-13 15:11:32 +08:00
|
|
|
|
2021-11-07 15:55:08 +08:00
|
|
|
::: table
|
|
|
|
|
2021-11-01 01:02:21 +08:00
|
|
|
| 属性 | 描述 | 可选值 |
|
|
|
|
| ----------- | ------------- | -------------- |
|
|
|
|
| name | 原始属性 name | -- |
|
|
|
|
| placeholder | 提示信息 | -- |
|
|
|
|
| disabled | 禁用 | `true` `false` |
|
|
|
|
| v-model | 值 | -- |
|
|
|
|
|
2021-11-07 15:55:08 +08:00
|
|
|
:::
|
|
|
|
|
2022-01-10 01:17:03 +08:00
|
|
|
::: title Textarea 事件
|
2021-11-01 01:02:21 +08:00
|
|
|
:::
|
|
|
|
|
2021-11-07 15:55:08 +08:00
|
|
|
::: table
|
|
|
|
|
2021-11-01 01:02:21 +08:00
|
|
|
| 事件 | 描述 | 可选值 |
|
|
|
|
| ----- | --------------- | ---------------- |
|
|
|
|
| input | 原生 input 事件 | event : 事件对象 |
|
|
|
|
| foucs | 原生 foucs 事件 | event : 事件对象 |
|
|
|
|
| blur | 原生 blur 事件 | -- |
|
2021-11-07 15:55:08 +08:00
|
|
|
|
2021-11-07 15:56:24 +08:00
|
|
|
:::
|
2021-12-16 17:57:59 +08:00
|
|
|
|
|
|
|
::: comment
|
2022-01-12 14:19:06 +08:00
|
|
|
:::
|
|
|
|
|
|
|
|
::: previousNext textarea
|
2021-12-16 17:57:59 +08:00
|
|
|
:::
|