У меня есть массив флажков, исходящих из основного системного объекта, где я храню все настройки системы.(называется getSystem {}).
В этой форме я обращаюсь к пользователю, у которого есть массив ролей [].Как я могу проверить этот массив ролей, с getSystem.user_roles?
Я знаю, как это сделать нормально, в JavaScript, очевидно.Но что бы я поставил в поле ввода Vue.js мудро?
<b-form-group>
<label for="company">Email Address</label>
<b-form-input type="text" id="email" v-model="user.email" placeholder="Enter a valid e-mail"></b-form-input>
</b-form-group>
// Here i can do user.roles to get the array of roles.
// What can I do to loop through the roles and check the box if it exists in the user roles??
<b-form-group v-for="resource, key in getSystem.user_roles" v-if="getSystem.user_roles">
<label>{{resource.role_name}}</label>
<input type="checkbox" [ what do I put here to compare against user.roles, and check the box if exists??] >
</b-form-group>