I found this in vue component , I didn't understand the purpose of :data-col in div , could you explain please
<template>
<div
:
:data-col="isNavMenuHidden ? '1-column' : null"
>
CodePudding user response:
This is a combination of Vue attribute binding and HTML data-* attribute
The purpose of this code is to put the data-*
attribute on the specified div when the isNavMenuHidden
is true.
CodePudding user response:
this is a bind attribute and means that data-col is equal to 1-column when 'isNavMenuHidden' is true