laravel databases, vuex
laravel databases, vuex
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
< template > < div class = "container-fluid" > < h1 class = "mt-4" >Dashboard < ol class = "breadcrumb mb-4" > < router-link to = "/" >Dashboardd < div class = "row" > < div class = "col-xl-12" > < div class = "card mb-4" > < div class = "card-header d-flex" > < span > < i class = "fas fa-chart-area mr-1" > Categories Menagemen < button class = "btn btn-primary btn-sm ml-auto" v-on:click = "showNewCategoryModal" > < span class = "fa fa-plus" >Create New < div class = "card-body" > < table class = "table" > < thead > < tr > < td >ID < td >Name < td >Image < td >Action < tbody > < td >1 < td >shirt < td >image < td > < button class = "btn btn-primary btn-sm" > < span class = "fa fa-edit" > < button class = "btn btn-denger btn-sm" > < span class = "fa fa-trash" > < b-modal ref = "NewCategoryModal" hide-footer title = "Add New Category" > < div class = "d-block" > < form v-on:submit.prevent = "createCategory" > < div class = "form-group" > < label for = "name" >Enter Name < input type = "text" v-model = "categoryData.name" class = "form-control" id = "name" placeholder = "Enter category name" / > < div class = "form-group" > < label for = "image" >Choose an image < input type = "file" v-on:change = "attachImage" class = "form-control" id = "image" / > < hr / > < div class = "text-right" > < button type = "button" class = "btn btn-default" v-on:cllck = "hideNewCategoryModal" >Cancel < button type = "submit" class = "btn btn-primary" > < span class = "fa fa-check" >Save < script > export default { name : "category" , data() { return { categoryData: { name : "" , image: "" } }; }, methods: { attachImage() {}, hideNewCategoryModal() { this.$refs.NewCategoryModal.hide(); }, showNewCategoryModal() { this.$refs.NewCategoryModal.show(); }, createCategory() { console .log( "form submitted" ); } } }; < style > Colored by Color Scripter
from http://anko3899.tistory.com/376 by ccl(A)
댓글
댓글 쓰기