No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to search and edit in v-for?

    Help
    2
    2
    33
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      josedj29 last edited by

      registrar () {
      if (this.editarid == null) {
      this.$v.$touch()
      if (!this.$v.$invalid) {
      this.items.push({
      uuid: ‘efrc-ec4c-65v0-34o’ + this.nextTodoid++,
      descripcion: this.formData.descripcion
      })
      this.formData.descripcion = ‘’
      Notify.create({
      message: ‘Área Registrada’,
      color: ‘green-13’,
      icon: ‘checkmark-outline’
      })
      this.dialog = false
      this.formData.descripcion = ‘’
      }
      } else {
      alert(this.editarid)
      this.items.$set(
      this.editarid, {
      descripcion: this.descripcion
      }
      )
      }
      },
      editar (index) {
      this.editarid = index
      this.dialog = true
      },
      borrar (index) {
      Swal.fire({
      title: ‘¿Quieres Eliminir el Área?’,
      type: ‘warning’,
      showCancelButton: true,
      confirmButtonColor: ‘#3085d6’,
      cancelButtonColor: ‘#d33’,
      confirmButtonText: ‘Si, Eliminar’,
      cancelButtonText: ‘Cancelar’,
      reverseButtons: true
      }).then((result) => {
      if (result.value) {
      this.items.splice(index, 1)
      Swal.fire(
      ‘Eliminado’,
      ‘Se ha elimnodo el Área.’,
      ‘success’
      )
      } else if (
      /* Read more about handling dismissals below */
      result.dismiss === Swal.DismissReason.cancel
      ) {
      Swal.fire(
      ‘Cancelado’,
      ‘:)’,
      ‘error’
      )
      }
      })
      },

      1 Reply Last reply Reply Quote 0
      • B
        btree last edited by

        Puedes poner ese codigo en un bloque rodeado por ``` ? Seria mucho mas facil entenderlo con resaltado de sintaxis y margenes correctos.

        Otra pregunta: por que quieres buscar en v-for y no en el script?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post