home.page.js 861 Bytes
var Vue = require('yoho-vue');

var app = require('example/home.vue');
var tpl = require('example/hello.hbs');

var vm = new Vue({
    el: '#app',
    components: {
        app: app
    }
});

console.log(vm);

/* eslint-disable */
// 私有包测试
var qs = require('yoho-qs');
console.log(qs);

var parse = require('yoho-qs/parse'); // 提供解析函数
console.log(parse('q=w&e=r')); // { q: 'w', e: 'r' }

var cookie = require('yoho-cookie');

console.log(cookie.all());

// ES6 test
var test = {
    data() {
        return {
            message: 'test',
            message2: 'test2'
        };
    }
};

// Handlebars/HBS 模版例子
$('#hbs-placeholder').html(tpl({
    text: 'Handlerbars'
}));


var overlay = require('../common/overlay');
$('#modal-overlay').click(()=> {
    var overlay = $.overlay();
    overlay.show();
});

/* eslint-enable */