<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Vue 测试实例 - 菜鸟教程(runoob.com)</title> <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script> </head> <body> <div id="app"> <div> <div v-for="i in 9"> <span v-for="j in i"> {{ j }} * {{ i }} = {{ j * i }} <span v-if="j * i < 10 "> <span v-if="j == 2"> </span> </span> <span v-else> </span> </span> </div> </div> </div> <script> new Vue({ el: '#app' }); </script> </body> </html>
点击 "运行实例" 按钮查看在线实例