✨ feat: crm初步
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
<slot name="info1" :item="item" :isSelected="isSelected(item)">
|
||||
<!-- Vue2 作用域插槽后备内容需用 template + slot-scope 包裹 -->
|
||||
<template slot-scope="{ item, isSelected }">
|
||||
<span class="info-label" v-if="info1Label">{{ info1Label }}:</span>
|
||||
<el-tooltip
|
||||
:content="item[info1Field]"
|
||||
placement="top"
|
||||
@@ -36,7 +35,6 @@
|
||||
<div class="klp-list-info-item" v-if="showInfoItem('info2', item)">
|
||||
<slot name="info2" :item="item" :isSelected="isSelected(item)">
|
||||
<template slot-scope="{ item, isSelected }">
|
||||
<span class="info-label" v-if="info2Label">{{ info2Label }}:</span>
|
||||
<span class="info-value">{{ item[info2Field] }}</span>
|
||||
</template>
|
||||
</slot>
|
||||
@@ -46,7 +44,6 @@
|
||||
<div class="klp-list-info-item" v-if="showInfoItem('info3', item)">
|
||||
<slot name="info3" :item="item" :isSelected="isSelected(item)">
|
||||
<template slot-scope="{ item, isSelected }">
|
||||
<span class="info-label" v-if="info3Label">{{ info3Label }}:</span>
|
||||
<span class="info-value">{{ item[info3Field] }}</span>
|
||||
</template>
|
||||
</slot>
|
||||
@@ -59,7 +56,6 @@
|
||||
<div class="klp-list-info-item" v-if="showInfoItem('info4', item)">
|
||||
<slot name="info4" :item="item" :isSelected="isSelected(item)">
|
||||
<template slot-scope="{ item, isSelected }">
|
||||
<span class="info-label" v-if="info4Label">{{ info4Label }}:</span>
|
||||
<span class="info-value">{{ item[info4Field] }}</span>
|
||||
</template>
|
||||
</slot>
|
||||
@@ -69,7 +65,6 @@
|
||||
<div class="klp-list-info-item" v-if="showInfoItem('info5', item)">
|
||||
<slot name="info5" :item="item" :isSelected="isSelected(item)">
|
||||
<template slot-scope="{ item, isSelected }">
|
||||
<span class="info-label" v-if="info5Label">{{ info5Label }}:</span>
|
||||
<span class="info-value">{{ item[info5Field] }}</span>
|
||||
</template>
|
||||
</slot>
|
||||
@@ -79,7 +74,6 @@
|
||||
<div class="klp-list-info-item" v-if="showInfoItem('info6', item)">
|
||||
<slot name="info6" :item="item" :isSelected="isSelected(item)">
|
||||
<template slot-scope="{ item, isSelected }">
|
||||
<span class="info-label" v-if="info6Label">{{ info6Label }}:</span>
|
||||
<span class="info-value">{{ item[info6Field] }}</span>
|
||||
</template>
|
||||
</slot>
|
||||
@@ -106,13 +100,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// Vue2 需显式引入 Element UI 组件
|
||||
import { ElTooltip, ElEmpty } from 'element-ui';
|
||||
|
||||
export default {
|
||||
name: "KLPList",
|
||||
// 注册引入的 Element 组件
|
||||
components: { ElTooltip, ElEmpty },
|
||||
props: {
|
||||
// ---------------------- 原有核心Props(保留) ----------------------
|
||||
/** 列表数据源(必传) */
|
||||
@@ -140,66 +129,36 @@ export default {
|
||||
required: false,
|
||||
default: "title" // 默认对应原titleField
|
||||
},
|
||||
info1Label: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "" // 兼容原titleLabel
|
||||
},
|
||||
// 信息位2(副标题)
|
||||
info2Field: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ""
|
||||
},
|
||||
info2Label: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ""
|
||||
},
|
||||
// 信息位3(状态)
|
||||
info3Field: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ""
|
||||
},
|
||||
info3Label: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ""
|
||||
},
|
||||
// 信息位4(时间)
|
||||
info4Field: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ""
|
||||
},
|
||||
info4Label: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ""
|
||||
},
|
||||
// 信息位5(数量/金额)
|
||||
info5Field: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ""
|
||||
},
|
||||
info5Label: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ""
|
||||
},
|
||||
// 信息位6(备注)
|
||||
info6Field: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ""
|
||||
},
|
||||
info6Label: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ""
|
||||
},
|
||||
|
||||
// ---------------------- 新增:样式控制Props ----------------------
|
||||
/** 每行内部信息位的间距(px) */
|
||||
|
||||
Reference in New Issue
Block a user