textTitleBox.vue
785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<template>
<div class="title-box" :class="'style-' + titles.style" fv-if="titles">
<div class="box">
<div class="title-box">
<div class="title">{{titles.title}}</div>
</div>
<div class="more-box" v-if="titles.more" @click="more(titles.more)">
<div class="more-text">更多</div>
</div>
</div>
</div>
</template>
<script>
export default {
data: function () {
return {
}
},
props: ["titles"],
methods: {
/**
* 更多
* @param {object} item [数据对象]
*/
more(item) {
this.$emit("more", item);
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style rel="stylesheet/less" lang="less">
@import './textTitleBox';
</style>