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

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <!doctype html>
  2. <html lang="zh" gv-id="index">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="keywords" content="">
  6. <link rel="stylesheet" href="css/main.css">
  7. <script src="js/vue.js" gv-src></script>
  8. </head>
  9. <body>
  10. <div id="demo">
  11. <div>searchShops</div>
  12. </div>
  13. </body>
  14. <script gv-src>
  15. a = function () {
  16. this.m5 = function () {
  17. this.m(this.c)
  18. };
  19. this.m2 = (new Function("with(this){m(c)}"))
  20. this.m3 = (new Function("with(this){m4('hello')}"))
  21. };
  22. a.prototype.c = "hello";
  23. a.prototype.m = function () {
  24. console.log("c:", this.c)
  25. };
  26. a.prototype.m4 = function (a) {
  27. console.log(this);
  28. console.log("c:", a)
  29. };
  30. b = new a();
  31. b.m5();
  32. b.m3();
  33. b.m2();
  34. </script>
  35. <script gv-src>
  36. var a = new Vue({
  37. el: "#demo",
  38. data: {
  39. title: "两端通用加载",
  40. categoryList: [],
  41. swiperList: [],
  42. searchShops: "123",
  43. },
  44. methods: {
  45. click: function () {
  46. alert("点击触发");
  47. }
  48. }
  49. });
  50. </script>
  51. </html>