sfsoul / personalBlog

思考与总结
MIT License
1 stars 0 forks source link

Vue-cli 梳理 #23

Open sfsoul opened 3 years ago

sfsoul commented 3 years ago
sfsoul commented 3 years ago

移动端适配

sfsoul commented 3 years ago

Axios 的统一封装

sfsoul commented 3 years ago

全局的遮罩层

sfsoul commented 3 years ago

过滤器 filter

sfsoul commented 3 years ago

自定义指令 directive

sfsoul commented 3 years ago

函数防抖与节流在 Vue 中的使用

sfsoul commented 3 years ago

Vue.config.js 配置

sfsoul commented 3 years ago

devServer 配置

sfsoul commented 3 years ago

Vue watch 高级用法

sfsoul commented 3 years ago

css 实现文字多行截断

sfsoul commented 3 years ago

Vue 文件中如何使用less变量

function resolve(dir) {
  return path.join(__dirname, dir)
}

module.exports = {
    chainWebpack: config => { // CLI内部webpack配置
        const types = ['vue-modules', 'vue', 'normal-modules', 'normal']
        types.forEach(type => addStyleResource(config.module.rule('less').oneOf(type)))
    }
}

// 全局样式 变量、函数
function addStyleResource (rule) {
  rule.use('style-resource')
    .loader('style-resources-loader')
    .options({
      patterns: [
        resolve('src/styles/variables.less'),
        resolve('src/styles/mixin.less'),
      ],
    })
}
sfsoul commented 3 years ago

Vue中的 htmlWebpackPlugin.options.title

sfsoul commented 3 years ago

限制input输入字数

sfsoul commented 3 years ago

position: sticky

sfsoul commented 3 years ago

postcss-pxtorem 使第三方UI库不进行转换

sfsoul commented 3 years ago

无限加载

sfsoul commented 3 years ago

如何动态地设置页面title

sfsoul commented 3 years ago

axios 跨域处理 & 让请求带上 cookie

sfsoul commented 3 years ago

Vue 中引入图片路径的几种方式

sfsoul commented 3 years ago

Vue 设置浏览器icon图标

sfsoul commented 3 years ago

Vue 项目中出现 Loading CSS Chunk Failed 问题

sfsoul commented 3 years ago

Vue-cli 脚手架如何引入iconfont图标