You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
spirit2020 8aa94e8ac6 添加工具 3 years ago
api 封装网络请求方式 3 years ago
common 添加工具 3 years ago
components/cp-button init 3 years ago
hybrid/html update. 3 years ago
keystore update. 3 years ago
locale init 3 years ago
pages init 3 years ago
static init 3 years ago
uni_modules/mescroll-uni 增加mescroll 3 years ago
uview-ui init 3 years ago
.gitignore update. 3 years ago
App.vue 添加工具类 3 years ago
README.md 添加工具 3 years ago
app.config.js dev 3 years ago
index.html init 3 years ago
main.js 添加工具类 3 years ago
manifest.json init 3 years ago
pages.json init 3 years ago
uni.scss init 3 years ago

README.md

uni-tpl

没有用到的不要引入, 否则会被打包进项目

分包

pages 下的一级目录

国际化

https://uniapp.dcloud.io/collocation/i18n?id=pages

npm install i18n --save 

main.js

import en from './locale/en.json'
import zhHans from './locale/zh-Hans.json'

const messages = {
    en,
    'zh-Hans': zhHans,
}

let i18nConfig = {
  locale: uni.getLocale(),
  messages
}

import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)

const app = new Vue({
  i18n,
  ...App
})

组件库

  • uview-ui
  • mescroll
    import {MescrollMixin, MescrollCompMixin} from '@/common/utils/mescroll-map'
    

api

一个页面需要多个模块

import {LoginApi, UserApi} from '@/api'

一个页面只需一个模块

import LoginApi from '@/api/modules/Login'