Comments (4)
@WolfDan Have you tried using full URL instead of /api/ladder/achievement
?
from vuetable-2.
@ratiw Thanks for the answer, I try use full URL but sadly isn't working, if you like full log:
Uncaught TypeError: Cannot read property 'get' of undefined
at VueComponent.loadData (eval at <anonymous> (main_pack.js:102), <anonymous>:306:55)
at VueComponent.boundFn [as loadData] (vue.js:131)
at VueComponent.created (eval at <anonymous> (main_pack.js:102), <anonymous>:214:12)
at callHook (vue.js:2610)
at VueComponent.Vue._init (vue.js:3364)
at new VueComponent (vue.js:3483)
at createComponentInstanceForVnode (vue.js:2761)
at init (vue.js:2771)
at createComponent (vue.js:4120)
at createElm (vue.js:4063)
loadData @ Vuetable.vue?e64a:301
boundFn @ vue.js:131
created @ Vuetable.vue?e64a:214
callHook @ vue.js:2610
Vue._init @ vue.js:3364
VueComponent @ vue.js:3483
createComponentInstanceForVnode @ vue.js:2761
init @ vue.js:2771
createComponent @ vue.js:4120
createElm @ vue.js:4063
createChildren @ vue.js:4171
createElm @ vue.js:4096
createChildren @ vue.js:4171
createElm @ vue.js:4096
createChildren @ vue.js:4171
createElm @ vue.js:4096
createChildren @ vue.js:4171
createElm @ vue.js:4096
createChildren @ vue.js:4171
createElm @ vue.js:4096
patch @ vue.js:4552
Vue._update @ vue.js:2490
(anonymous) @ vue.js:2464
get @ vue.js:1663
Watcher @ vue.js:1655
Vue._mount @ vue.js:2463
Vue$3.$mount @ vue.js:6104
Vue$3.$mount @ vue.js:8494
initRender @ vue.js:3060
Vue._init @ vue.js:3365
Vue$3 @ vue.js:3412
(anonymous) @ script.js:33
vue.js:439 TypeError: Cannot read property '_updateFromParent' of undefined
at prepatch (vue.js:2791)
at patchVnode (vue.js:4385)
at updateChildren (vue.js:4312)
at patchVnode (vue.js:4396)
at updateChildren (vue.js:4312)
at patchVnode (vue.js:4396)
at updateChildren (vue.js:4312)
at patchVnode (vue.js:4396)
at updateChildren (vue.js:4312)
at patchVnode (vue.js:4396)
I was working with vue 1.0.28 and all was fine, but I update to vue 2 and it's the online plugin that don't work for me and I use it a lot hahahaha, I hope can be solved
from vuetable-2.
@WolfDan Everything is pointing to loadData()
, but it's hard to say without really inspecting the code. By the way, have you import and register vue-resource
? If not, the Vue.http
might be undefined
, therefore causing the error.
from vuetable-2.
I found the solution!
In my project I'm using axios for http request, so maybe when I compile Vue.http its undefined, so I copy the components and modify Vuetable.vue from this:
<script>
import Vue from 'vue'
import VueResource from 'vue-resource'
Vue.use(VueResource)
export default {
to this:
<script>
Vue.use(VueResource)
Also I have tested with axios and just do this:
<script>
import axios from 'axios' // if you use cnd so delete this
Vue.prototype.$htpp = axios // this is you don't reference vue resource
Vue.http = axios //this if you reference vue resource
// don't import resource etc
//other component code
loadData: function(success = this.loadSuccess, failed = this.loadFailed) {
this.fireEvent('loading')
this.httpOptions['params'] = this.getAllQueryParams()
this.$http.get(this.apiUrl, this.httpOptions).then( //Vue.http to this.$http
success,
failed
)
},
loadSuccess: function(response) {
this.fireEvent('load-success', response)
let body = this.transform(response.data) //replace body to data
this.tableData = this.getObjectValue(body, this.dataPath, null)
this.tablePagination = this.getObjectValue(body, this.paginationPath, null)
if (this.tablePagination === null) {
this.warn('vuetable: pagination-path "' + this.paginationPath + '" not found. '
+ 'It looks like the data returned from the sever does not have pagination information '
+ 'or you may have set it incorrectly.'
)
}
this.$nextTick(function() {
this.fireEvent('pagination-data', this.tablePagination)
this.fireEvent('loaded')
})
},
In fact I don't know why don't work directly on npm package (I have VueResource in my npm too) I hope can be usefull for someone that has my same problem, also if like update the code to axios ^^
Thanks @ratiw for your time
from vuetable-2.
Related Issues (20)
- Please update axios version dependencies
- Vuetble-2 Pagination not working from page-2
- crypt online
- VuetableFieldCheckbox not found on library
- Sorting without API that supports sorting HOT 1
- Vuetable-2 Master Detail View
- No rowdata are available in data-item on checkbox-toggled method.
- How to disable checkboxes in vuetable in vue js.
- detail-row-component, data structure from @vuetable:cell-clicked event is changed?
- Add a possibility to remove sort for a field
- "formatter" not "format" in https://ratiw.github.io/vuetable-2/#/Callbacks
- Feature Request: Close other open details on open - like acrodion
- initial-page not working
- HOW UPDATE TABLE WITH dataManager
- The project is alive? HOT 2
- did this project die?
- calling api in component field error with pagination
- Multiple sort column field
- Prev and Next Buttons
- How to show image in vue-table in columns
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuetable-2.