gpt4 book ai didi

javascript - KendoUI TreeView 尝试向 Poco 添加脏属性并获取 Uncaught TypeError : e. slice 不是函数

转载 作者:行者123 更新时间:2023-12-03 22:52:15 24 4
gpt4 key购买 nike

好的,所以在 Kendo UI Treeview 上,我正在尝试将属性添加到我的 c# poco 中,但是一旦我这样做,我就会在 chrome 开发工具 中收到 错误

Uncaught TypeError: e.slice is not a function



我正在阅读有关添加到模型的信息,因此我添加了 脏:“脏”
schema: {
model: {
id: "Id",
dirty: "dirty",
hasChildren: "Id"
}
}

然后添加了导致问题的 C# poco 属性
public bool dirty { get; set; }

我首先想要dirty属性的原因是因为我没有使用kendo sync()方法,当我吐出数据源时我看到了
console.log(mydatasource.data());

然后我看到“ dirty ”在数组中。

我已经为 child 做了同样的事情,无论我是否扩展 Treeview (只有在扩展节点时才有 child ,因为它调用了 mvc Controller 方法)
// my children nodes
public List<Students> items { get; set; }

位于 数组 中,该数组 生成并不会导致任何问题。

为什么“ ”是一个问题?

最佳答案

好吧,我不使用 dirty 因为这不是必需的或好主意。

关于javascript - KendoUI TreeView 尝试向 Poco 添加脏属性并获取 Uncaught TypeError : e. slice 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36166105/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com