# 【组件】 卡片模板组件 B
# 描述
标题 + 副标题
# 使用效果
# 使用方法
在.ux
文件中引入组件
<import
name="template-b"
src="vivo-cards-suits/components/voice/components/template-b.ux"
></import>
1
2
3
4
2
3
4
# 示例
<template>
<div class="card">
<template-b title="{{title}}" subtitle="{{subtitle}}"></template-b>
</div>
</template>
<script>
export default {
data() {
return {
title: "标题",
subtitle: "只需要输入文字,列表高度将自动匹配。"
};
}
};
</script>
<style lang="less">
.card {
width: 100%;
flex-direction: column;
}
</style>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# API
# 组件属性
属性 | 类型 | 默认值 | 说明 |
---|---|---|---|
title | String | - | 标题 |
subtitle | String | - | 副标题 |