update

parent 549fd336
...@@ -18,17 +18,27 @@ ...@@ -18,17 +18,27 @@
style="max-height: calc(100vh - 14rem)" style="max-height: calc(100vh - 14rem)"
> >
<div class="row"> <div class="row">
<div class="col-8"> <div class="col-6">
<q-input
v-model="title"
label="Tiêu đề"
type="text"
class="q-ma-sm"
outlined
clearable
></q-input>
</div>
<div class="col-6">
<q-input <q-input
v-model="link" v-model="link"
label="Đường dẫn" label="URL"
type="text" type="text"
class="q-ma-sm" class="q-ma-sm"
outlined outlined
clearable clearable
></q-input> ></q-input>
</div> </div>
<div class="col-2"> <div class="col-6">
<q-select <q-select
v-model="typeLink" v-model="typeLink"
label="Loại link" label="Loại link"
...@@ -42,7 +52,7 @@ ...@@ -42,7 +52,7 @@
outlined outlined
></q-select> ></q-select>
</div> </div>
<div class="col-2"> <div class="col-6">
<q-select <q-select
v-model="status" v-model="status"
label="Trạng thái" label="Trạng thái"
...@@ -107,6 +117,7 @@ export default defineComponent({ ...@@ -107,6 +117,7 @@ export default defineComponent({
() => props.isOpened, () => props.isOpened,
(value) => { (value) => {
if (value) { if (value) {
title.value = props.data.title as string;
link.value = props.data.content as string; link.value = props.data.content as string;
status.value = props.data.status as number; status.value = props.data.status as number;
typeLink.value = props.data.type as number; typeLink.value = props.data.type as number;
...@@ -115,6 +126,7 @@ export default defineComponent({ ...@@ -115,6 +126,7 @@ export default defineComponent({
); );
const link = ref(''); const link = ref('');
const title = ref('');
const typeLink = ref(); const typeLink = ref();
const listType = ref([ const listType = ref([
{ {
...@@ -151,6 +163,7 @@ export default defineComponent({ ...@@ -151,6 +163,7 @@ export default defineComponent({
content: link.value, content: link.value,
status: status.value as number, status: status.value as number,
type: typeLink.value as number, type: typeLink.value as number,
title: title.value,
}, },
})) as AxiosResponse<BaseResponseBody<unknown>>; })) as AxiosResponse<BaseResponseBody<unknown>>;
if (response.data.error.code === config.API_RES_CODE.OK.code) { if (response.data.error.code === config.API_RES_CODE.OK.code) {
...@@ -166,6 +179,7 @@ export default defineComponent({ ...@@ -166,6 +179,7 @@ export default defineComponent({
return { return {
link, link,
title,
typeLink, typeLink,
listType, listType,
status, status,
......
...@@ -114,7 +114,15 @@ export default defineComponent({ ...@@ -114,7 +114,15 @@ export default defineComponent({
align: 'center', align: 'center',
sortable: false, sortable: false,
}, },
{
name: 'title',
field: 'title',
required: true,
label: 'Tiêu đề',
align: 'left',
headerStyle: 'text-align: center !important; width: 19%',
sortable: false,
},
{ {
name: 'content', name: 'content',
field: 'content', field: 'content',
......
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