11 2019 档案

摘要:一定要将静态资源引入 【 require("@/assets/") 】,绑定到 模型绑定的:src 数据中 动态的数据才能有效 <template> <div> <el-card class="box-card"> <div slot="header" class="clearfix"> <span 阅读全文
posted @ 2019-11-23 21:26 武卡卡 阅读(5076) 评论(0) 推荐(0) 编辑
摘要:var multer = require('multer') var storage = multer.diskStorage({ destination: function (req, file, cb) { cb(null, 'uploads/') }, filename: function ( 阅读全文
posted @ 2019-11-22 23:43 武卡卡 阅读(668) 评论(0) 推荐(0) 编辑
摘要:直接上代码。 <template> <div> <el-upload action="http://localhost:3000/picture" :http-request = "getimages" :before-upload = "beforeUp" :headers="headers" l 阅读全文
posted @ 2019-11-22 23:04 武卡卡 阅读(329) 评论(0) 推荐(0) 编辑
摘要:一,只有在上传文件之前的钩子函数中才可以获得最初的文件(文件本身的二进制形式),用以以上传服务器。 还需要使用formdata来承载数据,便于接收 <template> <div> <el-upload action="http://localhost:3000/picture" :http-req 阅读全文
posted @ 2019-11-21 22:40 武卡卡 阅读(4503) 评论(0) 推荐(1) 编辑
摘要:<template> <div> <el-upload action="http://localhost:3000/picture" :headers="headers" list-type="picture-card" :on-preview="handlePictureCardPreview" 阅读全文
posted @ 2019-11-19 05:41 武卡卡 阅读(6247) 评论(0) 推荐(0) 编辑
摘要:1, 安装 vue add vuex 2, 安装完之后会自动生成store文件夹,并在main.js中自动引用 store/index.js 3,在store文件夹下的index.js中定义 import Vue from 'vue' import Vuex from 'vuex' Vue.use( 阅读全文
posted @ 2019-11-17 14:32 武卡卡 阅读(725) 评论(0) 推荐(1) 编辑
摘要:首先最重要的是 你要明白 https接口的接收或者发送 的形式 是 https://域名:端口号 而不是 https://ip:端口号 一,首先,去阿里云注册免费ssl证书 1,在搜索框中输入关键字证书,点击SSL证书 2,点击购买证书 3,选择免费型,点击购买 4,点击支付 5,点击确认支付 6, 阅读全文
posted @ 2019-11-08 15:39 武卡卡 阅读(1584) 评论(0) 推荐(0) 编辑
摘要:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 阅读全文
posted @ 2019-11-07 14:11 武卡卡 阅读(5577) 评论(0) 推荐(0) 编辑
摘要:const port = normalizePort(process.env.PORT || '3000'); const path = require('path'); const https = require('https'); const fs = require('fs'); const  阅读全文
posted @ 2019-11-06 15:19 武卡卡 阅读(2484) 评论(0) 推荐(0) 编辑
摘要:1,卸载nginx不保留配置文件 $ sudo apt-get --purge remove nginx 2,卸载自动安装且不再需要的依赖包 $ sudo apt-get autoremove 3,卸载nginx-common不保留配置文件 $ sudo apt-get --purge remove 阅读全文
posted @ 2019-11-05 15:03 武卡卡 阅读(376) 评论(0) 推荐(0) 编辑
摘要:一、使用 mongodump 命令备份数据 mongodump -h IP --port 端口 -u 用户名 -p 密码 -d 数据库 -c 表 -o 文件存放路径 参数说明: -h 指明数据库宿主机的IP --port 指明数据库的端口 -u 指明数据库的用户名 -p 指明数据库的密码 -d 指明 阅读全文
posted @ 2019-11-04 16:11 武卡卡 阅读(208) 评论(0) 推荐(0) 编辑
摘要:1,第一种 <template> <div id="app"> <p> {{count}} </p> <p> {{todos}} </p> </div> </template> <script> import {mapState} from 'vuex' export default { name: 阅读全文
posted @ 2019-11-03 14:41 武卡卡 阅读(205) 评论(0) 推荐(0) 编辑
摘要:1,安装 进入项目目录,执行 vue add vuex 命令 2,会在src的目录下新增store文件夹 3,打开store文件夹下的index.js , 给 state 设定一些数据 import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vue 阅读全文
posted @ 2019-11-03 08:04 武卡卡 阅读(1804) 评论(0) 推荐(0) 编辑
摘要:1,安装 cors 模块 : npm install cors 2,代码 : var express = require('express') var app = express() var cors = require('cors') app.use(cors()) 即可解决跨域问题 。(http 阅读全文
posted @ 2019-11-02 15:47 武卡卡 阅读(1487) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2019-11-02 14:23 武卡卡 阅读(4742) 评论(0) 推荐(0) 编辑
摘要:created() { var that=this axios.get('http://jsonplaceholder.typicode.com/todos') .then(function (res) { // handle success // console.log(res); that.to 阅读全文
posted @ 2019-11-02 13:09 武卡卡 阅读(623) 评论(0) 推荐(0) 编辑
摘要:<template> <div> <form @submit.prevent="addTodo"> <input v-model="title" type="text" name="title" placeholder="请添加代办事项..."> <input type="submit" value 阅读全文
posted @ 2019-11-02 08:10 武卡卡 阅读(3316) 评论(0) 推荐(1) 编辑
摘要:1,在 methods 中 <template> <div> <form @submit="addTodo"> <input v-model="title" type="text" name="title"> <input type="submit" value="添加" class="btn"> 阅读全文
posted @ 2019-11-02 07:49 武卡卡 阅读(2237) 评论(0) 推荐(0) 编辑
摘要:<script> export default { name:'header' // 不要使用内置或保留的HTML元素 , 改为Header或者置或保留的HTML元素之外的名称就好了 } </script> <script> export default { name:'header' // 不要使 阅读全文
posted @ 2019-11-02 07:06 武卡卡 阅读(4371) 评论(0) 推荐(2) 编辑
摘要:通过应用生成器工具 express-generator 可以快速创建一个应用的骨架。 express-generator 包含了 express 命令行工具。通过如下命令即可安装: -h 参数可以列出所有可用的命令行参数: 例如,如下命令创建了一个名称为 myapp 的 Express 应用。此应用 阅读全文
posted @ 2019-11-01 20:11 武卡卡 阅读(260) 评论(0) 推荐(0) 编辑
摘要:1,子子组件 TodoItem.vue <template> <div class="todo-item" :class="{'is-complete':todo.completed}"> <p> <input type="checkbox" @change="markComplete"> {{to 阅读全文
posted @ 2019-11-01 13:52 武卡卡 阅读(527) 评论(0) 推荐(0) 编辑
摘要:<template> <div id="app"> <div v-for="todo in todos" :key="todo.id"> <div>{{todo}} <button @click="handleDelete(todo.id)">删除</button></div> </div> </d 阅读全文
posted @ 2019-11-01 13:20 武卡卡 阅读(875) 评论(0) 推荐(0) 编辑

喜欢请打赏

扫描二维码打赏

支付宝打赏

点击右上角即可分享
微信分享提示