Vue筆記12將表達式插入模板
Vue筆記12將表達式插入模板
<!DOCTYPE html>
<html lang="zh-hant-TW">
<head>
<meta charset="UTF-8">
<title>簡化版Vue學習</title>
</head>
<body>
<div id="tag01">
<!--此處會判斷布林值的真假-->
{{ message01?'為真':'為假' }}
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
var object01 = new Vue({
el: '#tag01',
data: {
message01: true
}
})
</script>
</html>