-
Notifications
You must be signed in to change notification settings - Fork 835
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
166 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<nut-textarea v-model="val" /> | ||
</template> | ||
<script setup> | ||
import { ref } from 'vue'; | ||
const val = ref(''); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<nut-textarea v-model="val" autofocus /> | ||
</template> | ||
<script setup> | ||
import { ref } from 'vue'; | ||
const val = ref(''); | ||
</script> |
50 changes: 37 additions & 13 deletions
50
packages/nutui-taro-demo/src/dentry/pages/textarea/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,44 @@ | ||
<template> | ||
<Demo class="full"> | ||
<h2>基础用法</h2> | ||
<nut-textarea v-model="value" /> | ||
<h2>显示字数统计</h2> | ||
<nut-textarea v-model="value2" limit-show max-length="20" /> | ||
<h2>高度自定义,拉伸</h2> | ||
<nut-textarea v-model="value3" autosize /> | ||
<h2>只读、禁用</h2> | ||
<nut-textarea readonly model-value="textarea 只读状态" /> | ||
<nut-textarea disabled model-value="textarea 禁用状态" /> | ||
<h2>{{ t('basic') }}</h2> | ||
<Basic /> | ||
|
||
<h2>{{ t('limit') }}</h2> | ||
<Limit /> | ||
|
||
<h2>{{ t('row') }}</h2> | ||
<Row /> | ||
|
||
<h2>{{ t('status') }}</h2> | ||
<Status /> | ||
|
||
<h2>{{ t('focus') }}</h2> | ||
<Focus /> | ||
</Demo> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
const value = ref(''); | ||
const value2 = ref(''); | ||
const value3 = ref(''); | ||
import { useTranslate } from '../../../utils'; | ||
import Basic from './basic.vue'; | ||
import Limit from './limit.vue'; | ||
import Row from './row.vue'; | ||
import Status from './status.vue'; | ||
import Focus from './focus.vue'; | ||
const t = useTranslate({ | ||
'zh-CN': { | ||
basic: '基础用法', | ||
limit: '显示字数统计', | ||
row: '高度自动拉伸', | ||
status: '只读、禁用', | ||
focus: '自动获取焦点' | ||
}, | ||
'en-US': { | ||
basic: 'Basic Usage', | ||
limit: 'Display word count', | ||
row: 'Height customization, stretching', | ||
status: 'Readonly & Disabled', | ||
focus: 'Autofocus' | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<nut-textarea v-model="val" limit-show :max-length="20" /> | ||
</template> | ||
<script setup> | ||
import { ref } from 'vue'; | ||
const val = ref(''); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<nut-textarea v-model="val" autosize /> | ||
</template> | ||
<script setup> | ||
import { ref } from 'vue'; | ||
const val = ref(''); | ||
</script> |
4 changes: 4 additions & 0 deletions
4
packages/nutui-taro-demo/src/dentry/pages/textarea/status.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<template> | ||
<nut-textarea readonly model-value="Textarea Readonly" /> | ||
<nut-textarea disabled model-value="Textarea Disabled" /> | ||
</template> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<nut-textarea v-model="val" /> | ||
</template> | ||
<script setup> | ||
import { ref } from 'vue'; | ||
const val = ref(''); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<nut-textarea v-model="val" autofocus /> | ||
</template> | ||
<script setup> | ||
import { ref } from 'vue'; | ||
const val = ref(''); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<template> | ||
<Demo class="full"> | ||
<h2>{{ t('basic') }}</h2> | ||
<Basic /> | ||
|
||
<h2>{{ t('limit') }}</h2> | ||
<Limit /> | ||
|
||
<h2>{{ t('row') }}</h2> | ||
<Row /> | ||
|
||
<h2>{{ t('status') }}</h2> | ||
<Status /> | ||
|
||
<h2>{{ t('focus') }}</h2> | ||
<Focus /> | ||
</Demo> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useTranslate } from '@/sites/utils'; | ||
import Basic from './basic.vue'; | ||
import Limit from './limit.vue'; | ||
import Row from './row.vue'; | ||
import Status from './status.vue'; | ||
import Focus from './focus.vue'; | ||
const t = useTranslate({ | ||
'zh-CN': { | ||
basic: '基础用法', | ||
limit: '显示字数统计', | ||
row: '高度自定义,拉伸', | ||
status: '只读、禁用', | ||
focus: '自动获取焦点' | ||
}, | ||
'en-US': { | ||
basic: 'Basic Usage', | ||
limit: 'Display word count', | ||
row: 'Height customization, stretching', | ||
status: 'Readonly & Disabled', | ||
focus: 'Autofocus' | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<nut-textarea v-model="val" limit-show :max-length="20" /> | ||
</template> | ||
<script setup> | ||
import { ref } from 'vue'; | ||
const val = ref(''); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<nut-textarea v-model="val" :rows="3" autosize /> | ||
</template> | ||
<script setup> | ||
import { ref } from 'vue'; | ||
const val = ref(''); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<template> | ||
<nut-textarea readonly model-value="Textarea Readonly" /> | ||
<nut-textarea disabled model-value="Textarea Disabled" /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.