Refactor PostList.vue and SheetList.vue

pull/40/head
ruibaby 2019-09-06 11:30:19 +08:00
parent 0723e5cc38
commit 1f9e1de998
2 changed files with 48 additions and 22 deletions

View File

@ -146,18 +146,41 @@
:href="options.blog_url+'/archives/'+record.url" :href="options.blog_url+'/archives/'+record.url"
target="_blank" target="_blank"
style="text-decoration: none;" style="text-decoration: none;"
v-if="record.status=='PUBLISHED'"
> >
<a-tooltip <a-tooltip
placement="topLeft" placement="topLeft"
:title="'点击访问【'+text+'】'" :title="'点击访问【'+text+'】'"
>{{ text }}</a-tooltip> >{{ text }}</a-tooltip>
</a> </a>
<a
:href="`${options.blog_url}/api/admin/posts/preview/${record.id}`"
target="_blank"
style="text-decoration: none;"
v-else-if="record.status=='DRAFT'"
>
<a-tooltip
placement="topLeft"
:title="'点击预览【'+text+'】'"
>{{ text }}</a-tooltip>
</a>
<a
href="javascript:void(0);"
style="text-decoration: none;"
disabled
v-else
>
{{ text }}
</a>
</span> </span>
<span <span
slot="status" slot="status"
slot-scope="statusProperty" slot-scope="statusProperty"
> >
<a-badge :status="statusProperty.status" :text="statusProperty.text" /> <a-badge
:status="statusProperty.status"
:text="statusProperty.text"
/>
</span> </span>
<span <span

View File

@ -9,26 +9,6 @@
<a-icon type="pushpin" />内置页面 <a-icon type="pushpin" />内置页面
</span> </span>
<!-- TODO 移动端展示 -->
<!-- <a-collapse
:bordered="false"
v-if="isMobile()"
>
<a-collapse-panel
v-for="(item,index) in internalSheets"
:key="index"
>
<a
href="javascript:void(0);"
slot="header"
> {{ item.name }} </a>
<div>
访问路径{{ item.url }}
操作{{ item.url }}
</div>
</a-collapse-panel>
</a-collapse> -->
<a-table <a-table
:columns="internalColumns" :columns="internalColumns"
:dataSource="internalSheets" :dataSource="internalSheets"
@ -106,19 +86,42 @@
:href="options.blog_url+'/s/'+record.url" :href="options.blog_url+'/s/'+record.url"
target="_blank" target="_blank"
style="text-decoration: none;" style="text-decoration: none;"
v-if="record.status=='PUBLISHED'"
> >
<a-tooltip <a-tooltip
placement="topLeft" placement="topLeft"
:title="'点击访问【'+text+'】'" :title="'点击访问【'+text+'】'"
>{{ text }}</a-tooltip> >{{ text }}</a-tooltip>
</a> </a>
<a
:href="`${options.blog_url}/api/admin/sheets/preview/${record.id}`"
target="_blank"
style="text-decoration: none;"
v-else-if="record.status=='DRAFT'"
>
<a-tooltip
placement="topLeft"
:title="'点击预览【'+text+'】'"
>{{ text }}</a-tooltip>
</a>
<a
href="javascript:void(0);"
style="text-decoration: none;"
disabled
v-else
>
{{ text }}
</a>
</span> </span>
<span <span
slot="status" slot="status"
slot-scope="statusProperty" slot-scope="statusProperty"
> >
<a-badge :status="statusProperty.status" :text="statusProperty.text"/> <a-badge
:status="statusProperty.status"
:text="statusProperty.text"
/>
</span> </span>
<span <span