找回密码
 立即注册
查看: 2|回复: 0

9,写入数据两种方法

[复制链接]

261

主题

6

精华

265

金币

技术维护QQ:515138

积分
571
发表于 13 小时前 | 显示全部楼层 |阅读模式
  1. <!-- <scrip t>
  2.   //写数据
  3.   export default{
  4.     data(){
  5.       return {
  6.         msg:'上海'
  7.       }
  8.     }
  9.   }
  10. </scrip t> -->
  11. <scrip t setup>
  12.   import {ref} from 'vue';
  13.   //调用ref函数,定义响应式数据
  14.   const msg = ref('西安');
  15.   //导入 Api.vue文件
  16.   import ApiVue from './Api.vue'
  17.   //导入Article.vue文件
  18.   import ArticleVue from './Article.vue'
  19. </scrip t>
  20. <template>
  21.   <!-- html -->
  22.   <!-- <h1>北京</h1> -->
  23.   <!-- <h1>{{ msg }}</h1>
  24.   <br>
  25.   <ApiVue/> -->
  26.   <ArticleVue/>
  27. </template>
  28. <style scoped>
  29.   /* 样式 */
  30.   h1{
  31.     color: red;
  32.   }
  33. </style>
复制代码





上一篇:8,VUE默认首页文件,自适应
下一篇:10,组合式API和选项式API
网站建设,公众号小程序开发,系统定制,软件App开发,技术维护【联系我们】手机/微信:17817817816 QQ:515138

QQ|Archiver|自丢网 ( 粤ICP备2024252464号-1 )

GMT+8, 2026-3-5 22:46

专注于网站建设,公众号小程序制作,商城小程序,系统定制,软件App开发

【联系我们】手机/微信:17817817816 QQ:515138

快速回复 返回顶部 返回列表