Support Forum
We have a guide on working with remote data.
The back end is a simple function written in Java to provide the data in the correct format
- Attachments
-
- components.zip
- This is a page I copied from the demo
- (7.06 MiB) Downloaded 98 times
I haven't found a way to run the application you posted. There's no package.json. Therefore I've only studied the sources and I found that dataSave function is commented out and even if it wouldn't it doesn't seem that it sends any payload to the server:
FYI, it is not necessary to write a custom implementations of sending-to-server task as CrudManager (or individual Ajax stores) do it for you. The complete discussion on how to do it is here.
In this case it would be probably enough to get the CrudManager and then call its sync() method on the button click. Something like
If you're still in troubles, post please the code that we can run so that we can see what is actually happening.
dataSave() {
if(!this.url.list){
this.$message.error("请设置url.list属性!")
return
}
alert(121312)
var params = this.getQueryParams();//查询条件
//params.datouyu = '21313213121'
getAction(this.url.list, params).then((res) => {
if (res.success) {
// this.dataSource = res.result.records;
// this.ipagination.total = res.result.total;
}
if(res.code===510){
this.$message.warning(res.message)
}
})
},
In this case it would be probably enough to get the CrudManager and then call its sync() method on the button click. Something like
this.crudManager.sync()
Sorry, the code is too large to upload. I also read the introduction of the document. I found that when using crudManager, you can use sync directly in this method, but when I use sync in my application, it cannot respond. Which side should I considersaki wrote: ↑Fri Apr 03, 2020 11:06 am I haven't found a way to run the application you posted. There's no package.json. Therefore I've only studied the sources and I found that dataSave function is commented out and even if it wouldn't it doesn't seem that it sends any payload to the server:FYI, it is not necessary to write a custom implementations of sending-to-server task as CrudManager (or individual Ajax stores) do it for you. The complete discussion on how to do it is here.dataSave() { if(!this.url.list){ this.$message.error("请设置url.list属性!") return } alert(121312) var params = this.getQueryParams();//查询条件 //params.datouyu = '21313213121' getAction(this.url.list, params).then((res) => { if (res.success) { // this.dataSource = res.result.records; // this.ipagination.total = res.result.total; } if(res.code===510){ this.$message.warning(res.message) } }) },
In this case it would be probably enough to get the CrudManager and then call its sync() method on the button click. Something likeIf you're still in troubles, post please the code that we can run so that we can see what is actually happening.this.crudManager.sync()
saki wrote: ↑Fri Apr 03, 2020 11:06 am I haven't found a way to run the application you posted. There's no package.json. Therefore I've only studied the sources and I found that dataSave function is commented out and even if it wouldn't it doesn't seem that it sends any payload to the server:FYI, it is not necessary to write a custom implementations of sending-to-server task as CrudManager (or individual Ajax stores) do it for you. The complete discussion on how to do it is here.dataSave() { if(!this.url.list){ this.$message.error("请设置url.list属性!") return } alert(121312) var params = this.getQueryParams();//查询条件 //params.datouyu = '21313213121' getAction(this.url.list, params).then((res) => { if (res.success) { // this.dataSource = res.result.records; // this.ipagination.total = res.result.total; } if(res.code===510){ this.$message.warning(res.message) } }) },
In this case it would be probably enough to get the CrudManager and then call its sync() method on the button click. Something likeIf you're still in troubles, post please the code that we can run so that we can see what is actually happening.this.crudManager.sync()
- Attachments
-
- 1586423973(1).png (12.41 KiB) Viewed 1806 times
Or I want to know where my newly created tasks are cached when I use space in the front end. Thank yousaki wrote: ↑Fri Apr 03, 2020 11:06 am I haven't found a way to run the application you posted. There's no package.json. Therefore I've only studied the sources and I found that dataSave function is commented out and even if it wouldn't it doesn't seem that it sends any payload to the server:FYI, it is not necessary to write a custom implementations of sending-to-server task as CrudManager (or individual Ajax stores) do it for you. The complete discussion on how to do it is here.dataSave() { if(!this.url.list){ this.$message.error("请设置url.list属性!") return } alert(121312) var params = this.getQueryParams();//查询条件 //params.datouyu = '21313213121' getAction(this.url.list, params).then((res) => { if (res.success) { // this.dataSource = res.result.records; // this.ipagination.total = res.result.total; } if(res.code===510){ this.$message.warning(res.message) } }) },
In this case it would be probably enough to get the CrudManager and then call its sync() method on the button click. Something likeIf you're still in troubles, post please the code that we can run so that we can see what is actually happening.this.crudManager.sync()
Is your issue solved? If not, please attach a runnable testcase that we can check.
Please see "How to ask for help here": viewtopic.php?f=35&t=772
Please strip out node_modules and our sources. We will add them and build your project.Sorry, the code is too large to upload.
Please see "How to ask for help here": viewtopic.php?f=35&t=772
Pavlo Miklashevych
Sr. Frontend Developer