1. 程式人生 > 其它 >[Linux-09] RPM 和 YUM

[Linux-09] RPM 和 YUM

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=<device-width>, initial-scale=1.0">
    <script crossorigin="anonymous" integrity="sha512-BKbSR+cfyxLdMAsE0naLReFSLg8/pjbgfxHh/k/kUC82Hy7r6HtR5hLhobaln2gcTvzkyyehrdREdjpsQwy2Jw=="
src="https://lib.baomitu.com/vue/2.6.12/vue.min.js"></script> <title>Document</title> </head> <body> <!-- view --> <div id="app"> <mycomponent v-for="item in items" v-bind:huang="item"></mycomponent> </div> <!--
viewmodel --> <script> //註冊一個元件,元件來達到複用的作用 Vue.component("mycomponent",{ props: ['huang'], template: '<li>{{huang}}</li>' }) var vm = new Vue({ el:"#app", data:{ items:["Java","PHP
","C++"] } }); </script> </body> </html>

  Vue.component(),引數一是模板名,引數二是模板的相關屬性,比如template,template的值就是替換該元件的真實標籤;

  注意,在Vue.component()是取不到Vue物件的資料的,只能元件標籤先渠道資料,然後通過v-bind繫結元件prop提供的屬性,才能設定進去。