摘要: vue 中 vue的ref 属性,主要用来共用组件,接收外部传过来的数据 1. App.vue <template> <div> <!-- 发送方确定哪些属性 age="18" 传递的是字符串18 --> <Student name="李四" sex="女" :age="18"/> </div> < 阅读全文
posted @ 2023-07-22 20:35 雪落无痕1 阅读(17) 评论(0) 推荐(0)
摘要: vue的ref 属性,,类似于原生 document.getElementById("smy") 获取标记dom 节点的信息 App.vue 的文件如下面所示 <template> <div> <h1 v-text="msg" ref="title"></h1> <button ref="btn" 阅读全文
posted @ 2023-07-22 15:15 雪落无痕1 阅读(32) 评论(0) 推荐(0)
摘要: 1. vue脚手架文件结构 2. 不同的版本vue 3. 修改默认配置 修改默认配置 1. 查看脚手架的默认配置 vue inspect >output.js 2. 为什么 main.js 是入口文件,index.html 是首页 调整 vue.config.js 阅读全文
posted @ 2023-07-22 14:54 雪落无痕1 阅读(27) 评论(0) 推荐(0)
摘要: 1.脚手架里面为什么main.js 里面,使用了render 函数/** * 该文件是整个项目的入口文件 */ //引入Vue import Vue from 'vue' // 引入App 组件 他是所有组件的父组件 import App from './App.vue' //关闭vue 的生产提示 阅读全文
posted @ 2023-07-22 13:03 雪落无痕1 阅读(20) 评论(0) 推荐(0)
摘要: pckgage.json 包的说明书 "scripts": { "serve": "vue-cli-service serve", 运行项目 "build": "vue-cli-service build", 编译 "lint": "vue-cli-service lint" 语法检查 }, pac 阅读全文
posted @ 2023-07-22 02:01 雪落无痕1 阅读(11) 评论(0) 推荐(0)