javascript - Repeated calls to vue components
漂亮男人
漂亮男人 2017-06-28 09:29:12
0
2
1389

Now I use vue to write projects. There are many pages, many of which have a delete confirmation box. Can I write this delete box as a component and call it every time, but the data inside changes?

Communication between sibling components will be used, but how can the delete button on different pages call this component?

漂亮男人
漂亮男人

reply all(2)
三叔
  1. Encapsulate the delete confirmation box into a module.

  2. Save necessary attributes for easy display of information.

  3. Set aside click events to confirm deletion and cancellation.

The calling method of this module is different from ordinary components. You can go online to find an example of a Vue modal box.

过去多啦不再A梦

You can refer to the implementation of the modal component in iview.

https://github.com/iview/ivie...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template