示例
后台管理系统中很多页面的头部都是相似的,如下:
所以很有必要把这部分抽离出来当公用组件Crumbs.vue:
<template>
<div class="container clearfix" :style="{'minWidth':minWidth?minWidth:'980px'}">
<img v-if="linkTo" class="return-btn fl" src="../../images/return.png" alt="返回按钮" @click="goBack">
<h4 class="fl">{
{title}}</h4>
<div class="contents fr">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
name: 'crumbs',
props: ['title','linkTo','minWidth'],
data: function () {
return {}