Multiple remove from object

Add User

Options

  • {{ option.name }}


Add User

Options

  • {{ option.name }}

Vue.component("checkbox", {
  template: "#checkbox-template",
  props: [ "id", "value", "val"],
  
  data() {
    return {
      proxy: false
    };
  },
  
  computed: {
    checked: {
      get() {
        return this.value;
      },
      set(value) {
        this.proxy = value;
      }
    }
  },
  
  methods: {
    onChange(event) {
      console.log(this.val )
      this.$emit("input", this.proxy);
    }
  }
});
new Vue({
  el: "#app",
  data() {
    return {
      options: [{
        id: 0,
        name: "John",
        age: 32,
        completed:false
      }, {
        id:1,
        name: "Lance",
        age: 28,
        completed:false
      }],
      addUser:{
        name: '',
        age: 0,
        completed: false
      },
      selected: [],
      filters: {
        notDone: function(option) {
          return !option.completed;
        }
      }
    }
  },
  methods:{
    destroyUser(){
      this.options = this.options.filter(this.filters.notDone);
    },
    setUser(){
      this.options.push(_.clone(this.addUser))
    }
  }
});

I Quit AeroMedLab

Watch now (2 mins) | Today is my last day at AeroMedLab ͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­...

Contact Form

Name

Email *

Message *