This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
//const Foo = Vue.component('fool', {
// template: '<div>foo {{count}}</div>',
// data() {
// return {
// count: 123
// };
// },
// created: function () {
// alert('created');
// }
//});
const Foo = Vue.component('fool', function (resolve, reject) {
// 可以请求一个html文件,既然存放模板还是html文件存放比较好
$.get("./test.c1.html").then(function (res) {
resolve({
template: res,
data() {
return {
count: 123
};
},
created: function () {
alert('created');
}
})
});