You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/projects/IoTCenter/wwwroot/test.c1.js

28 lines
700 B

This file contains ambiguous Unicode characters!

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');
}
})
});
});