1 Star 0 Fork 0

XBSS丶 / film

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

film

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Customize configuration

See Configuration Reference.

插件/组件库

vant 组件库

安装

  npm i vant -S

main.js 中引入

import Vant from 'vant'
import 'vant/lib/index.css'

amfe-flexible 适配插件

安装

npm i -S amfe-flexible

main.js 中引入

import 'amfe-flexible'

index.html 添加 meta

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover">

postcss-pxtorem px转rem插件

安装

npm install postcss-pxtorem@5.1.1[如果版本过高二报错,可安装指定版本] -D

项目根目录创建 postcss.config.js 并配置如下

module.exports = {
  plugins: {
    'postcss-pxtorem': {
      rootValue: 37.5,
      propList: ['*'],
    },
  }
}

项目根目的 .browserslistrc 中加入

Android >= 4.0
iOS >= 8

vue-feedback 点击反馈插件

安装

npm install vue-feedback --save

使用

// 基本使用
<div v-fb></div>
// 自定义样式
<div v-fb="{cls: 'clickable'}"></div>

参考手册:https://github.com/hjc22/vue-feedback 参考页面:src/view/bonus-record

全局 scss 变量

1、在 styles 目录新建 scss 文件

$primary: #ee0a24;
$success: #07c160;

:export {
  primary: $primary;
  success: $success;
}

2、vue.config.js 中添加如下配置

module.exports = {
  css: {
    loaderOptions: {
      sass: {
        prependData: `@import "@/styles/variables.scss";`
      }
    }
  }
}

3、组件 scss 中使用

<style lang="scss" scoped>
.div {
  color: $primary
}
</style>

4、组件 js 中使用

<script>
import variables from '@/styles/variables.scss'

export default {
  props: {
    color: {
      type: String,
      default: variables.primary
    }
  }
};
</script>

5、组件 template 中使用

<template>
  <div :style="color: variables.primary"></div>
</template>

<script>
import variables from '@/styles/variables.scss'
export default {
  computed: {
    variables() {
      return variables
    },
  },
};
</script>

空文件

简介

暂无描述 展开 收起
Vue 等 4 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/bashisan/film.git
git@gitee.com:bashisan/film.git
bashisan
film
film
master

搜索帮助