![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
前端开发
C++业余爱好者
很多人努力奔跑也很难追赶上年轻时的步伐,更何况,大部分人都是走走停停。
展开
-
npm 安装出错 npm ERR! request to https://registry.npmjs.org/express failed, reason: unable to verify th
npm 安装 jointjs时 出现D:\Project\demo>npm install jointjsnpm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATUREnpm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATUREnpm ERR! request to https://registry.npmjs.org/jointjs failed, reason: unable toverify the first certifi原创 2021-08-03 23:07:50 · 1536 阅读 · 0 评论 -
uniapp封装请求
创建common目录,建立request.js文件,代码如下:const baseUrl = 'http://111.1111.111.11:xxxx/Api/'// 封装请求 传入url data(get请求参数也在这里) typeexport const myRequest =(options)=>{ return new Promise((resolve,reject)=>{ uni.request({ url:baseUrl + options.url, me原创 2021-07-02 16:26:36 · 128 阅读 · 0 评论 -
UniAPP布局
uniapp建议使用flex布局。首先定义flex容器:display:flex。flex容器按主轴排列填充,支持横向、纵向排列,flex属性如下:flex-direction排列方向flex-direction:row。flex-wrap换行flex-wrap:nowrap,不换行flex-wrap:wrap,换行justify-content:设置元素在主轴上的对齐方式justify-content:flex-start 默认左对齐justify-content:flex-end原创 2021-07-02 10:38:35 · 5192 阅读 · 0 评论 -
Vuex基本使用
Vuex 是一个专为 Vue.js 应用程序开发的状态管理模式。简单理解为它是用来存放一些各个组件共享的数据,并支持修改、获取。Vuex可以理解为一个store对象,包含了state,getters,mutations,actions,modules几个部分。const store = new Vuex.Store({state: {count: 0},mutations: {increment (state) {state.count++}},actions: {increment原创 2021-06-30 15:18:09 · 93 阅读 · 0 评论 -
vue中export和export default的使用
1 export的使用比喻index.js要使用test.js中的数据首先在test.js文件中进行导出操作在index.js文件进行导入操作第一种方法:2 export default的使用test.js文件index.js文件中:总结:export 可以直接导出方法 或者 变量export default 可以直接导出类其他js中可以引入并使用了...转载 2021-06-29 17:48:06 · 410 阅读 · 0 评论 -
Vue整合ElementUI组件
安装ElementUInpm i element-ui -S提示2.15.1版本安装完成导入并使用ElementUI:import ElementUI from 'element-ui';import 'element-ui/lib/theme-chalk/index.css';Vue.use(ElementUI);原创 2021-04-29 17:01:57 · 195 阅读 · 0 评论 -
Vue项目使用自定义组件
如何使用自定义组件1.创建组件,三部分template/script/style2.在路由配置文件(默认router/index.js)中导入组件并配置路由,即可import Hello from ‘@/components/Hello’ //导入组件{ //配置路由path: ‘/hello’,name: ‘Hello’,component: Hello}3.浏览器输入URL:http://localhost:8080/#/hello 在路由视图就显示了自定义的hello组件4.页面原创 2021-04-29 14:47:47 · 311 阅读 · 0 评论 -
使用vue脚手架创建webpack项目
在目标文件执行cmd命令,vue init webpack vuedemo,失败:换一个命令,使用离线的webpack包:vue init webpack vuedemo --offlineF:\vue\vue01>vue init webpack vuedemo --offline> Use cached template at ~\.vue-templates\webpack vue-cli · Local template "C:\Users\Administrator\.原创 2021-04-27 09:50:48 · 1537 阅读 · 2 评论 -
Vue安装并创建项目
MVVM思想:view—viewmodel–model,view与model的数据通过viewmodel实现了实时刷新.vue是基于node.js框架,很好的实现了mvvm,是一种轻量级的渐进式框架,示例:helloworld一新建项目文件夹例如vueTest,使用vscode打开文件夹,终端输入命令 npm init -y 初始化项目npm install vue 安装vuePS C:\Users\Administrator\Desktop\vue01> npm init -yWr原创 2021-04-25 23:42:24 · 294 阅读 · 0 评论 -
node.js安装配置
node.js:简单的说 Node.js 就是运行在服务端的 JavaScript。node.js 安装包及源码下载地址:https://nodejs.org/en/download/。下载,直接“下一步”直到安装完成。创建 Node.js 应用在我们的项目根目录下创建server.js 的文件,写入如下代码://引入http模块var http = require('http');//创建服务器http.createServer(function (request, response)原创 2021-04-25 09:28:18 · 158 阅读 · 0 评论