上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页
摘要: 基本使用 <template> <el-button type="primary" @click="handle">{{ count }}</el-button> <el-button type="primary" @click="handle1">统计</el-button> </template 阅读全文
posted @ 2022-11-08 21:30 Sherwin_szw 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 概念 Vue Router 是 Vue.js 的官方路由。它与 Vue.js 核心深度集成,让用 Vue.js 构建单页应用变得轻而易举。功能包括: 嵌套路由映射 动态路由选择 模块化、基于组件的路由配置 路由参数、查询、通配符 展示由 Vue.js 的过渡系统提供的过渡效果 细致的导航控制 自动激 阅读全文
posted @ 2022-11-08 11:47 Sherwin_szw 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 概念 状态管理器,存取数据用的,可以跨组件通信(屏蔽了组件的父子关系) 定义store //store/index.js import { createStore } from "vuex"; const store = createStore({ state:{ // 存数据的地方 count:0 阅读全文
posted @ 2022-11-07 15:45 Sherwin_szw 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 前端存数据的地方 -cookie中:借助第三方插件,自己用js写,超时时间+发送请求自动携带。 -sessionStorage:关闭浏览器,它就没了 -localStorage:永久存在,手动删除,或浏览器存满了、 使用:sessionStorage sessionStorage.setItem(' 阅读全文
posted @ 2022-11-04 15:37 Sherwin_szw 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 使用包管理器 npm install element-plus --save 完整引入 // main.js import { createApp } from 'vue' import ElementPlus from 'element-plus' import 'element-plus/dis 阅读全文
posted @ 2022-11-04 13:56 Sherwin_szw 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 加载<style scoped> 表示写的样式,只在当前组件生效,不会影响到其他组件,造成污染 阅读全文
posted @ 2022-11-04 10:33 Sherwin_szw 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 概念 mixin 混入:可以把多个组件共用的配置提取成一个混入对象 提取混入对象 export const hunhe={ methods:{ show(){ console.log('show'); } }, data(){ return{ age:12 } } } 注册混入,全局注册(只要注册了 阅读全文
posted @ 2022-11-03 20:29 Sherwin_szw 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 定义 props是组件间通信,父传子,自定义属性时,子组件间中接收父组件中传入的数据使用的配置项 主 <script> import New from './components/NewComponents.vue' export default{ components:{ New, }, data 阅读全文
posted @ 2022-11-03 16:47 Sherwin_szw 阅读(91) 评论(0) 推荐(0) 编辑
摘要: test.js let name1 = 'testName'; function testFunc(){ console.log(name1); } export default { name1, testFunc} 使用 <script> // 导入 import test from '../te 阅读全文
posted @ 2022-11-02 17:17 Sherwin_szw 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 组件就是 xx.vue <!-- 第二部分 --> <!-- 以后在这个对象中写咱们之前学的data,methods,watch,computed,生命周期钩子 --> <script> export default { data() { return { name: 'szw' } }, prop 阅读全文
posted @ 2022-11-02 14:47 Sherwin_szw 阅读(9) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页