home.page.js
711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var tpl = require('./hello.hbs');
var Vue = require('yoho-vue');
var app = require('example/home.vue');
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());
var test = {
data() {
return {
message: 'test',
message2: 'test2'
};
}
};
// Handlebars/HBS 模版例子
$('#hbs-placeholder').html(tpl({
text: 'Handlerbars'
}));
/* eslint-enable */