Comments (5)
顶!组件化下根本用不出来现在
from lib-js-wild-vue.
然而半个月过去了,根本没有人回复..
不敢用了。
from lib-js-wild-vue.
给你我的代码
import WildVue from 'wildvue';
import Wilddog from 'wilddog';
Vue.use(WildVue);
var wilddogApp = Wilddog.initializeApp({
authDomain: 'your.wilddog.com',//注意这里两个地址不一样
syncURL: 'https://you.wilddogio.com'
});
var sync = wilddogApp.sync();
var actions = {
getData(context, object) {
var progress = object.progress;
var isRefresh = object.refresh;
progress.$Progress.start();
context.commit('updateLoadingState', false);
context.commit('updateBusyState', true);
sync.ref('posts').orderByChild('time').limitToLast(100000000).on('value', function(ss) {
var array = [];
var val = ss.val();
// var i = 0; for debug
for (var k in val) {
// i++;
if (val.hasOwnProperty(k)) {
if (val[k].img == undefined) {
continue;
}
array.push(val[k]);
}
// if (i > 10)
// break;
}
console.log('load ' + array.length + ' posts');
var result = array.reverse();
context.commit('addData', result);
context.commit('updateLoadingState', true);
context.commit('updateBusyState', false);
progress.$Progress.finish();
});
}
};
from lib-js-wild-vue.
感谢感谢。
其实我后面自己也琢磨得了。
wilddog 公众号更新挺勤快的,不知道为何不看 github issue..
from lib-js-wild-vue.
组件化的引用写的不清楚
from lib-js-wild-vue.
Related Issues (6)
- es6中怎么绑定数据呀?
- 野狗能随机查询吗 HOT 1
- this 没有指向 vue HOT 1
- 请问什么时候支持vue2.0? HOT 3
- 是否此库已废?看样子很久不更新了 HOT 1
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 lib-js-wild-vue.