screen_rotation
Copied to Clipboard
<script type="importmap"> { "imports": { "vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.js" } } </script> <div id="app"> <button @click="convertToArray" >Convert To Array</button> <p>String = {{testString}}</p> <p>Array = {{testArray}}</p> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return { testString: "1 2 3 4 5 6 7 8 9", testArray: [], } }, methods:{ convertToArray(){ this.testArray = this.testString.split(" "); } } }).mount('#app') </script>