├── App.vue ├── README.md ├── components └── nx-search │ └── nx-search.vue ├── env.js ├── main.js ├── manifest.json ├── nxTemp ├── apis │ └── login.js ├── cloudFun │ └── index.js ├── config │ ├── index.config.js │ └── requestConfig.js ├── filter │ └── index.js ├── index.js ├── request │ ├── ajax.js │ ├── core │ │ ├── request.js │ │ └── utils.js │ ├── index.js │ ├── request.md │ └── upload │ │ ├── qiniuUploader.js │ │ ├── upload.js │ │ └── utils.js ├── router │ ├── index.js │ └── uni-simple-router.js ├── store │ ├── index.js │ └── modules │ │ └── user.js ├── utils │ ├── share.js │ └── tools.js └── wechat │ └── wechat.js ├── package-lock.json ├── package.json ├── pages.json ├── pages ├── index │ └── index.vue ├── login │ ├── agreement.vue │ ├── forget.vue │ ├── login.vue │ └── reg.vue ├── me │ └── index.vue └── public │ └── 404.vue ├── static ├── colorui │ ├── animation.css │ ├── components │ │ └── cu-custom.vue │ ├── icon.css │ └── main.css ├── images │ ├── login │ │ ├── logo.jpg │ │ ├── ty0.png │ │ └── ty1.png │ └── tabbar │ │ ├── tab-home-selected.png │ │ ├── tab-home.png │ │ ├── tab-mine-selected.png │ │ ├── tab-mine.png │ │ ├── tab_home_01.png │ │ ├── tab_home_02.png │ │ ├── tab_user_01.png │ │ └── tab_user_02.png └── style │ ├── base.scss │ └── mixin │ ├── flex.scss │ ├── hr.scss │ ├── position-absolute.scss │ ├── price-before.scss │ ├── text-overflow.scss │ └── triangle.scss ├── template.h5.html ├── uni.scss ├── uniCloud-aliyun └── cloudfunctions │ └── app │ ├── config.js │ ├── controller │ └── member.js │ ├── index.js │ └── package.json ├── uni_modules ├── u-ajax │ ├── README.md │ ├── changelog.md │ ├── js_sdk │ │ ├── index.d.ts │ │ ├── index.js │ │ └── lib │ │ │ ├── adapters │ │ │ ├── Request.js │ │ │ └── http.js │ │ │ ├── core │ │ │ ├── Ajax.js │ │ │ ├── InterceptorManager.js │ │ │ ├── dispatchRequest.js │ │ │ └── handleCancel.js │ │ │ ├── defaults.js │ │ │ ├── helpers │ │ │ ├── buildURL.js │ │ │ ├── detachConfig.js │ │ │ ├── isCallback.js │ │ │ └── mergeConfig.js │ │ │ └── utils.js │ └── package.json ├── uni-cloud-router │ ├── changelog.md │ ├── package.json │ ├── readme.md │ └── uniCloud │ │ └── cloudfunctions │ │ └── common │ │ └── uni-cloud-router │ │ ├── LICENSE │ │ ├── dist │ │ └── index.js │ │ └── package.json ├── uni-config-center │ ├── changelog.md │ ├── package.json │ ├── readme.md │ └── uniCloud │ │ └── cloudfunctions │ │ └── common │ │ └── uni-config-center │ │ ├── index.js │ │ ├── package.json │ │ └── uni-id │ │ └── config.json └── uni-id │ ├── changelog.md │ ├── package.json │ ├── readme.md │ └── uniCloud │ └── cloudfunctions │ └── common │ └── uni-id │ ├── LICENSE.md │ ├── index.js │ └── package.json ├── uview-ui ├── LICENSE ├── README.md ├── changelog.md ├── components │ ├── u--form │ │ └── u--form.vue │ ├── u--image │ │ └── u--image.vue │ ├── u--input │ │ └── u--input.vue │ ├── u--text │ │ └── u--text.vue │ ├── u--textarea │ │ └── u--textarea.vue │ ├── u-action-sheet │ │ ├── props.js │ │ └── u-action-sheet.vue │ ├── u-album │ │ ├── props.js │ │ └── u-album.vue │ ├── u-alert │ │ ├── props.js │ │ └── u-alert.vue │ ├── u-avatar-group │ │ ├── props.js │ │ └── u-avatar-group.vue │ ├── u-avatar │ │ ├── props.js │ │ └── u-avatar.vue │ ├── u-back-top │ │ ├── props.js │ │ └── u-back-top.vue │ ├── u-badge │ │ ├── props.js │ │ └── u-badge.vue │ ├── u-button │ │ ├── nvue.scss │ │ ├── props.js │ │ ├── u-button.vue │ │ └── vue.scss │ ├── u-calendar │ │ ├── header.vue │ │ ├── month.vue │ │ ├── props.js │ │ ├── u-calendar.vue │ │ └── util.js │ ├── u-car-keyboard │ │ ├── props.js │ │ └── u-car-keyboard.vue │ ├── u-cell-group │ │ ├── props.js │ │ └── u-cell-group.vue │ ├── u-cell │ │ ├── props.js │ │ └── u-cell.vue │ ├── u-checkbox-group │ │ ├── props.js │ │ └── u-checkbox-group.vue │ ├── u-checkbox │ │ ├── props.js │ │ └── u-checkbox.vue │ ├── u-circle-progress │ │ ├── props.js │ │ └── u-circle-progress.vue │ ├── u-code-input │ │ ├── props.js │ │ └── u-code-input.vue │ ├── u-code │ │ ├── props.js │ │ └── u-code.vue │ ├── u-col │ │ ├── props.js │ │ └── u-col.vue │ ├── u-collapse-item │ │ ├── props.js │ │ └── u-collapse-item.vue │ ├── u-collapse │ │ ├── props.js │ │ └── u-collapse.vue │ ├── u-column-notice │ │ ├── props.js │ │ └── u-column-notice.vue │ ├── u-count-down │ │ ├── props.js │ │ ├── u-count-down.vue │ │ └── utils.js │ ├── u-count-to │ │ ├── props.js │ │ └── u-count-to.vue │ ├── u-datetime-picker │ │ ├── props.js │ │ └── u-datetime-picker.vue │ ├── u-divider │ │ ├── props.js │ │ └── u-divider.vue │ ├── u-dropdown-item │ │ ├── props.js │ │ └── u-dropdown-item.vue │ ├── u-dropdown │ │ ├── props.js │ │ └── u-dropdown.vue │ ├── u-empty │ │ ├── props.js │ │ └── u-empty.vue │ ├── u-form-item │ │ ├── props.js │ │ └── u-form-item.vue │ ├── u-form │ │ ├── props.js │ │ └── u-form.vue │ ├── u-gap │ │ ├── props.js │ │ └── u-gap.vue │ ├── u-grid-item │ │ ├── props.js │ │ └── u-grid-item.vue │ ├── u-grid │ │ ├── props.js │ │ └── u-grid.vue │ ├── u-icon │ │ ├── icons.js │ │ ├── props.js │ │ └── u-icon.vue │ ├── u-image │ │ ├── props.js │ │ └── u-image.vue │ ├── u-index-anchor │ │ ├── props.js │ │ └── u-index-anchor.vue │ ├── u-index-item │ │ ├── props.js │ │ └── u-index-item.vue │ ├── u-index-list │ │ ├── props.js │ │ └── u-index-list.vue │ ├── u-input │ │ ├── props.js │ │ └── u-input.vue │ ├── u-keyboard │ │ ├── props.js │ │ └── u-keyboard.vue │ ├── u-line-progress │ │ ├── props.js │ │ └── u-line-progress.vue │ ├── u-line │ │ ├── props.js │ │ └── u-line.vue │ ├── u-link │ │ ├── props.js │ │ └── u-link.vue │ ├── u-list-item │ │ ├── props.js │ │ └── u-list-item.vue │ ├── u-list │ │ ├── props.js │ │ └── u-list.vue │ ├── u-loading-icon │ │ ├── props.js │ │ └── u-loading-icon.vue │ ├── u-loading-page │ │ ├── props.js │ │ └── u-loading-page.vue │ ├── u-loadmore │ │ ├── props.js │ │ └── u-loadmore.vue │ ├── u-modal │ │ ├── props.js │ │ └── u-modal.vue │ ├── u-navbar │ │ ├── props.js │ │ └── u-navbar.vue │ ├── u-no-network │ │ ├── props.js │ │ └── u-no-network.vue │ ├── u-notice-bar │ │ ├── props.js │ │ └── u-notice-bar.vue │ ├── u-notify │ │ ├── props.js │ │ └── u-notify.vue │ ├── u-number-box │ │ ├── props.js │ │ └── u-number-box.vue │ ├── u-number-keyboard │ │ ├── props.js │ │ └── u-number-keyboard.vue │ ├── u-overlay │ │ ├── props.js │ │ └── u-overlay.vue │ ├── u-parse │ │ ├── node │ │ │ └── node.vue │ │ ├── parser.js │ │ ├── props.js │ │ └── u-parse.vue │ ├── u-picker-column │ │ ├── props.js │ │ └── u-picker-column.vue │ ├── u-picker │ │ ├── props.js │ │ └── u-picker.vue │ ├── u-popup │ │ ├── props.js │ │ └── u-popup.vue │ ├── u-radio-group │ │ ├── props.js │ │ └── u-radio-group.vue │ ├── u-radio │ │ ├── props.js │ │ └── u-radio.vue │ ├── u-rate │ │ ├── props.js │ │ └── u-rate.vue │ ├── u-read-more │ │ ├── props.js │ │ └── u-read-more.vue │ ├── u-row-notice │ │ ├── props.js │ │ └── u-row-notice.vue │ ├── u-row │ │ ├── props.js │ │ └── u-row.vue │ ├── u-safe-bottom │ │ ├── props.js │ │ └── u-safe-bottom.vue │ ├── u-scroll-list │ │ ├── nvue.js │ │ ├── other.js │ │ ├── props.js │ │ ├── scrollWxs.wxs │ │ └── u-scroll-list.vue │ ├── u-search │ │ ├── props.js │ │ └── u-search.vue │ ├── u-skeleton │ │ ├── props.js │ │ └── u-skeleton.vue │ ├── u-slider │ │ ├── mpother.js │ │ ├── mpwxs.js │ │ ├── mpwxs.wxs │ │ ├── nvue - ╕▒▒╛.js │ │ ├── nvue.js │ │ ├── props.js │ │ └── u-slider.vue │ ├── u-status-bar │ │ ├── props.js │ │ └── u-status-bar.vue │ ├── u-steps-item │ │ ├── props.js │ │ └── u-steps-item.vue │ ├── u-steps │ │ ├── props.js │ │ └── u-steps.vue │ ├── u-sticky │ │ ├── props.js │ │ └── u-sticky.vue │ ├── u-subsection │ │ ├── props.js │ │ └── u-subsection.vue │ ├── u-swipe-action-item │ │ ├── index - backup.wxs │ │ ├── index.wxs │ │ ├── nvue - backup.js │ │ ├── nvue.js │ │ ├── props.js │ │ ├── u-swipe-action-item.vue │ │ └── wxs.js │ ├── u-swipe-action │ │ ├── props.js │ │ └── u-swipe-action.vue │ ├── u-swiper-indicator │ │ ├── props.js │ │ └── u-swiper-indicator.vue │ ├── u-swiper │ │ ├── props.js │ │ └── u-swiper.vue │ ├── u-switch │ │ ├── props.js │ │ └── u-switch.vue │ ├── u-tabbar-item │ │ ├── props.js │ │ └── u-tabbar-item.vue │ ├── u-tabbar │ │ ├── props.js │ │ └── u-tabbar.vue │ ├── u-table │ │ ├── props.js │ │ └── u-table.vue │ ├── u-tabs-item │ │ ├── props.js │ │ └── u-tabs-item.vue │ ├── u-tabs │ │ ├── props.js │ │ └── u-tabs.vue │ ├── u-tag │ │ ├── props.js │ │ └── u-tag.vue │ ├── u-td │ │ ├── props.js │ │ └── u-td.vue │ ├── u-text │ │ ├── props.js │ │ ├── u-text.vue │ │ └── value.js │ ├── u-textarea │ │ ├── props.js │ │ └── u-textarea.vue │ ├── u-toast │ │ ├── props.js │ │ └── u-toast.vue │ ├── u-toolbar │ │ ├── props.js │ │ └── u-toolbar.vue │ ├── u-tooltip │ │ ├── clipboard.min.js │ │ ├── props.js │ │ └── u-tooltip.vue │ ├── u-tr │ │ ├── props.js │ │ └── u-tr.vue │ ├── u-transition │ │ ├── nvue.ani-map.js │ │ ├── props.js │ │ ├── transition.js │ │ ├── u-transition.vue │ │ └── vue.ani-style.scss │ ├── u-upload │ │ ├── mixin.js │ │ ├── props.js │ │ ├── u-upload.vue │ │ └── utils.js │ └── uview-ui │ │ └── uview-ui.vue ├── index.js ├── index.scss ├── libs │ ├── config │ │ ├── color.js │ │ ├── config.js │ │ ├── props.js │ │ ├── props │ │ │ ├── actionSheet.js │ │ │ ├── album.js │ │ │ ├── alert.js │ │ │ ├── avatar.js │ │ │ ├── avatarGroup.js │ │ │ ├── backtop.js │ │ │ ├── badge.js │ │ │ ├── button.js │ │ │ ├── calendar.js │ │ │ ├── carKeyboard.js │ │ │ ├── cell.js │ │ │ ├── cellGroup.js │ │ │ ├── checkbox.js │ │ │ ├── checkboxGroup.js │ │ │ ├── circleProgress.js │ │ │ ├── code.js │ │ │ ├── codeInput.js │ │ │ ├── col.js │ │ │ ├── collapse.js │ │ │ ├── collapseItem.js │ │ │ ├── columnNotice.js │ │ │ ├── countDown.js │ │ │ ├── countTo.js │ │ │ ├── datetimePicker.js │ │ │ ├── divider.js │ │ │ ├── empty.js │ │ │ ├── form.js │ │ │ ├── formItem.js │ │ │ ├── gap.js │ │ │ ├── grid.js │ │ │ ├── gridItem.js │ │ │ ├── icon.js │ │ │ ├── image.js │ │ │ ├── indexAnchor.js │ │ │ ├── indexList.js │ │ │ ├── input.js │ │ │ ├── keyboard.js │ │ │ ├── line.js │ │ │ ├── lineProgress.js │ │ │ ├── link.js │ │ │ ├── list.js │ │ │ ├── listItem.js │ │ │ ├── loadingIcon.js │ │ │ ├── loadingPage.js │ │ │ ├── loadmore.js │ │ │ ├── modal.js │ │ │ ├── navbar.js │ │ │ ├── noNetwork.js │ │ │ ├── noticeBar.js │ │ │ ├── notify.js │ │ │ ├── numberBox.js │ │ │ ├── numberKeyboard.js │ │ │ ├── overlay.js │ │ │ ├── parse.js │ │ │ ├── picker.js │ │ │ ├── popup.js │ │ │ ├── radio.js │ │ │ ├── radioGroup.js │ │ │ ├── rate.js │ │ │ ├── readMore.js │ │ │ ├── row.js │ │ │ ├── rowNotice.js │ │ │ ├── scrollList.js │ │ │ ├── search.js │ │ │ ├── section.js │ │ │ ├── skeleton.js │ │ │ ├── slider.js │ │ │ ├── statusBar.js │ │ │ ├── steps.js │ │ │ ├── stepsItem.js │ │ │ ├── sticky.js │ │ │ ├── subsection.js │ │ │ ├── swipeAction.js │ │ │ ├── swipeActionItem.js │ │ │ ├── swiper.js │ │ │ ├── swipterIndicator.js │ │ │ ├── switch.js │ │ │ ├── tabbar.js │ │ │ ├── tabbarItem.js │ │ │ ├── tabs.js │ │ │ ├── tag.js │ │ │ ├── text.js │ │ │ ├── textarea.js │ │ │ ├── toast.js │ │ │ ├── toolbar.js │ │ │ ├── tooltip.js │ │ │ ├── transition.js │ │ │ └── upload.js │ │ └── zIndex.js │ ├── css │ │ ├── color.scss │ │ ├── common.scss │ │ ├── components.scss │ │ ├── flex.scss │ │ ├── h5.scss │ │ ├── mixin.scss │ │ ├── mp.scss │ │ ├── nvue.scss │ │ └── vue.scss │ ├── function │ │ ├── colorGradient.js │ │ ├── debounce.js │ │ ├── digit.js │ │ ├── index.js │ │ ├── platform.js │ │ ├── test.js │ │ └── throttle.js │ ├── luch-request │ │ ├── adapters │ │ │ └── index.js │ │ ├── core │ │ │ ├── InterceptorManager.js │ │ │ ├── Request.js │ │ │ ├── buildFullPath.js │ │ │ ├── defaults.js │ │ │ ├── dispatchRequest.js │ │ │ ├── mergeConfig.js │ │ │ └── settle.js │ │ ├── helpers │ │ │ ├── buildURL.js │ │ │ ├── combineURLs.js │ │ │ └── isAbsoluteURL.js │ │ ├── index.d.ts │ │ ├── index.js │ │ ├── utils.js │ │ └── utils │ │ │ └── clone.js │ ├── mixin │ │ ├── button.js │ │ ├── mixin.js │ │ ├── mpMixin.js │ │ ├── mpShare.js │ │ ├── openType.js │ │ ├── style.js │ │ └── touch.js │ └── util │ │ ├── async-validator.js │ │ ├── calendar.js │ │ ├── dayjs.js │ │ ├── emitter.js │ │ └── route.js ├── package.json └── theme.scss └── vue.config.js /App.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /env.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 全局配置文件 3 | */ 4 | export const BASE_URL = 'https://zxjc1688.com' //后台根域名 https://zxjc1688.com 5 | export const debug = false //是否是调试 6 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import App from "./App"; 3 | import { 4 | router, 5 | RouterMount 6 | } from "@/nxTemp/router"; 7 | import store from "@/nxTemp/store"; 8 | import uView from "@/uview-ui"; 9 | import nxTemp from "@/nxTemp"; 10 | 11 | 12 | async function bootstrap() { 13 | App.mpType = "app"; 14 | //引入路由 15 | Vue.use(router); 16 | // 引入全局uView 17 | Vue.use(uView); 18 | // 加载nxTemp 19 | Vue.use(nxTemp); 20 | 21 | const app = new Vue({ 22 | store, 23 | ...App 24 | }); 25 | // #ifdef H5 26 | RouterMount(app, router, "#app"); 27 | // #endif 28 | // #ifndef H5 29 | app.$mount(); 30 | // #endif 31 | } 32 | 33 | bootstrap(); 34 | -------------------------------------------------------------------------------- /nxTemp/apis/login.js: -------------------------------------------------------------------------------- 1 | import request from "@/nxTemp/request/ajax.js"; 2 | // 用户登录 3 | export function postLogin(data) { 4 | return request({ 5 | url: '/user/login', 6 | method: 'POST', 7 | data 8 | }) 9 | } 10 | -------------------------------------------------------------------------------- /nxTemp/cloudFun/index.js: -------------------------------------------------------------------------------- 1 | 2 | import { 3 | debug 4 | } from '@/env.js' 5 | import $tools from '@/nxTemp/utils/tools' 6 | 7 | let func = {}; 8 | 9 | func = new Proxy(func, { 10 | get: function(target, key) { 11 | return new FuncContext(key); 12 | } 13 | }); 14 | 15 | function FuncContext(name) { 16 | this.funcname = name; 17 | this.response = { 18 | code: 200, 19 | datas: {}, 20 | msg: '' 21 | } 22 | } 23 | 24 | FuncContext.prototype = { 25 | funcname: '', // 云函数名称 26 | response: {} // 统一响应格式 27 | }; 28 | 29 | /** 30 | * 调用云函数 31 | * action controller 函数路径 32 | * data controller 数据参数 33 | * */ 34 | FuncContext.prototype.call = function(action, data) { 35 | uni.showNavigationBarLoading(); 36 | return uniCloud.callFunction({ 37 | name: this.funcname, 38 | data: { 39 | action, 40 | data 41 | } 42 | }).then(res => { 43 | if (debug) { 44 | console.log(this.funcname + '/' + action + ' call', res); 45 | } 46 | if (res.result) { 47 | this.response.code = res.result.code === 0 ? 200 : res.result.code; 48 | if (this.response.code != 200) { 49 | this.response.msg = res.result.msg || res.result.message; 50 | } else { 51 | this.response.msg = res.result.msg 52 | } 53 | this.response.datas = res.result.datas || res.result; 54 | return Promise.resolve(this.response); 55 | } 56 | 57 | return Promise.reject(res); 58 | }).catch(err => { 59 | if (debug) { 60 | console.log(this.table + ' call catch', err); 61 | $tools.showModal(JSON.stringify(err)); 62 | } 63 | return Promise.reject(err); 64 | }).finally(res => { 65 | uni.hideNavigationBarLoading(); 66 | }); 67 | } 68 | 69 | export default func; 70 | -------------------------------------------------------------------------------- /nxTemp/config/index.config.js: -------------------------------------------------------------------------------- 1 | const CONFIG = { 2 | //开发环境配置 3 | development: { 4 | loginTitleTxt: "欢迎使用XXX", // 登录页标题 5 | copyrightTxt: "XXXv1.0", // 版本信息 6 | assetsPath: "http://cdn.com/img", // 静态资源路径 7 | baseUrl: "http://192.168.1.7:8002", 8 | tokenKey: "WECHAT_TRADE", // 登录标识 9 | testOpenId: "oEjRxwy7jL9PgG0kWeb4VcDTZEas", // 小程序测试openId 10 | forcedLogin: false, // touristMode游客模式下APP是否强制用户登录 场景:当用户进入登录页面后无法后退。 11 | touristMode: true, // APP是否开启游客模式, 游客模式true开启:APP打开后可以进入首页和无权限的页面,游客模式false关闭:APP打开后首先需要登录才能进入, 此时forcedLogin配置项失效。 12 | }, 13 | 14 | //生产环境配置 15 | production: { 16 | loginTitleTxt: "欢迎使用XXX", // 登录页标题 17 | copyrightTxt: "XXXv1.0", // 版本信息 18 | assetsPath: "/static/img", // 静态资源路径 19 | baseUrl: "http://192.168.1.7:8002", 20 | tokenKey: "WECHAT_TRADE", // 登录标识 21 | testOpenId: "oEjRxwy7jL9PgG0kWeb4VcDTZEas", // 小程序测试openId 22 | forcedLogin: false, // touristMode游客模式下APP是否强制用户登录 场景:当用户进入登录页面后无法后退。 23 | touristMode: true, // APP是否开启游客模式, 游客模式true开启:APP打开后可以进入首页和无权限的页面,游客模式false关闭:APP打开后首先需要登录才能进入, 此时forcedLogin配置项失效。 24 | } 25 | 26 | } 27 | export default CONFIG[process.env.NODE_ENV]; 28 | -------------------------------------------------------------------------------- /nxTemp/filter/index.js: -------------------------------------------------------------------------------- 1 | 2 | // 自动添加省略号 3 | export function autoAddPoints(address) { 4 | if (address && address.length > 15) { 5 | return '...'.padStart(16, address); 6 | } else { 7 | return address; 8 | } 9 | 10 | } 11 | 12 | -------------------------------------------------------------------------------- /nxTemp/index.js: -------------------------------------------------------------------------------- 1 | import store from '@/nxTemp/store'; 2 | import wechat from '@/nxTemp/wechat/wechat'; 3 | import tools from '@/nxTemp/utils/tools' 4 | import cloudFun from '@/nxTemp/cloudFun'// 云函数方法 5 | import nxShare from '@/nxTemp/utils/share.js' 6 | import * as filter from '@/nxTemp/filter'; 7 | const install = Vue => { 8 | // global filter 9 | Object.keys(filter).forEach(item => { 10 | Vue.filter(item, filter[item]); 11 | }); 12 | // 挂载函数 13 | Vue.prototype.$store = store; 14 | Vue.prototype.$tools = tools; 15 | Vue.prototype.$cloudFun = cloudFun; 16 | // event Bus 用于无关系组件间的通信。 17 | Vue.prototype.$bus = new Vue() 18 | Vue.mixin(nxShare); 19 | } 20 | 21 | export async function init(options) { 22 | // #ifdef MP-WEIXIN 23 | // 检测小程序更新(如果从朋友圈场景进入则无此API) 24 | options.scene !== 1154 && wechat.checkMiniProgramUpdate(); 25 | // #endif 26 | } 27 | 28 | export default { 29 | install 30 | } 31 | -------------------------------------------------------------------------------- /nxTemp/request/ajax.js: -------------------------------------------------------------------------------- 1 | import ajax from '@/uni_modules/u-ajax/js_sdk' 2 | import { 3 | BASE_URL 4 | } from '@/env.js' 5 | // 创建请求实例 6 | const instance = ajax.create({ 7 | // 默认配置 8 | baseURL:BASE_URL 9 | }) 10 | 11 | // 添加请求拦截器 12 | instance.interceptors.request.use( 13 | config => { 14 | // 在发送请求前做些什么 15 | console.log('发送请求前', config) 16 | return config 17 | }, 18 | error => { 19 | // 对请求错误做些什么 20 | console.log('发请求错误', error) 21 | return Promise.reject(error) 22 | } 23 | ) 24 | 25 | // 添加响应拦截器 26 | instance.interceptors.response.use( 27 | response => { 28 | // 对响应数据做些什么 29 | console.log('响应成功后', response) 30 | return response 31 | }, 32 | error => { 33 | // 对响应错误做些什么 34 | console.log('响应错误后', error) 35 | return Promise.reject(error) 36 | } 37 | ) 38 | 39 | export const install = Vue => { 40 | // 如果您是像我下面这样挂载在 Vue 原型链上,则通过 this.$ajax 调用 41 | Vue.prototype.$ajax = instance 42 | } 43 | 44 | export default instance 45 | -------------------------------------------------------------------------------- /nxTemp/request/index.js: -------------------------------------------------------------------------------- 1 | /***************纯粹的数据请求(如果使用这种可以删除掉fileUpload.js)******************/ 2 | // import request from "./core/request.js"; 3 | // export default request; 4 | 5 | /********数据请求同时继承了文件上传(包括七牛云上传)************/ 6 | import upload from "./upload/upload.js"; 7 | export default upload; -------------------------------------------------------------------------------- /nxTemp/router/index.js: -------------------------------------------------------------------------------- 1 | // 路由 2 | import { 3 | RouterMount, 4 | createRouter 5 | } from './uni-simple-router.js' 6 | import store from '@/nxTemp/store' 7 | const router = createRouter({ 8 | platform: process.env.VUE_APP_PLATFORM, 9 | applet: { 10 | animationDuration: 0 //默认 300ms 11 | }, 12 | routerErrorEach: ({ 13 | type, 14 | msg 15 | }) => { 16 | switch (type) { 17 | case 3: // APP退出应用 18 | // #ifdef APP-PLUS 19 | router.$lockStatus = false; 20 | uni.showModal({ 21 | title: '提示', 22 | content: '您确定要退出应用吗?', 23 | success: function(res) { 24 | if (res.confirm) { 25 | plus.runtime.quit(); 26 | } 27 | } 28 | }); 29 | // #endif 30 | break; 31 | case 2: 32 | case 0: 33 | router.$lockStatus = false; 34 | break; 35 | default: 36 | break; 37 | } 38 | 39 | }, 40 | // 通配符,非定义页面,跳转404 41 | routes: [...ROUTES, 42 | { 43 | path: '*', 44 | redirect: (to) => { 45 | return { 46 | name: '404' 47 | } 48 | } 49 | }, 50 | ] 51 | }); 52 | 53 | //全局路由前置守卫 54 | router.beforeEach((to, from, next) => { 55 | // 权限控制登录 56 | next() 57 | // // 有两个个判断条件,一个是token,还有一个路由元信息 58 | // let userInfo = Boolean(uni.getStorageSync('userInfo')); 59 | // // 权限控制 60 | // if (to.meta && to.meta.auth && !userInfo) {//没有登录信息执行登录操作 61 | // } else { 62 | // next() 63 | // } 64 | }); 65 | 66 | export { 67 | router, 68 | RouterMount 69 | } 70 | -------------------------------------------------------------------------------- /nxTemp/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import Vuex from "vuex"; 3 | 4 | Vue.use(Vuex); 5 | const files = require.context("./modules", false, /\.js$/); 6 | let modules = { 7 | state: {}, 8 | mutations: {}, 9 | actions: {} 10 | }; 11 | 12 | files.keys().forEach((key) => { 13 | Object.assign(modules.state, files(key)["state"]); 14 | Object.assign(modules.mutations, files(key)["mutations"]); 15 | Object.assign(modules.actions, files(key)["actions"]); 16 | }); 17 | const store = new Vuex.Store(modules); 18 | export default store; 19 | 20 | -------------------------------------------------------------------------------- /nxTemp/store/modules/user.js: -------------------------------------------------------------------------------- 1 | // 用户数据模块 2 | import {router} from '@/nxTemp/router/index.js' 3 | const TOKEN = uni.getStorageSync("token") || ""; 4 | const OPENID = uni.getStorageSync("openId") || ""; 5 | const USER_INFO = uni.getStorageSync("userInfo") || {}; 6 | 7 | export const state = { 8 | // 前端token 9 | token: TOKEN, 10 | // 用户openid 11 | openId: OPENID, 12 | // 用户信息 头像 昵称 13 | userInfo: USER_INFO 14 | } 15 | 16 | export const actions = { 17 | async setUserData({ 18 | state, 19 | commit 20 | }, data) { 21 | commit('setStateAttr', { 22 | key: 'userInfo', 23 | val: data 24 | }) 25 | uni.setStorageSync('userInfo', data); 26 | }, 27 | // 登录过期 重新登录 28 | reLogin({ 29 | commit 30 | }, info) { 31 | commit('setStateAttr', { 32 | key: 'token', 33 | val: '' 34 | }) 35 | uni.setStorageSync("token", ''); 36 | router.push({ 37 | path: 'pages/login/login' 38 | }); 39 | } 40 | } 41 | 42 | export const mutations = { 43 | //更新state数据 44 | setStateAttr(state, param) { 45 | if (param instanceof Array) { 46 | for (let item of param) { 47 | state[item.key] = item.val; 48 | } 49 | } else { 50 | state[param.key] = param.val; 51 | } 52 | } 53 | 54 | } 55 | 56 | export const getters = { 57 | // 用户是否登录 58 | hasLogin: state => { 59 | if (state.token) { 60 | return true; 61 | } else { 62 | return false 63 | } 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /nxTemp/utils/tools.js: -------------------------------------------------------------------------------- 1 | export default { 2 | /** 3 | * 图片处理-预览图片 4 | * @param {Array} urls - 图片列表 5 | * @param {Number} current - 首个预览下标 6 | */ 7 | previewImage(urls = [], current = 0) { 8 | uni.previewImage({ 9 | urls: urls, 10 | current: current, 11 | indicator: 'default', 12 | loop: true, 13 | fail(err) { 14 | console.log('previewImage出错', urls, err) 15 | }, 16 | }) 17 | }, 18 | /** 19 | * 打电话 20 | * @param {String} phoneNumber - 数字字符串 21 | */ 22 | callPhone(phoneNumber = '') { 23 | let num = phoneNumber.toString() 24 | uni.makePhoneCall({ 25 | phoneNumber: num, 26 | fail(err) { 27 | console.log('makePhoneCall出错', err) 28 | }, 29 | }); 30 | }, 31 | 32 | /** 33 | * @description 弹窗提示 showModal 34 | */ 35 | showModal(content, callback) { 36 | uni.showModal({ 37 | title: '提示', 38 | content: content, 39 | showCancel: false, 40 | success(res) { 41 | if (res.confirm) { 42 | if (typeof callback === 'function') { 43 | callback(); 44 | } 45 | } else if (res.cancel) {} 46 | } 47 | }) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /nxTemp/wechat/wechat.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // #ifdef MP-WEIXIN 3 | // 小程序更新 4 | checkMiniProgramUpdate() { 5 | if (uni.canIUse("getUpdateManager")) { 6 | const updateManager = uni.getUpdateManager(); 7 | updateManager.onCheckForUpdate(function(res) { 8 | // 请求完新版本信息的回调 9 | if (res.hasUpdate) { 10 | updateManager.onUpdateReady(function() { 11 | uni.showModal({ 12 | title: "更新提示", 13 | content: "新版本已经准备好,是否重启应用?", 14 | success: function(res) { 15 | if (res.confirm) { 16 | // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 17 | updateManager.applyUpdate(); 18 | } 19 | } 20 | }); 21 | }); 22 | updateManager.onUpdateFailed(function() { 23 | // 新的版本下载失败 24 | uni.showModal({ 25 | title: "已经有新版本了哟~", 26 | content: "新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~" 27 | }); 28 | }); 29 | } 30 | }); 31 | } 32 | }, 33 | // #endif 34 | 35 | }; 36 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "uni-read-pages": { 6 | "version": "1.0.5", 7 | "resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz", 8 | "integrity": "sha512-GkrrZ0LX0vn9R5k6RKEi0Ez3Q3e2vUpjXQ8Z6/K/d28KudI9ajqgt8WEjQFlG5EPm1K6uTArN8LlqmZTEixDUA==" 9 | }, 10 | "uni-simple-router": { 11 | "version": "2.0.7", 12 | "resolved": "https://registry.npmjs.org/uni-simple-router/-/uni-simple-router-2.0.7.tgz", 13 | "integrity": "sha512-8FKv5dw7Eoonm0gkO8udprrxzin0fNUI0+AvIphFkFRH5ZmP5ZWJ2pvnWzb2NiiqQSECTSU5VSB7HhvOSwD5eA==" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "uni-read-pages": "^1.0.5", 4 | "uni-simple-router": "^2.0.1" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /pages/index/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 31 | 32 | 35 | -------------------------------------------------------------------------------- /pages/login/agreement.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 24 | 25 | 28 | -------------------------------------------------------------------------------- /pages/me/index.vue: -------------------------------------------------------------------------------- 1 | 9 | 27 | 28 | 31 | -------------------------------------------------------------------------------- /pages/public/404.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /static/colorui/components/cu-custom.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 66 | 67 | 70 | -------------------------------------------------------------------------------- /static/images/login/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/static/images/login/logo.jpg -------------------------------------------------------------------------------- /static/images/login/ty0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/static/images/login/ty0.png -------------------------------------------------------------------------------- /static/images/login/ty1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/static/images/login/ty1.png -------------------------------------------------------------------------------- /static/images/tabbar/tab-home-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/static/images/tabbar/tab-home-selected.png -------------------------------------------------------------------------------- /static/images/tabbar/tab-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/static/images/tabbar/tab-home.png -------------------------------------------------------------------------------- /static/images/tabbar/tab-mine-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/static/images/tabbar/tab-mine-selected.png -------------------------------------------------------------------------------- /static/images/tabbar/tab-mine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/static/images/tabbar/tab-mine.png -------------------------------------------------------------------------------- /static/images/tabbar/tab_home_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/static/images/tabbar/tab_home_01.png -------------------------------------------------------------------------------- /static/images/tabbar/tab_home_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/static/images/tabbar/tab_home_02.png -------------------------------------------------------------------------------- /static/images/tabbar/tab_user_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/static/images/tabbar/tab_user_01.png -------------------------------------------------------------------------------- /static/images/tabbar/tab_user_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/static/images/tabbar/tab_user_02.png -------------------------------------------------------------------------------- /static/style/mixin/hr.scss: -------------------------------------------------------------------------------- 1 | // 添加分割线 参数:位置,间隔 2 | @mixin hr($direction: top, $margin: 0){ 3 | position: absolute; 4 | z-index: 3; 5 | @if ($direction == top) { // 右三角 6 | top: 0; 7 | left: $margin; 8 | right: $margin; 9 | } @else if ($direction == bottom){ 10 | bottom: 0; 11 | left: $margin; 12 | right: $margin; 13 | } @else if ($direction == left){ 14 | top: $margin; 15 | bottom: $margin; 16 | left: 0; 17 | } @else if ($direction == right){ 18 | top: $margin; 19 | bottom: $margin; 20 | right: 0; 21 | } 22 | height: 1upx; 23 | content: ''; 24 | transform: scaleY(.5); 25 | background-color: #c8c7cc; 26 | } -------------------------------------------------------------------------------- /static/style/mixin/position-absolute.scss: -------------------------------------------------------------------------------- 1 | // 绝对定位 参数:上,右,下,左 2 | @mixin position-absolute($top: null, $right: null, $bottom: null, $left: null) { 3 | position: absolute; 4 | @if ($left!="" and $left!=null) { 5 | left: $left; 6 | } 7 | @if ($right!="" and $right!=null) { 8 | right: $right; 9 | } 10 | @if ($top!="" and $top!=null) { 11 | top: $top; 12 | } 13 | @if ($bottom!="" and $bottom!=null) { 14 | bottom: $bottom; 15 | } 16 | } -------------------------------------------------------------------------------- /static/style/mixin/price-before.scss: -------------------------------------------------------------------------------- 1 | // 价格¥前加 2 | %__priceBefore{ 3 | font-size: $uni-font-size-sm; 4 | content: "¥"; 5 | } -------------------------------------------------------------------------------- /static/style/mixin/text-overflow.scss: -------------------------------------------------------------------------------- 1 | // 文本格式化超出省略号 参数:宽度,单行/多行 2 | @mixin text-overflow($width: null, $row: 1){ 3 | @if $width != null{ 4 | width: $width; 5 | } 6 | @if $row == 1{ 7 | white-space: nowrap; 8 | text-overflow: ellipsis; 9 | overflow: hidden; 10 | } @else { 11 | display: -webkit-box; 12 | -webkit-box-orient: vertical; 13 | -webkit-line-clamp: $row; 14 | overflow: hidden; 15 | } 16 | } -------------------------------------------------------------------------------- /static/style/mixin/triangle.scss: -------------------------------------------------------------------------------- 1 | // 画三角形 参数:宽度,朝向,颜色 2 | @mixin triangle($width: 10px, $direction: top, $color: $uni-color-main) { 3 | border: $width solid transparent; 4 | @if ($direction == top) { // 上三角 5 | border-bottom-color: $color; 6 | } 7 | @if ($direction == bottom) { // 下三角 8 | border-top-color: $color; 9 | } 10 | @if ($direction == left) { // 左三角 11 | border-right-color: $color; 12 | } 13 | @if ($direction == right) { // 右三角 14 | border-left-color: $color; 15 | } 16 | } -------------------------------------------------------------------------------- /template.h5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | <%= htmlWebpackPlugin.options.title %> 10 | 11 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 |
28 | 29 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /uniCloud-aliyun/cloudfunctions/app/config.js: -------------------------------------------------------------------------------- 1 | function initPlugins(config) { 2 | const fs = require('fs') 3 | const path = require('path') 4 | const pluginDir = path.resolve(__dirname, 'plugin') 5 | let files 6 | try { 7 | files = fs.readdirSync(pluginDir) 8 | } catch (e) {} 9 | if (!files || files.length === 0) { 10 | return config 11 | } 12 | const EXTNAME = '.js' 13 | const configPlugins = config.plugin || {} 14 | files.forEach(file => { 15 | if (path.extname(file) !== EXTNAME) { 16 | return 17 | } 18 | let pluginOptions 19 | const pluginId = file.replace(EXTNAME, '') 20 | const configPlugin = configPlugins[pluginId] 21 | if (configPlugin === false) { 22 | return 23 | } 24 | if (configPlugin) { 25 | if (configPlugin.enable === false) { 26 | return 27 | } 28 | if (configPlugin.options) { 29 | pluginOptions = configPlugin.options 30 | } 31 | } 32 | const plugin = require(path.resolve(pluginDir, file))(pluginOptions) 33 | plugin && plugin.onInit(config) 34 | }) 35 | return config 36 | } 37 | 38 | module.exports = initPlugins({ 39 | baseDir: __dirname, // 项目根目录 40 | plugin: {}, // 插件配置,可设置是否启用某插件及插件所有参数 41 | middleware: [ 42 | 43 | ] 44 | }) 45 | -------------------------------------------------------------------------------- /uniCloud-aliyun/cloudfunctions/app/controller/member.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const uidObj = require('uni-id'); 4 | const { 5 | Controller 6 | } = require('uni-cloud-router'); 7 | 8 | 9 | module.exports = class MemberController extends Controller { 10 | // 微信小程序登录 11 | async loginByWeixin() { 12 | console.log('this.ctx.data888888888',this.ctx.data); 13 | let response = { 14 | code: 1, 15 | member: {}, 16 | msg: null 17 | }; 18 | try { 19 | this.ctx.data.role = ['member']; 20 | const res = await uidObj.loginByWeixin(this.ctx.data); 21 | 22 | let member = { 23 | member_name: res.username || res.userInfo.nickname, 24 | member_access_token: res.token, 25 | member_nickname: res.userInfo.nickname || res.username, 26 | member_gender: res.userInfo.gender || 0, 27 | member_weixin_headimg: res.userInfo.avatar || '', 28 | member_city: res.userInfo.comment || '', 29 | member_openid: res.openid || '', 30 | } 31 | 32 | response.code = 0; 33 | response.user = res; 34 | 35 | } catch (e) { 36 | //TODO handle the exception 37 | response.msg = e; 38 | console.log('catch', e); 39 | } 40 | 41 | return response; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /uniCloud-aliyun/cloudfunctions/app/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const Router = require("uni-cloud-router").Router; // 引入 Router 3 | const router = new Router(require("./config.js")); // 根据 config 初始化 Router 4 | exports.main = async (event, context) => { 5 | return router.serve(event, context); // 由 Router 接管云函数 6 | }; 7 | -------------------------------------------------------------------------------- /uniCloud-aliyun/cloudfunctions/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "app", 3 | "dependencies": { 4 | "uni-cloud-router": "file:../../../uni_modules/uni-cloud-router/uniCloud/cloudfunctions/common/uni-cloud-router", 5 | "uni-id": "file:../../../uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id" 6 | }, 7 | "extensions": { 8 | "uni-cloud-jql": {} 9 | } 10 | } -------------------------------------------------------------------------------- /uni_modules/u-ajax/README.md: -------------------------------------------------------------------------------- 1 | ## ✨ 特性 2 | 3 | - 支持 Promise API 4 | - 支持 Typescript 开发 5 | - 拦截请求和响应 6 | - 自定义配置请求实例 7 | - 多种 Method 方法请求 8 | - 支持 RequestTask 操作 9 | 10 | ## 🍟 文档 11 | 12 | **[uniajax.ponjs.com](https://uniajax.ponjs.com)** 13 | 14 | ## 🥗 安装 15 | 16 | **插件市场** 17 | 18 | 在插件市场右上角选择 `使用HBuilder X 导入插件` 或者 `下载插件ZIP` 19 | 20 | **NPM** 21 | 22 | ```bash 23 | # 如果您的项目是HBuilder X创建的,根目录又没有package.json文件的话,请先执行如下命令: 24 | # npm init -y 25 | 26 | # 安装 27 | npm install uni-ajax 28 | 29 | # 更新 30 | npm update uni-ajax 31 | ``` 32 | 33 | ## 🥐 实例 34 | 35 | 新建 `ajax.js` 文件(文件名可自定义)用于处理拦截器、接口根地址、默认配置等,详细配置请[查看文档](https://uniajax.ponjs.com/instance/create.html) 36 | 37 | ```JavaScript 38 | // ajax.js 39 | 40 | import ajax from 'uni-ajax' // 引入 uni-ajax 模块 41 | 42 | const instance = ajax.create(config) // 创建请求实例 43 | 44 | instance.interceptors.request.use(onFulfilled, onRejected) // 添加请求拦截器 45 | instance.interceptors.response.use(onFulfilled, onRejected) // 添加响应拦截器 46 | 47 | export default instance // 导出创建后的实例 48 | ``` 49 | 50 | ## 🥪 使用 51 | 52 | **请求方法** 53 | 54 | ```JavaScript 55 | // 常规方法 56 | ajax() 57 | 58 | // 请求方法别名 59 | ajax.get() 60 | ajax.post() 61 | ajax.put() 62 | ajax.delete() 63 | ``` 64 | 65 | **RequestTask** 66 | 67 | ```JavaScript 68 | const request = ajax() // 请求方法每项皆可 69 | 70 | request.abort() // 中断请求任务 71 | request.onHeadersReceived(callback) // 监听 HTTP Response Header 事件 72 | request.offHeadersReceived(callback) // 取消监听 HTTP Response Header 事件 73 | ``` 74 | 75 | **其他属性方法** 76 | 77 | ```JavaScript 78 | ajax.defaults // 全局默认配置 79 | ajax.config // 当前实例配置 80 | ajax.getURL(config) // 获取实例请求地址 81 | ``` 82 | -------------------------------------------------------------------------------- /uni_modules/u-ajax/changelog.md: -------------------------------------------------------------------------------- 1 | ## 2.4.4(2022-04-01) 2 | - 修复 params 参数被转成 JSON 字符串问题 [详情](https://uniajax.ponjs.com/api/config#params) 3 | ## 2.4.3(2022-02-24) 4 | - 兼容支付宝小程序不支持 `class extends Promise` 错误 5 | - 去除多余的 defaults 默认值 [详情](https://uniajax.ponjs.com/api#defaults) 6 | 7 | ## 2.4.2(2022-02-01) 8 | - 修改 params 配置参数 [详情](https://uniajax.ponjs.com/api/config#params) 9 | - 新增 query 配置参数 [详情](https://uniajax.ponjs.com/api/config#query) 10 | - 优化 create 方法的 TypeScript 参数类型 11 | 12 | ## 2.4.1(2022-01-15) 13 | 14 | - 全新的获取实例配置机制 [详情](https://uniajax.ponjs.com/guide/instance#实例配置) 15 | - 新增全局默认配置 [详情](https://uniajax.ponjs.com/guide/instance#全局配置) 16 | - 新增获取请求地址方法 [详情](https://uniajax.ponjs.com/api#geturl) 17 | - 去除获取 baseURL 和 origin 属性 18 | 19 | ## 2.4.0(2022-01-15) 20 | 21 | **全新版本发布** 22 | 注意 2.4.x 版本与 2.3.x 以下版本存在些许差异! 23 | -------------------------------------------------------------------------------- /uni_modules/u-ajax/js_sdk/index.js: -------------------------------------------------------------------------------- 1 | import Ajax from './lib/core/Ajax' 2 | 3 | const ajax = Ajax() 4 | 5 | ajax.create = function create(instanceConfig) { 6 | return Ajax(instanceConfig) 7 | } 8 | 9 | export default ajax 10 | -------------------------------------------------------------------------------- /uni_modules/u-ajax/js_sdk/lib/adapters/http.js: -------------------------------------------------------------------------------- 1 | export default function adapter(config, Request) { 2 | return new Promise((resolve, reject) => { 3 | // 判断是否被取消请求 4 | if (Request.aborted) { 5 | return reject({ 6 | config, 7 | errMsg: 'request:fail abort' 8 | }) 9 | } 10 | 11 | // 发起请求,并挂载 RequestTask 12 | Request.task = uni.request({ 13 | ...config, 14 | complete: result => { 15 | // 根据状态码判断要执行的触发的状态 16 | const response = { config, ...result } 17 | !config.validateStatus || config.validateStatus(result.statusCode) 18 | ? resolve(response) 19 | : reject(response) 20 | } 21 | }) 22 | 23 | // 请求类内部判断是否执行监听 HTTP Response Header 事件 24 | Request.onHeadersReceived() 25 | Request.offHeadersReceived() 26 | 27 | // 根据配置的 xhr 属性执行获取 RequestTask 28 | config.xhr?.(Request.task, config) 29 | }) 30 | } 31 | -------------------------------------------------------------------------------- /uni_modules/u-ajax/js_sdk/lib/core/InterceptorManager.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 拦截器类 3 | */ 4 | export default class InterceptorManager { 5 | handlers = [] 6 | 7 | constructor() { 8 | this.forEach = { 9 | asc: fn => { 10 | for (let i = 0, l = this.handlers.length; i < l; i++) { 11 | this.handlers[i] !== null && fn(this.handlers[i]) 12 | } 13 | }, 14 | desc: fn => { 15 | for (let i = this.handlers.length - 1; i >= 0; i--) { 16 | this.handlers[i] !== null && fn(this.handlers[i]) 17 | } 18 | } 19 | } 20 | } 21 | 22 | use(fulfilled, rejected) { 23 | this.handlers.push({ 24 | fulfilled, 25 | rejected 26 | }) 27 | return this.handlers.length - 1 28 | } 29 | eject(id) { 30 | if (this.handlers[id]) { 31 | this.handlers[id] = null 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /uni_modules/u-ajax/js_sdk/lib/core/dispatchRequest.js: -------------------------------------------------------------------------------- 1 | import buildURL from '../helpers/buildURL' 2 | import isCallback from '../helpers/isCallback' 3 | import { forEach, isPlainObject, merge } from '../utils' 4 | import { HEADER } from '../defaults' 5 | 6 | /** 7 | * 派发请求方法 8 | * @param {*} Request 请求类 9 | * @returns {Promise} 执行请求方法Promise 10 | */ 11 | export default function dispatchRequest(Request) { 12 | return config => { 13 | // 拼接 url 14 | config.url = buildURL(config) 15 | 16 | // 请求方法转大写 17 | config.method = (config.method || 'get').toUpperCase() 18 | 19 | // 调整 header 优先级 20 | config.header = merge( 21 | config.header.common, 22 | config.header[config.method.toLowerCase()], 23 | config.header 24 | ) 25 | 26 | // 清除多余的请求头 27 | forEach(HEADER, h => isPlainObject(config.header[h]) && delete config.header[h]) 28 | 29 | // 清除回调函数 30 | forEach(config, (val, key) => isCallback(key) && delete config[key]) 31 | 32 | // 执行请求方法 33 | return config.adapter(config, Request) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /uni_modules/u-ajax/js_sdk/lib/core/handleCancel.js: -------------------------------------------------------------------------------- 1 | const CANCEL = Symbol('$$cancel') 2 | 3 | function hasCancel(target) { 4 | return target === null || target === undefined 5 | ? false 6 | : Object.prototype.hasOwnProperty.call(target, CANCEL) 7 | } 8 | 9 | /** 10 | * 派发请求拒绝方法,处理发起请求前错误,取消执行请求,并防止进入响应拦截器 11 | * @param {*} reason 错误原因 12 | * @returns {Promise} 封装了 CANCEL 的失败对象 13 | */ 14 | export function dispatchCancel(reason) { 15 | return Promise.reject({ [CANCEL]: reason }) 16 | } 17 | 18 | /** 19 | * 拦截失败对象 20 | * @param {Function} rejected 响应错误拦截器 21 | */ 22 | export function interceptCancel(rejected) { 23 | // 判断发起请求前是否发生错误,如果发生错误则不执行后面的响应错误拦截器 24 | return ( 25 | rejected && (response => (hasCancel(response) ? Promise.reject(response) : rejected(response))) 26 | ) 27 | } 28 | 29 | /** 30 | * 分离失败对象 31 | * @param {*} response 封装了 CANCEL 的失败对象 32 | */ 33 | export function detachCancel(error) { 34 | return Promise.reject(hasCancel(error) ? error[CANCEL] : error) 35 | } 36 | -------------------------------------------------------------------------------- /uni_modules/u-ajax/js_sdk/lib/defaults.js: -------------------------------------------------------------------------------- 1 | import adapter from './adapters/http' 2 | import { forEach } from './utils' 3 | 4 | export const METHOD = ['get', 'post', 'put', 'delete', 'connect', 'head', 'options', 'trace'] 5 | export const HEADER = ['common', ...METHOD] 6 | 7 | const defaults = { 8 | adapter, 9 | header: {}, 10 | method: 'GET', 11 | // timeout: 60000, 12 | // dataType: 'json', 13 | // responseType: 'text', 14 | // sslVerify: true, 15 | // withCredentials: false, 16 | // firstIpv4: false, 17 | validateStatus: statusCode => statusCode >= 200 && statusCode < 300 18 | } 19 | 20 | forEach(HEADER, h => (defaults.header[h] = {})) 21 | 22 | export default defaults 23 | -------------------------------------------------------------------------------- /uni_modules/u-ajax/js_sdk/lib/helpers/detachConfig.js: -------------------------------------------------------------------------------- 1 | import isCallback from './isCallback' 2 | import { forEach, tryCatch } from '../utils' 3 | 4 | /** 5 | * 分离请求对象 6 | * @param {string|object} [url] 请求地址 / 请求配置 7 | * @param {string|object} [data] 请求参数 8 | * @param {object} [config] 请求配置 9 | * @returns {object} 回调函数对象 去除回调的请求参数 10 | */ 11 | export default function detachConfig(url, data, config) { 12 | // 回调函数对象 13 | let callback = null 14 | // 去除回调的请求参数对象 15 | const options = {} 16 | 17 | // 是否传入单个参数 18 | const isSingle = typeof url === 'object' 19 | 20 | // 请求参数对象 21 | const value = isSingle ? url : { ...config, url, data } 22 | 23 | // 分离请求参数 24 | forEach(value, (val, key) => { 25 | if (isSingle && isCallback(key)) { 26 | ;(callback || (callback = {}))[key] = tryCatch(val) 27 | } else { 28 | options[key] = val 29 | } 30 | }) 31 | 32 | return { 33 | callback, 34 | config: options 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /uni_modules/u-ajax/js_sdk/lib/helpers/isCallback.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 判断参数是否含有回调参数 success / fail / complete 之一 3 | * @param {string} field 参数的 Key 值字符串 4 | * @returns {boolean} 返回判断值 5 | */ 6 | export default function isCallback(field) { 7 | return ['success', 'fail', 'complete'].includes(field) 8 | } 9 | -------------------------------------------------------------------------------- /uni_modules/u-ajax/js_sdk/lib/helpers/mergeConfig.js: -------------------------------------------------------------------------------- 1 | import { assign, forEach } from '../utils' 2 | 3 | /** 4 | * 深度合并,且不合并 undefined 值 5 | * @param {object} obj1 前对象 6 | * @param {object} obj2 后对象 7 | * @returns {object} 合并后的对象 8 | */ 9 | function merge(obj1 = {}, obj2 = {}) { 10 | const obj = {} 11 | 12 | const objKeys = Object.keys({ ...obj1, ...obj2 }) 13 | 14 | forEach(objKeys, prop => { 15 | if (obj2[prop] !== undefined) { 16 | obj[prop] = assign(obj1[prop], obj2[prop]) 17 | } else if (obj1[prop] !== undefined) { 18 | obj[prop] = assign(undefined, obj1[prop]) 19 | } 20 | }) 21 | 22 | return obj 23 | } 24 | 25 | /** 26 | * 合并请求配置 27 | * @param {...object|function} args 请求配置 28 | * @returns {object} 合并后的请求配置 29 | */ 30 | export default async function mergeConfig(...args) { 31 | let config = {} 32 | 33 | for (let i = 0, l = args.length; i < l; i++) { 34 | const current = typeof args[i] === 'function' ? await args[i]() : args[i] 35 | config = merge(config, current) 36 | } 37 | 38 | config.method = config.method.toUpperCase() 39 | 40 | return config 41 | } 42 | -------------------------------------------------------------------------------- /uni_modules/uni-cloud-router/changelog.md: -------------------------------------------------------------------------------- 1 | ## 1.0.3(2021-02-02) 2 | - 修复 package.json 丢失 3 | ## 1.0.2(2021-02-02) 4 | - 支持 uni_modules 5 | -------------------------------------------------------------------------------- /uni_modules/uni-cloud-router/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uni-cloud-router", 3 | "name": "uni-cloud-router", 4 | "displayName": "uni-cloud-router", 5 | "version": "1.0.3", 6 | "description": " 基于 koa 风格的 uniCloud 云函数路由库,同时支持 uniCloud 客户端及 URL", 7 | "keywords": [ 8 | "云函数路由", 9 | "uniCloud", 10 | "uni-cloud-router" 11 | ], 12 | "repository": "https://gitee.com/dcloud/uni-cloud-router", 13 | "engines": { 14 | "HBuilderX": "^3.1.0" 15 | }, 16 | "files": ["uniCloud", "changelog.md", "readme.md"], 17 | "dcloudext": { 18 | "category": [ 19 | "uniCloud", 20 | "云函数模板" 21 | ], 22 | "sale": { 23 | "regular": { 24 | "price": "0.00" 25 | }, 26 | "sourcecode": { 27 | "price": "0.00" 28 | } 29 | }, 30 | "contact": { 31 | "qq": "" 32 | }, 33 | "declaration": { 34 | "ads": "无", 35 | "data": "无", 36 | "permissions": "无" 37 | }, 38 | "npmurl": "https://www.npmjs.com/package/uni-cloud-router" 39 | }, 40 | "uni_modules": { 41 | "dependencies": [], 42 | "encrypt": [], 43 | "platforms": { 44 | "cloud": { 45 | "tcb": "y", 46 | "aliyun": "y" 47 | }, 48 | "client": { 49 | "App": { 50 | "app-vue": "u", 51 | "app-nvue": "u" 52 | }, 53 | "H5-mobile": { 54 | "Safari": "u", 55 | "Android Browser": "u", 56 | "微信浏览器(Android)": "u", 57 | "QQ浏览器(Android)": "u" 58 | }, 59 | "H5-pc": { 60 | "Chrome": "u", 61 | "IE": "u", 62 | "Edge": "u", 63 | "Firefox": "u", 64 | "Safari": "u" 65 | }, 66 | "小程序": { 67 | "微信": "u", 68 | "阿里": "u", 69 | "百度": "u", 70 | "字节跳动": "u", 71 | "QQ": "u" 72 | }, 73 | "快应用": { 74 | "华为": "u", 75 | "联盟": "u" 76 | } 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /uni_modules/uni-cloud-router/readme.md: -------------------------------------------------------------------------------- 1 | ## 文档已迁移至[uni-cloud-router 文档](https://uniapp.dcloud.net.cn/uniCloud/uni-cloud-router) -------------------------------------------------------------------------------- /uni_modules/uni-cloud-router/uniCloud/cloudfunctions/common/uni-cloud-router/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uni-cloud-router", 3 | "version": "0.0.10", 4 | "description": "uni-cloud router", 5 | "main": "dist/index.js", 6 | "author": "fxy060608", 7 | "license": "Apache-2.0", 8 | "repository": { 9 | "type": "git", 10 | "url": "git+https://github.com/fxy060608/uni-cloud-router.git" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /uni_modules/uni-config-center/changelog.md: -------------------------------------------------------------------------------- 1 | ## 0.0.2(2021-04-16) 2 | - 修改插件package信息 3 | ## 0.0.1(2021-03-15) 4 | - 初始化项目 5 | -------------------------------------------------------------------------------- /uni_modules/uni-config-center/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uni-config-center", 3 | "displayName": "uni-config-center", 4 | "version": "0.0.2", 5 | "description": "uniCloud 配置中心", 6 | "keywords": [ 7 | "配置", 8 | "配置中心" 9 | ], 10 | "repository": "", 11 | "engines": { 12 | "HBuilderX": "^3.1.0" 13 | }, 14 | "dcloudext": { 15 | "category": [ 16 | "uniCloud", 17 | "云函数模板" 18 | ], 19 | "sale": { 20 | "regular": { 21 | "price": "0.00" 22 | }, 23 | "sourcecode": { 24 | "price": "0.00" 25 | } 26 | }, 27 | "contact": { 28 | "qq": "" 29 | }, 30 | "declaration": { 31 | "ads": "无", 32 | "data": "无", 33 | "permissions": "无" 34 | }, 35 | "npmurl": "" 36 | }, 37 | "directories": { 38 | "example": "../../../scripts/dist" 39 | }, 40 | "uni_modules": { 41 | "dependencies": [], 42 | "encrypt": [], 43 | "platforms": { 44 | "cloud": { 45 | "tcb": "y", 46 | "aliyun": "y" 47 | }, 48 | "client": { 49 | "App": { 50 | "app-vue": "u", 51 | "app-nvue": "u" 52 | }, 53 | "H5-mobile": { 54 | "Safari": "u", 55 | "Android Browser": "u", 56 | "微信浏览器(Android)": "u", 57 | "QQ浏览器(Android)": "u" 58 | }, 59 | "H5-pc": { 60 | "Chrome": "u", 61 | "IE": "u", 62 | "Edge": "u", 63 | "Firefox": "u", 64 | "Safari": "u" 65 | }, 66 | "小程序": { 67 | "微信": "u", 68 | "阿里": "u", 69 | "百度": "u", 70 | "字节跳动": "u", 71 | "QQ": "u" 72 | }, 73 | "快应用": { 74 | "华为": "u", 75 | "联盟": "u" 76 | } 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uni-config-center", 3 | "version": "0.0.2", 4 | "description": "配置中心", 5 | "main": "index.js", 6 | "keywords": [], 7 | "author": "DCloud", 8 | "license": "Apache-2.0" 9 | } -------------------------------------------------------------------------------- /uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "passwordSecret": "nx.unicloud.password.secret", 3 | "tokenSecret": "nx.unicloud.token.secret", 4 | "tokenExpiresIn": 7200, 5 | "tokenExpiresThreshold": 600, 6 | "passwordErrorLimit": 6, 7 | "bindTokenToDevice": false, 8 | "passwordErrorRetryTime": 3600, 9 | "autoSetInviteCode": true, 10 | "forceInviteCode": false, 11 | "preferedAppPlatform": "app-plus", 12 | "app-plus": { 13 | "tokenExpiresIn": 2592000, 14 | "oauth" : { 15 | "weixin" : { 16 | "appid": "weixin appid", 17 | "appsecret": "weixin appsecret" 18 | }, 19 | "apple": { 20 | "bundleId": "your APP bundleId" 21 | } 22 | } 23 | }, 24 | "mp-weixin": { 25 | "oauth" : { 26 | "weixin" : { 27 | "appid" : "weixin appid", 28 | "appsecret" : "weixin appsecret" 29 | } 30 | } 31 | }, 32 | "mp-alipay": { 33 | "oauth" : { 34 | "alipay" : { 35 | "appid" : "alipay appid", 36 | "privateKey" : "alipay privateKey" 37 | } 38 | } 39 | }, 40 | "service": { 41 | "sms": { 42 | "name": "DCloud", 43 | "codeExpiresIn": 300, 44 | "smsKey": "your sms key", 45 | "smsSecret": "your sms secret" 46 | }, 47 | "univerify": { 48 | "appid":"your appid", 49 | "apiKey": "your apiKey", 50 | "apiSecret": "your apiSecret" 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /uni_modules/uni-id/readme.md: -------------------------------------------------------------------------------- 1 | **文档已移至[uni-id文档](https://uniapp.dcloud.net.cn/uniCloud/uni-id)** 2 | 3 | > 一般uni-id升级大版本时为不兼容更新,从低版本迁移到高版本请参考:[uni-id迁移指南](https://uniapp.dcloud.net.cn/uniCloud/uni-id?id=migration) 4 | 5 | ## 重要升级说明 6 | 7 | **uni-id 3.x版本,搭配的uniCloud admin版本需大于1.2.10。** 8 | 9 | ### 缓存角色权限 10 | 11 | 自`uni-id 3.0.0`起,支持在token内缓存用户的角色权限,默认开启此功能,各登录接口的needPermission参数不再生效。如需关闭请在config内配置`"removePermissionAndRoleFromToken": true`。 12 | 13 | 为什么要缓存角色权限?要知道云数据库是按照读写次数来收取费用的,并且读写数据库会拖慢接口响应速度。未配置`"removePermissionAndRoleFromToken": true`的情况下,可以在调用checkToken接口时不查询数据库获取用户角色权限。 14 | 15 | 详细checkToken流程如下: 16 | 17 | ![](https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/ed45d350-5a4d-11eb-b997-9918a5dda011.jpg) 18 | 19 | 可以看出,旧版token(removePermissionAndRoleFromToken为true时生成的)在checkToken时如需返回权限需要进行两次数据库查询。新版token不需要查库即可返回权限信息。 20 | 21 | **注意** 22 | 23 | - 由于角色权限缓存在token内,可能会存在权限已经更新但是用户token未过期之前依然是旧版角色权限的情况。可以调短一些token过期时间来减少这种情况的影响。 24 | - admin角色token内不包含permission,如需自行判断用户是否有某个权限,要注意admin角色需要额外判断一下,写法如下 25 | ```js 26 | const { 27 | role, 28 | permission 29 | } = await uniID.checkToken(event.uniIdToken) 30 | if(role.includes('admin') || permission.includes('your permission id')) { 31 | // 当前角色拥有'your permission id'对应的权限 32 | } 33 | ``` -------------------------------------------------------------------------------- /uni_modules/uni-id/uniCloud/cloudfunctions/common/uni-id/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uni-id", 3 | "version": "3.3.25", 4 | "description": "uni-id for uniCloud", 5 | "main": "index.js", 6 | "homepage": "https://uniapp.dcloud.io/uniCloud/uni-id", 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://gitee.com/dcloud/uni-id.git" 10 | }, 11 | "author": "", 12 | "license": "Apache-2.0", 13 | "dependencies": { 14 | "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center" 15 | } 16 | } -------------------------------------------------------------------------------- /uview-ui/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 www.uviewui.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /uview-ui/components/u--image/u--image.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | -------------------------------------------------------------------------------- /uview-ui/components/u--text/u--text.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 45 | -------------------------------------------------------------------------------- /uview-ui/components/u--textarea/u--textarea.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 48 | -------------------------------------------------------------------------------- /uview-ui/components/u-action-sheet/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 操作菜单是否展示 (默认false) 4 | show: { 5 | type: Boolean, 6 | default: uni.$u.props.actionSheet.show 7 | }, 8 | // 标题 9 | title: { 10 | type: String, 11 | default: uni.$u.props.actionSheet.title 12 | }, 13 | // 选项上方的描述信息 14 | description: { 15 | type: String, 16 | default: uni.$u.props.actionSheet.description 17 | }, 18 | // 数据 19 | actions: { 20 | type: Array, 21 | default: uni.$u.props.actionSheet.actions 22 | }, 23 | // 取消按钮的文字,不为空时显示按钮 24 | cancelText: { 25 | type: String, 26 | default: uni.$u.props.actionSheet.cancelText 27 | }, 28 | // 点击某个菜单项时是否关闭弹窗 29 | closeOnClickAction: { 30 | type: Boolean, 31 | default: uni.$u.props.actionSheet.closeOnClickAction 32 | }, 33 | // 处理底部安全区(默认true) 34 | safeAreaInsetBottom: { 35 | type: Boolean, 36 | default: uni.$u.props.actionSheet.safeAreaInsetBottom 37 | }, 38 | // 小程序的打开方式 39 | openType: { 40 | type: String, 41 | default: uni.$u.props.actionSheet.openType 42 | }, 43 | // 点击遮罩是否允许关闭 (默认true) 44 | closeOnClickOverlay: { 45 | type: Boolean, 46 | default: uni.$u.props.actionSheet.closeOnClickOverlay 47 | }, 48 | // 圆角值 49 | round: { 50 | type: [Boolean, String, Number], 51 | default: uni.$u.props.actionSheet.round 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /uview-ui/components/u-alert/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 显示文字 4 | title: { 5 | type: String, 6 | default: uni.$u.props.alert.title 7 | }, 8 | // 主题,success/warning/info/error 9 | type: { 10 | type: String, 11 | default: uni.$u.props.alert.type 12 | }, 13 | // 辅助性文字 14 | description: { 15 | type: String, 16 | default: uni.$u.props.alert.description 17 | }, 18 | // 是否可关闭 19 | closable: { 20 | type: Boolean, 21 | default: uni.$u.props.alert.closable 22 | }, 23 | // 是否显示图标 24 | showIcon: { 25 | type: Boolean, 26 | default: uni.$u.props.alert.showIcon 27 | }, 28 | // 浅或深色调,light-浅色,dark-深色 29 | effect: { 30 | type: String, 31 | default: uni.$u.props.alert.effect 32 | }, 33 | // 文字是否居中 34 | center: { 35 | type: Boolean, 36 | default: uni.$u.props.alert.center 37 | }, 38 | // 字体大小 39 | fontSize: { 40 | type: [String, Number], 41 | default: uni.$u.props.alert.fontSize 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /uview-ui/components/u-avatar-group/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 头像图片组 4 | urls: { 5 | type: Array, 6 | default: uni.$u.props.avatarGroup.urls 7 | }, 8 | // 最多展示的头像数量 9 | maxCount: { 10 | type: [String, Number], 11 | default: uni.$u.props.avatarGroup.maxCount 12 | }, 13 | // 头像形状 14 | shape: { 15 | type: String, 16 | default: uni.$u.props.avatarGroup.shape 17 | }, 18 | // 图片裁剪模式 19 | mode: { 20 | type: String, 21 | default: uni.$u.props.avatarGroup.mode 22 | }, 23 | // 超出maxCount时是否显示查看更多的提示 24 | showMore: { 25 | type: Boolean, 26 | default: uni.$u.props.avatarGroup.showMore 27 | }, 28 | // 头像大小 29 | size: { 30 | type: [String, Number], 31 | default: uni.$u.props.avatarGroup.size 32 | }, 33 | // 指定从数组的对象元素中读取哪个属性作为图片地址 34 | keyName: { 35 | type: String, 36 | default: uni.$u.props.avatarGroup.keyName 37 | }, 38 | // 头像之间的遮挡比例 39 | gap: { 40 | type: [String, Number], 41 | validator(value) { 42 | return value >= 0 && value <= 1 43 | }, 44 | default: uni.$u.props.avatarGroup.gap 45 | }, 46 | // 需额外显示的值 47 | extraValue: { 48 | type: [Number, String], 49 | default: uni.$u.props.avatarGroup.extraValue 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /uview-ui/components/u-back-top/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 返回顶部的形状,circle-圆形,square-方形 4 | mode: { 5 | type: String, 6 | default: uni.$u.props.backtop.mode 7 | }, 8 | // 自定义图标 9 | icon: { 10 | type: String, 11 | default: uni.$u.props.backtop.icon 12 | }, 13 | // 提示文字 14 | text: { 15 | type: String, 16 | default: uni.$u.props.backtop.text 17 | }, 18 | // 返回顶部滚动时间 19 | duration: { 20 | type: [String, Number], 21 | default: uni.$u.props.backtop.duration 22 | }, 23 | // 滚动距离 24 | scrollTop: { 25 | type: [String, Number], 26 | default: uni.$u.props.backtop.scrollTop 27 | }, 28 | // 距离顶部多少距离显示,单位px 29 | top: { 30 | type: [String, Number], 31 | default: uni.$u.props.backtop.top 32 | }, 33 | // 返回顶部按钮到底部的距离,单位px 34 | bottom: { 35 | type: [String, Number], 36 | default: uni.$u.props.backtop.bottom 37 | }, 38 | // 返回顶部按钮到右边的距离,单位px 39 | right: { 40 | type: [String, Number], 41 | default: uni.$u.props.backtop.right 42 | }, 43 | // 层级 44 | zIndex: { 45 | type: [String, Number], 46 | default: uni.$u.props.backtop.zIndex 47 | }, 48 | // 图标的样式,对象形式 49 | iconStyle: { 50 | type: Object, 51 | default: uni.$u.props.backtop.iconStyle 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /uview-ui/components/u-button/nvue.scss: -------------------------------------------------------------------------------- 1 | $u-button-active-opacity:0.75 !default; 2 | $u-button-loading-text-margin-left:4px !default; 3 | $u-button-text-color: #FFFFFF !default; 4 | $u-button-text-plain-error-color:$u-error !default; 5 | $u-button-text-plain-warning-color:$u-warning !default; 6 | $u-button-text-plain-success-color:$u-success !default; 7 | $u-button-text-plain-info-color:$u-info !default; 8 | $u-button-text-plain-primary-color:$u-primary !default; 9 | .u-button { 10 | &--active { 11 | opacity: $u-button-active-opacity; 12 | } 13 | 14 | &--active--plain { 15 | background-color: rgb(217, 217, 217); 16 | } 17 | 18 | &__loading-text { 19 | margin-left:$u-button-loading-text-margin-left; 20 | } 21 | 22 | &__text, 23 | &__loading-text { 24 | color:$u-button-text-color; 25 | } 26 | 27 | &__text--plain--error { 28 | color:$u-button-text-plain-error-color; 29 | } 30 | 31 | &__text--plain--warning { 32 | color:$u-button-text-plain-warning-color; 33 | } 34 | 35 | &__text--plain--success{ 36 | color:$u-button-text-plain-success-color; 37 | } 38 | 39 | &__text--plain--info { 40 | color:$u-button-text-plain-info-color; 41 | } 42 | 43 | &__text--plain--primary { 44 | color:$u-button-text-plain-primary-color; 45 | } 46 | } -------------------------------------------------------------------------------- /uview-ui/components/u-car-keyboard/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 是否打乱键盘按键的顺序 4 | random: { 5 | type: Boolean, 6 | default: false 7 | }, 8 | // 输入一个中文后,是否自动切换到英文 9 | autoChange: { 10 | type: Boolean, 11 | default: false 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /uview-ui/components/u-cell-group/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 分组标题 4 | title: { 5 | type: String, 6 | default: uni.$u.props.cellGroup.title 7 | }, 8 | // 是否显示外边框 9 | border: { 10 | type: Boolean, 11 | default: uni.$u.props.cellGroup.border 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /uview-ui/components/u-circle-progress/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | percentage: { 4 | type: [String, Number], 5 | default: uni.$u.props.circleProgress.percentage 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /uview-ui/components/u-code/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 倒计时总秒数 4 | seconds: { 5 | type: [String, Number], 6 | default: uni.$u.props.code.seconds 7 | }, 8 | // 尚未开始时提示 9 | startText: { 10 | type: String, 11 | default: uni.$u.props.code.startText 12 | }, 13 | // 正在倒计时中的提示 14 | changeText: { 15 | type: String, 16 | default: uni.$u.props.code.changeText 17 | }, 18 | // 倒计时结束时的提示 19 | endText: { 20 | type: String, 21 | default: uni.$u.props.code.endText 22 | }, 23 | // 是否在H5刷新或各端返回再进入时继续倒计时 24 | keepRunning: { 25 | type: Boolean, 26 | default: uni.$u.props.code.keepRunning 27 | }, 28 | // 为了区分多个页面,或者一个页面多个倒计时组件本地存储的继续倒计时变了 29 | uniqueKey: { 30 | type: String, 31 | default: uni.$u.props.code.uniqueKey 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /uview-ui/components/u-col/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 占父容器宽度的多少等分,总分为12份 4 | span: { 5 | type: [String, Number], 6 | default: uni.$u.props.col.span 7 | }, 8 | // 指定栅格左侧的间隔数(总12栏) 9 | offset: { 10 | type: [String, Number], 11 | default: uni.$u.props.col.offset 12 | }, 13 | // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`) 14 | justify: { 15 | type: String, 16 | default: uni.$u.props.col.justify 17 | }, 18 | // 垂直对齐方式,可选值为top、center、bottom、stretch 19 | align: { 20 | type: String, 21 | default: uni.$u.props.col.align 22 | }, 23 | // 文字对齐方式 24 | textAlign: { 25 | type: String, 26 | default: uni.$u.props.col.textAlign 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /uview-ui/components/u-collapse-item/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 标题 4 | title: { 5 | type: String, 6 | default: uni.$u.props.collapseItem.title 7 | }, 8 | // 标题右侧内容 9 | value: { 10 | type: String, 11 | default: uni.$u.props.collapseItem.value 12 | }, 13 | // 标题下方的描述信息 14 | label: { 15 | type: String, 16 | default: uni.$u.props.collapseItem.label 17 | }, 18 | // 是否禁用折叠面板 19 | disabled: { 20 | type: Boolean, 21 | default: uni.$u.props.collapseItem.disabled 22 | }, 23 | // 是否展示右侧箭头并开启点击反馈 24 | isLink: { 25 | type: Boolean, 26 | default: uni.$u.props.collapseItem.isLink 27 | }, 28 | // 是否开启点击反馈 29 | clickable: { 30 | type: Boolean, 31 | default: uni.$u.props.collapseItem.clickable 32 | }, 33 | // 是否显示内边框 34 | border: { 35 | type: Boolean, 36 | default: uni.$u.props.collapseItem.border 37 | }, 38 | // 标题的对齐方式 39 | align: { 40 | type: String, 41 | default: uni.$u.props.collapseItem.align 42 | }, 43 | // 唯一标识符 44 | name: { 45 | type: [String, Number], 46 | default: uni.$u.props.collapseItem.name 47 | }, 48 | // 标题左侧图片,可为绝对路径的图片或内置图标 49 | icon: { 50 | type: String, 51 | default: uni.$u.props.collapseItem.icon 52 | }, 53 | // 面板展开收起的过渡时间,单位ms 54 | duration: { 55 | type: Number, 56 | default: uni.$u.props.collapseItem.duration 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /uview-ui/components/u-collapse/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 当前展开面板的name,非手风琴模式:[],手风琴模式:string | number 4 | value: { 5 | type: [String, Number, Array, null], 6 | default: uni.$u.props.collapse.value 7 | }, 8 | // 是否手风琴模式 9 | accordion: { 10 | type: Boolean, 11 | default: uni.$u.props.collapse.accordion 12 | }, 13 | // 是否显示外边框 14 | border: { 15 | type: Boolean, 16 | default: uni.$u.props.collapse.border 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uview-ui/components/u-column-notice/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 显示的内容,字符串 4 | text: { 5 | type: [Array], 6 | default: uni.$u.props.columnNotice.text 7 | }, 8 | // 是否显示左侧的音量图标 9 | icon: { 10 | type: String, 11 | default: uni.$u.props.columnNotice.icon 12 | }, 13 | // 通告模式,link-显示右箭头,closable-显示右侧关闭图标 14 | mode: { 15 | type: String, 16 | default: uni.$u.props.columnNotice.mode 17 | }, 18 | // 文字颜色,各图标也会使用文字颜色 19 | color: { 20 | type: String, 21 | default: uni.$u.props.columnNotice.color 22 | }, 23 | // 背景颜色 24 | bgColor: { 25 | type: String, 26 | default: uni.$u.props.columnNotice.bgColor 27 | }, 28 | // 字体大小,单位px 29 | fontSize: { 30 | type: [String, Number], 31 | default: uni.$u.props.columnNotice.fontSize 32 | }, 33 | // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度 34 | speed: { 35 | type: [String, Number], 36 | default: uni.$u.props.columnNotice.speed 37 | }, 38 | // direction = row时,是否使用步进形式滚动 39 | step: { 40 | type: Boolean, 41 | default: uni.$u.props.columnNotice.step 42 | }, 43 | // 滚动一个周期的时间长,单位ms 44 | duration: { 45 | type: [String, Number], 46 | default: uni.$u.props.columnNotice.duration 47 | }, 48 | // 是否禁止用手滑动切换 49 | // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序 50 | disableTouch: { 51 | type: Boolean, 52 | default: uni.$u.props.columnNotice.disableTouch 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /uview-ui/components/u-count-down/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 倒计时时长,单位ms 4 | time: { 5 | type: [String, Number], 6 | default: uni.$u.props.countDown.time 7 | }, 8 | // 时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒 9 | format: { 10 | type: String, 11 | default: uni.$u.props.countDown.format 12 | }, 13 | // 是否自动开始倒计时 14 | autoStart: { 15 | type: Boolean, 16 | default: uni.$u.props.countDown.autoStart 17 | }, 18 | // 是否展示毫秒倒计时 19 | millisecond: { 20 | type: Boolean, 21 | default: uni.$u.props.countDown.millisecond 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /uview-ui/components/u-divider/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 是否虚线 4 | dashed: { 5 | type: Boolean, 6 | default: uni.$u.props.divider.dashed 7 | }, 8 | // 是否细线 9 | hairline: { 10 | type: Boolean, 11 | default: uni.$u.props.divider.hairline 12 | }, 13 | // 是否以点替代文字,优先于text字段起作用 14 | dot: { 15 | type: Boolean, 16 | default: uni.$u.props.divider.dot 17 | }, 18 | // 内容文本的位置,left-左边,center-中间,right-右边 19 | textPosition: { 20 | type: String, 21 | default: uni.$u.props.divider.textPosition 22 | }, 23 | // 文本内容 24 | text: { 25 | type: [String, Number], 26 | default: uni.$u.props.divider.text 27 | }, 28 | // 文本大小 29 | textSize: { 30 | type: [String, Number], 31 | default: uni.$u.props.divider.textSize 32 | }, 33 | // 文本颜色 34 | textColor: { 35 | type: String, 36 | default: uni.$u.props.divider.textColor 37 | }, 38 | // 线条颜色 39 | lineColor: { 40 | type: String, 41 | default: uni.$u.props.divider.lineColor 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /uview-ui/components/u-dropdown-item/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 当前选中项的value值 4 | value: { 5 | type: [Number, String, Array], 6 | default: '' 7 | }, 8 | // 菜单项标题 9 | title: { 10 | type: [String, Number], 11 | default: '' 12 | }, 13 | // 选项数据,如果传入了默认slot,此参数无效 14 | options: { 15 | type: Array, 16 | default() { 17 | return [] 18 | } 19 | }, 20 | // 是否禁用此菜单项 21 | disabled: { 22 | type: Boolean, 23 | default: false 24 | }, 25 | // 下拉弹窗的高度 26 | height: { 27 | type: [Number, String], 28 | default: 'auto' 29 | }, 30 | // 点击遮罩是否可以收起弹窗 31 | closeOnClickOverlay: { 32 | type: Boolean, 33 | default: true 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /uview-ui/components/u-dropdown/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 标题选中时的样式 4 | activeStyle: { 5 | type: [String, Object], 6 | default: () => ({ 7 | color: '#2979ff', 8 | fontSize: '14px' 9 | }) 10 | }, 11 | // 标题未选中时的样式 12 | inactiveStyle: { 13 | type: [String, Object], 14 | default: () => ({ 15 | color: '#606266', 16 | fontSize: '14px' 17 | }) 18 | }, 19 | // 点击遮罩是否关闭菜单 20 | closeOnClickMask: { 21 | type: Boolean, 22 | default: true 23 | }, 24 | // 点击当前激活项标题是否关闭菜单 25 | closeOnClickSelf: { 26 | type: Boolean, 27 | default: true 28 | }, 29 | // 过渡时间 30 | duration: { 31 | type: [Number, String], 32 | default: 300 33 | }, 34 | // 标题菜单的高度 35 | height: { 36 | type: [Number, String], 37 | default: 40 38 | }, 39 | // 是否显示下边框 40 | borderBottom: { 41 | type: Boolean, 42 | default: false 43 | }, 44 | // 标题的字体大小 45 | titleSize: { 46 | type: [Number, String], 47 | default: 14 48 | }, 49 | // 下拉出来的内容部分的圆角值 50 | borderRadius: { 51 | type: [Number, String], 52 | default: 0 53 | }, 54 | // 菜单右侧的icon图标 55 | menuIcon: { 56 | type: String, 57 | default: 'arrow-down' 58 | }, 59 | // 菜单右侧图标的大小 60 | menuIconSize: { 61 | type: [Number, String], 62 | default: 14 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /uview-ui/components/u-dropdown/u-dropdown.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/uview-ui/components/u-dropdown/u-dropdown.vue -------------------------------------------------------------------------------- /uview-ui/components/u-empty/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 内置图标名称,或图片路径,建议绝对路径 4 | icon: { 5 | type: String, 6 | default: uni.$u.props.empty.icon 7 | }, 8 | // 提示文字 9 | text: { 10 | type: String, 11 | default: uni.$u.props.empty.text 12 | }, 13 | // 文字颜色 14 | textColor: { 15 | type: String, 16 | default: uni.$u.props.empty.textColor 17 | }, 18 | // 文字大小 19 | textSize: { 20 | type: [String, Number], 21 | default: uni.$u.props.empty.textSize 22 | }, 23 | // 图标的颜色 24 | iconColor: { 25 | type: String, 26 | default: uni.$u.props.empty.iconColor 27 | }, 28 | // 图标的大小 29 | iconSize: { 30 | type: [String, Number], 31 | default: uni.$u.props.empty.iconSize 32 | }, 33 | // 选择预置的图标类型 34 | mode: { 35 | type: String, 36 | default: uni.$u.props.empty.mode 37 | }, 38 | // 图标宽度,单位px 39 | width: { 40 | type: [String, Number], 41 | default: uni.$u.props.empty.width 42 | }, 43 | // 图标高度,单位px 44 | height: { 45 | type: [String, Number], 46 | default: uni.$u.props.empty.height 47 | }, 48 | // 是否显示组件 49 | show: { 50 | type: Boolean, 51 | default: uni.$u.props.empty.show 52 | }, 53 | // 组件距离上一个元素之间的距离,默认px单位 54 | marginTop: { 55 | type: [String, Number], 56 | default: uni.$u.props.empty.marginTop 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /uview-ui/components/u-form-item/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // input的label提示语 4 | label: { 5 | type: String, 6 | default: uni.$u.props.formItem.label 7 | }, 8 | // 绑定的值 9 | prop: { 10 | type: String, 11 | default: uni.$u.props.formItem.prop 12 | }, 13 | // 是否显示表单域的下划线边框 14 | borderBottom: { 15 | type: [String, Boolean], 16 | default: uni.$u.props.formItem.borderBottom 17 | }, 18 | // label的宽度,单位px 19 | labelWidth: { 20 | type: [String, Number], 21 | default: uni.$u.props.formItem.labelWidth 22 | }, 23 | // 右侧图标 24 | rightIcon: { 25 | type: String, 26 | default: uni.$u.props.formItem.rightIcon 27 | }, 28 | // 左侧图标 29 | leftIcon: { 30 | type: String, 31 | default: uni.$u.props.formItem.leftIcon 32 | }, 33 | // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置 34 | required: { 35 | type: Boolean, 36 | default: uni.$u.props.formItem.required 37 | }, 38 | leftIconStyle: { 39 | type: [String, Object], 40 | default: uni.$u.props.formItem.leftIconStyle, 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /uview-ui/components/u-form/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 当前form的需要验证字段的集合 4 | model: { 5 | type: Object, 6 | default: uni.$u.props.form.model 7 | }, 8 | // 验证规则 9 | rules: { 10 | type: [Object, Function, Array], 11 | default: uni.$u.props.form.rules 12 | }, 13 | // 有错误时的提示方式,message-提示信息,toast-进行toast提示 14 | // border-bottom-下边框呈现红色,none-无提示 15 | errorType: { 16 | type: String, 17 | default: uni.$u.props.form.errorType 18 | }, 19 | // 是否显示表单域的下划线边框 20 | borderBottom: { 21 | type: Boolean, 22 | default: uni.$u.props.form.borderBottom 23 | }, 24 | // label的位置,left-左边,top-上边 25 | labelPosition: { 26 | type: String, 27 | default: uni.$u.props.form.labelPosition 28 | }, 29 | // label的宽度,单位px 30 | labelWidth: { 31 | type: [String, Number], 32 | default: uni.$u.props.form.labelWidth 33 | }, 34 | // lable字体的对齐方式 35 | labelAlign: { 36 | type: String, 37 | default: uni.$u.props.form.labelAlign 38 | }, 39 | // lable的样式,对象形式 40 | labelStyle: { 41 | type: Object, 42 | default: uni.$u.props.form.labelStyle 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /uview-ui/components/u-gap/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 背景颜色(默认transparent) 4 | bgColor: { 5 | type: String, 6 | default: uni.$u.props.gap.bgColor 7 | }, 8 | // 分割槽高度,单位px(默认30) 9 | height: { 10 | type: [String, Number], 11 | default: uni.$u.props.gap.height 12 | }, 13 | // 与上一个组件的距离 14 | marginTop: { 15 | type: [String, Number], 16 | default: uni.$u.props.gap.marginTop 17 | }, 18 | // 与下一个组件的距离 19 | marginBottom: { 20 | type: [String, Number], 21 | default: uni.$u.props.gap.marginBottom 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /uview-ui/components/u-gap/u-gap.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 35 | 36 | 39 | -------------------------------------------------------------------------------- /uview-ui/components/u-grid-item/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 宫格的name 4 | name: { 5 | type: [String, Number, null], 6 | default: uni.$u.props.gridItem.name 7 | }, 8 | // 背景颜色 9 | bgColor: { 10 | type: String, 11 | default: uni.$u.props.gridItem.bgColor 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /uview-ui/components/u-grid/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 分成几列 4 | col: { 5 | type: [String, Number], 6 | default: uni.$u.props.grid.col 7 | }, 8 | // 是否显示边框 9 | border: { 10 | type: Boolean, 11 | default: uni.$u.props.grid.border 12 | }, 13 | // 宫格对齐方式,表现为数量少的时候,靠左,居中,还是靠右 14 | align: { 15 | type: String, 16 | default: uni.$u.props.grid.align 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uview-ui/components/u-index-anchor/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 列表锚点文本内容 4 | text: { 5 | type: [String, Number], 6 | default: uni.$u.props.indexAnchor.text 7 | }, 8 | // 列表锚点文字颜色 9 | color: { 10 | type: String, 11 | default: uni.$u.props.indexAnchor.color 12 | }, 13 | // 列表锚点文字大小,单位默认px 14 | size: { 15 | type: [String, Number], 16 | default: uni.$u.props.indexAnchor.size 17 | }, 18 | // 列表锚点背景颜色 19 | bgColor: { 20 | type: String, 21 | default: uni.$u.props.indexAnchor.bgColor 22 | }, 23 | // 列表锚点高度,单位默认px 24 | height: { 25 | type: [String, Number], 26 | default: uni.$u.props.indexAnchor.height 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /uview-ui/components/u-index-item/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /uview-ui/components/u-index-list/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 右边锚点非激活的颜色 4 | inactiveColor: { 5 | type: String, 6 | default: uni.$u.props.indexList.inactiveColor 7 | }, 8 | // 右边锚点激活的颜色 9 | activeColor: { 10 | type: String, 11 | default: uni.$u.props.indexList.activeColor 12 | }, 13 | // 索引字符列表,数组形式 14 | indexList: { 15 | type: Array, 16 | default: uni.$u.props.indexList.indexList 17 | }, 18 | // 是否开启锚点自动吸顶 19 | sticky: { 20 | type: Boolean, 21 | default: uni.$u.props.indexList.sticky 22 | }, 23 | // 自定义导航栏的高度 24 | customNavHeight: { 25 | type: [String, Number], 26 | default: uni.$u.props.indexList.customNavHeight 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /uview-ui/components/u-line-progress/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 激活部分的颜色 4 | activeColor: { 5 | type: String, 6 | default: uni.$u.props.lineProgress.activeColor 7 | }, 8 | inactiveColor: { 9 | type: String, 10 | default: uni.$u.props.lineProgress.color 11 | }, 12 | // 进度百分比,数值 13 | percentage: { 14 | type: [String, Number], 15 | default: uni.$u.props.lineProgress.inactiveColor 16 | }, 17 | // 是否在进度条内部显示百分比的值 18 | showText: { 19 | type: Boolean, 20 | default: uni.$u.props.lineProgress.showText 21 | }, 22 | // 进度条的高度,单位px 23 | height: { 24 | type: [String, Number], 25 | default: uni.$u.props.lineProgress.height 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /uview-ui/components/u-line/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | color: { 4 | type: String, 5 | default: uni.$u.props.line.color 6 | }, 7 | // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 8 | length: { 9 | type: [String, Number], 10 | default: uni.$u.props.line.length 11 | }, 12 | // 线条方向,col-竖向,row-横向 13 | direction: { 14 | type: String, 15 | default: uni.$u.props.line.direction 16 | }, 17 | // 是否显示细边框 18 | hairline: { 19 | type: Boolean, 20 | default: uni.$u.props.line.hairline 21 | }, 22 | // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px" 23 | margin: { 24 | type: [String, Number], 25 | default: uni.$u.props.line.margin 26 | }, 27 | // 是否虚线,true-实线,false-虚线 28 | dashed: { 29 | type: Boolean, 30 | default: uni.$u.props.line.dashed 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /uview-ui/components/u-link/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 文字颜色 4 | color: { 5 | type: String, 6 | default: uni.$u.props.link.color 7 | }, 8 | // 字体大小,单位px 9 | fontSize: { 10 | type: [String, Number], 11 | default: uni.$u.props.link.fontSize 12 | }, 13 | // 是否显示下划线 14 | underLine: { 15 | type: Boolean, 16 | default: uni.$u.props.link.underLine 17 | }, 18 | // 要跳转的链接 19 | href: { 20 | type: String, 21 | default: uni.$u.props.link.href 22 | }, 23 | // 小程序中复制到粘贴板的提示语 24 | mpTips: { 25 | type: String, 26 | default: uni.$u.props.link.mpTips 27 | }, 28 | // 下划线颜色 29 | lineColor: { 30 | type: String, 31 | default: uni.$u.props.link.lineColor 32 | }, 33 | // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色 34 | text: { 35 | type: String, 36 | default: uni.$u.props.link.text 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /uview-ui/components/u-list-item/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 用于滚动到指定item 4 | anchor: { 5 | type: [String, Number], 6 | default: uni.$u.props.listItem.anchor 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /uview-ui/components/u-loading-icon/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 是否显示组件 4 | show: { 5 | type: Boolean, 6 | default: uni.$u.props.loadingIcon.show 7 | }, 8 | // 颜色 9 | color: { 10 | type: String, 11 | default: uni.$u.props.loadingIcon.color 12 | }, 13 | // 提示文字颜色 14 | textColor: { 15 | type: String, 16 | default: uni.$u.props.loadingIcon.textColor 17 | }, 18 | // 文字和图标是否垂直排列 19 | vertical: { 20 | type: Boolean, 21 | default: uni.$u.props.loadingIcon.vertical 22 | }, 23 | // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形 24 | mode: { 25 | type: String, 26 | default: uni.$u.props.loadingIcon.mode 27 | }, 28 | // 图标大小,单位默认px 29 | size: { 30 | type: [String, Number], 31 | default: uni.$u.props.loadingIcon.size 32 | }, 33 | // 文字大小 34 | textSize: { 35 | type: [String, Number], 36 | default: uni.$u.props.loadingIcon.textSize 37 | }, 38 | // 文字内容 39 | text: { 40 | type: [String, Number], 41 | default: uni.$u.props.loadingIcon.text 42 | }, 43 | // 动画模式 44 | timingFunction: { 45 | type: String, 46 | default: uni.$u.props.loadingIcon.timingFunction 47 | }, 48 | // 动画执行周期时间 49 | duration: { 50 | type: [String, Number], 51 | default: uni.$u.props.loadingIcon.duration 52 | }, 53 | // mode=circle时的暗边颜色 54 | inactiveColor: { 55 | type: String, 56 | default: uni.$u.props.loadingIcon.inactiveColor 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /uview-ui/components/u-loading-page/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 提示内容 4 | loadingText: { 5 | type: [String, Number], 6 | default: uni.$u.props.loadingPage.loadingText 7 | }, 8 | // 文字上方用于替换loading动画的图片 9 | image: { 10 | type: String, 11 | default: uni.$u.props.loadingPage.image 12 | }, 13 | // 加载动画的模式,circle-圆形,spinner-花朵形,semicircle-半圆形 14 | loadingMode: { 15 | type: String, 16 | default: uni.$u.props.loadingPage.loadingMode 17 | }, 18 | // 是否加载中 19 | loading: { 20 | type: Boolean, 21 | default: uni.$u.props.loadingPage.loading 22 | }, 23 | // 背景色 24 | bgColor: { 25 | type: String, 26 | default: uni.$u.props.loadingPage.bgColor 27 | }, 28 | // 文字颜色 29 | color: { 30 | type: String, 31 | default: uni.$u.props.loadingPage.color 32 | }, 33 | // 文字大小 34 | fontSize: { 35 | type: [String, Number], 36 | default: uni.$u.props.loadingPage.fontSize 37 | }, 38 | // 加载中图标的颜色,只能rgb或者十六进制颜色值 39 | loadingColor: { 40 | type: String, 41 | default: uni.$u.props.loadingPage.loadingColor 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /uview-ui/components/u-no-network/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 页面文字提示 4 | tips: { 5 | type: String, 6 | default: uni.$u.props.noNetwork.tips 7 | }, 8 | // 一个z-index值,用于设置没有网络这个组件的层次,因为页面可能会有其他定位的元素层级过高,导致此组件被覆盖 9 | zIndex: { 10 | type: [String, Number], 11 | default: uni.$u.props.noNetwork.zIndex 12 | }, 13 | // image 没有网络的图片提示 14 | image: { 15 | type: String, 16 | default: uni.$u.props.noNetwork.image 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uview-ui/components/u-notify/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 到顶部的距离 4 | top: { 5 | type: [String, Number], 6 | default: uni.$u.props.notify.top 7 | }, 8 | // 是否展示组件 9 | // show: { 10 | // type: Boolean, 11 | // default: uni.$u.props.notify.show 12 | // }, 13 | // type主题,primary,success,warning,error 14 | type: { 15 | type: String, 16 | default: uni.$u.props.notify.type 17 | }, 18 | // 字体颜色 19 | color: { 20 | type: String, 21 | default: uni.$u.props.notify.color 22 | }, 23 | // 背景颜色 24 | bgColor: { 25 | type: String, 26 | default: uni.$u.props.notify.bgColor 27 | }, 28 | // 展示的文字内容 29 | message: { 30 | type: String, 31 | default: uni.$u.props.notify.message 32 | }, 33 | // 展示时长,为0时不消失,单位ms 34 | duration: { 35 | type: [String, Number], 36 | default: uni.$u.props.notify.duration 37 | }, 38 | // 字体大小 39 | fontSize: { 40 | type: [String, Number], 41 | default: uni.$u.props.notify.fontSize 42 | }, 43 | // 是否留出顶部安全距离(状态栏高度) 44 | safeAreaInsetTop: { 45 | type: Boolean, 46 | default: uni.$u.props.notify.safeAreaInsetTop 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /uview-ui/components/u-number-keyboard/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 键盘的类型,number-数字键盘,card-身份证键盘 4 | mode: { 5 | type: String, 6 | default: uni.$u.props.numberKeyboard.value 7 | }, 8 | // 是否显示键盘的"."符号 9 | dotDisabled: { 10 | type: Boolean, 11 | default: uni.$u.props.numberKeyboard.dotDisabled 12 | }, 13 | // 是否打乱键盘按键的顺序 14 | random: { 15 | type: Boolean, 16 | default: uni.$u.props.numberKeyboard.random 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uview-ui/components/u-overlay/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 是否显示遮罩 4 | show: { 5 | type: Boolean, 6 | default: uni.$u.props.overlay.show 7 | }, 8 | // 层级z-index 9 | zIndex: { 10 | type: [String, Number], 11 | default: uni.$u.props.overlay.zIndex 12 | }, 13 | // 遮罩的过渡时间,单位为ms 14 | duration: { 15 | type: [String, Number], 16 | default: uni.$u.props.overlay.duration 17 | }, 18 | // 不透明度值,当做rgba的第四个参数 19 | opacity: { 20 | type: [String, Number], 21 | default: uni.$u.props.overlay.opacity 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /uview-ui/components/u-parse/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // #ifdef APP-PLUS-NVUE 4 | bgColor: String, 5 | // #endif 6 | content: String, 7 | copyLink: { 8 | type: Boolean, 9 | default: uni.$u.props.parse.copyLink 10 | }, 11 | domain: String, 12 | errorImg: { 13 | type: String, 14 | default: uni.$u.props.parse.errorImg 15 | }, 16 | lazyLoad: { 17 | type: Boolean, 18 | default: uni.$u.props.parse.lazyLoad 19 | }, 20 | loadingImg: { 21 | type: String, 22 | default: uni.$u.props.parse.loadingImg 23 | }, 24 | pauseVideo: { 25 | type: Boolean, 26 | default: uni.$u.props.parse.pauseVideo 27 | }, 28 | previewImg: { 29 | type: Boolean, 30 | default: uni.$u.props.parse.previewImg 31 | }, 32 | scrollTable: Boolean, 33 | selectable: Boolean, 34 | setTitle: { 35 | type: Boolean, 36 | default: uni.$u.props.parse.setTitle 37 | }, 38 | showImgMenu: { 39 | type: Boolean, 40 | default: uni.$u.props.parse.showImgMenu 41 | }, 42 | tagStyle: Object, 43 | useAnchor: null 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /uview-ui/components/u-picker-column/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /uview-ui/components/u-picker-column/u-picker-column.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 24 | 25 | 28 | -------------------------------------------------------------------------------- /uview-ui/components/u-row-notice/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 显示的内容,字符串 4 | text: { 5 | type: String, 6 | default: uni.$u.props.rowNotice.text 7 | }, 8 | // 是否显示左侧的音量图标 9 | icon: { 10 | type: String, 11 | default: uni.$u.props.rowNotice.icon 12 | }, 13 | // 通告模式,link-显示右箭头,closable-显示右侧关闭图标 14 | mode: { 15 | type: String, 16 | default: uni.$u.props.rowNotice.mode 17 | }, 18 | // 文字颜色,各图标也会使用文字颜色 19 | color: { 20 | type: String, 21 | default: uni.$u.props.rowNotice.color 22 | }, 23 | // 背景颜色 24 | bgColor: { 25 | type: String, 26 | default: uni.$u.props.rowNotice.bgColor 27 | }, 28 | // 字体大小,单位px 29 | fontSize: { 30 | type: [String, Number], 31 | default: uni.$u.props.rowNotice.fontSize 32 | }, 33 | // 水平滚动时的滚动速度,即每秒滚动多少px(rpx),这有利于控制文字无论多少时,都能有一个恒定的速度 34 | speed: { 35 | type: [String, Number], 36 | default: uni.$u.props.rowNotice.speed 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /uview-ui/components/u-row/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 给col添加间距,左右边距各占一半 4 | gutter: { 5 | type: [String, Number], 6 | default: uni.$u.props.row.gutter 7 | }, 8 | // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`) 9 | justify: { 10 | type: String, 11 | default: uni.$u.props.row.justify 12 | }, 13 | // 垂直对齐方式,可选值为top、center、bottom 14 | align: { 15 | type: String, 16 | default: uni.$u.props.row.align 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uview-ui/components/u-safe-bottom/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /uview-ui/components/u-safe-bottom/u-safe-bottom.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 49 | 50 | 57 | -------------------------------------------------------------------------------- /uview-ui/components/u-scroll-list/nvue.js: -------------------------------------------------------------------------------- 1 | // 引入bindingx,此库类似于微信小程序wxs,目的是让js运行在视图层,减少视图层和逻辑层的通信折损 2 | const BindingX = uni.requireNativePlugin('bindingx') 3 | 4 | export default { 5 | methods: { 6 | // 此处不写注释,请自行体会 7 | nvueScrollHandler(e) { 8 | const anchor = this.$refs['u-scroll-list__scroll-view'].ref 9 | const element = this.$refs['u-scroll-list__indicator__line__bar'].ref 10 | const scrollLeft = e.contentOffset.x 11 | const contentSize = e.contentSize.width 12 | const { scrollWidth } = this 13 | const barAllMoveWidth = this.indicatorWidth - this.indicatorBarWidth 14 | // 在安卓和iOS上,需要除的倍数不一样,iOS需要除以2 15 | const actionNum = uni.$u.os() === 'ios' ? 2 : 1 16 | const expression = `(x / ${actionNum}) / ${contentSize - scrollWidth} * ${barAllMoveWidth}` 17 | BindingX.bind({ 18 | anchor, 19 | eventType: 'scroll', 20 | props: [{ 21 | element, 22 | property: 'transform.translateX', 23 | expression 24 | }] 25 | }) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /uview-ui/components/u-scroll-list/other.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/uview-ui/components/u-scroll-list/other.js -------------------------------------------------------------------------------- /uview-ui/components/u-scroll-list/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 指示器的整体宽度 4 | indicatorWidth: { 5 | type: [String, Number], 6 | default: uni.$u.props.scrollList.indicatorWidth 7 | }, 8 | // 滑块的宽度 9 | indicatorBarWidth: { 10 | type: [String, Number], 11 | default: uni.$u.props.scrollList.indicatorBarWidth 12 | }, 13 | // 是否显示面板指示器 14 | indicator: { 15 | type: Boolean, 16 | default: uni.$u.props.scrollList.indicator 17 | }, 18 | // 指示器非激活颜色 19 | indicatorColor: { 20 | type: String, 21 | default: uni.$u.props.scrollList.indicatorColor 22 | }, 23 | // 指示器的激活颜色 24 | indicatorActiveColor: { 25 | type: String, 26 | default: uni.$u.props.scrollList.indicatorActiveColor 27 | }, 28 | // 指示器样式,可通过bottom,left,right进行定位 29 | indicatorStyle: { 30 | type: [String, Object], 31 | default: uni.$u.props.scrollList.indicatorStyle 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /uview-ui/components/u-slider/mpwxs.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data() { 3 | return { 4 | sliderRect: {}, 5 | info: { 6 | width: null, 7 | left: null, 8 | step: this.step, 9 | disabled: this.disabled, 10 | min: this.min, 11 | max: this.max, 12 | value: this.value 13 | } 14 | } 15 | }, 16 | mounted() { 17 | this.init() 18 | }, 19 | methods: { 20 | init() { 21 | this.getSliderRect() 22 | }, 23 | // 获取slider尺寸 24 | getSliderRect() { 25 | // 获取滑块条的尺寸信息 26 | uni.$u.sleep().then(() => { 27 | this.$uGetRect('.u-slider').then((rect) => { 28 | this.info.width = rect.width 29 | this.info.left = rect.left 30 | }) 31 | }) 32 | }, 33 | // 此方法由wxs调用,用于修改v-model绑定的值 34 | updateValue(value) { 35 | this.$emit('input', value) 36 | }, 37 | // 此方法由wxs调用,发出事件 38 | emitEvent(e) { 39 | this.$emit(e.event, e.value ? e.value : this.value) 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /uview-ui/components/u-slider/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 最小可选值 4 | min: { 5 | type: [Number, String], 6 | default: uni.$u.props.slider.min 7 | }, 8 | // 最大可选值 9 | max: { 10 | type: [Number, String], 11 | default: uni.$u.props.slider.max 12 | }, 13 | // 步长,取值必须大于 0,并且可被(max - min)整除 14 | step: { 15 | type: [Number, String], 16 | default: uni.$u.props.slider.step 17 | }, 18 | // 当前取值 19 | value: { 20 | type: [Number, String], 21 | default: uni.$u.props.slider.value 22 | }, 23 | // 滑块右侧已选择部分的背景色 24 | activeColor: { 25 | type: String, 26 | default: uni.$u.props.slider.activeColor 27 | }, 28 | // 滑块左侧未选择部分的背景色 29 | inactiveColor: { 30 | type: String, 31 | default: uni.$u.props.slider.inactiveColor 32 | }, 33 | // 滑块的大小,取值范围为 12 - 28 34 | blockSize: { 35 | type: [Number, String], 36 | default: uni.$u.props.slider.blockSize 37 | }, 38 | // 滑块的颜色 39 | blockColor: { 40 | type: String, 41 | default: uni.$u.props.slider.blockColor 42 | }, 43 | // 禁用状态 44 | disabled: { 45 | type: Boolean, 46 | default: uni.$u.props.slider.disabled 47 | }, 48 | // 是否显示当前的选择值 49 | showValue: { 50 | type: Boolean, 51 | default: uni.$u.props.slider.showValue 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /uview-ui/components/u-slider/u-slider.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 52 | 53 | 56 | -------------------------------------------------------------------------------- /uview-ui/components/u-status-bar/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | bgColor: { 4 | type: String, 5 | default: uni.$u.props.statusBar.bgColor 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /uview-ui/components/u-status-bar/u-status-bar.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 38 | 39 | 47 | -------------------------------------------------------------------------------- /uview-ui/components/u-steps-item/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 标题 4 | title: { 5 | type: [String, Number], 6 | default: uni.$u.props.stepsItem.title 7 | }, 8 | // 描述文本 9 | desc: { 10 | type: [String, Number], 11 | default: uni.$u.props.stepsItem.desc 12 | }, 13 | // 图标大小 14 | iconSize: { 15 | type: [String, Number], 16 | default: uni.$u.props.stepsItem.iconSize 17 | }, 18 | // 当前步骤是否处于失败状态 19 | error: { 20 | type: Boolean, 21 | default: uni.$u.props.stepsItem.error 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /uview-ui/components/u-steps/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 排列方向 4 | direction: { 5 | type: String, 6 | default: uni.$u.props.steps.direction 7 | }, 8 | // 设置第几个步骤 9 | current: { 10 | type: [String, Number], 11 | default: uni.$u.props.steps.current 12 | }, 13 | // 激活状态颜色 14 | activeColor: { 15 | type: String, 16 | default: uni.$u.props.steps.activeColor 17 | }, 18 | // 未激活状态颜色 19 | inactiveColor: { 20 | type: String, 21 | default: uni.$u.props.steps.inactiveColor 22 | }, 23 | // 激活状态的图标 24 | activeIcon: { 25 | type: String, 26 | default: uni.$u.props.steps.activeIcon 27 | }, 28 | // 未激活状态图标 29 | inactiveIcon: { 30 | type: String, 31 | default: uni.$u.props.steps.inactiveIcon 32 | }, 33 | // 是否显示点类型 34 | dot: { 35 | type: Boolean, 36 | default: uni.$u.props.steps.dot 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /uview-ui/components/u-sticky/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px 4 | offsetTop: { 5 | type: [String, Number], 6 | default: uni.$u.props.sticky.offsetTop 7 | }, 8 | // 自定义导航栏的高度 9 | customNavHeight: { 10 | type: [String, Number], 11 | // #ifdef H5 12 | // H5端的导航栏属于“自定义”导航栏的范畴,因为它是非原生的,与普通元素一致 13 | default: 44, 14 | // #endif 15 | // #ifndef H5 16 | default: uni.$u.props.sticky.customNavHeight 17 | // #endif 18 | }, 19 | // 是否开启吸顶功能 20 | disabled: { 21 | type: Boolean, 22 | default: uni.$u.props.sticky.disabled 23 | }, 24 | // 吸顶区域的背景颜色 25 | bgColor: { 26 | type: String, 27 | default: uni.$u.props.sticky.bgColor 28 | }, 29 | // z-index值 30 | zIndex: { 31 | type: [String, Number], 32 | default: uni.$u.props.sticky.zIndex 33 | }, 34 | // 列表中的索引值 35 | index: { 36 | type: [String, Number], 37 | default: uni.$u.props.sticky.index 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /uview-ui/components/u-subsection/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // tab的数据 4 | list: { 5 | type: Array, 6 | default: uni.$u.props.subsection.list 7 | }, 8 | // 当前活动的tab的index 9 | current: { 10 | type: [String, Number], 11 | default: uni.$u.props.subsection.current 12 | }, 13 | // 激活的颜色 14 | activeColor: { 15 | type: String, 16 | default: uni.$u.props.subsection.activeColor 17 | }, 18 | // 未激活的颜色 19 | inactiveColor: { 20 | type: String, 21 | default: uni.$u.props.subsection.inactiveColor 22 | }, 23 | // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式 24 | mode: { 25 | type: String, 26 | default: uni.$u.props.subsection.mode 27 | }, 28 | // 字体大小 29 | fontSize: { 30 | type: [String, Number], 31 | default: uni.$u.props.subsection.fontSize 32 | }, 33 | // 激活tab的字体是否加粗 34 | bold: { 35 | type: Boolean, 36 | default: uni.$u.props.subsection.bold 37 | }, 38 | // mode = button时,组件背景颜色 39 | bgColor: { 40 | type: String, 41 | default: uni.$u.props.subsection.bgColor 42 | }, 43 | // 从list元素对象中读取的键名 44 | keyName: { 45 | type: String, 46 | default: uni.$u.props.subsection.keyName 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /uview-ui/components/u-swipe-action-item/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 控制打开或者关闭 4 | show: { 5 | type: Boolean, 6 | default: uni.$u.props.swipeActionItem.show 7 | }, 8 | // 标识符,如果是v-for,可用index索引值 9 | name: { 10 | type: [String, Number], 11 | default: uni.$u.props.swipeActionItem.name 12 | }, 13 | // 是否禁用 14 | disabled: { 15 | type: Boolean, 16 | default: uni.$u.props.swipeActionItem.disabled 17 | }, 18 | // 是否自动关闭其他swipe按钮组 19 | autoClose: { 20 | type: Boolean, 21 | default: uni.$u.props.swipeActionItem.autoClose 22 | }, 23 | // 滑动距离阈值,只有大于此值,才被认为是要打开菜单 24 | threshold: { 25 | type: Number, 26 | default: uni.$u.props.swipeActionItem.threshold 27 | }, 28 | // 右侧按钮内容 29 | options: { 30 | type: Array, 31 | default() { 32 | return uni.$u.props.swipeActionItem.rightOptions 33 | } 34 | }, 35 | // 动画过渡时间,单位ms 36 | duration: { 37 | type: [String, Number], 38 | default: uni.$u.props.swipeActionItem.duration 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /uview-ui/components/u-swipe-action-item/wxs.js: -------------------------------------------------------------------------------- 1 | export default { 2 | methods: { 3 | // 关闭时执行 4 | closeHandler() { 5 | this.status = 'close' 6 | }, 7 | setState(status) { 8 | this.status = status 9 | }, 10 | closeOther() { 11 | // 尝试关闭其他打开的单元格 12 | this.parent && this.parent.closeOther(this) 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /uview-ui/components/u-swipe-action/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 是否自动关闭其他swipe按钮组 4 | autoClose: { 5 | type: Boolean, 6 | default: uni.$u.props.swipeAction.autoClose 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /uview-ui/components/u-swiper-indicator/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 轮播的长度 4 | length: { 5 | type: [String, Number], 6 | default: uni.$u.props.swiperIndicator.length 7 | }, 8 | // 当前处于活动状态的轮播的索引 9 | current: { 10 | type: [String, Number], 11 | default: uni.$u.props.swiperIndicator.current 12 | }, 13 | // 指示器非激活颜色 14 | indicatorActiveColor: { 15 | type: String, 16 | default: uni.$u.props.swiperIndicator.indicatorActiveColor 17 | }, 18 | // 指示器的激活颜色 19 | indicatorInactiveColor: { 20 | type: String, 21 | default: uni.$u.props.swiperIndicator.indicatorInactiveColor 22 | }, 23 | // 指示器模式,line-线型,dot-点型 24 | indicatorMode: { 25 | type: String, 26 | default: uni.$u.props.swiperIndicator.indicatorMode 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /uview-ui/components/u-switch/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 是否为加载中状态 4 | loading: { 5 | type: Boolean, 6 | default: uni.$u.props.switch.loading 7 | }, 8 | // 是否为禁用装填 9 | disabled: { 10 | type: Boolean, 11 | default: uni.$u.props.switch.disabled 12 | }, 13 | // 开关尺寸,单位px 14 | size: { 15 | type: [String, Number], 16 | default: uni.$u.props.switch.size 17 | }, 18 | // 打开时的背景颜色 19 | activeColor: { 20 | type: String, 21 | default: uni.$u.props.switch.activeColor 22 | }, 23 | // 关闭时的背景颜色 24 | inactiveColor: { 25 | type: String, 26 | default: uni.$u.props.switch.inactiveColor 27 | }, 28 | // 通过v-model双向绑定的值 29 | value: { 30 | type: [Boolean, String, Number], 31 | default: uni.$u.props.switch.value 32 | }, 33 | // switch打开时的值 34 | activeValue: { 35 | type: [String, Number, Boolean], 36 | default: uni.$u.props.switch.activeValue 37 | }, 38 | // switch关闭时的值 39 | inactiveValue: { 40 | type: [String, Number, Boolean], 41 | default: uni.$u.props.switch.inactiveValue 42 | }, 43 | // 是否开启异步变更,开启后需要手动控制输入值 44 | asyncChange: { 45 | type: Boolean, 46 | default: uni.$u.props.switch.asyncChange 47 | }, 48 | // 圆点与外边框的距离 49 | space: { 50 | type: [String, Number], 51 | default: uni.$u.props.switch.space 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /uview-ui/components/u-tabbar-item/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // item标签的名称,作为与u-tabbar的value参数匹配的标识符 4 | name: { 5 | type: [String, Number, null], 6 | default: uni.$u.props.tabbarItem.name 7 | }, 8 | // uView内置图标或者绝对路径的图片 9 | icon: { 10 | icon: String, 11 | default: uni.$u.props.tabbarItem.icon 12 | }, 13 | // 右上角的角标提示信息 14 | badge: { 15 | type: [String, Number, null], 16 | default: uni.$u.props.tabbarItem.badge 17 | }, 18 | // 是否显示圆点,将会覆盖badge参数 19 | dot: { 20 | type: Boolean, 21 | default: uni.$u.props.tabbarItem.dot 22 | }, 23 | // 描述文本 24 | text: { 25 | type: String, 26 | default: uni.$u.props.tabbarItem.text 27 | }, 28 | // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性 29 | badgeStyle: { 30 | type: [Object, String], 31 | default: uni.$u.props.tabbarItem.badgeStyle 32 | } 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /uview-ui/components/u-tabbar/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 当前匹配项的name 4 | value: { 5 | type: [String, Number, null], 6 | default: uni.$u.props.tabbar.value 7 | }, 8 | // 是否为iPhoneX留出底部安全距离 9 | safeAreaInsetBottom: { 10 | type: Boolean, 11 | default: uni.$u.props.tabbar.safeAreaInsetBottom 12 | }, 13 | // 是否显示上方边框 14 | border: { 15 | type: Boolean, 16 | default: uni.$u.props.tabbar.border 17 | }, 18 | // 元素层级z-index 19 | zIndex: { 20 | type: [String, Number], 21 | default: uni.$u.props.tabbar.zIndex 22 | }, 23 | // 选中标签的颜色 24 | activeColor: { 25 | type: String, 26 | default: uni.$u.props.tabbar.activeColor 27 | }, 28 | // 未选中标签的颜色 29 | inactiveColor: { 30 | type: String, 31 | default: uni.$u.props.tabbar.inactiveColor 32 | }, 33 | // 是否固定在底部 34 | fixed: { 35 | type: Boolean, 36 | default: uni.$u.props.tabbar.fixed 37 | }, 38 | // fixed定位固定在底部时,是否生成一个等高元素防止塌陷 39 | placeholder: { 40 | type: Boolean, 41 | default: uni.$u.props.tabbar.placeholder 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /uview-ui/components/u-table/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /uview-ui/components/u-table/u-table.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 25 | 26 | 30 | -------------------------------------------------------------------------------- /uview-ui/components/u-tabs-item/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /uview-ui/components/u-tabs-item/u-tabs-item.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 27 | 28 | 30 | -------------------------------------------------------------------------------- /uview-ui/components/u-td/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /uview-ui/components/u-td/u-td.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 27 | 28 | 32 | -------------------------------------------------------------------------------- /uview-ui/components/u-toolbar/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 是否展示工具条 4 | show: { 5 | type: Boolean, 6 | default: uni.$u.props.toolbar.show 7 | }, 8 | // 取消按钮的文字 9 | cancelText: { 10 | type: String, 11 | default: uni.$u.props.toolbar.cancelText 12 | }, 13 | // 确认按钮的文字 14 | confirmText: { 15 | type: String, 16 | default: uni.$u.props.toolbar.confirmText 17 | }, 18 | // 取消按钮的颜色 19 | cancelColor: { 20 | type: String, 21 | default: uni.$u.props.toolbar.cancelColor 22 | }, 23 | // 确认按钮的颜色 24 | confirmColor: { 25 | type: String, 26 | default: uni.$u.props.toolbar.confirmColor 27 | }, 28 | // 标题文字 29 | title: { 30 | type: String, 31 | default: uni.$u.props.toolbar.title 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /uview-ui/components/u-tooltip/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 需要显示的提示文字 4 | text: { 5 | type: [String, Number], 6 | default: uni.$u.props.tooltip.text 7 | }, 8 | // 点击复制按钮时,复制的文本,为空则使用text值 9 | copyText: { 10 | type: [String, Number], 11 | default: uni.$u.props.tooltip.copyText 12 | }, 13 | // 文本大小 14 | size: { 15 | type: [String, Number], 16 | default: uni.$u.props.tooltip.size 17 | }, 18 | // 字体颜色 19 | color: { 20 | type: String, 21 | default: uni.$u.props.tooltip.color 22 | }, 23 | // 弹出提示框时,文本的背景色 24 | bgColor: { 25 | type: String, 26 | default: uni.$u.props.tooltip.bgColor 27 | }, 28 | // 弹出提示的方向,top-上方,bottom-下方 29 | direction: { 30 | type: String, 31 | default: uni.$u.props.tooltip.direction 32 | }, 33 | // 弹出提示的z-index,nvue无效 34 | zIndex: { 35 | type: [String, Number], 36 | default: uni.$u.props.tooltip.zIndex 37 | }, 38 | // 是否显示复制按钮 39 | showCopy: { 40 | type: Boolean, 41 | default: uni.$u.props.tooltip.showCopy 42 | }, 43 | // 扩展的按钮组 44 | buttons: { 45 | type: Array, 46 | default: uni.$u.props.tooltip.buttons 47 | }, 48 | // 是否显示透明遮罩以防止触摸穿透 49 | overlay: { 50 | type: Boolean, 51 | default: uni.$u.props.tooltip.overlay 52 | }, 53 | // 是否显示复制成功或者失败的toast 54 | showToast: { 55 | type: Boolean, 56 | default: uni.$u.props.tooltip.showToast 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /uview-ui/components/u-tr/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /uview-ui/components/u-tr/u-tr.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 27 | 28 | 32 | -------------------------------------------------------------------------------- /uview-ui/components/u-transition/props.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | // 是否展示组件 4 | show: { 5 | type: Boolean, 6 | default: uni.$u.props.transition.show 7 | }, 8 | // 使用的动画模式 9 | mode: { 10 | type: String, 11 | default: uni.$u.props.transition.mode 12 | }, 13 | // 动画的执行时间,单位ms 14 | duration: { 15 | type: [String, Number], 16 | default: uni.$u.props.transition.duration 17 | }, 18 | // 使用的动画过渡函数 19 | timingFunction: { 20 | type: String, 21 | default: uni.$u.props.transition.timingFunction 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /uview-ui/components/u-upload/mixin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | watch: { 3 | // 监听accept的变化,判断是否符合个平台要求 4 | // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示 5 | accept: { 6 | immediate: true, 7 | handler(val) { 8 | // #ifndef MP-WEIXIN 9 | if (val === 'all' || val === 'media') { 10 | uni.$u.error('只有微信小程序才支持把accept配置为all、media之一') 11 | } 12 | // #endif 13 | // #ifndef H5 || MP-WEIXIN 14 | if (val === 'file') { 15 | uni.$u.error('只有微信小程序和H5(HX2.9.9)才支持把accept配置为file') 16 | } 17 | // #endif 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /uview-ui/components/uview-ui/uview-ui.vue: -------------------------------------------------------------------------------- 1 | 3 | 4 | 7 | 8 | 13 | 14 | 16 | -------------------------------------------------------------------------------- /uview-ui/index.scss: -------------------------------------------------------------------------------- 1 | // 引入公共基础类 2 | @import "./libs/css/common.scss"; 3 | @import "./libs/css/color.scss"; 4 | 5 | // 非nvue的样式 6 | /* #ifndef APP-NVUE */ 7 | @import "./libs/css/vue.scss"; 8 | /* #endif */ 9 | 10 | // nvue的特有样式 11 | /* #ifdef APP-NVUE */ 12 | @import "./libs/css/nvue.scss"; 13 | /* #endif */ 14 | 15 | // 小程序特有的样式 16 | /* #ifdef MP */ 17 | @import "./libs/css/mp.scss"; 18 | /* #endif */ 19 | 20 | // H5特有的样式 21 | /* #ifdef H5 */ 22 | @import "./libs/css/h5.scss"; 23 | /* #endif */ -------------------------------------------------------------------------------- /uview-ui/libs/config/color.js: -------------------------------------------------------------------------------- 1 | // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供 2 | // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20) 3 | const color = { 4 | primary: '#3c9cff', 5 | info: '#909399', 6 | default: '#909399', 7 | warning: '#f9ae3d', 8 | error: '#f56c6c', 9 | success: '#5ac725', 10 | mainColor: '#303133', 11 | contentColor: '#606266', 12 | tipsColor: '#909399', 13 | lightColor: '#c0c4cc', 14 | borderColor: '#e4e7ed' 15 | } 16 | 17 | export default color 18 | -------------------------------------------------------------------------------- /uview-ui/libs/config/config.js: -------------------------------------------------------------------------------- 1 | // 此版本发布于2022-04-04 2 | const version = '2.0.30' 3 | 4 | // 开发环境才提示,生产环境不会提示 5 | if (process.env.NODE_ENV === 'development') { 6 | console.log(`\n %c uView V${version} %c https://www.uviewui.com/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #ffffff; padding:5px 0;'); 7 | } 8 | 9 | export default { 10 | v: version, 11 | version, 12 | // 主题名称 13 | type: [ 14 | 'primary', 15 | 'success', 16 | 'info', 17 | 'error', 18 | 'warning' 19 | ], 20 | // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持 21 | color: { 22 | 'u-primary': '#2979ff', 23 | 'u-warning': '#ff9900', 24 | 'u-success': '#19be6b', 25 | 'u-error': '#fa3534', 26 | 'u-info': '#909399', 27 | 'u-main-color': '#303133', 28 | 'u-content-color': '#606266', 29 | 'u-tips-color': '#909399', 30 | 'u-light-color': '#c0c4cc' 31 | }, 32 | // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx 33 | unit: 'px' 34 | } 35 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/actionSheet.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:44:35 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/actionSheet.js 9 | */ 10 | export default { 11 | // action-sheet组件 12 | actionSheet: { 13 | show: false, 14 | title: '', 15 | description: '', 16 | actions: () => [], 17 | index: '', 18 | cancelText: '', 19 | closeOnClickAction: true, 20 | safeAreaInsetBottom: true, 21 | openType: '', 22 | closeOnClickOverlay: true, 23 | round: 0 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/album.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:47:24 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/album.js 9 | */ 10 | export default { 11 | // album 组件 12 | album: { 13 | urls: () => [], 14 | keyName: '', 15 | singleSize: 180, 16 | multipleSize: 70, 17 | space: 6, 18 | singleMode: 'scaleToFill', 19 | multipleMode: 'aspectFill', 20 | maxCount: 9, 21 | previewFullImage: true, 22 | rowCount: 3, 23 | showMore: true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/alert.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:48:53 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/alert.js 9 | */ 10 | export default { 11 | // alert警告组件 12 | alert: { 13 | title: '', 14 | type: 'warning', 15 | description: '', 16 | closable: false, 17 | showIcon: false, 18 | effect: 'light', 19 | center: false, 20 | fontSize: 14 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/avatar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:49:22 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/avatar.js 9 | */ 10 | export default { 11 | // avatar 组件 12 | avatar: { 13 | src: '', 14 | shape: 'circle', 15 | size: 40, 16 | mode: 'scaleToFill', 17 | text: '', 18 | bgColor: '#c0c4cc', 19 | color: '#ffffff', 20 | fontSize: 18, 21 | icon: '', 22 | mpAvatar: false, 23 | randomBgColor: false, 24 | defaultUrl: '', 25 | colorIndex: '', 26 | name: '' 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/avatarGroup.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:49:55 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/avatarGroup.js 9 | */ 10 | export default { 11 | // avatarGroup 组件 12 | avatarGroup: { 13 | urls: () => [], 14 | maxCount: 5, 15 | shape: 'circle', 16 | mode: 'scaleToFill', 17 | showMore: true, 18 | size: 40, 19 | keyName: '', 20 | gap: 0.5, 21 | extraValue: 0 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/backtop.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:50:18 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/backtop.js 9 | */ 10 | export default { 11 | // backtop组件 12 | backtop: { 13 | mode: 'circle', 14 | icon: 'arrow-upward', 15 | text: '', 16 | duration: 100, 17 | scrollTop: 0, 18 | top: 400, 19 | bottom: 100, 20 | right: 20, 21 | zIndex: 9, 22 | iconStyle: () => ({ 23 | color: '#909399', 24 | fontSize: '19px' 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/badge.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-23 19:51:50 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/badge.js 9 | */ 10 | export default { 11 | // 徽标数组件 12 | badge: { 13 | isDot: false, 14 | value: '', 15 | show: true, 16 | max: 999, 17 | type: 'error', 18 | showZero: false, 19 | bgColor: null, 20 | color: null, 21 | shape: 'circle', 22 | numberType: 'overflow', 23 | offset: () => [], 24 | inverted: false, 25 | absolute: false 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/button.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:51:27 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/button.js 9 | */ 10 | export default { 11 | // button组件 12 | button: { 13 | hairline: false, 14 | type: 'info', 15 | size: 'normal', 16 | shape: 'square', 17 | plain: false, 18 | disabled: false, 19 | loading: false, 20 | loadingText: '', 21 | loadingMode: 'spinner', 22 | loadingSize: 15, 23 | openType: '', 24 | formType: '', 25 | appParameter: '', 26 | hoverStopPropagation: true, 27 | lang: 'en', 28 | sessionFrom: '', 29 | sendMessageTitle: '', 30 | sendMessagePath: '', 31 | sendMessageImg: '', 32 | showMessageCard: false, 33 | dataName: '', 34 | throttleTime: 0, 35 | hoverStartTime: 0, 36 | hoverStayTime: 200, 37 | text: '', 38 | icon: '', 39 | iconColor: '', 40 | color: '' 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/calendar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:52:43 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/calendar.js 9 | */ 10 | export default { 11 | // calendar 组件 12 | calendar: { 13 | title: '日期选择', 14 | showTitle: true, 15 | showSubtitle: true, 16 | mode: 'single', 17 | startText: '开始', 18 | endText: '结束', 19 | customList: () => [], 20 | color: '#3c9cff', 21 | minDate: 0, 22 | maxDate: 0, 23 | defaultDate: null, 24 | maxCount: Number.MAX_SAFE_INTEGER, // Infinity 25 | rowHeight: 56, 26 | formatter: null, 27 | showLunar: false, 28 | showMark: true, 29 | confirmText: '确定', 30 | confirmDisabledText: '确定', 31 | show: false, 32 | closeOnClickOverlay: false, 33 | readonly: false, 34 | showConfirm: true, 35 | maxRange: Number.MAX_SAFE_INTEGER, // Infinity 36 | rangePrompt: '', 37 | showRangePrompt: true, 38 | allowSameDay: false, 39 | round: 0, 40 | monthNum: 3 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/carKeyboard.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:53:20 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/carKeyboard.js 9 | */ 10 | export default { 11 | // 车牌号键盘 12 | carKeyboard: { 13 | random: false 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/cell.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-23 20:53:09 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/cell.js 9 | */ 10 | export default { 11 | // cell组件的props 12 | cell: { 13 | customClass: '', 14 | title: '', 15 | label: '', 16 | value: '', 17 | icon: '', 18 | disabled: false, 19 | border: true, 20 | center: false, 21 | url: '', 22 | linkType: 'navigateTo', 23 | clickable: false, 24 | isLink: false, 25 | required: false, 26 | arrowDirection: '', 27 | iconStyle: {}, 28 | rightIconStyle: {}, 29 | rightIcon: 'arrow-right', 30 | titleStyle: {}, 31 | size: '', 32 | stop: true, 33 | name: '' 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/cellGroup.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:54:16 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/cellGroup.js 9 | */ 10 | export default { 11 | // cell-group组件的props 12 | cellGroup: { 13 | title: '', 14 | border: true, 15 | customStyle: {} 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/checkbox.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-23 21:06:59 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/checkbox.js 9 | */ 10 | export default { 11 | // checkbox组件 12 | checkbox: { 13 | name: '', 14 | shape: '', 15 | size: '', 16 | checkbox: false, 17 | disabled: '', 18 | activeColor: '', 19 | inactiveColor: '', 20 | iconSize: '', 21 | iconColor: '', 22 | label: '', 23 | labelSize: '', 24 | labelColor: '', 25 | labelDisabled: '' 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/checkboxGroup.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:54:47 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/checkboxGroup.js 9 | */ 10 | export default { 11 | // checkbox-group组件 12 | checkboxGroup: { 13 | name: '', 14 | value: () => [], 15 | shape: 'square', 16 | disabled: false, 17 | activeColor: '#2979ff', 18 | inactiveColor: '#c8c9cc', 19 | size: 18, 20 | placement: 'row', 21 | labelSize: 14, 22 | labelColor: '#303133', 23 | labelDisabled: false, 24 | iconColor: '#ffffff', 25 | iconSize: 12, 26 | iconPlacement: 'left', 27 | borderBottom: false 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/circleProgress.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:55:02 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/circleProgress.js 9 | */ 10 | export default { 11 | // circleProgress 组件 12 | circleProgress: { 13 | percentage: 30 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/code.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:55:27 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/code.js 9 | */ 10 | 11 | export default { 12 | // code 组件 13 | code: { 14 | seconds: 60, 15 | startText: '获取验证码', 16 | changeText: 'X秒重新获取', 17 | endText: '重新获取', 18 | keepRunning: false, 19 | uniqueKey: '' 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/codeInput.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:55:58 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/codeInput.js 9 | */ 10 | export default { 11 | // codeInput 组件 12 | codeInput: { 13 | maxlength: 6, 14 | dot: false, 15 | mode: 'box', 16 | hairline: false, 17 | space: 10, 18 | value: '', 19 | focus: false, 20 | bold: false, 21 | color: '#606266', 22 | fontSize: 18, 23 | size: 35, 24 | disabledKeyboard: false, 25 | borderColor: '#c9cacc', 26 | disabledDot: true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/col.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:56:12 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/col.js 9 | */ 10 | export default { 11 | // col 组件 12 | col: { 13 | span: 12, 14 | offset: 0, 15 | justify: 'start', 16 | align: 'stretch', 17 | textAlign: 'left' 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/collapse.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:56:30 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/collapse.js 9 | */ 10 | export default { 11 | // collapse 组件 12 | collapse: { 13 | value: null, 14 | accordion: false, 15 | border: true 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/collapseItem.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:56:42 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/collapseItem.js 9 | */ 10 | export default { 11 | // collapseItem 组件 12 | collapseItem: { 13 | title: '', 14 | value: '', 15 | label: '', 16 | disabled: false, 17 | isLink: true, 18 | clickable: true, 19 | border: true, 20 | align: 'left', 21 | name: '', 22 | icon: '', 23 | duration: 300 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/columnNotice.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:57:16 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/columnNotice.js 9 | */ 10 | export default { 11 | // columnNotice 组件 12 | columnNotice: { 13 | text: '', 14 | icon: 'volume', 15 | mode: '', 16 | color: '#f9ae3d', 17 | bgColor: '#fdf6ec', 18 | fontSize: 14, 19 | speed: 80, 20 | step: false, 21 | duration: 1500, 22 | disableTouch: true 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/countDown.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:11:29 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/countDown.js 9 | */ 10 | export default { 11 | // u-count-down 计时器组件 12 | countDown: { 13 | time: 0, 14 | format: 'HH:mm:ss', 15 | autoStart: true, 16 | millisecond: false 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/countTo.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:57:32 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/countTo.js 9 | */ 10 | export default { 11 | // countTo 组件 12 | countTo: { 13 | startVal: 0, 14 | endVal: 0, 15 | duration: 2000, 16 | autoplay: true, 17 | decimals: 0, 18 | useEasing: true, 19 | decimal: '.', 20 | color: '#606266', 21 | fontSize: 22, 22 | bold: false, 23 | separator: '' 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/datetimePicker.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:57:48 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/datetimePicker.js 9 | */ 10 | export default { 11 | // datetimePicker 组件 12 | datetimePicker: { 13 | show: false, 14 | showToolbar: true, 15 | value: '', 16 | title: '', 17 | mode: 'datetime', 18 | maxDate: new Date(new Date().getFullYear() + 10, 0, 1).getTime(), 19 | minDate: new Date(new Date().getFullYear() - 10, 0, 1).getTime(), 20 | minHour: 0, 21 | maxHour: 23, 22 | minMinute: 0, 23 | maxMinute: 59, 24 | filter: null, 25 | formatter: null, 26 | loading: false, 27 | itemHeight: 44, 28 | cancelText: '取消', 29 | confirmText: '确认', 30 | cancelColor: '#909193', 31 | confirmColor: '#3c9cff', 32 | visibleItemCount: 5, 33 | closeOnClickOverlay: false, 34 | defaultIndex: () => [] 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/divider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:58:03 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/divider.js 9 | */ 10 | export default { 11 | // divider组件 12 | divider: { 13 | dashed: false, 14 | hairline: true, 15 | dot: false, 16 | textPosition: 'center', 17 | text: '', 18 | textSize: 14, 19 | textColor: '#909399', 20 | lineColor: '#dcdfe6' 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/empty.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:03:27 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/empty.js 9 | */ 10 | export default { 11 | // empty组件 12 | empty: { 13 | icon: '', 14 | text: '', 15 | textColor: '#c0c4cc', 16 | textSize: 14, 17 | iconColor: '#c0c4cc', 18 | iconSize: 90, 19 | mode: 'data', 20 | width: 160, 21 | height: 160, 22 | show: true, 23 | marginTop: 0 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/form.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:03:49 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/form.js 9 | */ 10 | export default { 11 | // form 组件 12 | form: { 13 | model: () => ({}), 14 | rules: () => ({}), 15 | errorType: 'message', 16 | borderBottom: true, 17 | labelPosition: 'left', 18 | labelWidth: 45, 19 | labelAlign: 'left', 20 | labelStyle: () => ({}) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/formItem.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:04:32 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/formItem.js 9 | */ 10 | export default { 11 | // formItem 组件 12 | formItem: { 13 | label: '', 14 | prop: '', 15 | borderBottom: '', 16 | labelWidth: '', 17 | rightIcon: '', 18 | leftIcon: '', 19 | required: false, 20 | leftIconStyle: '', 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/gap.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:05:25 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/gap.js 9 | */ 10 | export default { 11 | // gap组件 12 | gap: { 13 | bgColor: 'transparent', 14 | height: 20, 15 | marginTop: 0, 16 | marginBottom: 0, 17 | customStyle: {} 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/grid.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:05:57 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/grid.js 9 | */ 10 | export default { 11 | // grid组件 12 | grid: { 13 | col: 3, 14 | border: false, 15 | align: 'left' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/gridItem.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:06:13 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/gridItem.js 9 | */ 10 | export default { 11 | // grid-item组件 12 | gridItem: { 13 | name: null, 14 | bgColor: 'transparent' 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/icon.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 18:00:14 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/icon.js 9 | */ 10 | import config from '../config' 11 | 12 | const { 13 | color 14 | } = config 15 | export default { 16 | // icon组件 17 | icon: { 18 | name: '', 19 | color: color['u-content-color'], 20 | size: '16px', 21 | bold: false, 22 | index: '', 23 | hoverClass: '', 24 | customPrefix: 'uicon', 25 | label: '', 26 | labelPos: 'right', 27 | labelSize: '15px', 28 | labelColor: color['u-content-color'], 29 | space: '3px', 30 | imgMode: '', 31 | width: '', 32 | height: '', 33 | top: 0, 34 | stop: false 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/image.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:01:51 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/image.js 9 | */ 10 | export default { 11 | // image组件 12 | image: { 13 | src: '', 14 | mode: 'aspectFill', 15 | width: '300', 16 | height: '225', 17 | shape: 'square', 18 | radius: 0, 19 | lazyLoad: true, 20 | showMenuByLongpress: true, 21 | loadingIcon: 'photo', 22 | errorIcon: 'error-circle', 23 | showLoading: true, 24 | showError: true, 25 | fade: true, 26 | webp: false, 27 | duration: 500, 28 | bgColor: '#f3f4f6' 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/indexAnchor.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:13:15 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/indexAnchor.js 9 | */ 10 | export default { 11 | // indexAnchor 组件 12 | indexAnchor: { 13 | text: '', 14 | color: '#606266', 15 | size: 14, 16 | bgColor: '#dedede', 17 | height: 32 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/indexList.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:13:35 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/indexList.js 9 | */ 10 | export default { 11 | // indexList 组件 12 | indexList: { 13 | inactiveColor: '#606266', 14 | activeColor: '#5677fc', 15 | indexList: () => [], 16 | sticky: true, 17 | customNavHeight: 0 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/input.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:13:55 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/input.js 9 | */ 10 | export default { 11 | // index 组件 12 | input: { 13 | value: '', 14 | type: 'text', 15 | fixed: false, 16 | disabled: false, 17 | disabledColor: '#f5f7fa', 18 | clearable: false, 19 | password: false, 20 | maxlength: -1, 21 | placeholder: null, 22 | placeholderClass: 'input-placeholder', 23 | placeholderStyle: 'color: #c0c4cc', 24 | showWordLimit: false, 25 | confirmType: 'done', 26 | confirmHold: false, 27 | holdKeyboard: false, 28 | focus: false, 29 | autoBlur: false, 30 | disableDefaultPadding: false, 31 | cursor: -1, 32 | cursorSpacing: 30, 33 | selectionStart: -1, 34 | selectionEnd: -1, 35 | adjustPosition: true, 36 | inputAlign: 'left', 37 | fontSize: '15px', 38 | color: '#303133', 39 | prefixIcon: '', 40 | prefixIconStyle: '', 41 | suffixIcon: '', 42 | suffixIconStyle: '', 43 | border: 'surround', 44 | readonly: false, 45 | shape: 'square', 46 | formatter: null 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/keyboard.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:07:49 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/keyboard.js 9 | */ 10 | export default { 11 | // 键盘组件 12 | keyboard: { 13 | mode: 'number', 14 | dotDisabled: false, 15 | tooltip: true, 16 | showTips: true, 17 | tips: '', 18 | showCancel: true, 19 | showConfirm: true, 20 | random: false, 21 | safeAreaInsetBottom: true, 22 | closeOnClickOverlay: true, 23 | show: false, 24 | overlay: true, 25 | zIndex: 10075, 26 | cancelText: '取消', 27 | confirmText: '确定', 28 | autoChange: false 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/line.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:04:49 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/line.js 9 | */ 10 | export default { 11 | // line组件 12 | line: { 13 | color: '#d6d7d9', 14 | length: '100%', 15 | direction: 'row', 16 | hairline: true, 17 | margin: 0, 18 | dashed: false 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/lineProgress.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:14:11 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/lineProgress.js 9 | */ 10 | export default { 11 | // lineProgress 组件 12 | lineProgress: { 13 | activeColor: '#19be6b', 14 | inactiveColor: '#ececec', 15 | percentage: 0, 16 | showText: true, 17 | height: 12 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/link.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:45:36 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/link.js 9 | */ 10 | import config from '../config' 11 | 12 | const { 13 | color 14 | } = config 15 | export default { 16 | // link超链接组件props参数 17 | link: { 18 | color: color['u-primary'], 19 | fontSize: 15, 20 | underLine: false, 21 | href: '', 22 | mpTips: '链接已复制,请在浏览器打开', 23 | lineColor: '', 24 | text: '' 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/list.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:14:53 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/list.js 9 | */ 10 | export default { 11 | // list 组件 12 | list: { 13 | showScrollbar: false, 14 | lowerThreshold: 50, 15 | upperThreshold: 0, 16 | scrollTop: 0, 17 | offsetAccuracy: 10, 18 | enableFlex: false, 19 | pagingEnabled: false, 20 | scrollable: true, 21 | scrollIntoView: '', 22 | scrollWithAnimation: false, 23 | enableBackToTop: false, 24 | height: 0, 25 | width: 0, 26 | preLoadScreen: 1 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/listItem.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:15:40 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/listItem.js 9 | */ 10 | export default { 11 | // listItem 组件 12 | listItem: { 13 | anchor: '' 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/loadingIcon.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:45:47 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadingIcon.js 9 | */ 10 | import config from '../config' 11 | 12 | const { 13 | color 14 | } = config 15 | export default { 16 | // loading-icon加载中图标组件 17 | loadingIcon: { 18 | show: true, 19 | color: color['u-tips-color'], 20 | textColor: color['u-tips-color'], 21 | vertical: false, 22 | mode: 'spinner', 23 | size: 24, 24 | textSize: 15, 25 | text: '', 26 | timingFunction: 'ease-in-out', 27 | duration: 1200, 28 | inactiveColor: '' 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/loadingPage.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:00:23 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadingPage.js 9 | */ 10 | export default { 11 | // loading-page组件 12 | loadingPage: { 13 | loadingText: '正在加载', 14 | image: '', 15 | loadingMode: 'circle', 16 | loading: false, 17 | bgColor: '#ffffff', 18 | color: '#C8C8C8', 19 | fontSize: 19, 20 | loadingColor: '#C8C8C8' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/loadmore.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:15:26 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadmore.js 9 | */ 10 | export default { 11 | // loadmore 组件 12 | loadmore: { 13 | status: 'loadmore', 14 | bgColor: 'transparent', 15 | icon: true, 16 | fontSize: 14, 17 | color: '#606266', 18 | loadingIcon: 'spinner', 19 | loadmoreText: '加载更多', 20 | loadingText: '正在加载...', 21 | nomoreText: '没有更多了', 22 | isDot: false, 23 | iconColor: '#b7b7b7', 24 | marginTop: 10, 25 | marginBottom: 10, 26 | height: 'auto', 27 | line: false 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/modal.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:15:59 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/modal.js 9 | */ 10 | export default { 11 | // modal 组件 12 | modal: { 13 | show: false, 14 | title: '', 15 | content: '', 16 | confirmText: '确认', 17 | cancelText: '取消', 18 | showConfirmButton: true, 19 | showCancelButton: false, 20 | confirmColor: '#2979ff', 21 | cancelColor: '#606266', 22 | buttonReverse: false, 23 | zoom: true, 24 | asyncClose: false, 25 | closeOnClickOverlay: false, 26 | negativeTop: 0, 27 | width: '650rpx', 28 | confirmButtonShape: '' 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/navbar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:16:18 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/navbar.js 9 | */ 10 | import color from '../color' 11 | export default { 12 | // navbar 组件 13 | navbar: { 14 | safeAreaInsetTop: true, 15 | placeholder: false, 16 | fixed: true, 17 | border: false, 18 | leftIcon: 'arrow-left', 19 | leftText: '', 20 | rightText: '', 21 | rightIcon: '', 22 | title: '', 23 | bgColor: '#ffffff', 24 | titleWidth: '400rpx', 25 | height: '44px', 26 | leftIconSize: 20, 27 | leftIconColor: color.mainColor, 28 | autoBack: false, 29 | titleStyle: '' 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/noticeBar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:17:13 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/noticeBar.js 9 | */ 10 | export default { 11 | // noticeBar 12 | noticeBar: { 13 | text: () => [], 14 | direction: 'row', 15 | step: false, 16 | icon: 'volume', 17 | mode: '', 18 | color: '#f9ae3d', 19 | bgColor: '#fdf6ec', 20 | speed: 80, 21 | fontSize: 14, 22 | duration: 2000, 23 | disableTouch: true, 24 | url: '', 25 | linkType: 'navigateTo' 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/notify.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:10:21 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/notify.js 9 | */ 10 | export default { 11 | // notify组件 12 | notify: { 13 | top: 0, 14 | type: 'primary', 15 | color: '#ffffff', 16 | bgColor: '', 17 | message: '', 18 | duration: 3000, 19 | fontSize: 15, 20 | safeAreaInsetTop: false 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/numberBox.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:11:46 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/numberBox.js 9 | */ 10 | export default { 11 | // 步进器组件 12 | numberBox: { 13 | name: '', 14 | value: 0, 15 | min: 1, 16 | max: Number.MAX_SAFE_INTEGER, 17 | step: 1, 18 | integer: false, 19 | disabled: false, 20 | disabledInput: false, 21 | asyncChange: false, 22 | inputWidth: 35, 23 | showMinus: true, 24 | showPlus: true, 25 | decimalLength: null, 26 | longPress: true, 27 | color: '#323233', 28 | buttonSize: 30, 29 | bgColor: '#EBECEE', 30 | cursorSpacing: 100, 31 | disableMinus: false, 32 | disablePlus: false, 33 | iconStyle: '' 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/numberKeyboard.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:08:05 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/numberKeyboard.js 9 | */ 10 | export default { 11 | // 数字键盘 12 | numberKeyboard: { 13 | mode: 'number', 14 | dotDisabled: false, 15 | random: false 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/overlay.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:06:50 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/overlay.js 9 | */ 10 | export default { 11 | // overlay组件 12 | overlay: { 13 | show: false, 14 | zIndex: 10070, 15 | duration: 300, 16 | opacity: 0.5 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/parse.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:17:33 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/parse.js 9 | */ 10 | export default { 11 | // parse 12 | parse: { 13 | copyLink: true, 14 | errorImg: '', 15 | lazyLoad: false, 16 | loadingImg: '', 17 | pauseVideo: true, 18 | previewImg: true, 19 | setTitle: true, 20 | showImgMenu: true 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/picker.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:18:20 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/picker.js 9 | */ 10 | export default { 11 | // picker 12 | picker: { 13 | show: false, 14 | showToolbar: true, 15 | title: '', 16 | columns: () => [], 17 | loading: false, 18 | itemHeight: 44, 19 | cancelText: '取消', 20 | confirmText: '确定', 21 | cancelColor: '#909193', 22 | confirmColor: '#3c9cff', 23 | singleIndex: 0, 24 | visibleItemCount: 5, 25 | keyName: 'text', 26 | closeOnClickOverlay: false, 27 | defaultIndex: () => [], 28 | immediateChange: false 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/popup.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:06:33 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/popup.js 9 | */ 10 | export default { 11 | // popup组件 12 | popup: { 13 | show: false, 14 | overlay: true, 15 | mode: 'bottom', 16 | duration: 300, 17 | closeable: false, 18 | overlayStyle: () => {}, 19 | closeOnClickOverlay: true, 20 | zIndex: 10075, 21 | safeAreaInsetBottom: true, 22 | safeAreaInsetTop: false, 23 | closeIconPos: 'top-right', 24 | round: 0, 25 | zoom: true, 26 | bgColor: '', 27 | overlayOpacity: 0.5 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/radio.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:02:34 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/radio.js 9 | */ 10 | export default { 11 | // radio组件 12 | radio: { 13 | name: '', 14 | shape: '', 15 | disabled: '', 16 | labelDisabled: '', 17 | activeColor: '', 18 | inactiveColor: '', 19 | iconSize: '', 20 | labelSize: '', 21 | label: '', 22 | labelColor: '', 23 | size: '', 24 | iconColor: '', 25 | placement: '' 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/radioGroup.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:03:12 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/radioGroup.js 9 | */ 10 | export default { 11 | // radio-group组件 12 | radioGroup: { 13 | value: '', 14 | disabled: false, 15 | shape: 'circle', 16 | activeColor: '#2979ff', 17 | inactiveColor: '#c8c9cc', 18 | name: '', 19 | size: 18, 20 | placement: 'row', 21 | label: '', 22 | labelColor: '#303133', 23 | labelSize: 14, 24 | labelDisabled: false, 25 | iconColor: '#ffffff', 26 | iconSize: 12, 27 | borderBottom: false, 28 | iconPlacement: 'left' 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/rate.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:05:09 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/rate.js 9 | */ 10 | export default { 11 | // rate组件 12 | rate: { 13 | value: 1, 14 | count: 5, 15 | disabled: false, 16 | size: 18, 17 | inactiveColor: '#b2b2b2', 18 | activeColor: '#FA3534', 19 | gutter: 4, 20 | minCount: 1, 21 | allowHalf: false, 22 | activeIcon: 'star-fill', 23 | inactiveIcon: 'star', 24 | touchable: true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/readMore.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:18:41 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/readMore.js 9 | */ 10 | export default { 11 | // readMore 12 | readMore: { 13 | showHeight: 400, 14 | toggle: false, 15 | closeText: '展开阅读全文', 16 | openText: '收起', 17 | color: '#2979ff', 18 | fontSize: 14, 19 | textIndent: '2em', 20 | name: '' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/row.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:18:58 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/row.js 9 | */ 10 | export default { 11 | // row 12 | row: { 13 | gutter: 0, 14 | justify: 'start', 15 | align: 'center' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/rowNotice.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:19:13 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/rowNotice.js 9 | */ 10 | export default { 11 | // rowNotice 12 | rowNotice: { 13 | text: '', 14 | icon: 'volume', 15 | mode: '', 16 | color: '#f9ae3d', 17 | bgColor: '#fdf6ec', 18 | fontSize: 14, 19 | speed: 80 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/scrollList.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:19:28 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/scrollList.js 9 | */ 10 | export default { 11 | // scrollList 12 | scrollList: { 13 | indicatorWidth: 50, 14 | indicatorBarWidth: 20, 15 | indicator: true, 16 | indicatorColor: '#f2f2f2', 17 | indicatorActiveColor: '#3c9cff', 18 | indicatorStyle: '' 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/search.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:19:45 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/search.js 9 | */ 10 | export default { 11 | // search 12 | search: { 13 | shape: 'round', 14 | bgColor: '#f2f2f2', 15 | placeholder: '请输入关键字', 16 | clearabled: true, 17 | focus: false, 18 | showAction: true, 19 | actionStyle: () => ({}), 20 | actionText: '搜索', 21 | inputAlign: 'left', 22 | inputStyle: () => ({}), 23 | disabled: false, 24 | borderColor: 'transparent', 25 | searchIconColor: '#909399', 26 | searchIconSize: 22, 27 | color: '#606266', 28 | placeholderColor: '#909399', 29 | searchIcon: 'search', 30 | margin: '0', 31 | animation: false, 32 | value: '', 33 | maxlength: '-1', 34 | height: 32, 35 | label: null 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/section.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:07:33 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/section.js 9 | */ 10 | export default { 11 | // u-section组件 12 | section: { 13 | title: '', 14 | subTitle: '更多', 15 | right: true, 16 | fontSize: 15, 17 | bold: true, 18 | color: '#303133', 19 | subColor: '#909399', 20 | showLine: true, 21 | lineColor: '', 22 | arrow: true 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/skeleton.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:20:14 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/skeleton.js 9 | */ 10 | export default { 11 | // skeleton 12 | skeleton: { 13 | loading: true, 14 | animate: true, 15 | rows: 0, 16 | rowsWidth: '100%', 17 | rowsHeight: 18, 18 | title: true, 19 | titleWidth: '50%', 20 | titleHeight: 18, 21 | avatar: false, 22 | avatarSize: 32, 23 | avatarShape: 'circle' 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/slider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:08:25 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/slider.js 9 | */ 10 | export default { 11 | // slider组件 12 | slider: { 13 | value: 0, 14 | blockSize: 18, 15 | min: 0, 16 | max: 100, 17 | step: 1, 18 | activeColor: '#2979ff', 19 | inactiveColor: '#c0c4cc', 20 | blockColor: '#ffffff', 21 | showValue: false, 22 | disabled:false, 23 | blockStyle: () => {} 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/statusBar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:20:39 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/statusBar.js 9 | */ 10 | export default { 11 | // statusBar 12 | statusBar: { 13 | bgColor: 'transparent' 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/steps.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:12:37 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/steps.js 9 | */ 10 | export default { 11 | // steps组件 12 | steps: { 13 | direction: 'row', 14 | current: 0, 15 | activeColor: '#3c9cff', 16 | inactiveColor: '#969799', 17 | activeIcon: '', 18 | inactiveIcon: '', 19 | dot: false 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/stepsItem.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:12:55 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/stepsItem.js 9 | */ 10 | export default { 11 | // steps-item组件 12 | stepsItem: { 13 | title: '', 14 | desc: '', 15 | iconSize: 17, 16 | error: false 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/sticky.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:01:30 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/sticky.js 9 | */ 10 | export default { 11 | // sticky组件 12 | sticky: { 13 | offsetTop: 0, 14 | customNavHeight: 0, 15 | disabled: false, 16 | bgColor: 'transparent', 17 | zIndex: '', 18 | index: '' 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/subsection.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:12:20 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/subsection.js 9 | */ 10 | export default { 11 | // subsection组件 12 | subsection: { 13 | list: [], 14 | current: 0, 15 | activeColor: '#3c9cff', 16 | inactiveColor: '#303133', 17 | mode: 'button', 18 | fontSize: 12, 19 | bold: true, 20 | bgColor: '#eeeeef', 21 | keyName: 'name' 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/swipeAction.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:00:42 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/swipeAction.js 9 | */ 10 | export default { 11 | // swipe-action组件 12 | swipeAction: { 13 | autoClose: true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/swipeActionItem.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:01:13 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/swipeActionItem.js 9 | */ 10 | export default { 11 | // swipeActionItem 组件 12 | swipeActionItem: { 13 | show: false, 14 | name: '', 15 | disabled: false, 16 | threshold: 20, 17 | autoClose: true, 18 | options: [], 19 | duration: 300 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/swiper.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:21:38 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/swiper.js 9 | */ 10 | export default { 11 | // swiper 组件 12 | swiper: { 13 | list: () => [], 14 | indicator: false, 15 | indicatorActiveColor: '#FFFFFF', 16 | indicatorInactiveColor: 'rgba(255, 255, 255, 0.35)', 17 | indicatorStyle: '', 18 | indicatorMode: 'line', 19 | autoplay: true, 20 | current: 0, 21 | currentItemId: '', 22 | interval: 3000, 23 | duration: 300, 24 | circular: false, 25 | previousMargin: 0, 26 | nextMargin: 0, 27 | acceleration: false, 28 | displayMultipleItems: 1, 29 | easingFunction: 'default', 30 | keyName: 'url', 31 | imgMode: 'aspectFill', 32 | height: 130, 33 | bgColor: '#f3f4f6', 34 | radius: 4, 35 | loading: false, 36 | showTitle: false 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/swipterIndicator.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:22:07 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/swiperIndicator.js 9 | */ 10 | export default { 11 | // swiperIndicator 组件 12 | swiperIndicator: { 13 | length: 0, 14 | current: 0, 15 | indicatorActiveColor: '', 16 | indicatorInactiveColor: '', 17 | indicatorMode: 'line' 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/switch.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:22:24 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/switch.js 9 | */ 10 | export default { 11 | // switch 12 | switch: { 13 | loading: false, 14 | disabled: false, 15 | size: 25, 16 | activeColor: '#2979ff', 17 | inactiveColor: '#ffffff', 18 | value: false, 19 | activeValue: true, 20 | inactiveValue: false, 21 | asyncChange: false, 22 | space: 0 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/tabbar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:22:40 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabbar.js 9 | */ 10 | export default { 11 | // tabbar 12 | tabbar: { 13 | value: null, 14 | safeAreaInsetBottom: true, 15 | border: true, 16 | zIndex: 1, 17 | activeColor: '#1989fa', 18 | inactiveColor: '#7d7e80', 19 | fixed: true, 20 | placeholder: true 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/tabbarItem.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:22:55 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabbarItem.js 9 | */ 10 | export default { 11 | // 12 | tabbarItem: { 13 | name: null, 14 | icon: '', 15 | badge: null, 16 | dot: false, 17 | text: '', 18 | badgeStyle: 'top: 6px;right:2px;' 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/tabs.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:23:14 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabs.js 9 | */ 10 | export default { 11 | // 12 | tabs: { 13 | duration: 300, 14 | list: () => [], 15 | lineColor: '#3c9cff', 16 | activeStyle: () => ({ 17 | color: '#303133' 18 | }), 19 | inactiveStyle: () => ({ 20 | color: '#606266' 21 | }), 22 | lineWidth: 20, 23 | lineHeight: 3, 24 | lineBgSize: 'cover', 25 | itemStyle: () => ({ 26 | height: '44px' 27 | }), 28 | scrollable: true, 29 | current: 0, 30 | keyName: 'name' 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/tag.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:23:37 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/tag.js 9 | */ 10 | export default { 11 | // tag 组件 12 | tag: { 13 | type: 'primary', 14 | disabled: false, 15 | size: 'medium', 16 | shape: 'square', 17 | text: '', 18 | bgColor: '', 19 | color: '', 20 | borderColor: '', 21 | closeColor: '#C6C7CB', 22 | name: '', 23 | plainFill: false, 24 | plain: false, 25 | closable: false, 26 | show: true, 27 | icon: '' 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/text.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:23:58 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/text.js 9 | */ 10 | export default { 11 | // text 组件 12 | text: { 13 | type: '', 14 | show: true, 15 | text: '', 16 | prefixIcon: '', 17 | suffixIcon: '', 18 | mode: '', 19 | href: '', 20 | format: '', 21 | call: false, 22 | openType: '', 23 | bold: false, 24 | block: false, 25 | lines: '', 26 | color: '#303133', 27 | size: 15, 28 | iconStyle: () => ({ 29 | fontSize: '15px' 30 | }), 31 | decoration: 'none', 32 | margin: 0, 33 | lineHeight: '', 34 | align: 'left', 35 | wordWrap: 'normal' 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/textarea.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:24:32 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/textarea.js 9 | */ 10 | export default { 11 | // textarea 组件 12 | textarea: { 13 | value: '', 14 | placeholder: '', 15 | placeholderClass: 'textarea-placeholder', 16 | placeholderStyle: 'color: #c0c4cc', 17 | height: 70, 18 | confirmType: '', 19 | disabled: false, 20 | count: false, 21 | focus: false, 22 | autoHeight: false, 23 | fixed: false, 24 | cursorSpacing: 0, 25 | cursor: '', 26 | showConfirmBar: true, 27 | selectionStart: -1, 28 | selectionEnd: -1, 29 | adjustPosition: true, 30 | disableDefaultPadding: false, 31 | holdKeyboard: false, 32 | maxlength: 140, 33 | border: 'surround', 34 | formatter: null 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/toast.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:07:07 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/toast.js 9 | */ 10 | export default { 11 | // toast组件 12 | toast: { 13 | zIndex: 10090, 14 | loading: false, 15 | text: '', 16 | icon: '', 17 | type: '', 18 | loadingMode: '', 19 | show: '', 20 | overlay: false, 21 | position: 'center', 22 | params: () => {}, 23 | duration: 2000, 24 | isTab: false, 25 | url: '', 26 | callback: null, 27 | back: false 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/toolbar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:24:55 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/toolbar.js 9 | */ 10 | export default { 11 | // toolbar 组件 12 | toolbar: { 13 | show: true, 14 | cancelText: '取消', 15 | confirmText: '确认', 16 | cancelColor: '#909193', 17 | confirmColor: '#3c9cff', 18 | title: '' 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/tooltip.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:25:14 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/tooltip.js 9 | */ 10 | export default { 11 | // tooltip 组件 12 | tooltip: { 13 | text: '', 14 | copyText: '', 15 | size: 14, 16 | color: '#606266', 17 | bgColor: 'transparent', 18 | direction: 'top', 19 | zIndex: 10071, 20 | showCopy: true, 21 | buttons: () => [], 22 | overlay: true, 23 | showToast: true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/transition.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 16:59:00 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/transition.js 9 | */ 10 | export default { 11 | // transition动画组件的props 12 | transition: { 13 | show: false, 14 | mode: 'fade', 15 | duration: '300', 16 | timingFunction: 'ease-out' 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /uview-ui/libs/config/props/upload.js: -------------------------------------------------------------------------------- 1 | /* 2 | * @Author : LQ 3 | * @Description : 4 | * @version : 1.0 5 | * @Date : 2021-08-20 16:44:21 6 | * @LastAuthor : LQ 7 | * @lastTime : 2021-08-20 17:09:50 8 | * @FilePath : /u-view2.0/uview-ui/libs/config/props/upload.js 9 | */ 10 | export default { 11 | // upload组件 12 | upload: { 13 | accept: 'image', 14 | capture: () => ['album', 'camera'], 15 | compressed: true, 16 | camera: 'back', 17 | maxDuration: 60, 18 | uploadIcon: 'camera-fill', 19 | uploadIconColor: '#D3D4D6', 20 | useBeforeRead: false, 21 | previewFullImage: true, 22 | maxCount: 52, 23 | disabled: false, 24 | imageMode: 'aspectFill', 25 | name: '', 26 | sizeType: () => ['original', 'compressed'], 27 | multiple: false, 28 | deletable: true, 29 | maxSize: Number.MAX_VALUE, 30 | fileList: () => [], 31 | uploadText: '', 32 | width: 80, 33 | height: 80, 34 | previewImage: true 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /uview-ui/libs/config/zIndex.js: -------------------------------------------------------------------------------- 1 | // uniapp在H5中各API的z-index值如下: 2 | /** 3 | * actionsheet: 999 4 | * modal: 999 5 | * navigate: 998 6 | * tabbar: 998 7 | * toast: 999 8 | */ 9 | 10 | export default { 11 | toast: 10090, 12 | noNetwork: 10080, 13 | // popup包含popup,actionsheet,keyboard,picker的值 14 | popup: 10075, 15 | mask: 10070, 16 | navbar: 980, 17 | topTips: 975, 18 | sticky: 970, 19 | indexListSticky: 965 20 | } 21 | -------------------------------------------------------------------------------- /uview-ui/libs/css/components.scss: -------------------------------------------------------------------------------- 1 | @import "./mixin.scss"; 2 | 3 | /* #ifndef APP-NVUE */ 4 | // 由于uView是基于nvue环境进行开发的,此环境中普通元素默认为flex-direction: column; 5 | // 所以在非nvue中,需要对元素进行重置为flex-direction: column; 否则可能会表现异常 6 | view, scroll-view, swiper-item { 7 | display: flex; 8 | flex-direction: column; 9 | flex-shrink: 0; 10 | flex-grow: 0; 11 | flex-basis: auto; 12 | align-items: stretch; 13 | align-content: flex-start; 14 | } 15 | /* #endif */ 16 | -------------------------------------------------------------------------------- /uview-ui/libs/css/h5.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/uview-ui/libs/css/h5.scss -------------------------------------------------------------------------------- /uview-ui/libs/css/mixin.scss: -------------------------------------------------------------------------------- 1 | // 通过scss的mixin功能,把原来需要写4行的css,变成一行 2 | // 目的是保持代码干净整洁,不至于在nvue下,到处都要写display:flex的条件编译 3 | @mixin flex($direction: row) { 4 | /* #ifndef APP-NVUE */ 5 | display: flex; 6 | /* #endif */ 7 | flex-direction: $direction; 8 | } 9 | -------------------------------------------------------------------------------- /uview-ui/libs/css/mp.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/uview-ui/libs/css/mp.scss -------------------------------------------------------------------------------- /uview-ui/libs/css/nvue.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgbq/uni-template/7d79da00fbf9aec80257bbc69e4418695057bdcc/uview-ui/libs/css/nvue.scss -------------------------------------------------------------------------------- /uview-ui/libs/css/vue.scss: -------------------------------------------------------------------------------- 1 | // 历遍生成4个方向的底部安全区 2 | @each $d in top, right, bottom, left { 3 | .u-safe-area-inset-#{$d} { 4 | padding-#{$d}: 0; 5 | padding-#{$d}: constant(safe-area-inset-#{$d}); 6 | padding-#{$d}: env(safe-area-inset-#{$d}); 7 | } 8 | } 9 | 10 | //提升H5端uni.toast()的层级,避免被uView的modal等遮盖 11 | /* #ifdef H5 */ 12 | uni-toast { 13 | z-index: 10090; 14 | } 15 | uni-toast .uni-toast { 16 | z-index: 10090; 17 | } 18 | /* #endif */ 19 | 20 | // 隐藏scroll-view的滚动条 21 | ::-webkit-scrollbar { 22 | display: none; 23 | width: 0 !important; 24 | height: 0 !important; 25 | -webkit-appearance: none; 26 | background: transparent; 27 | } -------------------------------------------------------------------------------- /uview-ui/libs/function/debounce.js: -------------------------------------------------------------------------------- 1 | let timeout = null 2 | 3 | /** 4 | * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数 5 | * 6 | * @param {Function} func 要执行的回调函数 7 | * @param {Number} wait 延时的时间 8 | * @param {Boolean} immediate 是否立即执行 9 | * @return null 10 | */ 11 | function debounce(func, wait = 500, immediate = false) { 12 | // 清除定时器 13 | if (timeout !== null) clearTimeout(timeout) 14 | // 立即执行,此类情况一般用不到 15 | if (immediate) { 16 | const callNow = !timeout 17 | timeout = setTimeout(() => { 18 | timeout = null 19 | }, wait) 20 | if (callNow) typeof func === 'function' && func() 21 | } else { 22 | // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法 23 | timeout = setTimeout(() => { 24 | typeof func === 'function' && func() 25 | }, wait) 26 | } 27 | } 28 | 29 | export default debounce 30 | -------------------------------------------------------------------------------- /uview-ui/libs/function/platform.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 注意: 3 | * 此部分内容,在vue-cli模式下,需要在vue.config.js加入如下内容才有效: 4 | * module.exports = { 5 | * transpileDependencies: ['uview-v2'] 6 | * } 7 | */ 8 | 9 | let platform = 'none' 10 | 11 | // #ifdef VUE3 12 | platform = 'vue3' 13 | // #endif 14 | 15 | // #ifdef VUE2 16 | platform = 'vue2' 17 | // #endif 18 | 19 | // #ifdef APP-PLUS 20 | platform = 'plus' 21 | // #endif 22 | 23 | // #ifdef APP-NVUE 24 | platform = 'nvue' 25 | // #endif 26 | 27 | // #ifdef H5 28 | platform = 'h5' 29 | // #endif 30 | 31 | // #ifdef MP-WEIXIN 32 | platform = 'weixin' 33 | // #endif 34 | 35 | // #ifdef MP-ALIPAY 36 | platform = 'alipay' 37 | // #endif 38 | 39 | // #ifdef MP-BAIDU 40 | platform = 'baidu' 41 | // #endif 42 | 43 | // #ifdef MP-TOUTIAO 44 | platform = 'toutiao' 45 | // #endif 46 | 47 | // #ifdef MP-QQ 48 | platform = 'qq' 49 | // #endif 50 | 51 | // #ifdef MP-KUAISHOU 52 | platform = 'kuaishou' 53 | // #endif 54 | 55 | // #ifdef MP-360 56 | platform = '360' 57 | // #endif 58 | 59 | // #ifdef MP 60 | platform = 'mp' 61 | // #endif 62 | 63 | // #ifdef QUICKAPP-WEBVIEW 64 | platform = 'quickapp-webview' 65 | // #endif 66 | 67 | // #ifdef QUICKAPP-WEBVIEW-HUAWEI 68 | platform = 'quickapp-webview-huawei' 69 | // #endif 70 | 71 | // #ifdef QUICKAPP-WEBVIEW-UNION 72 | platform = 'quckapp-webview-union' 73 | // #endif 74 | 75 | export default platform 76 | -------------------------------------------------------------------------------- /uview-ui/libs/function/throttle.js: -------------------------------------------------------------------------------- 1 | let timer; let 2 | flag 3 | /** 4 | * 节流原理:在一定时间内,只能触发一次 5 | * 6 | * @param {Function} func 要执行的回调函数 7 | * @param {Number} wait 延时的时间 8 | * @param {Boolean} immediate 是否立即执行 9 | * @return null 10 | */ 11 | function throttle(func, wait = 500, immediate = true) { 12 | if (immediate) { 13 | if (!flag) { 14 | flag = true 15 | // 如果是立即执行,则在wait毫秒内开始时执行 16 | typeof func === 'function' && func() 17 | timer = setTimeout(() => { 18 | flag = false 19 | }, wait) 20 | } 21 | } else if (!flag) { 22 | flag = true 23 | // 如果是非立即执行,则在wait毫秒内的结束处执行 24 | timer = setTimeout(() => { 25 | flag = false 26 | typeof func === 'function' && func() 27 | }, wait) 28 | } 29 | } 30 | export default throttle 31 | -------------------------------------------------------------------------------- /uview-ui/libs/luch-request/core/InterceptorManager.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | function InterceptorManager() { 4 | this.handlers = [] 5 | } 6 | 7 | /** 8 | * Add a new interceptor to the stack 9 | * 10 | * @param {Function} fulfilled The function to handle `then` for a `Promise` 11 | * @param {Function} rejected The function to handle `reject` for a `Promise` 12 | * 13 | * @return {Number} An ID used to remove interceptor later 14 | */ 15 | InterceptorManager.prototype.use = function use(fulfilled, rejected) { 16 | this.handlers.push({ 17 | fulfilled, 18 | rejected 19 | }) 20 | return this.handlers.length - 1 21 | } 22 | 23 | /** 24 | * Remove an interceptor from the stack 25 | * 26 | * @param {Number} id The ID that was returned by `use` 27 | */ 28 | InterceptorManager.prototype.eject = function eject(id) { 29 | if (this.handlers[id]) { 30 | this.handlers[id] = null 31 | } 32 | } 33 | 34 | /** 35 | * Iterate over all the registered interceptors 36 | * 37 | * This method is particularly useful for skipping over any 38 | * interceptors that may have become `null` calling `eject`. 39 | * 40 | * @param {Function} fn The function to call for each interceptor 41 | */ 42 | InterceptorManager.prototype.forEach = function forEach(fn) { 43 | this.handlers.forEach((h) => { 44 | if (h !== null) { 45 | fn(h) 46 | } 47 | }) 48 | } 49 | 50 | export default InterceptorManager 51 | -------------------------------------------------------------------------------- /uview-ui/libs/luch-request/core/buildFullPath.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import isAbsoluteURL from '../helpers/isAbsoluteURL' 4 | import combineURLs from '../helpers/combineURLs' 5 | 6 | /** 7 | * Creates a new URL by combining the baseURL with the requestedURL, 8 | * only when the requestedURL is not already an absolute URL. 9 | * If the requestURL is absolute, this function returns the requestedURL untouched. 10 | * 11 | * @param {string} baseURL The base URL 12 | * @param {string} requestedURL Absolute or relative URL to combine 13 | * @returns {string} The combined full path 14 | */ 15 | export default function buildFullPath(baseURL, requestedURL) { 16 | if (baseURL && !isAbsoluteURL(requestedURL)) { 17 | return combineURLs(baseURL, requestedURL) 18 | } 19 | return requestedURL 20 | } 21 | -------------------------------------------------------------------------------- /uview-ui/libs/luch-request/core/defaults.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 默认的全局配置 3 | */ 4 | 5 | export default { 6 | baseURL: '', 7 | header: {}, 8 | method: 'GET', 9 | dataType: 'json', 10 | // #ifndef MP-ALIPAY 11 | responseType: 'text', 12 | // #endif 13 | custom: {}, 14 | // #ifdef H5 || APP-PLUS || MP-ALIPAY || MP-WEIXIN 15 | timeout: 60000, 16 | // #endif 17 | // #ifdef APP-PLUS 18 | sslVerify: true, 19 | // #endif 20 | // #ifdef H5 21 | withCredentials: false, 22 | // #endif 23 | // #ifdef APP-PLUS 24 | firstIpv4: false, 25 | // #endif 26 | validateStatus: function validateStatus(status) { 27 | return status >= 200 && status < 300 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /uview-ui/libs/luch-request/core/dispatchRequest.js: -------------------------------------------------------------------------------- 1 | import adapter from '../adapters/index' 2 | 3 | export default (config) => adapter(config) 4 | -------------------------------------------------------------------------------- /uview-ui/libs/luch-request/core/settle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Resolve or reject a Promise based on response status. 3 | * 4 | * @param {Function} resolve A function that resolves the promise. 5 | * @param {Function} reject A function that rejects the promise. 6 | * @param {object} response The response. 7 | */ 8 | export default function settle(resolve, reject, response) { 9 | const { validateStatus } = response.config 10 | const status = response.statusCode 11 | if (status && (!validateStatus || validateStatus(status))) { 12 | resolve(response) 13 | } else { 14 | reject(response) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /uview-ui/libs/luch-request/helpers/combineURLs.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /** 4 | * Creates a new URL by combining the specified URLs 5 | * 6 | * @param {string} baseURL The base URL 7 | * @param {string} relativeURL The relative URL 8 | * @returns {string} The combined URL 9 | */ 10 | export default function combineURLs(baseURL, relativeURL) { 11 | return relativeURL 12 | ? `${baseURL.replace(/\/+$/, '')}/${relativeURL.replace(/^\/+/, '')}` 13 | : baseURL 14 | } 15 | -------------------------------------------------------------------------------- /uview-ui/libs/luch-request/helpers/isAbsoluteURL.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /** 4 | * Determines whether the specified URL is absolute 5 | * 6 | * @param {string} url The URL to test 7 | * @returns {boolean} True if the specified URL is absolute, otherwise false 8 | */ 9 | export default function isAbsoluteURL(url) { 10 | // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). 11 | // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed 12 | // by any combination of letters, digits, plus, period, or hyphen. 13 | return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url) 14 | } 15 | -------------------------------------------------------------------------------- /uview-ui/libs/luch-request/index.js: -------------------------------------------------------------------------------- 1 | import Request from './core/Request' 2 | 3 | export default Request 4 | -------------------------------------------------------------------------------- /uview-ui/libs/mixin/button.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | lang: String, 4 | sessionFrom: String, 5 | sendMessageTitle: String, 6 | sendMessagePath: String, 7 | sendMessageImg: String, 8 | showMessageCard: Boolean, 9 | appParameter: String, 10 | formType: String, 11 | openType: String 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /uview-ui/libs/mixin/mpMixin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | // #ifdef MP-WEIXIN 3 | // 将自定义节点设置成虚拟的,更加接近Vue组件的表现,能更好的使用flex属性 4 | options: { 5 | virtualHost: true 6 | } 7 | // #endif 8 | } 9 | -------------------------------------------------------------------------------- /uview-ui/libs/mixin/mpShare.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | onLoad() { 3 | // 设置默认的转发参数 4 | uni.$u.mpShare = { 5 | title: '', // 默认为小程序名称 6 | path: '', // 默认为当前页面路径 7 | imageUrl: '' // 默认为当前页面的截图 8 | } 9 | }, 10 | onShareAppMessage() { 11 | return uni.$u.mpShare 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /uview-ui/libs/mixin/openType.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | openType: String 4 | }, 5 | methods: { 6 | onGetUserInfo(event) { 7 | this.$emit('getuserinfo', event.detail) 8 | }, 9 | onContact(event) { 10 | this.$emit('contact', event.detail) 11 | }, 12 | onGetPhoneNumber(event) { 13 | this.$emit('getphonenumber', event.detail) 14 | }, 15 | onError(event) { 16 | this.$emit('error', event.detail) 17 | }, 18 | onLaunchApp(event) { 19 | this.$emit('launchapp', event.detail) 20 | }, 21 | onOpenSetting(event) { 22 | this.$emit('opensetting', event.detail) 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /uview-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "uview-ui", 3 | "name": "uview-ui", 4 | "displayName": "uView2.0重磅发布,利剑出鞘,一统江湖", 5 | "version": "2.0.30", 6 | "description": "uView UI已完美兼容nvue,全面的组件和便捷的工具会让您信手拈来,如鱼得水", 7 | "keywords": [ 8 | "uview", 9 | "uview", 10 | "ui", 11 | "ui", 12 | "uni-app", 13 | "uni-app", 14 | "ui" 15 | ], 16 | "repository": "https://github.com/umicro/uView2.0", 17 | "engines": { 18 | "HBuilderX": "^3.1.0" 19 | }, 20 | "dcloudext": { 21 | "category": [ 22 | "前端组件", 23 | "通用组件" 24 | ], 25 | "sale": { 26 | "regular": { 27 | "price": "0.00" 28 | }, 29 | "sourcecode": { 30 | "price": "0.00" 31 | } 32 | }, 33 | "contact": { 34 | "qq": "1416956117" 35 | }, 36 | "declaration": { 37 | "ads": "无", 38 | "data": "无", 39 | "permissions": "无" 40 | }, 41 | "npmurl": "https://www.npmjs.com/package/uview-ui" 42 | }, 43 | "uni_modules": { 44 | "dependencies": [], 45 | "encrypt": [], 46 | "platforms": { 47 | "cloud": { 48 | "tcb": "y", 49 | "aliyun": "y" 50 | }, 51 | "client": { 52 | "Vue": { 53 | "vue2": "y", 54 | "vue3": "n" 55 | }, 56 | "App": { 57 | "app-vue": "y", 58 | "app-nvue": "y" 59 | }, 60 | "H5-mobile": { 61 | "Safari": "y", 62 | "Android Browser": "y", 63 | "微信浏览器(Android)": "y", 64 | "QQ浏览器(Android)": "y" 65 | }, 66 | "H5-pc": { 67 | "Chrome": "y", 68 | "IE": "y", 69 | "Edge": "y", 70 | "Firefox": "y", 71 | "Safari": "y" 72 | }, 73 | "小程序": { 74 | "微信": "y", 75 | "阿里": "y", 76 | "百度": "y", 77 | "字节跳动": "y", 78 | "QQ": "y" 79 | }, 80 | "快应用": { 81 | "华为": "y", 82 | "联盟": "y" 83 | } 84 | } 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /uview-ui/theme.scss: -------------------------------------------------------------------------------- 1 | // 此文件为uView的主题变量,这些变量目前只能通过uni.scss引入才有效,另外由于 2 | // uni.scss中引入的样式会同时混入到全局样式文件和单独每一个页面的样式中,造成微信程序包太大, 3 | // 故uni.scss只建议放scss变量名相关样式,其他的样式可以通过main.js或者App.vue引入 4 | 5 | $u-main-color: #303133; 6 | $u-content-color: #606266; 7 | $u-tips-color: #909193; 8 | $u-light-color: #c0c4cc; 9 | $u-border-color: #dadbde; 10 | $u-bg-color: #f3f4f6; 11 | $u-disabled-color: #c8c9cc; 12 | 13 | $u-primary: #3c9cff; 14 | $u-primary-dark: #398ade; 15 | $u-primary-disabled: #9acafc; 16 | $u-primary-light: #ecf5ff; 17 | 18 | $u-warning: #f9ae3d; 19 | $u-warning-dark: #f1a532; 20 | $u-warning-disabled: #f9d39b; 21 | $u-warning-light: #fdf6ec; 22 | 23 | $u-success: #5ac725; 24 | $u-success-dark: #53c21d; 25 | $u-success-disabled: #a9e08f; 26 | $u-success-light: #f5fff0; 27 | 28 | $u-error: #f56c6c; 29 | $u-error-dark: #e45656; 30 | $u-error-disabled: #f7b2b2; 31 | $u-error-light: #fef0f0; 32 | 33 | $u-info: #909399; 34 | $u-info-dark: #767a82; 35 | $u-info-disabled: #c4c6c9; 36 | $u-info-light: #f4f4f5; 37 | 38 | // scss混入,为了少写几行#ifndef 39 | @mixin flex($direction: row) { 40 | /* #ifndef APP-NVUE */ 41 | display: flex; 42 | /* #endif */ 43 | flex-direction: $direction; 44 | } 45 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | const TransformPages = require('uni-read-pages') 2 | const { 3 | webpack 4 | } = new TransformPages() 5 | module.exports = { 6 | configureWebpack: { 7 | plugins: [ 8 | new webpack.DefinePlugin({ 9 | ROUTES: webpack.DefinePlugin.runtimeValue(() => { 10 | const tfPages = new TransformPages({ 11 | includes: ['path', 'name', 'aliasPath', 'meta'] 12 | }); 13 | return JSON.stringify(tfPages.routes) 14 | }, true) 15 | }) 16 | ] 17 | } 18 | } 19 | --------------------------------------------------------------------------------