40 lines
1.1 KiB
HTML
40 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>MeshRay 调试页面</title>
|
|
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<h1>Vue 测试页面</h1>
|
|
<p>测试消息:{{ testMessage }}</p>
|
|
<p>当前时间:{{ currentTime }}</p>
|
|
<button @click="updateTime">更新时间</button>
|
|
</div>
|
|
|
|
<script>
|
|
const { createApp, ref } = Vue;
|
|
|
|
createApp({
|
|
setup() {
|
|
const testMessage = ref('Vue 工作正常!');
|
|
const currentTime = ref(new Date().toLocaleString());
|
|
|
|
const updateTime = () => {
|
|
currentTime.value = new Date().toLocaleString();
|
|
alert('时间已更新!');
|
|
};
|
|
|
|
return {
|
|
testMessage,
|
|
currentTime,
|
|
updateTime
|
|
};
|
|
}
|
|
}).mount('#app');
|
|
</script>
|
|
</body>
|
|
</html>
|