修改了,添加了一行代码,还是不行,出不来,在vite2项目里

news/2024/7/10 2:34:00 标签: vue
<template>
  <title>陈尼克</title>
  <div id="app">
  <p>姓名: {{ name }}</p>
  <p>职业: {{ state.work }}</p>
  </div>
</template>

<script>
//import { defineProps, reactive } from 'vue'

import { createApp, ref, reactive } from 'vue'
//const { createApp, ref, reactive } = Vue;
const App = {
  setup() {
    const name = ref("Nick")
    const state = reactive({
      work: "前端工程师",
    });
    return {
      state,
      name,
    };
  },
};
createApp(App).mount("#app");
</script>

   




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

相关文章

python中的for循环如何控制步长

for i in range(开始/左边界, 结束/右边界, 步长):print i 例如 for i in range(1, 10, 2):print i 等价于 for (i1;i<10;i2) 1 3 5 7 9 [Finished in 0.4s]

mybatis 日志Spring Boot+log4j2+yml配置

简单了解 输出mybatis的相关信息&#xff0c;要在控制台输出就需要支持log看了下面的文档我们大概会知道一些相关信息 https://docs.spring.io/spring-boot/docs/current/reference/html/howto-logging.html 如果让系统使用log4j要做对应的修改 为什么使用log4j 2&#xff…

可以把work改成age

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

为什么必须用const { createApp, ref, reactive } = Vue;而import { defineProps, reactive } from ‘vue‘不行,二者有什么区

这个直接不显示 <!DOCTYPE html> <html> <head> <meta charset"utf-8"> <title>陈尼克</title> <style>[v-cloak] {display: none;} </style> </head><body><div id"app" v-cloak><…

darknet在windows上的安装编译与使用

目录 目录 前言 1&#xff0c;操作系统环境 2&#xff0c;下载darknet 3&#xff0c;下载安装Cygwin 4&#xff0c;编译darknet 5&#xff0c;使用darknet 前言 本篇文章参考这篇&#xff1a; http://www.cnblogs.com/jackkwok/p/9045890.html 但部分细节随着时间发生了变化。…

加一个work也可以,变三行了

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

openFeign实现服务间并且调用时传递header以及新增header, header透传

场景&#xff1a;A服务调用B服务&#xff0c;并且在进入到B服务之前&#xff0c;设置一个自定义的hader值&#xff0c;实现如下&#xff1a; 1、创建FeignConfiguration&#xff1a; import feign.Logger; import feign.RequestInterceptor; import feign.RequestTemplate; i…

再加一个也行,不放在state下,行不行呢?

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