1.自定义jiyong组件
<div id="app">
<jiyong v-for="item in items" v-bind:ji="item"></jiyong>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
//定义一个vue组件
Vue.component("jiyong",{
props: ['ji'],
template: '<li>{{ji}}</li>'
});
var vm = new Vue({
el:"#app",
data: {
items:["java","前端","python"]
}
});
</script>