提交 f46e96d7 编写于 作者: hudan's avatar hudan

新增列表面板自定义插件

上级 260cdd17
.app-list-itemlayoutpanel{
padding: 0 0 0 20px;
// margin: 10px;
.srfmajortext{
font-size: 16px;
cursor: pointer;
}
.srfdescription{
margin-bottom: 10px;
}
.el-tag{
margin: 10px 6px 10px 0;
color: #000;
padding: 0 16px;
max-height: 24px;
line-height: 24px;
background-color: rgb(250, 250, 250)
}
.srfmajortext:hover{
color: #40a9ff;
}
.user-information{
display: flex;
.srficon{
width: 28px;
height: 28px;
margin-right: 6px;
>img{
width: 100%;
border-radius: 50%;
height: 100%;
}
}
}
.app-list-item-action{
margin-top:6px;
>a{
margin:0 20px 0 0 !important;
}
}
}
<template>
<div v-if="inputData" class="app-list-itemlayoutpanel">
<h4 class="srfmajortext">{{inputData.srfmajortext}}</h4>
<template v-for="(tagitem,index) of tagArr">
<el-tag v-if="tagArr" type="info" size="medium" :key="index">{{tagitem}}</el-tag>
</template>
<p class="srfdescription">{{inputData.srfdescription}}</p>
<div class="user-information">
<div class="srficon">
<img v-if="inputData.srficon" :src="inputData.srficon" />
<img v-else src="/assets/img/noimage.png" alt="">
</div>
<span class="srfdate">{{inputData.srfdate}}</span>
</div>
<div class="app-list-item-action">
<template v-for="(action,index) in Object.keys(actionModel)">
<a :key="index" style="display: inline-block;margin: 0 12px;" @click="uiAction(inputData, action, $event)">
<i :class="actionModel[action].icon" style="margin-right:2px;"></i>
<span>{{actionModel[action].caption}}</span>
</a>
</template>
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop, Model, Watch } from 'vue-property-decorator';
import { Subject,Subscription } from 'rxjs';
@Component({
})
export default class AppListItemlayoutpanel extends Vue {
/**
* 传递数据
*
* @type {any}
* @memberof AppListItemlayoutpanel
*/
@Prop() public inputData: any;
/**
* 操作栏模型
*
* @type {*}
* @memberof AppCalendarItemlayoutpanel
*/
@Prop() public actionModel:any;
/**
* 处理数据
*
* @memberof AppListItemlayoutpanel
*/
public tagArr:Array<any>=[];
/**
* 操作列界面行为
*
* @param {*} data
* @param {*} tag
* @param {*} $event
* @memberof AppCalendarItemlayoutpanel
*/
public uiAction(data: any, tag: any, $event: any) {
this.$emit('uiAction',data, tag, $event)
}
/**
* vue生命周期
*
* @memberof AppCalendarItemlayoutpanel
*/
public created(){
if(this.inputData && this.inputData.srftag){
this.tagArr = this.inputData.srftag.split(',');
}
}
}
</script>
<style lang='less'>
@import './app-list-itemlayoutpanel.less';
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册