screen_rotation
Copied to Clipboard
<html> <head> <script type="importmap"> { "imports": { "vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.js" } } </script> <body> <div id="app"> <h2>Vue js splice Method</h2> <p>remove property from object</p> <button @click="addFun">Remove</button> <table> <tr> <th>S.no</th> <th>Site Name</th> <th>Site Url</th> </tr> <tr v-for="object in demoObject"> <td> {{object.s_no}}</td> <td>{{object.siteName}}</td> <td><a :href="object.siteUrl" target="_blank">{{object.siteUrl}}</a></td> </tr> </table> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return{ demoObject : [ { s_no:1, siteName:'Sarkari Naukri Exams', siteUrl:'https://sarkarinaukriexams.com' }, { s_no:2, siteName:'Font Awesome Icons', siteUrl:'https://fontawesomeicons.com' }, { s_no:3, siteName:'Tutorials Plane', siteUrl:'https://tutorialsplane.com' }, { s_no:4, siteName : 'Schools Geek Technology', siteUrl:'https://schoolsgeek.com' } ] } }, methods:{ addFun(){ this.demoObject.splice(2,1); }, } }).mount('#app') </script> </body> </head> </html>