<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>
默認(rèn)語言
</el-button>
</template>
以下屬性贡歧,需要在前面加上冒號(hào)滩租,才能引用在 <script> 里面定義的內(nèi)容:
- maxlength
- placeholder
- loading
以下屬性,需要在前面加上冒號(hào)利朵,才能使得 {} 里面的屬性生效:
- autosize