uni-app, Vue, SASS, Vue CLI, Webpack, miniprogram-ci, etc.
Studio | UED |
---|---|
Asako Art Studio, a laboratory and studio dedicated to visual imaging and engineering research (scan the QR code or search on WeChat below)
Miniprogram | Home | Creative | Works | About |
---|---|---|---|---|
One Page Calendar • Beautiful Wallpaper Library RSS
AI selects global visual and photographic art to accompany you in a good mood every day?
Miniprogram | Home | About | Creator | AI Daily |
---|---|---|---|---|
Enjoy reading about exquisite life and DIY your home?
Miniprogram | Home | About |
---|---|---|
A user experience design language that combines talent (standardization) and appearance (professionalism)
Miniprogram | Home | Components | About |
---|---|---|---|
storehouse | Baidu version | Headline version | WeChat version |
---|---|---|---|
Intranet |
VSCode + Mini Program IDE + HbuilderX (optional, can be switched with cli by modifying the directory) VSCode development, HbuilderX real-time compilation (visual menu operation), real-time preview of Mini Program IDE cd projectName => git clone this project => Based on this Project business development;
Tools, first download the development tools (IDE) of each platform https://uniapp.dcloud.io/quickstart
Import the current project (uni-app type) in Hbuilder, modify or update the current configuration, manifest.json and pages.json (especially pay attention to adding the appid of the corresponding platform, and configure the request and downloadFile domain names in the developer backend);
Configure the plug-in. Click Plug-in Management in the menu bar to install the plug-ins and loaders required for the current project (scss, babel, es6, etc.), yarn (step 3 in no particular order);
Menu bar [Run] to the corresponding development platform. If you are not used to the current IDE, you can switch to VSCode for synchronous development and real-time compilation;
Continuous integration reference document: https://ask.dcloud.net.cn/article/35750
The vue-cli version is updated more frequently. When you need to use some new features, you can convert it to the vue-cli project.
step:
The mini program direction will have different products of main package, sub-package, and plug-in (subsequent support), and the h5 direction will have different routing mode (history, hash) configurations.
1: Main package mode
2: Sub-package mode. In HBuilderX 3.1.0+, click the menu of the release applet, check the release mixed sub-package, fill in the name of the sub-package directory, and after packaging, copy the corresponding directory file to the existing applet. You need to add it yourself. Note on the page or subcontracting configuration in the original mini program app.json:
Related environment product paths can be customized in vue.config.js
1: Main package mode yarn build:mp-weixin
2: Sub-package mode
Note: npm run can be replaced with yarn.
├── uniapp-scaffold # your project name
│ ├── /config/ # 业务基础/全局/国际化/皮肤配置等
│ ├── /components/ # 公共组件库: 基础 + 部分高复用业务组件
│ ├── /mixins/ # index已默认全局混入,其他可按需业务自行注入
│ ├── /pages/ # 主要业务页面(index.vue + index.scss)
│ ├── /services/ # 服务Service,建议按照业务模块拆分
│ ├── /styles/ # 全局样式 => core + mixin + function + theme...
│ ├── /store/ # 数据流(globalApp、业务数据等)
│ ├── /static/ # 项目图片、图标、字体及静态资源CDN、tabBar等
│ ├── /utils/ # lib、request、tool等
│ ├── /node_modules/ # npm依赖包
│ ├── /uni_modules/ # 存放[uni_module](/uni_modules)规范的插件
│ ├── /unpackage/ # 编译后多个平台的源码(dev开发版、dist生产版)
│ ├── /wxcomponents/ # 存放小程序组件的目录
│ ├── /platforms/ # 存放各平台专用页面的目录,[详见](https://uniapp.dcloud.io/platform?id=整体目录条件编译)
│ │──page.json # 配置页面路由、导航条、选项卡等页面类信息
│ │──manifest.json # 配置应用名称、appid、logo、版本等打包信息
│ │──main.js # Vue初始化入口文件
│ │──App.vue # 应用配置,用来配置App全局样式以及监听应用生命周期
?
AdUI:Asako(浅子,作者的Home) Design(用户体验设计中心)旗下的UI组件库
一款集才华(规范)与颜值(专业)的用户体验设计组件库(基于微信视觉规范进一步封装的组件)
全局组件(@/components目录下)已开启easycom模式,可以不用像传统vue组件那样安装、引用、注册,可以直接在业务中使用(ad-xxx)
* 基础组件
+ ad-button
+ ad-avatar
+ ad-icon
+ ad-badge
+ ad-mask(遮罩,可自定义slot content及position)
+ ad-tag
+ ad-tips
+ ad-actionsheet(浮动面板,支持更强大的配置和淡入淡出动画)
+ ad-card
+ ad-spin(支持svg、img、css loading)
+ ad-calender(日历)
+ ad-text-animate(文字渐变动画)
+ ad-countup(数字递增及动画)
+ ad-tree(树结构)
* 业务组件
+ ad-author(一条数据/一个作者的丰富场景,头像、title、描述、额外插槽等)
+ ad-skeleton(骨架屏)
+ ad-status(状态结果页)
+ ad-swiper(3D画廊幻灯片)
+ ad-sticky(滑动固定器)
+ ad-navbar(自定义导航栏)
+ ad-clock(计时器)
+ ad-interact(互动)
+ ad-map(个性化地图)
+ Poster(分享海报插件/wxcomponents/wxa-plugin-canvas)
+ more...
* 图表组件
+ ad-charts(支持个性化配置config/charts,类型支持折线图、柱状图、饼图等10+种)
// 使用方式
可以在任何视图层页面以ad-xxx引用
// 使用方式
* services层(新建yourpage.js)
import config from "@/config";
import http from "@/utils/request";
const { request } = http;
/* request层做了统一api host拼接url,若覆盖只需自定义baseUrl或在config/index.js自定义hostKey,业务层传参使用 */
// 某推荐列表
export function getAlbumListSvc(query = {}) {
return request({
// hostKey: 'monkey' // @/config hosts下配置对应key(自定义host时推荐方式,优于baseUrl)
// baseUrl: config.yourkey, // 自定义请求host,不指定会走默认api
url: "/your-api-path",
method: "post", // 'get'可省略
data: {
page: 1,
size: 10
...query
}
});
}
* pages业务层
import * as Services from "@/services/home";
export default {
data() {
return {
entry: []
}
},
onLoad(options) {
// 若需要参数可从options取然后传入query
this.getAlbumList(query = {})
},
methods() {
async getAlbumList() {
let res = await Services.getAlbumListSvc();
if(res.ok) {
this.entry = res.data;
}
}
}
}
If you have relevant questions and feedback, please go to Github to file an issue. The developer will be notified as soon as possible and follow up on the issue in a timely manner; if you have business or technical design cooperation intentions, or daily communication intentions, you can contact the developers below , remark uniapp community, join the group;
Creator | Group | Sponsor |
---|---|---|
MIT