sitecolumnlink.vue 852 Bytes
<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>