摘要: 1、安装vuex扩展 : npm install vuex 2、在componets目录下新建 store.js 文件 属性值介绍: state:定义初始值 getters:获取变量值 mutations: 定义触发状态对象方法,传入state整个对象,在页面中触发时使用this.$store.co 阅读全文
posted @ 2017-08-04 12:19 L狗哥 阅读(354) 评论(0) 推荐(0) 编辑
摘要: 1、在 src/router/index.js 里定义新的路由数据 HTML5 history 模式配置 Apache Nginx Nodejs Express 2、在需要跳转的页面添加代码 阅读全文
posted @ 2017-08-03 19:02 L狗哥 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1、在components 目录下新建Test.vue 文件 2、在Hell.vue里添加代码引用Test.vue 运行结果: 阅读全文
posted @ 2017-08-03 18:02 L狗哥 阅读(535) 评论(0) 推荐(0) 编辑
摘要: 1、需要nodejs 环境支持。 2、安装 cnpm 替换npm镜像为国内镜像 3、全局安装vue 4、新建项目 5、安装依赖并运行 6、打包 7、目录结构 阅读全文
posted @ 2017-08-03 17:48 L狗哥 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 1、log_format 普通格式 2、log_format JSON 格式 3、指定日志格式 4、字段释义 字段 说明 阅读全文
posted @ 2017-08-02 21:19 L狗哥 阅读(8414) 评论(0) 推荐(0) 编辑
摘要: 1、使用 show processlist; 查询当前进程; 找到Command 状态是query 并且Time 时间很长的id kill掉即可 2、select * from information_schema.innodb_trx; MySQL 5.5版本以上才可以用此方法,5.5版本以下会没 阅读全文
posted @ 2017-07-30 23:02 L狗哥 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1、查询 2、新增 3、修改 4、删除 阅读全文
posted @ 2017-07-14 11:31 L狗哥 阅读(902) 评论(0) 推荐(0) 编辑
摘要: 1、在 assets/AppAsset 里定义方法 2、在view里调用 阅读全文
posted @ 2017-07-14 11:23 L狗哥 阅读(2360) 评论(0) 推荐(0) 编辑
摘要: 1. enablePrettyUrl yii2默认不支持类似 http://<domain>/site/error 的url格式,需要在config.php中启用 enablePrettyUrl 属性 2. 配置suffix 实现伪静态 *.html 需要在 config.php中配置 urlMan 阅读全文
posted @ 2017-07-13 11:52 L狗哥 阅读(1159) 评论(0) 推荐(0) 编辑
摘要: 场景描述: 自定义wp主题中,添加了个关于页面(about.php) 。 目的: 顺利访问 http://<domain>/about.php 解决方案:在主题的functions.php文件中, 自定义重写规则 rewrite_rules Step 1. 添加 generate_rewrite_r 阅读全文
posted @ 2017-07-13 11:31 L狗哥 阅读(843) 评论(0) 推荐(0) 编辑