es6-proxy-polyfill icon indicating copy to clipboard operation
es6-proxy-polyfill copied to clipboard

Can it work with vue3 which used in lower version chrome <49

Open zacard-orc opened this issue 1 year ago • 0 comments

Hi, I build your product and try work with vue3 in lower version chrome <49

but, because vue3 has his own context , sometimes the webpack throw error like this.xxxx is not a function (this is undefined) or vue3 can't trig deps to update dom

so, do we have some methods to work with with vue3

eg: i used vue.global.js to test proxy-polyfill ,and use the demo

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Vue 3 UMD Demo</title>
  <script src="./es6_proxy_polyfill_raw.js"></script>
</head>
<body>
<div id="app">

  <div>msg {{ message }}</div>
  <div>ldr {{ ldr }}</div>
  <div>num {{ mm }}</div>
  <div>
    <button @click="ppp">+1</button>
  </div>
</div>

<script src="https://unpkg.com/[email protected]/dist/vue.global.js"></script>

<script>
  const { createApp } = Vue;

  const App = {
    data() {
      return {
        message: "Hello, Vue 3 UMD!",
        ldr: this.langx(),
        mm: 10
      };
    },
    methods: {
      langx: function() {
        console.log("langx");
        return "langx111";
      },
      ppp: function() {
        console.log("mmd click this-", this, this.mm);
        this.mm = this.mm + 1;
      }
    }
  };

  createApp(App).mount("#app");
</script>
</body>
</html>

zacard-orc avatar Jun 05 '24 09:06 zacard-orc