New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updateRows方法 #127
Comments
<dv-scroll-board :config="config" ref="scroll-board" />
export default {
doUpdate () {
const scrollBoard = this.$refs['scroll-board']
scrollBoard.updateRows(someRows)
}
} |
老大 可以具体些不 看的有点麻 |
methods: {
}, |
TypeError: scrollBoard.updateRows is not a function |
遇到了同样的问题,datav是最新版本 |
感谢搞定
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: Tony <notifications@github.com>
发送时间: 2020年8月19日 16:59
收件人: DataV-Team/DataV <DataV@noreply.github.com>
抄送: 517724473 <517724473@qq.com>, Author <author@noreply.github.com>
主题: 回复:[DataV-Team/DataV] updateRows方法 (#127)
跟新datav库到最新版本,或者updateRows的版本
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
请确保版本大于等于 <!DOCTYPE html>
<html>
<head>
<title>DataV</title>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/@jiaminghi/data-view/dist/datav.map.vue.js"></script>
<style>
html,
body,
#app {
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
.dv-scroll-board {
width: 400px !important;
height: 200px !important;
}
</style>
</head>
<body>
<div id="app">
<dv-scroll-board :config="config" ref="test"></dv-scroll-board>
</div>
<script>
var app = new Vue({
el: "#app",
data() {
return {
config: {
header: ["列1", "列2", "列3"],
data: [
["行1列1", "行1列2", "行1列3"],
["行2列1", "行2列2", "行2列3"],
],
},
};
},
mounted() {
setTimeout(() => {
this.$refs["test"].updateRows([
["行1列1", "行1列2", "行1列3"],
["行2列1", "行2列2", "行2列3"],
["行3列1", "行3列2", "行3列3"],
["行4列1", "行4列2", "行4列3"],
["行5列1", "行5列2", "行5列3"],
["行6列1", "行6列2", "行6列3"],
["行7列1", "行7列2", "行7列3"],
["行8列1", "行8列2", "行8列3"],
["行9列1", "行9列2", "行9列3"],
["行10列1", "行10列2", "行10列3"],
]);
}, 2000);
},
});
</script>
</body>
</html> |
谢谢 老大 我搞定了
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: JM <notifications@github.com>
发送时间: 2020年8月19日 17:48
收件人: DataV-Team/DataV <DataV@noreply.github.com>
抄送: 517724473 <517724473@qq.com>, Author <author@noreply.github.com>
主题: 回复:[DataV-Team/DataV] updateRows方法 (#127)
请确保版本大于等于v2.9.6
参考下述🌰
<!DOCTYPE html> <html> <head> <title>DataV</title> <script src="https://unpkg.com/vue"></script> <script src="https://unpkg.com/@jiaminghi/data-view/dist/datav.map.vue.js"></script> <style> html, body, #app { width: 100%; height: 100%; margin: 0px; padding: 0px; } .dv-scroll-board { width: 400px !important; height: 200px !important; } </style> </head> <body> <div id="app"> <dv-scroll-board :config="config" ref="test"></dv-scroll-board> </div> <script> var app = new Vue({ el: "#app", data() { return { config: { header: ["列1", "列2", "列3"], data: [ ["行1列1", "行1列2", "行1列3"], ["行2列1", "行2列2", "行2列3"], ], }, }; }, mounted() { setTimeout(() => { this.$refs["test"].updateRows([ ["行1列1", "行1列2", "行1列3"], ["行2列1", "行2列2", "行2列3"], ["行3列1", "行3列2", "行3列3"], ["行4列1", "行4列2", "行4列3"], ["行5列1", "行5列2", "行5列3"], ["行6列1", "行6列2", "行6列3"], ["行7列1", "行7列2", "行7列3"], ["行8列1", "行8列2", "行8列3"], ["行9列1", "行9列2", "行9列3"], ["行10列1", "行10列2", "行10列3"], ]); }, 2000); }, }); </script> </body> </html>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
新添加一条数据后,配置的隔行变色就失效了,怎么解? |
有点坑, 用this.refs返回的数据格式变成一个数组了,后面要加个[0]才是组件实例
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这个方法给个例子 也不知道写在哪里在vue中,很懵的 老大
The text was updated successfully, but these errors were encountered: