vue 组件

it2022-05-06  5

<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>组件</title> <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script></head><body><div id="root"> <table> <tbody> <tr is="row"></tr> <tr is="row"></tr> <tr is="row"></tr> </tbody> </table></div><script> Vue.component('row',{ data:function() { return { content:'this is content' } }, template:'<tr><td>{{content}}</td></tr>' }); var vm=new Vue({ el:'#root' })</script>,</body></html>

转载于:https://www.cnblogs.com/guangzhou11/p/9042421.html

相关资源:数据结构—成绩单生成器

最新回复(0)