<script>new Vue({\tel:'#app',\tdata:{\t\tflag:'my-a'\t},\tcomponents:{\t\t'my-a':{\t\t\ttemplate:'<h1>{{title}}</h1>',\t\t\tdata(){\t\t\t\treturn{\t\t\t\t\ttitle:Math.random()\t\t\t\t}\t\t\t}\t\t},\t\t'my-b':{\t\t\ttemplate:'<h1>{{name}}</h1>',\t\t\tdata(){\t\t\t\treturn{\t\t\t\t\tname:Math.random()\t\t\t\t}\t\t\t}\t\t},\t\t'my-c':{\t\t\ttemplate:'#myC',\t\t\t\t\t}\t}})</script>
最新評論