code-8
code-8

Reputation: 58652

How can I display dynamic value in v-text-field?

I'm trying to change the UI element from <v-card-text> to <v-text-field> read-only. While doing so, I face some challenges. This is used to work

{{ displayType(campaign.type_name) }}

but not they don't. I got error Errors compiling template:

<v-text-field
    outlined
    small
    value="{{ displayType(campaign.type_name) }}"
    label="Type"
    readonly
></v-text-field>

Upvotes: 0

Views: 2404

Answers (1)

david
david

Reputation: 51

Try this instead

<v-text-field
    outlined
    small
    :value="displayType(campaign.type_name)"
    label="Type"
    readonly
></v-text-field>

Upvotes: 1

Related Questions