我想用Vite vanilla建立一个非常基本的项目
我用脚手架搭建了该项目yarn create @vitejs/app
现在我调整了以下文件:
索引.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<link rel="stylesheet" href="style.css">
<script type="module" src="main.js"></script>
</head>
<body>
<div id="app">
<h1>Chat</h1>
Message
<br/>
<textarea placeholder="Message"></textarea>
<button onclick="sendMessage()">Send</button>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
样式.css
h1 {
color: blue;
}
Run Code Online (Sandbox Code Playgroud)
main.js
console.log('hello main.js')
const chatInput = document.querySelector('textarea')
export function sendMessage() {
let message = chatInput.value
window.alert(message)
chatInput.value = "";
}
Run Code Online (Sandbox Code Playgroud)
当我单击“发送”按钮时,我现在在浏览器控制台中收到以下错误
<!DOCTYPE html>
<html lang="en">
<head> …Run Code Online (Sandbox Code Playgroud) 哪个 Angular 材质版本属于哪个材质设计规范版本(v1、v2、v3)?
| 角度材质版本 | 材料设计版本 |
|---|---|
| 16 | ? |
| 15 | ? |
| 14 | ? |
| 13 | ? |
| 12 | ? |
| 11 | ? |
| 10 | ? |
如何在
<template> </template>.vue 文件的标签内全局禁用 max-len 警告?
我想这样做的原因是我不想
<!-- eslint-disable max-len -->
每次都写。
我也不想在整个 vue 文件中全局禁用它,所以我仍然想在脚本标记中收到警告。