Open weehong opened 7 years ago
Hello everyone,
I would like to know is that possible to use ONE template script to perform add and delete function?
add
delete
Because I don't want to create a same template to serve the two functions.
<script type="text/x-template" id="category-template"> <transition name="modal"> <div class="modal-mask"> <div class="modal-wrapper d-flex justify-content-center align-items-center"> <div class="modal-container"> <div class="modal-header"> <slot name="header"> default header </slot> </div> <div class="modal-body"> <form method="POST"> <div class="form-group" :class="{'has-error': errors.has('category') }"> <input v-validate="'required'" type="text" class="form-control" name="category" id="category" placeholder="Category name"> <span v-cloak v-show="errors.has('category')" class="text-danger">@{{ errors.first('category') }}</span> </div> <div class="form-group text-center"> <button type="submit" class="btn btn-primary">Create</button> </div> </form> </div> </div> </div> </div> </transition> </script>
Hello everyone,
I would like to know is that possible to use ONE template script to perform
add
anddelete
function?Because I don't want to create a same template to serve the two functions.