A
A
Andrej Sharapov2019-09-09 17:43:38
Vue.js
Andrej Sharapov, 2019-09-09 17:43:38

How to correctly insert a value into a template?

Can you tell me how to correctly add values ​​to :stroke-dasharray=""?

<circle v-for="{percent, dash} in cd.content" cx="21" cy="21" r="15.91549430918954" stroke="#49a12f" :stroke-dasharray="percent dash" stroke-dashoffset="25"></circle>

"content": [
            {
                "result": "Lorem ipsum",
                "percent": "96",
                "dash": "4",
                "img": ""
            }
        ],

Fires only if I specify one :stroke-dasharray=percentlike this

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrej Sharapov, 2019-09-12
@Madeas

did it "dash": "96 4",, everything works.

<circle cx="21" cy="21" r="15.91549430918954" stroke="#49a12f" :stroke-dasharray="p.dash" stroke-dashoffset="25"></circle>

M
Michael, 2019-09-09
@notiv-nt

`${a} ${b}`

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question