上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 75 下一页
摘要: 子组件 菜单组件 MenuComponent 列表组件 ExtTelListComponent 状态组件 ExtTelStatusComponent 父组件 界面主体 MainIndex 实现功能:在 MainIndex 中引入 三个子组件 通过点击 菜单组件 切换加载 列表组件 和 状态组件 实现 阅读全文
posted @ 2023-07-12 17:24 海乐学习 阅读(1213) 评论(0) 推荐(0)
摘要: 子组件 <template> <div class="menuUn Huans"> <a href="javascript:;" class="menuUna flexC fl-bet Huans" @click="menuOnClick('ExtTelStatusComponent')"><p>调 阅读全文
posted @ 2023-07-12 16:51 海乐学习 阅读(2398) 评论(0) 推荐(1)
摘要: 在 vue3 开发中 经常会遇有 动态切换组件 的需求,下面简单写个例子,当然也还有其它方法。 用 component :is= 来变换组件 <div class="IndConK Huans overH" > <!-- 正常组件 <ext-tel-status-component ></ext-t 阅读全文
posted @ 2023-07-12 16:30 海乐学习 阅读(1584) 评论(0) 推荐(0)
摘要: 页面上有两个 Div 用 JQuery 控制 Div 显示和隐藏。实现Div间切换的需求 <div class="IndConK Huans overH" id="divExtTelList"> 11111111111111111111 <div> <div class="IndConB flex" 阅读全文
posted @ 2023-07-11 14:04 海乐学习 阅读(92) 评论(0) 推荐(0)
摘要: vue2.0 外部配置文件,重点是打包后也可以 修改配置参数 一、在public中创建static文件夹,在static文件夹中创建config.js文件 config.js { "apiUrl": "http://192.168.1.5:5011/httpCli" } 二、在 man.js 中 使 阅读全文
posted @ 2023-07-07 16:20 海乐学习 阅读(165) 评论(0) 推荐(0)
摘要: vue3.0 外部配置文件,重点是打包后也可以 修改配置参数 axios方式有两个缺点: 1.读取配置参数是用 axios请求 所以要比程序加载慢些。有时会出现程度加载完毕后要等1秒左右才能读到配置参数 2.最重要的缺点是 axios方式,编译后必须放在Apache(或其它服务)的www目录下用 地 阅读全文
posted @ 2023-07-07 16:08 海乐学习 阅读(706) 评论(0) 推荐(0)
摘要: 项目需求 实现一个 响应式全局对象,在A模板页修改全局对象 ,在B模板页中自动响应改变为新值 main.js 全局对象 globalVars import { createApp } from 'vue' import { reactive } from 'vue' import App from 阅读全文
posted @ 2023-07-07 15:02 海乐学习 阅读(463) 评论(0) 推荐(0)
摘要: vue项目打包上线时报错’Failed to load resource: net::ERR_FILE_NOT_FOUND’ 原因:这里的确是css以及js文件的路径问题 解决方案: 解决时并不需要手动改路径或者加一段判断去修改 最方便的办法时在项目打包前的 vue.config.js 里面将pub 阅读全文
posted @ 2023-07-03 14:27 海乐学习 阅读(1162) 评论(0) 推荐(0)
摘要: 模板页 在components目录下 新建 HeaderComponent.vue 文件 HeaderComponent.vue <template> <div > 元素 </div> </template> <script> export default { // 组件名称 name: 'Head 阅读全文
posted @ 2023-06-30 17:02 海乐学习 阅读(44) 评论(0) 推荐(0)
摘要: Vue3 使用 axios 可以实现请求跨域问题 1.安装axios npm install axios -S 2.引入axios 并配置为全局 $axios 对象 main.js import { createApp } from 'vue' import App from './App.vue' 阅读全文
posted @ 2023-06-30 13:49 海乐学习 阅读(3534) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 75 下一页