目录
全局构建
- 1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>learn js</title>
<base href="/">
<link href="styles/style.css" rel="stylesheet" />
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="hello">{{ message }}
<p id="ruby-info">We are pleased to announce the release of Ruby 3.3.0-preview1. Ruby 3.3 adds a new pure-Ruby JIT compiler named RJIT, uses Lrama as a parser generator, and many performance improvements especially YJIT.</p>
</div>
<script>
const { createApp, ref } = Vue
createApp({
setup() {
const message = ref('你好,vue3!')
return {
message
}
}
}).mount('#hello')
</script>
</body>
</html>
#hello{
font: italic small-caps bold 16px/2 cursive;
color: rgb(214, 122, 127);
}
#ruby-info{
font: small-caps 16px/2 cursive;
color: green;
}
-2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>learn js</title>
<base href="/">
<link href="styles/style.css" rel="stylesheet" />
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="hello">
<p>{{ message }}</p>
<p>{{timeStr}}</p>
<p id="ruby-info">We are pleased to announce the release of Ruby 3.3.0-preview1. Ruby 3.3 adds a new pure-Ruby JIT compiler named RJIT, uses Lrama as a parser generator, and many performance improvements especially YJIT.</p>
</div>
<script>
const { createApp, ref } = Vue
createApp({
setup() {
const message = ref('你好,vue3!')
const timeStr= ref(Date())
return {
message,timeStr
}
}
}).mount('#hello')
</script>
</body>
</html>
标签:13,vue,const,ref,ruby,3.3,createApp,message,Ruby
From: https://www.cnblogs.com/waterruby/p/17790773.html