怎样在建好的vite2项目里运行html-vue呢,应该放在哪个文件里面呢?

news/2024/7/10 1:15:40 标签: vue

放在App.vue里,似乎是不对的

<template>
  <title>陈尼克</title>

  <div id="app" v-cloak>
  <p>姓名: {{ name }}</p>
  <p>职业: {{ state.work }}</p>
  </div>
</template>

<script>
const { createApp, ref, reactive } = Vue;
const app = {
  setup() {
    const name = ref("Nick")
    const state = reactive({
      work: "前端工程师",
    });
    return {
      state,
      name,
    };
  },
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>

放在index.html里吗?试一试


http://www.niftyadmin.cn/n/957755.html

相关文章

Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect‘ not set。

Access to DialectResolutionInfo cannot be null when hibernate.dialect not set。 2021-08-15最新的spring boot&#xff0c;JPAmysql&#xff0c;出现这个错误&#xff1a; Access to DialectResolutionInfo cannot be null when hibernate.dialect not set。百度了好一会…

再试试放在HelloWorld.vue里试试,第一次没出来,再试一次看看

<template><title>陈尼克</title><div id"app" v-cloak><p>姓名: {{ name }}</p><p>职业: {{ state.work }}</p></div> </template><script> //import { defineProps, reactive } from vueimport…

springboot配置log4j2输出mybatis的sql语句日志记录,包括控制台输出sql语句

1、日志记录效果图 2、控制台输出效果图 3、application-dev.yml # mybatis mybatis: mapper-locations: classpath:mapper/*.xml #注意&#xff1a;一定要对应mapper映射xml文件的所在路径 type-aliases-package: com.xuan.entity # 注意&#xff1a;对应实体类的路径 …

计算两幅图像的相似度总结

1. SSIM&#xff08;结构相似性度量&#xff09; 这是一种全参考的图像质量评价指标&#xff0c;分别从亮度、对比度、结构三个方面度量图像相似性。 SSIM取值范围[0, 1]&#xff0c;值越大&#xff0c;表示图像失真越小。 在实际应用中&#xff0c;可以利用滑动窗将图像分块…

maven 配置远程仓库服务器密码

maven 配置远程仓库服务器密码 如果maven仓库被指定为私库或者有权限设定的话&#xff0c;一般来说是可以下载jar包的。但是发布jar包就有问题了 如果maven仓库设置了权限系统&#xff0c;用户不仅需要具有远程仓库的权限&#xff0c;还需要在setting.xml中配置用户名密码&am…

python中去掉字符串中的\xa0、\t、\n

转载自&#xff1a;https://blog.csdn.net/wangbowj123/article/details/78061618 今天帮女朋友从网络上收集一些信息&#xff0c;但是发现提取出的信息中有“\xa0”&#xff0c;并且无法去掉&#xff0c;查阅了相关资料&#xff0c;后发现该字符表示空格。 \xa0 是不间断空白…

太坑了,刚才写错了一个字母,把const App写成了const app

用html可以 <!DOCTYPE html> <html> <head> <meta charset"utf-8"> <title>陈尼克</title> <style>[v-cloak] {display: none;} </style> </head><body><div id"app" v-cloak><p>…

maven项目集成findbugs详解

文章目录 0、概述 一、接入方式 二、如何使用 方式一、在控制台中执行打包命令 方式二、使用IntelliJ IDEA的maven工具&#xff08;其他IDE用户忽略&#xff09; 三、bug详情查看 四、忽略指定的包、类、类中的方法 步骤一、在pom.xml中 增加配置。 步骤二、增加配置文件&#…