A
A
ABCquestion2022-02-21 15:56:19
Vue.js
ABCquestion, 2022-02-21 15:56:19

How to put the name of the classes?

I want to pass numbers in props how to do it?

:class="{'col-lg-' + colLg,'col-md-' + colMd, colLg,'col-sm-' + colSm,'col-xs-' +  colXs}"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vadim, 2022-02-21
@ABCquestion

Template strings: https://developer.mozilla.org/ru/docs/Web/JavaScri...
Or make a computed property that will return a string.

A
Alexander, 2022-02-21
@Aleksandr-JS-Developer

in computed and there you already fence

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question