Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue-cli 梳理 #23

Open
sfsoul opened this issue Oct 14, 2020 · 22 comments
Open

Vue-cli 梳理 #23

sfsoul opened this issue Oct 14, 2020 · 22 comments

Comments

@sfsoul
Copy link
Owner

sfsoul commented Oct 14, 2020

@sfsoul
Copy link
Owner Author

sfsoul commented Oct 26, 2020

移动端适配

@sfsoul
Copy link
Owner Author

sfsoul commented Oct 27, 2020

Axios 的统一封装

@sfsoul
Copy link
Owner Author

sfsoul commented Oct 28, 2020

全局的遮罩层

@sfsoul
Copy link
Owner Author

sfsoul commented Oct 28, 2020

过滤器 filter

@sfsoul
Copy link
Owner Author

sfsoul commented Oct 28, 2020

自定义指令 directive

@sfsoul
Copy link
Owner Author

sfsoul commented Oct 28, 2020

@sfsoul
Copy link
Owner Author

sfsoul commented Oct 28, 2020

Vue.config.js 配置

@sfsoul
Copy link
Owner Author

sfsoul commented Oct 28, 2020

devServer 配置

@sfsoul
Copy link
Owner Author

sfsoul commented Oct 29, 2020

Vue watch 高级用法

@sfsoul
Copy link
Owner Author

sfsoul commented Nov 2, 2020

css 实现文字多行截断

@sfsoul
Copy link
Owner Author

sfsoul commented Nov 2, 2020

Vue 文件中如何使用less变量

  • 下载 less:npm i less-loader less --save-dev;
  • 再下载 style-resources-loader:npm i style-resources-loader --save-dev;
  • 在 vue.config.js 进行如下配置:
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
Copy link
Owner Author

sfsoul commented Nov 4, 2020

@sfsoul
Copy link
Owner Author

sfsoul commented Nov 4, 2020

@sfsoul
Copy link
Owner Author

sfsoul commented Nov 4, 2020

position: sticky

@sfsoul
Copy link
Owner Author

sfsoul commented Nov 4, 2020

@sfsoul
Copy link
Owner Author

sfsoul commented Nov 5, 2020

无限加载

@sfsoul
Copy link
Owner Author

sfsoul commented Nov 12, 2020

如何动态地设置页面title

@sfsoul
Copy link
Owner Author

sfsoul commented Nov 23, 2020

@sfsoul
Copy link
Owner Author

sfsoul commented Nov 24, 2020

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

@sfsoul
Copy link
Owner Author

sfsoul commented Dec 11, 2020

Vue 设置浏览器icon图标

@sfsoul
Copy link
Owner Author

sfsoul commented Dec 21, 2020

@sfsoul
Copy link
Owner Author

sfsoul commented Jan 8, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant