摘要:
<template> <div> list1Son <div class="ck-cont"> <div class="ck-cont-t0"> <div v-for="(navItem,index) in nav" :key="index" class="ck-cont-t" @click="na 阅读全文
摘要:
一、props / $emit 没什么说的,vue官网就够了,easy,没有所谓的奇淫技巧 二、 $children / $parent this.$parent为父组件的实例对象,this.$children为子组件的实例对象 奇淫技巧: 1>当一个组件内有多个子组件或者一个子组件的父级有多个兄弟 阅读全文
摘要:
先来目录层级 store/index import Vue from 'vue' import Vuex from 'vuex' import moduleA from './module/a' import moduleB from './module/b' Vue.use(Vuex) const 阅读全文
摘要:
vue data里的数据 listThematicChecked: [], subjectList: [ { menu: '辖区态势图', img: '/static/images/icon-tuli/tuli_xiaqutaishitu_icon.png', isCheck: false, fou 阅读全文
摘要:
可以看出来DOM结构 最主要的为 阅读全文
摘要:
目前在vue-cli2运用 webpack.base.conf.js new webpack.ProvidePlugin({ jQuery: 'jquery', $: 'jquery', Gdata: ['@/api/index.js', 'default'], RequestApi: resolv 阅读全文
摘要:
new UglifyJsPlugin({ uglifyOptions: { compress: { warnings: false, //过滤console.log-start drop_console: true, pure_funcs: ['console.log'] //过滤console.log-end } }, sourceMap: config.build.productionSour 阅读全文
摘要:
正则表达式中,需要转义的字符: * . ? + $ ^ [ ] ( ) { } | \ / let reg = /\d+/g let str = 'ad/23/dfww/454/6' 1. reg.test(str) > true 如果字符串中存在正则表达式的匹配结果则返回true否则返回false 阅读全文
摘要:
此坑比较大 场景: vue子组件拿父组件的传值,[{},{}]结构的,父组件为2014-02-04 03:55:33,子组件需要过滤改变为02-04 03:55:33 正常写法为注释 但是这样会出现一个问题,可能是相同内存的递归???反正会一直截取字符串,不明白为什么 但是我用了一个新值去放这个处理 阅读全文
摘要:
vuex模块化结构目录 1>store>index.js 2>store>system>actions.js 2>store>system>getters.js 3>store>system>mutations.js 4>store>system>mutation-types.js 5>store> 阅读全文