Vue.component("lottery-tab", {
template: `
<ul class="clearfix lottery-tab-list">
<li class="fl lottery-tab-item" v-for="(tab, index) in tabsArr" @click="switchTab(tab.en)" :class="{on: tab.en === _tabCode}">{{tab.cn}}</li>
</ul>
`,
props: ["tabs-arr", "tab-default-obj", "lottery-type", "lottery"],
data() {
return {
_tabCode: "", //
};
},
});
how to match with the html in the template above the rule?
wrote a / ([\ "\"
]?) (template) 1: (?: s *) ([" ]) (. *?) / I
, but not allowed. Ask for advice.