SheetJS / sheetjs

📗 SheetJS Spreadsheet Data Toolkit -- New home https://git.sheetjs.com/SheetJS/sheetjs
https://sheetjs.com/
Apache License 2.0
34.87k stars 8k forks source link

is support vue3 #2394

Closed wsxe9988 closed 2 years ago

wsxe9988 commented 2 years ago

is support vue3,if not,what time will support vue3

SheetJSDev commented 2 years ago

SheetJS is pure javascript and should "just work" with Vue3. The vue demos include Nuxt and Weex, and we have to wait for them to support V3 before updating those demos.

As for the in-browser vue example, a few lines need to be changed to reflect Vue's new setup:


--- a/demos/vue/SheetJS-vue.js
+++ b/demos/vue/SheetJS-vue.js
@@ -12,8 +12,8 @@ var SJSTemplate = [
                '<div id="out-table"></div>',
        '</div>'
 ].join("");
-
-Vue.component('html-preview', {
+var app = Vue.createApp({});
+app.component('html-preview', {
        template: SJSTemplate,
        methods: {
                onchange: function(evt) {
--- a/demos/vue/index.html
+++ b/demos/vue/index.html
@@ -5,7 +5,7 @@
 <head>
        <title>SheetJS + VueJS2</title>
        <!-- Vue 2 -->
-       <script src="https://unpkg.com/vue@2.x"></script>
+       <script src="https://unpkg.com/vue@3.x"></script>

        <!-- Various shims -->
        <script src="shim.js"></script>
@@ -55,7 +55,7 @@ This demo shows a sample Vue component "html-preview" that:
 </div>

 <script lang="javascript">
-var app = new Vue({ el: '#app' });
+app.mount('#app');
 </script>
 </body>
 </html>
reviewher commented 2 years ago

VueJS v3 ecosystem issues:

Nuxt: https://github.com/nuxt/nuxt.js/issues/5708

WeeX (expected in WeeX 2.0): https://github.com/alibaba/weex/issues/3239