09 2020 档案

摘要:通过vue-cli创建的脚手架项目, 配置.browserslistrc 即可实现CSS3/ES678 语法兼容 ie >= 8 Firefox >= 3.5 chrome >= 35 opera >= 11.5 阅读全文
posted @ 2020-09-30 15:45 凉城i 阅读(3625) 评论(0) 推荐(0)
摘要:postcss-pxtorem 用于自动帮助将px转换成rem,所以在编写代码时候,直接按照设计图px即可 module.exports = { plugins: { autoprefixer: {}, 'postcss-pxtorem': { rootValue: 100, // 根元素字体大小 阅读全文
posted @ 2020-09-30 15:39 凉城i 阅读(3396) 评论(0) 推荐(0)
摘要:module.exports = { /* 部署应用包的基本URL, 不设置可能会出现打包后项目找不到资源问题 */ publicPath: './', configureWebpack: { module: { rules: [ { test: /\.(html)$/, exclude: /nod 阅读全文
posted @ 2020-09-30 15:26 凉城i 阅读(831) 评论(0) 推荐(0)
摘要:<template> <div class="menu"> <div :class="index==menuIndex?'active':'menu-box'" v-for="(item,index) in menu" :key="index" @click="setMenu(index)"> <r 阅读全文
posted @ 2020-09-27 15:51 凉城i 阅读(803) 评论(0) 推荐(0)
摘要:方法一:直接在文字后面+“|” 方法二: border-right来实现(不可操作竖线高度) margin-right: 15px; padding-right: 15px; border-right: 1px solid #6598c7; 方法三:伪类实现 .content { &:after { 阅读全文
posted @ 2020-09-16 10:54 凉城i 阅读(4074) 评论(0) 推荐(0)
摘要:module.exports = { presets: [ ['@vue/cli-plugin-babel/preset', { modules: false }] ], plugins: [ [ 'component', { libraryName: 'element-ui', styleLibr 阅读全文
posted @ 2020-09-05 17:34 凉城i 阅读(579) 评论(0) 推荐(0)
摘要:<input v-model="sth" /> // 等同于 <input :value="sth" @input="sth = $event.target.value" /> v-model只不过是一个语法糖而已,真正的实现靠的还是 v-bind:绑定响应式数据 触发oninput 事件并传递数据 阅读全文
posted @ 2020-09-04 00:35 凉城i 阅读(314) 评论(0) 推荐(0)
摘要:1.安装脚手架 npm i @vue/cli -g 2.脚手架创建项目 vue create myproject 3.创建项目完成后,手动在项目根目录创建vue.config.js module.exports = { devServer: { host: 'localhost', port: 80 阅读全文
posted @ 2020-09-03 04:02 凉城i 阅读(1148) 评论(0) 推荐(0)
摘要:String.prototype.myTrim = function () { return this replace(/^\s+/, '').replcae(/\s+$/, '') } 阅读全文
posted @ 2020-09-01 02:52 凉城i 阅读(229) 评论(0) 推荐(0)