<script lang="ts" setup>
import { ref } from 'vue'
import { Refresh } from '@element-plus/icons-vue'
const maxTokens = 800
const placeHolder = "单次最多输入 " + maxTokens + " 字"
let loading = ref(false)
const fromText = ref("")
</script>
<template>
<el-input v-model="fromText" type="textarea" :autosize="{ minRows: 25, maxRows: 25 }"
:maxlength="maxTokens" required="true" :placeholder="placeHolder" />
<el-button type="primary" @click="resetDefaultLang" :loading="false" >
<el-icon>
<Refresh />
</el-icon>
默认语言
</el-button>
</template>
以下属性,需要在前面加上冒号,才能引用在 <script> 里面定义的内容:
- maxlength
- placeholder
- loading
以下属性,需要在前面加上冒号,才能使得 {} 里面的属性生效:
- autosize
网友评论