index.vue 1.33 KB
Newer Older
程智春 committed
1 2 3 4 5 6
<!-- 链接 -->
<template>
  <div
    class="links"
    :style="{'background-color':datas.componentData['backgroundColor'],'color':datas.componentData['fontColor'],
    'text-align':datas.componentData['arrowsSite'],'line-height':datas.componentData['initcharSize']+'em'}"
侯体倬 committed
7
    @click="onclickHandle"
程智春 committed
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
  >
    <span
      :style="{'font-size':datas.componentData['initcharSize']+'em'}"
    >{{datas.componentData['title']}}</span>
    <span class="jt" v-if="datas.componentData['arrowShow']"></span>
  </div>
</template>
<script>
const app = getApp()
export default {
  name: "links",
  props: {
    datas: {
      type: Object,
      default: {}
    },
    render: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {};
  },
  methods: {
侯体倬 committed
33 34
    onclickHandle(e) {
      app.trackCpn(e, this.datas.componentName, this.datas.componentData.link)
程智春 committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
      app.$themeToLink(this.datas.componentData.link);
    }
  },
  computed: {},
  components: {}
};
</script>
<style lang="scss" scoped>
.links {
  font-size: 16px;
  padding-right: 10px;
  // height: 35px;
  // line-height: 35px;
  .jt {
    display: inline-block;
    border-top: 1px solid;
    border-right: 1px solid;
    width: 10px;
    height: 10px;
    -webkit-transform: rotate(-135deg);
    transform: rotate(405deg);
    margin-left: 10px;
    // vertical-align: middle;
  }
}
侯体倬 committed
60
</style>