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.
61 lines
1.1 KiB
61 lines
1.1 KiB
<!doctype html>
|
|
<html lang="zh" gv-id="index">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="keywords" content="">
|
|
<link rel="stylesheet" href="css/main.css">
|
|
<script src="js/vue.js" gv-src></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="demo">
|
|
<div>searchShops</div>
|
|
</div>
|
|
</body>
|
|
|
|
|
|
<script gv-src>
|
|
|
|
a = function () {
|
|
this.m5 = function () {
|
|
|
|
this.m(this.c)
|
|
};
|
|
this.m2 = (new Function("with(this){m(c)}"))
|
|
this.m3 = (new Function("with(this){m4('hello')}"))
|
|
};
|
|
a.prototype.c = "hello";
|
|
a.prototype.m = function () {
|
|
console.log("c:", this.c)
|
|
};
|
|
a.prototype.m4 = function (a) {
|
|
console.log(this);
|
|
console.log("c:", a)
|
|
};
|
|
b = new a();
|
|
b.m5();
|
|
b.m3();
|
|
b.m2();
|
|
</script>
|
|
|
|
<script gv-src>
|
|
|
|
|
|
var a = new Vue({
|
|
el: "#demo",
|
|
data: {
|
|
title: "两端通用加载",
|
|
categoryList: [],
|
|
swiperList: [],
|
|
searchShops: "123",
|
|
},
|
|
methods: {
|
|
click: function () {
|
|
alert("点击触发");
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
</script>
|
|
</html>
|