1.安装vue插件,方法 Setting->Plugins,点击Plugins,在右边输入vue,找到相应插件,然后安装 2.创建vue模板 注意红圈里面的 3.设置vue文件支持的样式 注意:这个设置后没效果,是因为2里面的reformat according to style没有取消掉 4.vue用的是es6的语法,所以要把javascript的版本改为es6
var width = this.$refs.topInfo.offsetWidth; var height = this.$refs.topInfo.offsetHeight; var img_w = 77; var img_h = 80; var radius = 30; //console.log(width,height) var svg = d3.select("#forceDirected") .append("svg") .attr("wid