File tree Expand file tree Collapse file tree
src/uni_modules/wot-design-uni/components/wd-textarea Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 :class =" `wd-textarea__inner ${customTextareaClass}`"
1818 v-model =" inputValue"
1919 :show-count =" false"
20- :placeholder =" placeholder || translate('placeholder') "
20+ :placeholder =" placeholderValue "
2121 :disabled =" disabled"
2222 :maxlength =" maxlength"
2323 :focus =" isFocus"
@@ -72,7 +72,7 @@ export default {
7272
7373<script lang="ts" setup>
7474import { computed , onBeforeMount , ref , watch } from ' vue'
75- import { objToStyle , requestAnimationFrame } from ' ../common/util'
75+ import { objToStyle , requestAnimationFrame , isDef } from ' ../common/util'
7676import { useCell } from ' ../composables/useCell'
7777import { FORM_KEY , type FormItemRule } from ' ../wd-form/types'
7878import { useParent } from ' ../composables/useParent'
@@ -96,6 +96,10 @@ const emit = defineEmits([
9696 ' click'
9797])
9898
99+ const placeholderValue = computed (() => {
100+ return isDef (props .placeholder ) ? props .placeholder : translate (' placeholder' )
101+ })
102+
99103const showClear = ref <boolean >(false )
100104const showWordCount = ref <boolean >(false )
101105const clearing = ref <boolean >(false )
You can’t perform that action at this time.
0 commit comments