Commit d61d966a authored by yyh's avatar yyh

无模板缺省页面

parent f137b2fb
...@@ -39,6 +39,11 @@ ...@@ -39,6 +39,11 @@
:title="folder_name" :title="folder_name"
:desc="`${detail.length}条模板`" :desc="`${detail.length}条模板`"
></template-item> --> ></template-item> -->
<van-empty
v-if="!list.length"
description="您还未添加模板"
image="@/assets/notemplate.png">
</van-empty>
<div class="folder-item" v-for="{id, folder_simg_url, folder_name, detail} of list" :key="id" @click="goTemplList(detail)"> <div class="folder-item" v-for="{id, folder_simg_url, folder_name, detail} of list" :key="id" @click="goTemplList(detail)">
<van-image <van-image
class="thumb" class="thumb"
...@@ -54,13 +59,14 @@ ...@@ -54,13 +59,14 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'; import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
import { List, Image } from 'vant'; import { List, Image, Empty } from 'vant';
import { TEMPLATETYPE } from '@/const/enum'; import { TEMPLATETYPE } from '@/const/enum';
import { State, Action } from 'vuex-class'; import { State, Action } from 'vuex-class';
@Component({ @Component({
components: { components: {
[List.name]: List, [List.name]: List,
[Image.name]: Image, [Image.name]: Image,
[Empty.name]: Empty,
}, },
}) })
export default class Index extends Vue { export default class Index extends Vue {
......
<template> <template>
<div class="template-list"> <div class="template-list">
<van-empty
v-if="!list"
description="您还未添加模板"
image="@/assets/notemplate.png">
</van-empty>
<template-item <template-item
v-for="{id, s_image_url, name, info} of list" v-for="{id, s_image_url, name, info} of list"
:key="id" :key="id"
...@@ -13,12 +18,13 @@ ...@@ -13,12 +18,13 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'; import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
import { List, Image } from 'vant'; import { List, Image, Empty } from 'vant';
import { TEMPLATETYPE } from '@/const/enum'; import { TEMPLATETYPE } from '@/const/enum';
@Component({ @Component({
components: { components: {
[List.name]: List, [List.name]: List,
[Image.name]: Image, [Image.name]: Image,
[Empty.name]: Empty,
}, },
}) })
export default class Index extends Vue { export default class Index extends Vue {
......
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