sitecolumnlink.vue
852 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
39
40
41
42
43
44
<style>
.sitecolumnlink{
display: inline-block;padding:0px;margin:0px;
cursor: pointer; font-size: 12px;
color: #ee7a2f;
}
</style>
<template>
<a :class="class" :href="href" :title="title" v-show="show"
target="_blank">
帮助?
</a>
</template>
<script>
module.exports={
data:function(){
return {
href:'javascript:',title:'',show:false
}
},props:{
typetitle:{
type:String,default:'title'
},class:{
type:String,default:'sitecolumnlink'
}
},methods:{
getData:function(){
var that=this;
Ajax.get('/platform/sitedata/links/'+this.typetitle).
then(function(res){
var result=res.data;
if(result.data){
that.href=result.data.link;
that.title=result.data.title;
that.show=true;
}
})
}
},ready:function(){
this.getData();
}
}
</script>