Commit 86679059 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

Merge branch 'feature/category-ui' into 'feature/UI-vuetify'

Feature/category ui

See merge request !12
parents 064aae00 9462c892
<template>
<div>
<NavBar />
<v-app>
<NavBar />
<nuxt />
</v-app>
</div>
</template>
<script>
......
This diff is collapsed.
<!-- eslint-disable vue/valid-v-slot -->
<!-- eslint-disable no-sequences -->
<!-- eslint-disable no-unused-expressions -->
<!-- eslint-disable no-unused-expressions -->
<!-- eslint-disable vue/require-v-for-key -->
<template>
<div>
<div>
......@@ -283,9 +288,17 @@
<div class="w-full mt-4 p-10">
<form>
<label for="input-live">Title :</label>
<b-form-input id="input-live" type="text" class="form-control mb-2" placeholder="name"
aria-describedby="input-live-help input-live-feedback" v-model="title" max="255" min="1" trim>
</b-form-input>
<b-form-input
id="input-live"
v-model="title"
type="text"
class="form-control mb-2"
placeholder="name"
aria-describedby="input-live-help input-live-feedback"
max="255"
min="1"
trim
/>
<label>Category ID :</label>
<b-form-select v-model="category_id">
<option v-for="item in categories" :value="item.id">
......@@ -293,21 +306,40 @@
</option>
</b-form-select>
<label>Content :</label>
<input type="text" class="form-control mb-2" placeholder="Ordering" v-model="content" size="sm" required />
<input
v-model="content"
type="text"
class="form-control mb-2"
placeholder="Ordering"
size="sm"
required
>
<label>Author :</label>
<input type="text" class="form-control mb-2" placeholder="Description" v-model="user_id" size="sm" required />
<input
v-model="user_id"
type="text"
class="form-control mb-2"
placeholder="Description"
size="sm"
required
>
<label>Status :</label>
<b-form-select v-model="status" :options="options"></b-form-select>
<b-form-select v-model="status" :options="options" />
<label>Image :</label>
<b-form-file v-model="images" multiple :state="Boolean(images)"
placeholder="Choose a image or drop it here..." drop-placeholder="Drop file here..."></b-form-file>
<b-form-file
v-model="images"
multiple
:state="Boolean(images)"
placeholder="Choose a image or drop it here..."
drop-placeholder="Drop file here..."
/>
</form>
</div>
<template #modal-footer>
<button v-b-modal.modal-close_visit @click="$bvModal.hide('modal-create')" class="btn btn-danger btn-sm m-1">
<button v-b-modal.modal-close_visit class="btn btn-danger btn-sm m-1" @click="$bvModal.hide('modal-create')">
Close
</button>
<button @click="createPost()" v-b-modal.modal-close_visit class="btn btn-success btn-sm m-1">
<button v-b-modal.modal-close_visit class="btn btn-success btn-sm m-1" @click="createPost()">
Submit
</button>
</template>
......@@ -317,23 +349,30 @@
<div class="w-full mt-4 p-10">
<form>
<label>Title :</label>
<input type="text" class="form-control mb-2" v-model="sTitle" size="sm" disabled />
<input v-model="sTitle" type="text" class="form-control mb-2" size="sm" disabled>
<label>Category ID :</label>
<input type="text" class="form-control mb-2" v-model="sCategoryId" size="sm" disabled />
<input v-model="sCategoryId" type="text" class="form-control mb-2" size="sm" disabled>
<label>Content :</label>
<input type="text" class="form-control mb-2" v-model="sContent" size="sm" disabled />
<input v-model="sContent" type="text" class="form-control mb-2" size="sm" disabled>
<label>Author :</label>
<input type="text" class="form-control mb-2" placeholder="Description" v-model="sUserId" size="sm" disabled />
<input
v-model="sUserId"
type="text"
class="form-control mb-2"
placeholder="Description"
size="sm"
disabled
>
<label>Status :</label>
<b-form-select v-model="sStatus" :options="options" disabled></b-form-select>
<b-form-select v-model="sStatus" :options="options" disabled />
<label>Image :</label>
<div v-for="(image, index) in sImages" :key="index">
<b-img :src="image" fluid alt="Fluid image"></b-img>
<b-img :src="image" fluid alt="Fluid image" />
</div>
</form>
</div>
<template #modal-footer>
<button v-b-modal.modal-close_visit @click="$bvModal.hide('modal-show')" class="btn btn-danger btn-sm m-1">
<button v-b-modal.modal-close_visit class="btn btn-danger btn-sm m-1" @click="$bvModal.hide('modal-show')">
Close
</button>
</template>
......@@ -343,8 +382,16 @@
<div class="w-full mt-4 p-10">
<form>
<label>Title :</label>
<input type="text" class="form-control mb-2" placeholder="name" v-model="eTitle" max="255" min="1" size="sm"
required />
<input
v-model="eTitle"
type="text"
class="form-control mb-2"
placeholder="name"
max="255"
min="1"
size="sm"
required
>
<label>Category ID :</label>
<b-form-select v-model="eCategoryId">
<option v-for="item in categories" :value="item.id">
......@@ -352,21 +399,33 @@
</option>
</b-form-select>
<label>Content :</label>
<input type="text" class="form-control mb-2" placeholder="Ordering" v-model="eContent" size="sm" required />
<input
v-model="eContent"
type="text"
class="form-control mb-2"
placeholder="Ordering"
size="sm"
required
>
<label>Author :</label>
<input type="text" class="form-control mb-2" placeholder="Description" v-model="eUserId" size="sm" />
<input v-model="eUserId" type="text" class="form-control mb-2" placeholder="Description" size="sm">
<label>Status :</label>
<b-form-select v-model="eStatus" :options="options"></b-form-select>
<b-form-select v-model="eStatus" :options="options" />
<label>Image :</label>
<b-form-file v-model="eImages" multiple :state="Boolean(eImages)"
placeholder="Choose a image or drop it here..." drop-placeholder="Drop file here..."></b-form-file>
<b-form-file
v-model="eImages"
multiple
:state="Boolean(eImages)"
placeholder="Choose a image or drop it here..."
drop-placeholder="Drop file here..."
/>
</form>
</div>
<template #modal-footer>
<button v-b-modal.modal-close_visit @click="$bvModal.hide('modal-edit')" class="btn btn-danger btn-sm m-1">
<button v-b-modal.modal-close_visit class="btn btn-danger btn-sm m-1" @click="$bvModal.hide('modal-edit')">
Close
</button>
<button @click="updatePost()" v-b-modal.modal-close_visit class="btn btn-success btn-sm m-1">
<button v-b-modal.modal-close_visit class="btn btn-success btn-sm m-1" @click="updatePost()">
Submit
</button>
</template>
......
<!-- eslint-disable vue/require-v-for-key -->
<!-- eslint-disable vue/valid-v-slot -->
<template>
<div>
<div>
......
<!-- eslint-disable vue/valid-v-slot -->
<template>
<v-app>
<div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment