node 压缩解压缩

var fs=require("fs"); var zlib=require("zlib"); // fs.createReadStream("1.txt").pipe(zlib.createGzip()).pipe(fs.createWriteStream("1.txt.gz"));//压缩 fs.c...

跨静态页面传递json数据

今天又遇到了需要跨静态页面间传递json数据的方法,总结总结,都有其优缺点, 1.利用cookie传值的方法:(注意有缺点, 当存储数据比较多的时候就可能出现丢失,取得的cookie为空,所以提前估量数据量 ) function setCookie(c_name, value, expiredays)...

vue 使用vuex

app.vue: <template> <div id="app"> <input type="button" value="增加" @click="add"> <h1>{{count}}</h1> </div> </template> <script> import {mapGetters,mapAc...

Vue使用css和css-loader

首先cnpm i css css-loader file-loader -D 之后再webpackconfig里面加入: { test: /\.css$/, loader: 'style-loader!css-loader' }, { test: /\.(eot|svg|ttf|woff|woff2)$...

vue路由

模板news页: <div> <router-link to="/home" tag="li" >主页</router-link> <router-link to="/list">列表</router-link> </div> <div class="container"> <router-view><...

Vue简单搜索

<div id="box"> <input type="text" v-model="show" > <transition-group name="fade" enter-active-class="animated zoomInLeft" leave-active-class="animated z...