Coder Social home page Coder Social logo

Comments (5)

akinlong avatar akinlong commented on August 20, 2024

顶!组件化下根本用不出来现在

from lib-js-wild-vue.

includeleec avatar includeleec commented on August 20, 2024

然而半个月过去了,根本没有人回复..
不敢用了。

from lib-js-wild-vue.

akinlong avatar akinlong commented on August 20, 2024

给你我的代码
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.

includeleec avatar includeleec commented on August 20, 2024

感谢感谢。
其实我后面自己也琢磨得了。
wilddog 公众号更新挺勤快的,不知道为何不看 github issue..

from lib-js-wild-vue.

princessJoanna avatar princessJoanna commented on August 20, 2024

组件化的引用写的不清楚

from lib-js-wild-vue.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.