Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
show : function(index)
show (index) { ... }
<button @click="show(index)">Показать</button>
show : function(index){ this.users[index].isShow = true }
<div v-show="user.isShow" style="border: 2px solid black; margin: 15px;" :key="user.id"> <p>ID : {{user.id}}</p> <p>Name : {{user.name}}</p> <p>FName : {{user.fname}}</p> <p>Age : {{user.age}}</p> <p>City : {{user.city}}</p> </div>
saveUser : function(){ this.id++; this.users.push( { name : this.username, fname : this.userfname, age : this.usernage, city : this.usercity, id : this.id isShow: false // add }); this.username = ''; this.userfname = ''; this.usernage = ''; this.usercity = ''; this.userid = ''; },
<div>
<template>
{
import '../node_modules/jquery/dist/jquery.js'
import 'semantic-ui/dist/semantic.min.js'
jquery