| Marketplace
Sign in
Visual Studio Code>Other>VuenoNew to Visual Studio Code? Get it now.

Vueno

Eno Yao

|
2,169 installs
| (1) | Free
HTML file transform Vue file
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Vueno

.html文件处理为.vue文件

贡献者


Eno Yao

Aaron Xie

DK Lan

Xin

Lemon

Jing

Lin

使用

在VSC中打开任何.html后缀文件,修改并保存,将自动转换为.vue的单文件组件

例如有文件test.html内容如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
            color: red
        }
    </style>
</head>
<body>
    <script>
        console.log('Eno Yao')
    </script>
    <p>Eno Yao</p>
    <p>Hello World</p>
    <script>
        console.log('Hello World')
    </script>
</body>
</html>

保存文件后,将在同目录下生成test.html.vue文件,内容如下

<template>
  <div>
    <p>Eno Yao</p>
    <p>Hello World</p>
  </div>
</template>
<script>
export default {};
</script>
<style scoped>
div {
  color: red;
}
</style>
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2019 Microsoft