所以我收到这个错误
[Vue 警告]:避免直接改变 prop,因为每当父组件重新渲染时,值都会被覆盖。相反,根据道具的值使用数据或计算属性。道具正在发生变化:“chartData”(在 中找到)
现在这似乎是一个常见的错误,但我不知道在这种情况下如何解决它
我在 Vue-chartjs 中使用 Vue,我得到以下结果
bar_chart.vue
<script>
import { Bar, mixins } from 'vue-chartjs'
export default Bar.extend({
name:"bar_chart",
mixins: [mixins.reactiveProp],
props: ["width","height","options"],
mounted () {
this.renderChart(this.chartData, {responsive: true, maintainAspectRatio: false});
}
})
</script>
Run Code Online (Sandbox Code Playgroud)
module_content.vue
<template>
<div id="module_content">
<div class="container-fluid">
<div class="row">
<div class="col-md-6 bar_chart_test">
<bar_chart
:chartData="DataSet"
:width="400"
:height="200">
</bar_chart>
<button v-on:click="getBarDate">Hey there!</button>
</div>
</div>
</div>
</div>
</template>
<script>
import bar_chart from 'components/controls/bar_chart.vue'
export default {
name: 'module_content',
components: {
bar_chart
},
data: function () { …Run Code Online (Sandbox Code Playgroud) 我以前尝试过,但在完整版本中几乎没有成功,但即使现在失败了,而且我显然在 Windows 上遗漏了一些东西(是的,它可能是 Windows :P)
有人可以带我过去吗
我正在使用 CMake gui For windows,尝试构建一个 VC2015 项目
我在构建 libgit2 时遇到的错误是
checking for module 'libssh2'
package 'libssh2' not found
LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path.
Run Code Online (Sandbox Code Playgroud)
即使我已经把它放在每一个可能的地方,我认为它会看起来,我试过设置CMAKE_PREFIX_PATH?
如果有人在 Windows 上成功完成了它,我将不胜感激一两个关于我做错了什么或应该做什么的指针
谢谢罗伯特