vue2_frontend init..
This commit is contained in:
parent
1096bf645c
commit
6c21223494
@ -54,17 +54,39 @@
|
|||||||
label-sort-clear=""
|
label-sort-clear=""
|
||||||
@filtered="onFiltered"
|
@filtered="onFiltered"
|
||||||
>
|
>
|
||||||
|
<template #table-colgroup="scope">
|
||||||
|
<col
|
||||||
|
v-for="field in scope.fields"
|
||||||
|
:key="field.key"
|
||||||
|
:style="{ width: field.width }"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<template #cell(selected)="row">
|
<template #cell(selected)="row">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
:value="row.item.id"
|
:value="row.item.id"
|
||||||
@change="checkedIdsToggle(row.item.id)"
|
@change="checkedIdsToggle(row.item.id)"
|
||||||
/>
|
/>
|
||||||
{{ row.item.id }}
|
|
||||||
</template>
|
</template>
|
||||||
<template #cell(index)="row">
|
<template #cell(index)="row">
|
||||||
{{ total - (currentPage * perPage + row.index) + perPage }}
|
{{ total - (currentPage * perPage + row.index) + perPage }}
|
||||||
</template>
|
</template>
|
||||||
|
<template #cell(title)="row">
|
||||||
|
{{ row.item.title }}
|
||||||
|
<b-button size="sm" @click="row.toggleDetails" class="mr-2">
|
||||||
|
{{ row.detailsShowing ? 'Hide' : 'Show' }} Details
|
||||||
|
</b-button>
|
||||||
|
</template>
|
||||||
|
<template #row-details="row">
|
||||||
|
<b-card>
|
||||||
|
<b-row class="mb-2">
|
||||||
|
<b-col><span v-html="row.item.content"></span></b-col>
|
||||||
|
</b-row>
|
||||||
|
<b-button size="sm" @click="row.toggleDetails"
|
||||||
|
>Hide Details</b-button
|
||||||
|
>
|
||||||
|
</b-card>
|
||||||
|
</template>
|
||||||
<template #table-busy>
|
<template #table-busy>
|
||||||
<div class="text-center text-danger my-2">
|
<div class="text-center text-danger my-2">
|
||||||
<b-spinner class="align-middle"></b-spinner>
|
<b-spinner class="align-middle"></b-spinner>
|
||||||
@ -112,26 +134,28 @@ export default {
|
|||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
key: 'selected',
|
key: 'selected',
|
||||||
label: ''
|
label: '',
|
||||||
|
width: '10px'
|
||||||
},
|
},
|
||||||
{ key: 'index', label: '번호' },
|
{ key: 'index', label: '번호', width: '55px' },
|
||||||
{
|
{
|
||||||
key: 'title',
|
key: 'title',
|
||||||
label: '타이틀',
|
label: '제목',
|
||||||
sortable: true,
|
|
||||||
sortDirection: 'desc',
|
|
||||||
filterByFormatted: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'content',
|
|
||||||
label: '내용',
|
|
||||||
sortable: true,
|
sortable: true,
|
||||||
sortDirection: 'desc',
|
sortDirection: 'desc',
|
||||||
filterByFormatted: true
|
filterByFormatted: true
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// key: 'content',
|
||||||
|
// label: '내용',
|
||||||
|
// sortable: true,
|
||||||
|
// sortDirection: 'desc',
|
||||||
|
// filterByFormatted: true
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
key: 'is_done',
|
key: 'is_done',
|
||||||
label: '사용여부',
|
label: '사용여부',
|
||||||
|
width: '105px',
|
||||||
// formatter: (value, key, item) => {
|
// formatter: (value, key, item) => {
|
||||||
formatter: (value) => {
|
formatter: (value) => {
|
||||||
return value ? 'Yes' : 'No'
|
return value ? 'Yes' : 'No'
|
||||||
@ -144,6 +168,7 @@ export default {
|
|||||||
{
|
{
|
||||||
key: 'createdAt',
|
key: 'createdAt',
|
||||||
label: '登録日時',
|
label: '登録日時',
|
||||||
|
width: '105px',
|
||||||
formatter: (value) => {
|
formatter: (value) => {
|
||||||
return value.replace(
|
return value.replace(
|
||||||
/([0-9]{4})-([0-9]{2})-([0-9]{2}).*/gi,
|
/([0-9]{4})-([0-9]{2})-([0-9]{2}).*/gi,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user