commit c46b07d1da94582c73f282989f2a18e00748080e Author: 脆皮鸭 <1003092440@qq.com> Date: Sat Aug 12 22:15:27 2023 +0800 提交 diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..1d451e7 --- /dev/null +++ b/.env.development @@ -0,0 +1,11 @@ +# 页面标题 +VITE_APP_TITLE = 金武联驾校 + +# 开发环境配置 +VITE_APP_ENV = 'development' + +# 金武联驾校/开发环境 +VITE_APP_BASE_API = 'https://test.jd-mall.cn/dev/zongheng-api/' + +# +VITE_WEB_BASE_URL = 'https://test.jd-mall.cn/dev/zongheng' diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..7f92d8e --- /dev/null +++ b/.env.production @@ -0,0 +1,11 @@ +# 页面标题 +VITE_APP_TITLE = 金武联驾校 + +# 开发环境配置 +VITE_APP_ENV = 'production' + +# 金武联驾校/开发环境 +VITE_APP_BASE_API = 'https://i.equ-tech.com/zongheng-api/' + +# +VITE_WEB_BASE_URL = 'https://i.equ-tech.com/zongheng' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..78a752d --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +.DS_Store +node_modules/ +dist/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +**/*.log + +tests/**/coverage/ +tests/e2e/reports +selenium-debug.log + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.local + +package-lock.json +yarn.lock diff --git a/index.html b/index.html new file mode 100644 index 0000000..fb81ddc --- /dev/null +++ b/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + +
+ + + diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..730626d --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "types": [ + "@dcloudio/types", + "miniprogram-api-typings", + "mini-types" + ] + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..1ca10ae --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "OA", + "version": "0.0.0", + "scripts": { + "dev:h5": "uni", + "dev": "uni -p mp-weixin", + "build:h5": "uni build", + "build": "uni build -p mp-weixin", + "build-test:mp-weixin": "uni --mode test -p mp-weixin" + }, + "dependencies": { + "@dcloudio/uni-app": "3.0.0-alpha-3060420220922001", + "@dcloudio/uni-app-plus": "3.0.0-alpha-3060420220922001", + "@dcloudio/uni-components": "3.0.0-alpha-3060420220922001", + "@dcloudio/uni-h5": "3.0.0-alpha-3060420220922001", + "@dcloudio/uni-mp-weixin": "3.0.0-alpha-3060420220922001", + "jsencrypt-plus": "^0.1.0", + "pinia": "^2.0.24", + "pinia-plugin-persist-uni": "^1.2.0", + "vue": "^3.2.37", + "vue-i18n": "^9.1.9" + }, + "devDependencies": { + "@dcloudio/types": "^3.0.13", + "@dcloudio/uni-automator": "3.0.0-alpha-3060420220922001", + "@dcloudio/uni-cli-shared": "3.0.0-alpha-3060420220922001", + "@dcloudio/uni-stacktracey": "3.0.0-alpha-3060420220922001", + "@dcloudio/vite-plugin-uni": "3.0.0-alpha-3060420220922001", + "sass": "^1.63.6", + "sass-loader": "^13.3.2", + "vite": "^2.9.14" + } +} diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..7bd0892 --- /dev/null +++ b/src/App.vue @@ -0,0 +1,19 @@ + + + diff --git a/src/jtools/api/index.js b/src/jtools/api/index.js new file mode 100644 index 0000000..e9eab95 --- /dev/null +++ b/src/jtools/api/index.js @@ -0,0 +1,10 @@ +import request from '../request/index.js'; + +export function getAliCompanyInfo(data) { + return request({ + url: 'alipay/findAliCompanyInfo', + method: 'POST', + data, + noToken: true + }); +} \ No newline at end of file diff --git a/src/jtools/api/login.js b/src/jtools/api/login.js new file mode 100644 index 0000000..77eaf29 --- /dev/null +++ b/src/jtools/api/login.js @@ -0,0 +1,10 @@ +import request from '../request/index.js'; + +export function login(data) { + return request({ + url: 'api-admin/pcLogin', + method: 'POST', + data, + noToken: true + }); +} diff --git a/src/jtools/constants/common.js b/src/jtools/constants/common.js new file mode 100644 index 0000000..f6484fb --- /dev/null +++ b/src/jtools/constants/common.js @@ -0,0 +1,11 @@ + +// 请求状态码 +const RESPONSE_TYPE = { + SUCCESS: '0000', + RELOGIN: 'E403', + ERROR: '4000' +}; + +export default { + RESPONSE_TYPE, +}; diff --git a/src/jtools/constants/index.js b/src/jtools/constants/index.js new file mode 100644 index 0000000..26524a5 --- /dev/null +++ b/src/jtools/constants/index.js @@ -0,0 +1,5 @@ +import common from './common.js' + +export default { + ...common +} \ No newline at end of file diff --git a/src/jtools/platform/index.js b/src/jtools/platform/index.js new file mode 100644 index 0000000..ec8dad7 --- /dev/null +++ b/src/jtools/platform/index.js @@ -0,0 +1,75 @@ +/** + * Platform v1.0.0 + * @Class Platform + * @description jtools-platform 1.0.0 全平台兼容 + * @Author lidongtony + * @Date 2021-04-07 + * @Email lidongtony@qq.com + */ + +// #ifdef H5 +// 微信H5 +import wxsdk from '@/jtools/wechat/sdk'; +// #endif +export default { + // 获取当前运行平台 + get() { + let platform = ''; + // #ifdef H5 + wxsdk.isWechat() ? (platform = 'wxOfficialAccount') : (platform = 'H5'); + // #endif + // #ifdef APP-PLUS + platform = 'App'; + // #endif + // #ifdef MP-WEIXIN + platform = 'wxMiniProgram'; + // #endif + // #ifdef MP-ALIPAY + platform = 'alipayMiniProgram'; + // #endif + if (platform !== '') { + uni.setStorageSync('platform', platform); + } else { + uni.showToast({ + title: '暂不支持该平台', + icon: 'none' + }); + } + return platform; + }, + set(platform) { + uni.setStorageSync('platform', platform); + return platform; + }, + + // 检测当前运行机型 + device() { + return uni.getSystemInfoSync().platform; + }, + + // 获取前端真实主机 + host() { + let host = location.origin; + let basePath = router.$route.options.base; + let mode = router.$route.options.mode; + host += basePath; + if (mode === 'hash') { + host += '#/'; + } + return host; + }, + + // 处理wechat jssdk 签名网址(针对IOS微信浏览器做优化) + entry() { + let that = this; + var entryUrl = location.href; + if (this.device() === 'ios') { + if (typeof location.entryUrl !== 'undefined') { + entryUrl = location.entryUrl; + } else { + location.entryUrl = entryUrl; + } + } + return entryUrl; + } +}; diff --git a/src/jtools/request/index.js b/src/jtools/request/index.js new file mode 100644 index 0000000..241d7de --- /dev/null +++ b/src/jtools/request/index.js @@ -0,0 +1,47 @@ +import storage from '../storage/index.js'; +//把配置项单独处理 +let server_url = ' '; // 请求地址 +let token = ' '; // 凭证 + +server_url = import.meta.env.VITE_APP_BASE_API; //环境配置 +function service(options = {}) { + storage.get('token') && (token = storage.get('token')); + options.url = `${server_url}${options.url}`; + if (!options.noToken) { + if (!token.trim()) { + uni.redirectTo({ + url: '/pages/login/login' + }); + } else { + options.header = { + Authorization: `Bearer ${token}` + }; + } + } + return new Promise((resolved, rejected) => { + //成功 + options.success = res => { + if (res.data.code == 'E403') { + // 未登录 + uni.showToast({ + title: res.data.message, + icon: 'none' + }); + uni.redirectTo({ + url: '/pages/login/login' + }); + //请求成功 + resolved(res.data); + } else { + //请求成功 + resolved(res.data); + } + }; + //错误 + options.fail = err => { + rejected(err); //错误 + }; + uni.request(options); + }); +} +export default service; diff --git a/src/jtools/storage/index.js b/src/jtools/storage/index.js new file mode 100644 index 0000000..e134c45 --- /dev/null +++ b/src/jtools/storage/index.js @@ -0,0 +1,40 @@ +const APP_NAME = import.meta.env.VITE_APP_TITLE +export default { + set(key, value) { + // 命名规则 小程序名称-环境 + const storageName = `${APP_NAME}-${process.env.NODE_ENV}` + const temp = uni.getStorageSync(storageName) || {} + temp[key] = value + uni.setStorageSync(storageName, temp) + }, + get(key) { + // 命名规则 小程序名称-环境 + const storageName = `${APP_NAME}-${process.env.NODE_ENV}` + const temp = uni.getStorageSync(storageName) || {} + if(temp.hasOwnProperty(key)) { + return temp[key] + } else { + return undefined + } + }, + remove(key) { + // 命名规则 小程序名称-环境 + const storageName = `${APP_NAME}-${process.env.NODE_ENV}` + const temp = uni.getStorageSync(storageName) || {} + if(temp.hasOwnProperty(key)) { + delete temp[key]; + uni.setStorageSync(storageName, temp); + } + }, + has(key) { + // 命名规则 小程序名称-环境 + const storageName = `${APP_NAME}-${process.env.NODE_ENV}` + const temp = uni.getStorageSync(storageName) || {} + return temp.hasOwnProperty(key) + }, + clear() { + // 命名规则 小程序名称-环境 + const storageName = `${APP_NAME}-${process.env.NODE_ENV}` + uni.removeStorageSync(storageName) + } +} diff --git a/src/jtools/store/index.js b/src/jtools/store/index.js new file mode 100644 index 0000000..80c3042 --- /dev/null +++ b/src/jtools/store/index.js @@ -0,0 +1,18 @@ +import { createPinia } from 'pinia'; + +// 自动注入所有pinia模块 +const files = import.meta.globEager('./*.js'); +const modules = {}; +Object.keys(files).forEach((key) => { + modules[key.replace(/(.*\/)*([^.]+).*/gi, '$2')] = files[key].default; +}); + +export const setupPinia = (app) => { + const pinia = createPinia(); + + app.use(pinia); +}; + +export default (name) => { + return modules[name](); +}; diff --git a/src/jtools/store/user.js b/src/jtools/store/user.js new file mode 100644 index 0000000..d1fde67 --- /dev/null +++ b/src/jtools/store/user.js @@ -0,0 +1,68 @@ +import { defineStore } from 'pinia'; +import http from '@/jtools/request/index'; +import constants from '@/jtools/constants'; +import storage from '@/jtools/storage'; + +const user = defineStore({ + id: 'user', + state: () => ({ + token: storage.get('token'), + isLogin: storage.get('isLogin'), // 是否登陆 + userInfo: storage.get('userInfo'), // 用户信息 + }), + + actions: { + // 登录 + showAuth() { + // router.replaceAll('/pages/login/login'); + }, + + // 获取个人信息 + async getInfo() { + const { error, data } = await userApi.profile(); + if (error !== 0) return; + this.userInfo = data; + return Promise.resolve(data); + }, + + + // 设置token + setToken(token = '') { + if (token === '') { + this.isLogin = false; + this.token = '' + this.userInfo = {} + storage.set('token', ''); + storage.set('isLogin', false); + storage.set('userInfo', {}); + } else { + this.isLogin = true; + this.token = token + storage.set('token', token); + storage.set('isLogin', true); + } + return this.isLogin; + }, + + // 重置用户默认数据 + resetUserData() { + this.setToken(); + }, + // 登出 + async logout(force = false) { + if (!force) { + const { error } = await userApi.logout(); + if (error === 0) { + this.resetUserData(); + } + } + if (force) { + this.resetUserData(); + } + + return !this.isLogin; + }, + }, +}); + +export default user; diff --git a/src/jtools/utils/throttle.js b/src/jtools/utils/throttle.js new file mode 100644 index 0000000..c318127 --- /dev/null +++ b/src/jtools/utils/throttle.js @@ -0,0 +1,31 @@ +let timer; +let flag; +/** + * 节流原理:在一定时间内,只能触发一次 + * + * @param {Function} func 要执行的回调函数 + * @param {Number} wait 延时的时间 + * @param {Boolean} immediate 是否立即执行 + * @return null + */ +function throttle(func, wait = 500, immediate = true) { + if (immediate) { + if (!flag) { + flag = true; + // 如果是立即执行,则在wait毫秒内开始时执行 + typeof func === 'function' && func(); + timer = setTimeout(() => { + flag = false; + }, wait); + } else { + } + } else if (!flag) { + flag = true; + // 如果是非立即执行,则在wait毫秒内的结束处执行 + timer = setTimeout(() => { + flag = false; + typeof func === 'function' && func(); + }, wait); + } +} +export default throttle; diff --git a/src/jtools/wechat/sdk.js b/src/jtools/wechat/sdk.js new file mode 100644 index 0000000..80f4476 --- /dev/null +++ b/src/jtools/wechat/sdk.js @@ -0,0 +1,170 @@ +var jweixin = require("jweixin-module"); +import http from "@/jtools/request/index"; +import $platform from "@/jtools/platform"; +export default { + //判断是否在微信中 + isWechat() { + var ua = window.navigator.userAgent.toLowerCase(); + if (ua.match(/micromessenger/i) == "micromessenger") { + return true; + } else { + return false; + } + }, + // 鉴权页面 + initJssdk(callback) { + http("common.wxJssdk", { + uri: encodeURIComponent($platform.entry()) + }).then(res => { + jweixin.config({ + debug: res.data.debug, + appId: res.data.appId, + timestamp: res.data.timestamp, + nonceStr: res.data.nonceStr, + signature: res.data.signature, + jsApiList: res.data.jsApiList, + openTagList: res.data.openTagList + }); + if (callback) { + callback(res.data); + } + }); + }, + + //在需要定位页面调用 + getLocation(callback) { + this.isWechat() && this.initJssdk(function(res) { + jweixin.ready(function() { + jweixin.getLocation({ + type: "gcj02", // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' + success: function(res) { + callback(res); + }, + fail: function(res) { + console.log("%c微信H5sdk,getLocation失败:", + "color:green;background:yellow"); + }, + }); + }); + }); + }, + + //获取微信收货地址 + openAddress(callback) { + this.isWechat() && this.initJssdk(function(res) { + jweixin.ready(function() { + jweixin.openAddress({ + success: function(res) { + callback(res); + }, + fail: function(err) { + console.log("%c微信H5sdk,openAddress失败:", + "color:green;background:yellow"); + }, + complete: function(msg) {} + }); + }); + }); + }, + + // 微信扫码 + scanQRCode(callback) { + this.isWechat() && this.initJssdk(function(res) { + jweixin.ready(function() { + jweixin.scanQRCode({ + needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果, + scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有 + success: function(res) { + callback(res); + }, + fail: function(res) { + console.log("%c微信H5sdk,scanQRCode失败:", + "color:green;background:yellow"); + }, + }); + }); + }); + }, + + // 微信分享 + share(data, callback) { + this.isWechat() && this.initJssdk(function(res) { + jweixin.ready(function() { + var shareData = { + title: data.title, + desc: data.desc, + link: data.path, + imgUrl: data.image, + success: function(res) { + callback(res); + // 分享后的一些操作,比如分享统计等等 + }, + cancel: function(res) {} + }; + + jweixin.updateAppMessageShareData(shareData); //新版接口 + //分享到朋友圈接口 + // jweixin.updateTimelineShareData(shareData); + + + }); + }); + + }, + + + // 打开坐标位置 + openLocation(data, callback) { //打开位置 + this.isWechat() && this.initJssdk(function(res) { + jweixin.ready(function() { + jweixin.openLocation({ //根据传入的坐标打开地图 + latitude: data.latitude, + longitude: data.longitude + }); + }); + }); + }, + // 选择图片 + chooseImage(callback) { //选择图片 + this.isWechat() && this.initJssdk(function(res) { + jweixin.ready(function() { + jweixin.chooseImage({ + count: 1, + sizeType: ["compressed"], + sourceType: ["album"], + success: function(rs) { + callback(rs); + } + }); + }); + }); + }, + + //微信支付 + wxpay(data, callback) { + let that = this; + this.isWechat() && this.initJssdk(function(res) { + jweixin.ready(function() { + jweixin.chooseWXPay({ + timestamp: data + .timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 + nonceStr: data.nonceStr, // 支付签名随机串,不长于 32 位 + package: data.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*) + signType: data.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5' + paySign: data.paySign, // 支付签名 + success: function(res) { + callback(res); + }, + fail: function(res) { + console.log("%c微信H5sdk,chooseWXPay失败:", + "color:green;background:yellow"); + callback(res); + }, + cancel: function(res) { + + }, + }); + }); + }); + } +}; diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..ef50aaf --- /dev/null +++ b/src/main.js @@ -0,0 +1,19 @@ +import { + createSSRApp +} from "vue"; +import uviewPlus from './uni_modules/uview-plus' +import platform from '@/jtools/platform'; +import constants from '@/jtools/constants'; +import storage from '@/jtools/storage'; + +import App from "./App.vue"; +export function createApp() { + const app = createSSRApp(App); + app.config.globalProperties.$platform=platform + app.config.globalProperties.$constants=constants + app.config.globalProperties.$storage=storage + app.use(uviewPlus) + return { + app, + }; +} diff --git a/src/manifest.json b/src/manifest.json new file mode 100644 index 0000000..6a0fa1a --- /dev/null +++ b/src/manifest.json @@ -0,0 +1,77 @@ +{ + "name" : "金武联驾校", + "appid" : "__UNI__401C711", + "description" : "", + "versionName" : "1.0.0", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "wx756a7425037609fb", + "setting" : { + "urlCheck" : false, + "minified" : true, + "es6" : false + }, + "usingComponents" : true, + "permission" : {} + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3", + "fallbackLocale" : "zh-Hans", + "locale" : "zh-Hans" +} diff --git a/src/pages.json b/src/pages.json new file mode 100644 index 0000000..8a02a39 --- /dev/null +++ b/src/pages.json @@ -0,0 +1,62 @@ +{ + "easycom": { + "^u-(.*)": "uview-plus/components/u-$1/u-$1.vue", + "^j-(.*)": "@/components/j-$1/j-$1.vue" + }, + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "金武联驾考" + } + }, + { + "path": "pages/me/index", + "style": { + "navigationBarTitleText": "我的" + } + } + ,{ + "path" : "pages/questionBank/questionBank", + "style" : + { + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + + }, + { + "path": "pages/questionBank/practiceExams", + "style": { + "navigationBarTitleText": "模拟考试" + } + } + ], + + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "通用模板", + "navigationBarBackgroundColor": "#FFF", + "backgroundColor": "#FFF" + }, + "tabBar": { + "borderStyle": "white", + "selectedColor": "#333333", + "backgroundColor": "#FFFFFF", + "color": "#999999", + "list": [{ + "pagePath": "pages/index/index", + "iconPath": "static/image/tabbar/tab-home.png", + "selectedIconPath":"static/image/tabbar/tab-home-selected.png", + "text": "首页" + }, + + { + "pagePath": "pages/me/index", + "iconPath": "static/image/tabbar/tab-mine.png", + "selectedIconPath": "static/image/tabbar/tab-mine-selected.png", + "text": "我的" + } + ] + } + } diff --git a/src/pages/index/components/Subject1.vue b/src/pages/index/components/Subject1.vue new file mode 100644 index 0000000..1f0f5e6 --- /dev/null +++ b/src/pages/index/components/Subject1.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/src/pages/index/components/Subject2.vue b/src/pages/index/components/Subject2.vue new file mode 100644 index 0000000..18c7e22 --- /dev/null +++ b/src/pages/index/components/Subject2.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue new file mode 100644 index 0000000..742b28a --- /dev/null +++ b/src/pages/index/index.vue @@ -0,0 +1,52 @@ + + + + diff --git a/src/pages/login/agreement.vue b/src/pages/login/agreement.vue new file mode 100644 index 0000000..2e8d56e --- /dev/null +++ b/src/pages/login/agreement.vue @@ -0,0 +1,27 @@ + + + + + diff --git a/src/pages/login/forget.vue b/src/pages/login/forget.vue new file mode 100644 index 0000000..83a4500 --- /dev/null +++ b/src/pages/login/forget.vue @@ -0,0 +1,255 @@ + + + + + diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue new file mode 100644 index 0000000..af57c29 --- /dev/null +++ b/src/pages/login/login.vue @@ -0,0 +1,140 @@ + + + + + diff --git a/src/pages/login/reg.vue b/src/pages/login/reg.vue new file mode 100644 index 0000000..d51c945 --- /dev/null +++ b/src/pages/login/reg.vue @@ -0,0 +1,303 @@ + + + + + diff --git a/src/pages/me/index.vue b/src/pages/me/index.vue new file mode 100644 index 0000000..42eabd7 --- /dev/null +++ b/src/pages/me/index.vue @@ -0,0 +1,30 @@ + + + + diff --git a/src/pages/public/404.vue b/src/pages/public/404.vue new file mode 100644 index 0000000..cab3f1b --- /dev/null +++ b/src/pages/public/404.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/src/pages/questionBank/components/Question.vue b/src/pages/questionBank/components/Question.vue new file mode 100644 index 0000000..48b0915 --- /dev/null +++ b/src/pages/questionBank/components/Question.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/pages/questionBank/practiceExams.vue b/src/pages/questionBank/practiceExams.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/src/pages/questionBank/practiceExams.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/src/pages/questionBank/questionBank.vue b/src/pages/questionBank/questionBank.vue new file mode 100644 index 0000000..c339c9f --- /dev/null +++ b/src/pages/questionBank/questionBank.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/static/image/index/500icon.png b/src/static/image/index/500icon.png new file mode 100644 index 0000000..ad60c48 Binary files /dev/null and b/src/static/image/index/500icon.png differ diff --git a/src/static/image/index/index_bg.png b/src/static/image/index/index_bg.png new file mode 100644 index 0000000..3173bc1 Binary files /dev/null and b/src/static/image/index/index_bg.png differ diff --git a/src/static/image/index/realicon.png b/src/static/image/index/realicon.png new file mode 100644 index 0000000..5abae1d Binary files /dev/null and b/src/static/image/index/realicon.png differ diff --git a/src/static/image/index/testbeforeicon.png b/src/static/image/index/testbeforeicon.png new file mode 100644 index 0000000..f4fd2ed Binary files /dev/null and b/src/static/image/index/testbeforeicon.png differ diff --git a/src/static/image/index/vipAds.png b/src/static/image/index/vipAds.png new file mode 100644 index 0000000..e292575 Binary files /dev/null and b/src/static/image/index/vipAds.png differ diff --git a/src/static/image/index/vipicon.png b/src/static/image/index/vipicon.png new file mode 100644 index 0000000..ac7068e Binary files /dev/null and b/src/static/image/index/vipicon.png differ diff --git a/src/static/image/index/worryicon.png b/src/static/image/index/worryicon.png new file mode 100644 index 0000000..f0103dc Binary files /dev/null and b/src/static/image/index/worryicon.png differ diff --git a/src/static/image/index/zxicon.png b/src/static/image/index/zxicon.png new file mode 100644 index 0000000..f04598f Binary files /dev/null and b/src/static/image/index/zxicon.png differ diff --git a/src/static/image/tabbar/tab-home-selected.png b/src/static/image/tabbar/tab-home-selected.png new file mode 100644 index 0000000..12ba615 Binary files /dev/null and b/src/static/image/tabbar/tab-home-selected.png differ diff --git a/src/static/image/tabbar/tab-home.png b/src/static/image/tabbar/tab-home.png new file mode 100644 index 0000000..e9ef186 Binary files /dev/null and b/src/static/image/tabbar/tab-home.png differ diff --git a/src/static/image/tabbar/tab-mine-selected.png b/src/static/image/tabbar/tab-mine-selected.png new file mode 100644 index 0000000..23773dc Binary files /dev/null and b/src/static/image/tabbar/tab-mine-selected.png differ diff --git a/src/static/image/tabbar/tab-mine.png b/src/static/image/tabbar/tab-mine.png new file mode 100644 index 0000000..e3c1fe2 Binary files /dev/null and b/src/static/image/tabbar/tab-mine.png differ diff --git a/src/static/index.scss b/src/static/index.scss new file mode 100644 index 0000000..30d57ce --- /dev/null +++ b/src/static/index.scss @@ -0,0 +1,3 @@ +page { + color: $uni-color-primary; +} \ No newline at end of file diff --git a/src/static/style/app.scss b/src/static/style/app.scss new file mode 100644 index 0000000..2106fa3 --- /dev/null +++ b/src/static/style/app.scss @@ -0,0 +1,429 @@ +/*每个页面公共css */ +page { + background: #f4f4f4; + color: #383838; + font-size: 26rpx; +} +/* image{ + background: skyblue; +} */ +image, +video { + display: block; +} +image{will-change: transform} +/*字体颜色*/ +.cor_fff { + color: #fff; +} +.cor_000 { + color: #000; +} +.cor_red { + color: #eb3831; +} +.cor_333 { + color: #333; +} +.cor_666 { + color: #666; +} +.cor_999 { + color: #999; +} +.cor_ccc { + color: #ccc; +} +.cor_eee{ + color: #eee; +} +.cor_text { + color: #262626; +} +.cor_38{ + color: #383838; +} +.cor_8c { + color: #8c8c8c; +} +.cor_80 { + color: #808080; +} +.cor_A6 { + color: #A6A6A6; +} +.cor_theme { + color: $uni-color-primary !important; +} +.cor_blue { + color: #43aefd; +} +.bk_theme { + background-color: $uni-color-primary !important; + color: #fff !important; +} + +.fwb { + font-weight: bold; +} + +/**图片大小**/ +.img16 { + width: 16rpx; + height: 16rpx; +} + +.mt70 { + margin-top: 70rpx; +} +.mt80 { + margin-top: 80rpx; +} +.mt90 { + margin-top: 90rpx; +} + +.mr60 { + margin-right: 60rpx; +} +.mr70 { + margin-right: 70rpx; +} +.mr100 { + margin-right: 100rpx; +} +.m20lr { + margin-left: 20rpx; + margin-right: 20rpx; +} +.m30lr { + margin-left: 30rpx; + margin-right: 30rpx; +} + +/**border**/ +.bb1 { + border-bottom: solid 1px #f4f4f4; +} +.bt1 { + border-top: solid 1px #eee; +} +.border1 { + border: solid 1px #eee; +} +.border_tb1{ + border-bottom: solid 1px #eee; + border-top: solid 1px #eee; +} +/***背景**/ +.bk_f { + background-color: #fff; +} +.bk_f9 { + background-color: #f9f9f9; +} +.bk_f2 { + background-color: #f2f2f2; +} +.bk_rgba05 { + background-color: rgba(0, 0, 0, 0.5); +} +.bk_main { + background-color: #3d92e1; +} +.bk_blue { + background: skyblue; +} +.bk_red { + background-color: #ff2d17; +} +.bk_white { + background-color: #fff; +} +.opt5 { + opacity: 0.5; +} + +.br_p50 { + border-radius: 50%; +} +.br_ltb{ + border-radius: 50% 0 0 50% !important; +} +.br_rtb{ + border-radius: 0 50% 50% 0 !important; +} + +/**宽度**/ +.wp20 { + width: 20%; +} +.wp25 { + width: 25%; +} +.wp40 { + width: 40%; +} +.wp50 { + width: 50%; +} +.wp100 { + width: 100%; +} + +/**高度**/ +.hp100 { + height: 100%; +} + +/**行距**/ +.lh1 { + line-height: 1; +} +.lh50{ + line-height: 50rpx; +} +/**flex 设置**/ +.df { + display: flex; +} +.fldr { + flex-direction: row !important; +} +.fldc { + flex-direction: column !important; +} +.fldrr { + flex-direction: row-reverse !important; +} +.jcsb { + justify-content: space-between !important; +} +.jcsba { + justify-content: space-around !important; +} +.jcfs { + justify-content: flex-start !important; +} +.jcc { + justify-content: center !important; +} +.jcfe { + justify-content: flex-end; +} +.fl1 { + flex: 1 !important; +} +.fw { + flex-wrap: wrap; +} +.ai-center { + align-items: center !important; +} +.ai-start { + align-items: flex-start; +} +.ai-baseline { + align-items: flex-end; +} +.ai-end { + align-items: flex-end; +} +.fls0 { + flex-shrink: 0; +} + +/*对齐*/ +.tac { + text-align: center; +} +.tar { + text-align: right; +} +.tal { + text-align: left; +} + +/** 其他样式 **/ +.ov { + overflow: hidden; +} +.ovya { + overflow-y: auto; +} +.bsb { + box-sizing: border-box; +} +.re { + position: relative; +} +.ab { + position: absolute; +} +.ab_full { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; +} +.fixed { + position: fixed; +} +.db { + display: block; +} +.di { + display: inline; +} +.dib { + display: inline-block; +} +.dif { + display: inline-flex; +} +.v-middle { + position: absolute; + top: 50%; + transform: translateY(-50%); +} +.h-middle { + position: absolute; + left: 50%; + transform: translateX(-50%); +} +.middle { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.text-line-through { + text-decoration: line-through; +} +.text-underline { + text-decoration: underline; +} +.wb { + display: block; + word-break: break-all; + word-wrap: break-word; +} +.vam { + vertical-align: middle; +} + +/*灰色分割条*/ +.gray_bar { + height: 20rpx; + background: #f5f5f5; +} + +.scroll-box { + flex: 1; + height: 100%; + position: relative; +} +.content_box { + flex: 1; + overflow-y: auto; +} +.theme-tag { + display: inline-block; + padding: 0 25rpx; + height: 36rpx; + line-height: 36rpx; + border-radius: 20rpx; + border: 2rpx solid $uni-color-primary; + box-sizing: content-box; + font-size: 24rpx; + color: $uni-color-primary; +} +.selector { + position: relative; + padding-left: 30rpx; + padding-right: 20rpx; + height: 60rpx; + line-height: 60rpx; + border-radius: 30rpx; + font-size: 24rpx; + color: #333; + background-color: #fff; +} +.selector.actived { + color: $uni-color-primary; + border: 1rpx solid $uni-color-primary; + background: #e6f2ff; +} + + +.img24 { + width: 24px; + height: 24px; +} + +.img36 { + width: 36px; + height: 36px; +} + +.img48 { + width: 48px; + height: 48px; +} + +.img50 { + width: 50px; + height: 50px; +} + +.img120 { + width: 120px; + height: 120px; +} + +.img140 { + width: 140px; + height: 140px; +} + +.theme-bg-light { + background-color: $uni-color-primary; +} +.pt100 { + padding-top: 100rpx; +} + +.theme-btn { + padding: 0 20px; + min-width: 250rpx; + height: 78rpx; + line-height: 80rpx; + text-align: center; + font-size: 28rpx; + color: #fff; + border-radius: 40rpx; + background-color: $uni-color-primary; +} + +.theme-btn-light { + padding: 0 20px; + min-width: 250rpx; + height: 78rpx; + line-height: 80rpx; + text-align: center; + font-size: 28rpx; + color: #fff; + border-radius: 40rpx; + color: $uni-color-primary; + border: 1px solid $uni-color-primary; +} + +.img70 { + width:70px; + height: 70px; +} + +// .u-tabbar { +// max-height: 50px; +// } diff --git a/src/static/style/base.scss b/src/static/style/base.scss new file mode 100644 index 0000000..b38a3a2 --- /dev/null +++ b/src/static/style/base.scss @@ -0,0 +1,678 @@ +html, +body, +#app { + box-sizing: border-box; + height: 100%; + font-family: Avenir, Helvetica, Arial, sans-serif; +} + +/* 背景 */ +.bc-000 { + background-color: #000; +} +.bc-f5 { + background-color: #f5f5f5; +} +.bc-f7 { + background-color: #f7f7f7; +} +.bc-fff { + background-color: #fff; +} +.bc-t { + background-color: transparent; +} + +/* border */ +.border-top { + border-top: solid 1px #eee; +} +.border-bottom { + border-bottom: solid 1px #eee; +} +.border-0 { + border: 0px; +} +.border-1 { + border: 1px solid #eee; +} +.border-2 { + border: 2px solid #eee; +} +.border-3 { + border: 3px solid #eee; +} +.border-4 { + border: 4px solid #eee; +} +.border-5 { + border: 5px solid #eee; +} + +/* 文本格式 */ +.i { + word-wrap: break-word; + text-align: justify; + text-justify: inter-ideograph; +} + +/* 字体颜色 */ +.cor-000 { + color: #000000; +} +.cor-333 { + color: #333333; +} +.cor-666 { + color: #666666; +} +.cor-999 { + color: #999999; +} +.cor-aaa { + color: #aaaaaa; +} +.cor-ccc { + color: #cccccc; +} +.cor-ddd { + color: #dddddd; +} +.cor-fff { + color: #ffffff; +} +.cor-price { + color: #C03639; +} + +/* 行距 */ +.lh10 { + line-height: 1; +} +.lh11 { + line-height: 1.1; +} +.lh12 { + line-height: 1.2; +} +.lh13 { + line-height: 1.3; +} +.lh14 { + line-height: 1.4; +} +.lh15 { + line-height: 1.5; +} +.lh16 { + line-height: 1.6; +} +.lh18 { + line-height: 1.8; +} +.lh20 { + line-height: 2; +} +.lh25 { + line-height: 2.5; +} +.lh30 { + line-height: 3; +} + +/* 高度 */ +.hvh100 { + height: 100vh; + overflow: hidden; +} +.hp100 { + height: 100%; + overflow: hidden; +} + +/* float */ +.float-l { + float: left; +} +.float-r { + float: right; +} +.clearfix-both::after { + display: table; + clear: both; + content: ''; +} + +/* flex */ +.flex { + display: flex; +} +.fl0 { + flex: 0; +} +.fl1 { + flex: 1; +} +.fl2 { + flex: 2; +} +.fl3 { + flex: 3; +} +.fl4 { + flex: 4; +} +.fld-r { + flex-direction: row; +} +.fld-c { + flex-direction: column; +} +.fld-rr { + flex-direction: row-reverse; +} +.flw-w { + flex-wrap: wrap; +} +.fls0 { + flex-shrink: 0; +} + +.jc-sb { + justify-content: space-between; +} +.jc-sa { + justify-content: space-around; +} +.jc-fs { + justify-content: flex-start; +} +.jc-c { + justify-content: center; +} +.jc-fe { + justify-content: flex-end; +} + +.ai-c { + align-items: center; +} +.ai-s { + align-items: stretch; +} +.ai-fs { + align-items: flex-start; +} +.ai-fe { + align-items: flex-end; +} + +/* 对齐 */ +.text-center { + text-align: center; +} +.text-right { + text-align: right; +} +.text-left { + text-align: left; +} + +/* display */ +.none { + display: none; +} +.block { + display: block; +} +.inline { + display: inline; +} +.inline-block { + display: inline-block; +} + +/* 溢出 */ +.text-ellipsis { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.text-ellipsis2 { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} +.text-ellipsis3 { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; +} + +/* 其他 */ +.middle { + position: absolute; + z-index: 2; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.middle-y { + position: absolute; + z-index: 2; + top: 50%; + transform: translateY(-50%); +} +.middle-x { + position: absolute; + z-index: 2; + left: 50%; + transform: translateX(-50%); +} +.text-line-through { + text-decoration: line-through; +} +.text-underline { + text-decoration: underline; +} +.overflow-h { + overflow: hidden; +} +.overflow-y { + overflow-y: auto; + overflow-x: hidden; +} +.overflow-x { + overflow-x: auto; + overflow-y: hidden; +} +.border-box { + box-sizing: border-box; +} +.content-box { + box-sizing: content-box; +} +.relative { + position: relative; + z-index: 1; +} +.absolute { + position: absolute; + z-index: 2; +} +.absolute-full { + position: absolute; + z-index: 2; + top: 0; + left: 0; + right: 0; + bottom: 0; +} +.fixed { + position: fixed; + z-index: 9; +} +.break-all { + display: block; + word-break: break-all; + word-wrap: break-word; +} +.nowrap { + white-space: nowrap; +} +.va-m { + vertical-align: middle; +} +.va-t { + vertical-align: top; +} +.va-b { + vertical-align: bottom; +} + +.opacity0 { + opacity: 0; +} +.opacity1 { + opacity: 0.1; +} +.opacity2 { + opacity: 0.2; +} +.opacity3 { + opacity: 0.3; +} +.opacity4 { + opacity: 0.4; +} +.opacity5 { + opacity: 0.5; +} +.opacity6 { + opacity: 0.6; +} +.opacity7 { + opacity: 0.7; +} +.opacity8 { + opacity: 0.8; +} +.opacity9 { + opacity: 0.9; +} +.opacity10 { + opacity: 1; +} + +/* z-index */ +.z-index-1 { + z-index: -1; +} +.z-index0 { + z-index: 0; +} +.z-index1 { + z-index: 1; +} +.z-index2 { + z-index: 2; +} +.z-index3 { + z-index: 3; +} +.z-index4 { + z-index: 4; +} +.z-index5 { + z-index: 5; +} +.z-index6 { + z-index: 6; +} +.z-index7 { + z-index: 7; +} +.z-index8 { + z-index: 8; +} +.z-index9 { + z-index: 9; +} +.z-index10 { + z-index: 10; +} +.z-index15 { + z-index: 15; +} +.z-index19 { + z-index: 19; +} +.z-index20 { + z-index: 20; +} +.z-index99 { + z-index: 99; +} +.z-index100 { + z-index: 100; +} +.z-index300 { + z-index: 300; +} +.z-index500 { + z-index: 500; +} +.z-index999 { + z-index: 999; +} + +/* 宽度 */ +.wp20 { + width: 20%; +} +.wp23 { + width: 23%; +} +.wp24 { + width: 24%; +} +.wp25 { + width: 25%; +} +.wp30 { + width: 30%; +} +.wp31 { + width: 31%; +} +.wp32 { + width: 32%; +} +.wp33 { + width: 33%; +} +.wp40 { + width: 40%; +} +.wp45 { + width: 45%; +} +.wp48 { + width: 48%; +} +.wp49 { + width: 49%; +} +.wp50 { + width: 50%; +} +.wp60 { + width: 60%; +} +.wp70 { + width: 70%; +} +.wp80 { + width: 80%; +} +.wp85 { + width: 85%; +} +.wp90 { + width: 90%; +} +.wp95 { + width: 95%; +} +.wp100 { + width: 100%; +} +.wvw100 { + width: 100vw; +} +.wp100-i { + width: 100% !important; +} + +/* 字体样式 */ +.arial { + font-family: Arial; +} + +/* 字体大小 */ +@for $i from 0 through 100 { + .fs#{$i} { + font-size: $i + px; + } + .img#{$i} { + width: $i + px; + height: $i + px; + } +} + +.fw400 { + font-weight: 400; +} +.fw500 { + font-weight: 500; +} +.fw600 { + font-weight: 600; +} +.fw700 { + font-weight: 700; +} +.fw800 { + font-weight: 800; +} +.fw900 { + font-weight: 900; +} + +.m0a { + margin: 0 auto; +} + +.br-p50 { + border-radius: 50%; +} + +/* marging */ +.mt-3 { + margin-top: -3px; +} +.mt-2 { + margin-top: -2px; +} +.mt-1 { + margin-top: -1px; +} + +.mr-3 { + margin-right: -3px; +} +.mr-2 { + margin-right: -2px; +} +.mr-1 { + margin-right: -1px; +} + +.mr-p1 { + margin-right: 1%; +} +.mr-p2 { + margin-right: 2%; +} +.mr-p3 { + margin-right: 3%; +} +.mr-p4 { + margin-right: 4%; +} +.mr-p5 { + margin-right: 5%; +} + +.mb-5 { + margin-bottom: -5px; +} +.mb-4 { + margin-bottom: -4px; +} +.mb-3 { + margin-bottom: -3px; +} +.mb-2 { + margin-bottom: -2px; +} +.mb-1 { + margin-bottom: -1px; +} + +.ml-5 { + margin-left: -5px; +} +.ml-4 { + margin-left: -4px; +} +.ml-3 { + margin-left: -3px; +} +.ml-2 { + margin-left: -2px; +} +.ml-1 { + margin-left: -1px; +} + +@for $i from 0 through 50 { + .m#{$i} { + margin: $i + px; + } + .mt#{$i} { + margin-top: $i + px; + } + .ml#{$i} { + margin-left: $i + px; + } + .mb#{$i} { + margin-bottom: $i + px; + } + .mr#{$i} { + margin-right: $i + px; + } + .m#{$i}tb { + margin-top: $i + px; + margin-bottom: $i + px; + } + .m#{$i}lr { + margin-left: $i + px; + margin-right: $i + px; + } + .p#{$i} { + padding: $i + px; + } + .pt#{$i} { + padding-top: $i + px; + } + .pl#{$i} { + padding-left: $i + px; + } + .pb#{$i} { + padding-bottom: $i + px; + } + .pr#{$i} { + padding-right: $i + px; + } + .p#{$i}lr { + padding-left: $i + px; + padding-right: $i + px; + } + .p#{$i}tb { + padding-top: $i + px; + padding-bottom: $i + px; + } + .br#{$i} { + border-radius: $i + px; + } +} + +@for $i from -10 through 20 { + .top#{$i} { + top: $i + px; + } + .left#{$i} { + left: $i + px; + } + .right#{$i} { + right: $i + px; + } + .bottom#{$i} { + bottom: $i + px; + } +} diff --git a/src/static/style/colorui.css b/src/static/style/colorui.css new file mode 100644 index 0000000..5bbe867 --- /dev/null +++ b/src/static/style/colorui.css @@ -0,0 +1,3924 @@ +/* + ColorUi for uniApp v2.1.6 | by 文晓港 2019-05-31 10:44:24 + 仅供学习交流,如作它用所承受的法律责任一概与作者无关 + + *使用ColorUi开发扩展与插件时,请注明基于ColorUi开发 + + (QQ交流群:240787041) +*/ + +/* ================== + 初始化 + ==================== */ +body { + background-color: #f1f1f1; + font-size: 28upx; + color: #333333; + font-family: Helvetica Neue, Helvetica, sans-serif; +} + +view, +scroll-view, +swiper, +button, +input, +textarea, +label, +navigator, +image { + box-sizing: border-box; +} + +.round { + border-radius: 5000upx; +} + +.radius { + border-radius: 6upx; +} + +/* ================== + 图片 + ==================== */ + +image { + max-width: 100%; + display: inline-block; + position: relative; + z-index: 0; +} + +image.loading::before { + content: ""; + background-color: #f5f5f5; + display: block; + position: absolute; + width: 100%; + height: 100%; + z-index: -2; +} + +image.loading::after { + content: "\e7f1"; + font-family: "cuIcon"; + position: absolute; + top: 0; + left: 0; + width: 32upx; + height: 32upx; + line-height: 32upx; + right: 0; + bottom: 0; + z-index: -1; + font-size: 32upx; + margin: auto; + color: #ccc; + -webkit-animation: cuIcon-spin 2s infinite linear; + animation: cuIcon-spin 2s infinite linear; + display: block; +} + +.response { + width: 100%; +} + +/* ================== + 开关 + ==================== */ + +switch, +checkbox, +radio { + position: relative; +} + +switch::after, +switch::before { + font-family: "cuIcon"; + content: "\e645"; + position: absolute; + color: #ffffff !important; + top: 0%; + left: 0upx; + font-size: 26upx; + line-height: 26px; + width: 50%; + text-align: center; + pointer-events: none; + transform: scale(0, 0); + transition: all 0.3s ease-in-out 0s; + z-index: 9; + bottom: 0; + height: 26px; + margin: auto; +} + +switch::before { + content: "\e646"; + right: 0; + transform: scale(1, 1); + left: auto; +} + +switch[checked]::after, +switch.checked::after { + transform: scale(1, 1); +} + +switch[checked]::before, +switch.checked::before { + transform: scale(0, 0); +} + +/* #ifndef MP-ALIPAY */ +radio::before, +checkbox::before { + font-family: "cuIcon"; + content: "\e645"; + position: absolute; + color: #ffffff !important; + top: 50%; + margin-top: -8px; + right: 5px; + font-size: 32upx; + line-height: 16px; + pointer-events: none; + transform: scale(1, 1); + transition: all 0.3s ease-in-out 0s; + z-index: 9; +} + +radio .wx-radio-input, +checkbox .wx-checkbox-input, +radio .uni-radio-input, +checkbox .uni-checkbox-input { + margin: 0; + width: 24px; + height: 24px; +} + +checkbox.round .wx-checkbox-input, +checkbox.round .uni-checkbox-input { + border-radius: 100upx; +} + +/* #endif */ + +switch[checked]::before { + transform: scale(0, 0); +} + +switch .wx-switch-input, +switch .uni-switch-input { + border: none; + padding: 0 24px; + width: 48px; + height: 26px; + margin: 0; + border-radius: 100upx; +} + +switch .wx-switch-input:not([class*="bg-"]), +switch .uni-switch-input:not([class*="bg-"]) { + background: #8799a3 !important; +} + +switch .wx-switch-input::after, +switch .uni-switch-input::after { + margin: auto; + width: 26px; + height: 26px; + border-radius: 100upx; + left: 0upx; + top: 0upx; + bottom: 0upx; + position: absolute; + transform: scale(0.9, 0.9); + transition: all 0.1s ease-in-out 0s; +} + +switch .wx-switch-input.wx-switch-input-checked::after, +switch .uni-switch-input.uni-switch-input-checked::after { + margin: auto; + left: 22px; + box-shadow: none; + transform: scale(0.9, 0.9); +} + +radio-group { + display: inline-block; +} + + + +switch.radius .wx-switch-input::after, +switch.radius .wx-switch-input, +switch.radius .wx-switch-input::before, +switch.radius .uni-switch-input::after, +switch.radius .uni-switch-input, +switch.radius .uni-switch-input::before { + border-radius: 10upx; +} + +.uni-checkbox-input:hover { + border-color: #d1d1d1 !important; +} + +switch .wx-switch-input::before, +radio.radio::before, +checkbox .wx-checkbox-input::before, +radio .wx-radio-input::before, +switch .uni-switch-input::before, +radio.radio::before, +checkbox .uni-checkbox-input::before, +radio .uni-radio-input::before { + display: none; +} + +radio.radio[checked]::after, +radio.radio .uni-radio-input-checked::after { + content: ""; + background-color: transparent; + display: block; + position: absolute; + width: 8px; + height: 8px; + z-index: 999; + top: 0upx; + left: 0upx; + right: 0; + bottom: 0; + margin: auto; + border-radius: 200upx; + /* #ifndef MP */ + border: 7px solid #ffffff !important; + /* #endif */ + + /* #ifdef MP */ + border: 8px solid #ffffff !important; + /* #endif */ +} + +.switch-sex::after { + content: "\e71c"; +} + +.switch-sex::before { + content: "\e71a"; +} + +.switch-sex .wx-switch-input, +.switch-sex .uni-switch-input { + background: #e54d42 !important; + border-color: #e54d42 !important; +} + +.switch-sex[checked] .wx-switch-input, +.switch-sex.checked .uni-switch-input { + background: #0081ff !important; + border-color: #0081ff !important; +} + +switch.red[checked] .wx-switch-input.wx-switch-input-checked, +checkbox.red[checked] .wx-checkbox-input, +radio.red[checked] .wx-radio-input, +switch.red.checked .uni-switch-input.uni-switch-input-checked, +checkbox.red.checked .uni-checkbox-input, +radio.red.checked .uni-radio-input { + background-color: #e54d42 !important; + border-color: #e54d42 !important; + color: #ffffff !important; +} + +switch.orange[checked] .wx-switch-input, +checkbox.orange[checked] .wx-checkbox-input, +radio.orange[checked] .wx-radio-input, +switch.orange.checked .uni-switch-input, +checkbox.orange.checked .uni-checkbox-input, +radio.orange.checked .uni-radio-input { + background-color: #f37b1d !important; + border-color: #f37b1d !important; + color: #ffffff !important; +} + +switch.yellow[checked] .wx-switch-input, +checkbox.yellow[checked] .wx-checkbox-input, +radio.yellow[checked] .wx-radio-input, +switch.yellow.checked .uni-switch-input, +checkbox.yellow.checked .uni-checkbox-input, +radio.yellow.checked .uni-radio-input { + background-color: #fbbd08 !important; + border-color: #fbbd08 !important; + color: #333333 !important; +} + +switch.olive[checked] .wx-switch-input, +checkbox.olive[checked] .wx-checkbox-input, +radio.olive[checked] .wx-radio-input, +switch.olive.checked .uni-switch-input, +checkbox.olive.checked .uni-checkbox-input, +radio.olive.checked .uni-radio-input { + background-color: #8dc63f !important; + border-color: #8dc63f !important; + color: #ffffff !important; +} + +switch.green[checked] .wx-switch-input, +switch[checked] .wx-switch-input, +checkbox.green[checked] .wx-checkbox-input, +checkbox[checked] .wx-checkbox-input, +radio.green[checked] .wx-radio-input, +radio[checked] .wx-radio-input, +switch.green.checked .uni-switch-input, +switch.checked .uni-switch-input, +checkbox.green.checked .uni-checkbox-input, +checkbox.checked .uni-checkbox-input, +radio.green.checked .uni-radio-input, +radio.checked .uni-radio-input { + background-color: #39b54a !important; + border-color: #39b54a !important; + color: #ffffff !important; + border-color: #39B54A !important; +} + +switch.cyan[checked] .wx-switch-input, +checkbox.cyan[checked] .wx-checkbox-input, +radio.cyan[checked] .wx-radio-input, +switch.cyan.checked .uni-switch-input, +checkbox.cyan.checked .uni-checkbox-input, +radio.cyan.checked .uni-radio-input { + background-color: #1cbbb4 !important; + border-color: #1cbbb4 !important; + color: #ffffff !important; +} + +switch.blue[checked] .wx-switch-input, +checkbox.blue[checked] .wx-checkbox-input, +radio.blue[checked] .wx-radio-input, +switch.blue.checked .uni-switch-input, +checkbox.blue.checked .uni-checkbox-input, +radio.blue.checked .uni-radio-input { + background-color: #0081ff !important; + border-color: #0081ff !important; + color: #ffffff !important; +} + +switch.purple[checked] .wx-switch-input, +checkbox.purple[checked] .wx-checkbox-input, +radio.purple[checked] .wx-radio-input, +switch.purple.checked .uni-switch-input, +checkbox.purple.checked .uni-checkbox-input, +radio.purple.checked .uni-radio-input { + background-color: #6739b6 !important; + border-color: #6739b6 !important; + color: #ffffff !important; +} + +switch.mauve[checked] .wx-switch-input, +checkbox.mauve[checked] .wx-checkbox-input, +radio.mauve[checked] .wx-radio-input, +switch.mauve.checked .uni-switch-input, +checkbox.mauve.checked .uni-checkbox-input, +radio.mauve.checked .uni-radio-input { + background-color: #9c26b0 !important; + border-color: #9c26b0 !important; + color: #ffffff !important; +} + +switch.pink[checked] .wx-switch-input, +checkbox.pink[checked] .wx-checkbox-input, +radio.pink[checked] .wx-radio-input, +switch.pink.checked .uni-switch-input, +checkbox.pink.checked .uni-checkbox-input, +radio.pink.checked .uni-radio-input { + background-color: #e03997 !important; + border-color: #e03997 !important; + color: #ffffff !important; +} + +switch.brown[checked] .wx-switch-input, +checkbox.brown[checked] .wx-checkbox-input, +radio.brown[checked] .wx-radio-input, +switch.brown.checked .uni-switch-input, +checkbox.brown.checked .uni-checkbox-input, +radio.brown.checked .uni-radio-input { + background-color: #a5673f !important; + border-color: #a5673f !important; + color: #ffffff !important; +} + +switch.grey[checked] .wx-switch-input, +checkbox.grey[checked] .wx-checkbox-input, +radio.grey[checked] .wx-radio-input, +switch.grey.checked .uni-switch-input, +checkbox.grey.checked .uni-checkbox-input, +radio.grey.checked .uni-radio-input { + background-color: #8799a3 !important; + border-color: #8799a3 !important; + color: #ffffff !important; +} + +switch.gray[checked] .wx-switch-input, +checkbox.gray[checked] .wx-checkbox-input, +radio.gray[checked] .wx-radio-input, +switch.gray.checked .uni-switch-input, +checkbox.gray.checked .uni-checkbox-input, +radio.gray.checked .uni-radio-input { + background-color: #f0f0f0 !important; + border-color: #f0f0f0 !important; + color: #333333 !important; +} + +switch.black[checked] .wx-switch-input, +checkbox.black[checked] .wx-checkbox-input, +radio.black[checked] .wx-radio-input, +switch.black.checked .uni-switch-input, +checkbox.black.checked .uni-checkbox-input, +radio.black.checked .uni-radio-input { + background-color: #333333 !important; + border-color: #333333 !important; + color: #ffffff !important; +} + +switch.white[checked] .wx-switch-input, +checkbox.white[checked] .wx-checkbox-input, +radio.white[checked] .wx-radio-input, +switch.white.checked .uni-switch-input, +checkbox.white.checked .uni-checkbox-input, +radio.white.checked .uni-radio-input { + background-color: #ffffff !important; + border-color: #ffffff !important; + color: #333333 !important; +} + +/* ================== + 边框 + ==================== */ + +/* -- 实线 -- */ + +.solid, +.solid-top, +.solid-right, +.solid-bottom, +.solid-left, +.solids, +.solids-top, +.solids-right, +.solids-bottom, +.solids-left, +.dashed, +.dashed-top, +.dashed-right, +.dashed-bottom, +.dashed-left { + position: relative; +} + +.solid::after, +.solid-top::after, +.solid-right::after, +.solid-bottom::after, +.solid-left::after, +.solids::after, +.solids-top::after, +.solids-right::after, +.solids-bottom::after, +.solids-left::after, +.dashed::after, +.dashed-top::after, +.dashed-right::after, +.dashed-bottom::after, +.dashed-left::after { + content: " "; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border-radius: inherit; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; + box-sizing: border-box; +} + +.solid::after { + border: 1upx solid rgba(0, 0, 0, 0.1); +} + +.solid-top::after { + border-top: 1upx solid rgba(0, 0, 0, 0.1); +} + +.solid-right::after { + border-right: 1upx solid rgba(0, 0, 0, 0.1); +} + +.solid-bottom::after { + border-bottom: 1upx solid rgba(0, 0, 0, 0.1); +} + +.solid-left::after { + border-left: 1upx solid rgba(0, 0, 0, 0.1); +} + +.solids::after { + border: 8upx solid #eee; +} + +.solids-top::after { + border-top: 8upx solid #eee; +} + +.solids-right::after { + border-right: 8upx solid #eee; +} + +.solids-bottom::after { + border-bottom: 8upx solid #eee; +} + +.solids-left::after { + border-left: 8upx solid #eee; +} + +/* -- 虚线 -- */ + +.dashed::after { + border: 1upx dashed #ddd; +} + +.dashed-top::after { + border-top: 1upx dashed #ddd; +} + +.dashed-right::after { + border-right: 1upx dashed #ddd; +} + +.dashed-bottom::after { + border-bottom: 1upx dashed #ddd; +} + +.dashed-left::after { + border-left: 1upx dashed #ddd; +} + +/* -- 阴影 -- */ + +.shadow[class*='white'] { + --ShadowSize: 0 1upx 6upx; +} + +.shadow-lg { + --ShadowSize: 0upx 40upx 100upx 0upx; +} + +.shadow-warp { + position: relative; + box-shadow: 0 0 10upx rgba(0, 0, 0, 0.1); +} + +.shadow-warp:before, +.shadow-warp:after { + position: absolute; + content: ""; + top: 20upx; + bottom: 30upx; + left: 20upx; + width: 50%; + box-shadow: 0 30upx 20upx rgba(0, 0, 0, 0.2); + transform: rotate(-3deg); + z-index: -1; +} + +.shadow-warp:after { + right: 20upx; + left: auto; + transform: rotate(3deg); +} + +.shadow-blur { + position: relative; +} + +.shadow-blur::before { + content: ""; + display: block; + background: inherit; + filter: blur(10upx); + position: absolute; + width: 100%; + height: 100%; + top: 10upx; + left: 10upx; + z-index: -1; + opacity: 0.4; + transform-origin: 0 0; + border-radius: inherit; + transform: scale(1, 1); +} + +/* ================== + 按钮 + ==================== */ + +.cu-btn { + position: relative; + border: 0upx; + display: inline-flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 0 30upx; + font-size: 28upx; + height: 64upx; + line-height: 1; + text-align: center; + text-decoration: none; + overflow: visible; + margin-left: initial; + transform: translate(0upx, 0upx); + margin-right: initial; +} + +.cu-btn::after { + display: none; +} + +.cu-btn:not([class*="bg-"]) { + background-color: #f0f0f0; +} + +.cu-btn[class*="line"] { + background-color: transparent; +} + +.cu-btn[class*="line"]::after { + content: " "; + display: block; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border: 1upx solid currentColor; + transform: scale(0.5); + transform-origin: 0 0; + box-sizing: border-box; + border-radius: 12upx; + z-index: 1; + pointer-events: none; +} + +.cu-btn.round[class*="line"]::after { + border-radius: 1000upx; +} + +.cu-btn[class*="lines"]::after { + border: 6upx solid currentColor; +} + +.cu-btn[class*="bg-"]::after { + display: none; +} + +.cu-btn.sm { + padding: 0 20upx; + font-size: 20upx; + height: 48upx; +} + +.cu-btn.lg { + padding: 0 40upx; + font-size: 32upx; + height: 80upx; +} + +.cu-btn.cuIcon.sm { + width: 48upx; + height: 48upx; +} + +.cu-btn.cuIcon { + width: 64upx; + height: 64upx; + border-radius: 500upx; + padding: 0; +} + +button.cuIcon.lg { + width: 80upx; + height: 80upx; +} + +.cu-btn.shadow-blur::before { + top: 4upx; + left: 4upx; + filter: blur(6upx); + opacity: 0.6; +} + +.cu-btn.button-hover { + transform: translate(1upx, 1upx); +} + +.block { + display: block; +} + +.cu-btn.block { + display: flex; +} + +.cu-btn[disabled] { + opacity: 0.6; + color: #ffffff; +} + +/* ================== + 徽章 + ==================== */ + +.cu-tag { + font-size: 24upx; + vertical-align: middle; + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: 0upx 16upx; + height: 48upx; + font-family: Helvetica Neue, Helvetica, sans-serif; + white-space: nowrap; +} + +.cu-tag:not([class*="bg"]):not([class*="line"]) { + background-color: #f1f1f1; +} + +.cu-tag[class*="line-"]::after { + content: " "; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border: 1upx solid currentColor; + transform: scale(0.5); + transform-origin: 0 0; + box-sizing: border-box; + border-radius: inherit; + z-index: 1; + pointer-events: none; +} + +.cu-tag.radius[class*="line"]::after { + border-radius: 12upx; +} + +.cu-tag.round[class*="line"]::after { + border-radius: 1000upx; +} + +.cu-tag[class*="line-"]::after { + border-radius: 0; +} + +.cu-tag+.cu-tag { + margin-left: 10upx; +} + +.cu-tag.sm { + font-size: 20upx; + padding: 0upx 12upx; + height: 32upx; +} + +.cu-capsule { + display: inline-flex; + vertical-align: middle; +} + +.cu-capsule+.cu-capsule { + margin-left: 10upx; +} + +.cu-capsule .cu-tag { + margin: 0; +} + +.cu-capsule .cu-tag[class*="line-"]:last-child::after { + border-left: 0upx solid transparent; +} + +.cu-capsule .cu-tag[class*="line-"]:first-child::after { + border-right: 0upx solid transparent; +} + +.cu-capsule.radius .cu-tag:first-child { + border-top-left-radius: 6upx; + border-bottom-left-radius: 6upx; +} + +.cu-capsule.radius .cu-tag:last-child::after, +.cu-capsule.radius .cu-tag[class*="line-"] { + border-top-right-radius: 12upx; + border-bottom-right-radius: 12upx; +} + +.cu-capsule.round .cu-tag:first-child { + border-top-left-radius: 200upx; + border-bottom-left-radius: 200upx; + text-indent: 4upx; +} + +.cu-capsule.round .cu-tag:last-child::after, +.cu-capsule.round .cu-tag:last-child { + border-top-right-radius: 200upx; + border-bottom-right-radius: 200upx; + text-indent: -4upx; +} + +.cu-tag.badge { + border-radius: 200upx; + position: absolute; + top: -10upx; + right: -10upx; + font-size: 20upx; + padding: 0upx 10upx; + height: 28upx; + color: #ffffff; +} + +.cu-tag.badge:not([class*="bg-"]) { + background-color: #dd514c; +} + +.cu-tag:empty:not([class*="cuIcon-"]) { + padding: 0upx; + width: 16upx; + height: 16upx; + top: -4upx; + right: -4upx; +} + +.cu-tag[class*="cuIcon-"] { + width: 32upx; + height: 32upx; + top: -4upx; + right: -4upx; +} + +/* ================== + 头像 + ==================== */ + +.cu-avatar { + font-variant: small-caps; + margin: 0; + padding: 0; + display: inline-flex; + text-align: center; + justify-content: center; + align-items: center; + background-color: #ccc; + color: #ffffff; + white-space: nowrap; + position: relative; + width: 64upx; + height: 64upx; + background-size: cover; + background-position: center; + vertical-align: middle; + font-size: 1.5em; +} + +.cu-avatar.sm { + width: 48upx; + height: 48upx; + font-size: 1em; +} + +.cu-avatar.lg { + width: 96upx; + height: 96upx; + font-size: 2em; +} + +.cu-avatar.xl { + width: 128upx; + height: 128upx; + font-size: 2.5em; +} + +.cu-avatar .avatar-text { + font-size: 0.4em; +} + +.cu-avatar-group { + direction: rtl; + unicode-bidi: bidi-override; + padding: 0 10upx 0 40upx; + display: inline-block; +} + +.cu-avatar-group .cu-avatar { + margin-left: -30upx; + border: 4upx solid #f1f1f1; + vertical-align: middle; +} + +.cu-avatar-group .cu-avatar.sm { + margin-left: -20upx; + border: 1upx solid #f1f1f1; +} + +/* ================== + 进度条 + ==================== */ + +.cu-progress { + overflow: hidden; + height: 28upx; + background-color: #ebeef5; + display: inline-flex; + align-items: center; + width: 100%; +} + +.cu-progress+view, +.cu-progress+text { + line-height: 1; +} + +.cu-progress.xs { + height: 10upx; +} + +.cu-progress.sm { + height: 20upx; +} + +.cu-progress view { + width: 0; + height: 100%; + align-items: center; + display: flex; + justify-items: flex-end; + justify-content: space-around; + font-size: 20upx; + color: #ffffff; + transition: width 0.6s ease; +} + +.cu-progress text { + align-items: center; + display: flex; + font-size: 20upx; + color: #333333; + text-indent: 10upx; +} + +.cu-progress.text-progress { + padding-right: 60upx; +} + +.cu-progress.striped view { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 72upx 72upx; +} + +.cu-progress.active view { + animation: progress-stripes 2s linear infinite; +} + +@keyframes progress-stripes { + from { + background-position: 72upx 0; + } + + to { + background-position: 0 0; + } +} + +/* ================== + 加载 + ==================== */ + +.cu-load { + display: block; + line-height: 3em; + text-align: center; +} + +.cu-load::before { + font-family: "cuIcon"; + display: inline-block; + margin-right: 6upx; +} + +.cu-loda.loadmore::before { + content: "加载更多"; +} + +.cu-load.loading::before { + content: "\e67a"; + animation: cuIcon-spin 2s infinite linear; +} + +.cu-load.loading::after { + content: "加载中..."; +} + +.cu-load.nomore::before { + content: "\e64a"; +} + +.cu-load.nomore::after { + content: "没有更多了"; +} + +.cu-load.erro::before { + content: "\e658"; +} + +.cu-load.erro::after { + content: "加载失败"; +} + +.cu-load.load-cuIcon::before { + font-size: 32upx; +} + +.cu-load.load-cuIcon::after { + display: none; +} + +.cu-load.load-cuIcon.over { + display: none; +} + +.cu-load.load-modal { + position: fixed; + top: 0; + right: 0; + bottom: 140upx; + left: 0; + margin: auto; + width: 260upx; + height: 260upx; + background-color: #ffffff; + border-radius: 10upx; + box-shadow: 0 0 0upx 2000upx rgba(0, 0, 0, 0.5); + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; + font-size: 28upx; + z-index: 9999; + line-height: 2.4em; +} + +.cu-load.load-modal [class*="cuIcon-"] { + font-size: 60upx; +} + +.cu-load.load-modal image { + width: 70upx; + height: 70upx; +} + +.cu-load.load-modal::after { + content: ""; + position: absolute; + background-color: #ffffff; + border-radius: 50%; + width: 200upx; + height: 200upx; + font-size: 10px; + border-top: 6upx solid rgba(0, 0, 0, 0.05); + border-right: 6upx solid rgba(0, 0, 0, 0.05); + border-bottom: 6upx solid rgba(0, 0, 0, 0.05); + border-left: 6upx solid #f37b1d; + animation: cuIcon-spin 1s infinite linear; + z-index: -1; +} + +.load-progress { + pointer-events: none; + top: 0; + position: fixed; + width: 100%; + left: 0; + z-index: 2000; +} + +.load-progress.hide { + display: none; +} + +.load-progress .load-progress-bar { + position: relative; + width: 100%; + height: 4upx; + overflow: hidden; + transition: all 200ms ease 0s; +} + +.load-progress .load-progress-spinner { + position: absolute; + top: 10upx; + right: 10upx; + z-index: 2000; + display: block; +} + +.load-progress .load-progress-spinner::after { + content: ""; + display: block; + width: 24upx; + height: 24upx; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border: solid 4upx transparent; + border-top-color: inherit; + border-left-color: inherit; + border-radius: 50%; + -webkit-animation: load-progress-spinner 0.4s linear infinite; + animation: load-progress-spinner 0.4s linear infinite; +} + +@-webkit-keyframes load-progress-spinner { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes load-progress-spinner { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +/* ================== + 列表 + ==================== */ +.grayscale { + filter: grayscale(1); +} + +.cu-list+.cu-list { + margin-top: 30upx +} + +.cu-list>.cu-item { + transition: all .6s ease-in-out 0s; + transform: translateX(0upx) +} + +.cu-list>.cu-item.move-cur { + transform: translateX(-260upx) +} + +.cu-list>.cu-item .move { + position: absolute; + right: 0; + display: flex; + width: 260upx; + height: 100%; + transform: translateX(100%) +} + +.cu-list>.cu-item .move view { + display: flex; + flex: 1; + justify-content: center; + align-items: center +} + +.cu-list.menu-avatar { + overflow: hidden; +} + +.cu-list.menu-avatar>.cu-item { + position: relative; + display: flex; + padding-right: 10upx; + height: 140upx; + background-color: #ffffff; + justify-content: flex-end; + align-items: center +} + +.cu-list.menu-avatar>.cu-item>.cu-avatar { + position: absolute; + left: 30upx +} + +.cu-list.menu-avatar>.cu-item .flex .text-cut { + max-width: 510upx +} + +.cu-list.menu-avatar>.cu-item .content { + position: absolute; + left: 146upx; + width: calc(100% - 96upx - 60upx - 120upx - 20upx); + line-height: 1.6em; +} + +.cu-list.menu-avatar>.cu-item .content.flex-sub { + width: calc(100% - 96upx - 60upx - 20upx); +} + +.cu-list.menu-avatar>.cu-item .content>view:first-child { + font-size: 30upx; + display: flex; + align-items: center +} + +.cu-list.menu-avatar>.cu-item .content .cu-tag.sm { + display: inline-block; + margin-left: 10upx; + height: 28upx; + font-size: 16upx; + line-height: 32upx +} + +.cu-list.menu-avatar>.cu-item .action { + width: 100upx; + text-align: center +} + +.cu-list.menu-avatar>.cu-item .action view+view { + margin-top: 10upx +} + +.cu-list.menu-avatar.comment>.cu-item .content { + position: relative; + left: 0; + width: auto; + flex: 1; +} + +.cu-list.menu-avatar.comment>.cu-item { + padding: 30upx 30upx 30upx 120upx; + height: auto +} + +.cu-list.menu-avatar.comment .cu-avatar { + align-self: flex-start +} + +.cu-list.menu>.cu-item { + position: relative; + display: flex; + padding: 0 30upx; + min-height: 100upx; + background-color: #ffffff; + justify-content: space-between; + align-items: center +} + +.cu-list.menu>.cu-item:last-child:after { + border: none +} + +.cu-list.menu-avatar>.cu-item:after, +.cu-list.menu>.cu-item:after { + position: absolute; + top: 0; + left: 0; + box-sizing: border-box; + width: 200%; + height: 200%; + border-bottom: 1upx solid #ddd; + border-radius: inherit; + content: " "; + transform: scale(.5); + transform-origin: 0 0; + pointer-events: none +} + +.cu-list.menu>.cu-item.grayscale { + background-color: #f5f5f5 +} + +.cu-list.menu>.cu-item.cur { + background-color: #fcf7e9 +} + +.cu-list.menu>.cu-item.arrow { + padding-right: 90upx +} + +.cu-list.menu>.cu-item.arrow:before { + position: absolute; + top: 0; + right: 30upx; + bottom: 0; + display: block; + margin: auto; + width: 30upx; + height: 30upx; + color: #8799a3; + content: "\e6a3"; + text-align: center; + font-size: 34upx; + font-family: cuIcon; + line-height: 30upx +} + +.cu-list.menu>.cu-item button.content { + padding: 0; + background-color: transparent; + justify-content: flex-start +} + +.cu-list.menu>.cu-item button.content:after { + display: none +} + +.cu-list.menu>.cu-item .cu-avatar-group .cu-avatar { + border-color: #ffffff +} + +.cu-list.menu>.cu-item .content>view:first-child { + display: flex; + align-items: center +} + +.cu-list.menu>.cu-item .content>text[class*=cuIcon] { + display: inline-block; + margin-right: 10upx; + width: 1.6em; + text-align: center +} + +.cu-list.menu>.cu-item .content>image { + display: inline-block; + margin-right: 10upx; + width: 1.6em; + height: 1.6em; + vertical-align: middle +} + +.cu-list.menu>.cu-item .content { + font-size: 30upx; + line-height: 1.6em; + flex: 1 +} + +.cu-list.menu>.cu-item .content .cu-tag.sm { + display: inline-block; + margin-left: 10upx; + height: 28upx; + font-size: 16upx; + line-height: 32upx +} + +.cu-list.menu>.cu-item .action .cu-tag:empty { + right: 10upx +} + +.cu-list.menu { + display: block; + overflow: hidden +} + +.cu-list.menu.sm-border>.cu-item:after { + left: 30upx; + width: calc(200% - 120upx) +} + +.cu-list.grid>.cu-item { + position: relative; + display: flex; + padding: 20upx 0 30upx; + transition-duration: 0s; + flex-direction: column +} + +.cu-list.grid>.cu-item:after { + position: absolute; + top: 0; + left: 0; + box-sizing: border-box; + width: 200%; + height: 200%; + border-right: 1px solid rgba(0, 0, 0, .1); + border-bottom: 1px solid rgba(0, 0, 0, .1); + border-radius: inherit; + content: " "; + transform: scale(.5); + transform-origin: 0 0; + pointer-events: none +} + +.cu-list.grid>.cu-item text { + display: block; + margin-top: 10upx; + color: #888; + font-size: 26upx; + line-height: 40upx +} + +.cu-list.grid>.cu-item [class*=cuIcon] { + position: relative; + display: block; + margin-top: 20upx; + width: 100%; + font-size: 48upx +} + +.cu-list.grid>.cu-item .cu-tag { + right: auto; + left: 50%; + margin-left: 20upx +} + +.cu-list.grid { + background-color: #ffffff; + text-align: center +} + +.cu-list.grid.no-border>.cu-item { + padding-top: 10upx; + padding-bottom: 20upx +} + +.cu-list.grid.no-border>.cu-item:after { + border: none +} + +.cu-list.grid.no-border { + padding: 20upx 10upx +} + +.cu-list.grid.col-3>.cu-item:nth-child(3n):after, +.cu-list.grid.col-4>.cu-item:nth-child(4n):after, +.cu-list.grid.col-5>.cu-item:nth-child(5n):after { + border-right-width: 0 +} + +.cu-list.card-menu { + overflow: hidden; + margin-right: 30upx; + margin-left: 30upx; + border-radius: 20upx +} + + +/* ================== + 操作条 + ==================== */ + +.cu-bar { + display: flex; + position: relative; + align-items: center; + min-height: 100upx; + justify-content: space-between; +} + +.cu-bar .action { + display: flex; + align-items: center; + height: 100%; + justify-content: center; + max-width: 100%; +} + +.cu-bar .action.border-title { + position: relative; + top: -10upx; +} + +.cu-bar .action.border-title text[class*="bg-"]:last-child { + position: absolute; + bottom: -0.5rem; + min-width: 2rem; + height: 6upx; + left: 0; +} + +.cu-bar .action.sub-title { + position: relative; + top: -0.2rem; +} + +.cu-bar .action.sub-title text { + position: relative; + z-index: 1; +} + +.cu-bar .action.sub-title text[class*="bg-"]:last-child { + position: absolute; + display: inline-block; + bottom: -0.2rem; + border-radius: 6upx; + width: 100%; + height: 0.6rem; + left: 0.6rem; + opacity: 0.3; + z-index: 0; +} + +.cu-bar .action.sub-title text[class*="text-"]:last-child { + position: absolute; + display: inline-block; + bottom: -0.7rem; + left: 0.5rem; + opacity: 0.2; + z-index: 0; + text-align: right; + font-weight: 900; + font-size: 36upx; +} + +.cu-bar.justify-center .action.border-title text:last-child, +.cu-bar.justify-center .action.sub-title text:last-child { + left: 0; + right: 0; + margin: auto; + text-align: center; +} + +.cu-bar .action:first-child { + margin-left: 30upx; + font-size: 30upx; +} + +.cu-bar .action text.text-cut { + text-align: left; + width: 100%; +} + +.cu-bar .cu-avatar:first-child { + margin-left: 20upx; +} + +.cu-bar .action:first-child>text[class*="cuIcon-"] { + margin-left: -0.3em; + margin-right: 0.3em; +} + +.cu-bar .action:last-child { + margin-right: 30upx; +} + +.cu-bar .action>text[class*="cuIcon-"], +.cu-bar .action>view[class*="cuIcon-"] { + font-size: 36upx; +} + +.cu-bar .action>text[class*="cuIcon-"]+text[class*="cuIcon-"] { + margin-left: 0.5em; +} + +.cu-bar .content { + position: absolute; + text-align: center; + width: calc(100% - 340upx); + left: 0; + right: 0; + bottom: 0; + top: 0; + margin: auto; + height: 60upx; + font-size: 32upx; + line-height: 60upx; + cursor: none; + pointer-events: none; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.cu-bar.ios .content { + bottom: 7px; + height: 30px; + font-size: 32upx; + line-height: 30px; +} + +.cu-bar.btn-group { + justify-content: space-around; +} + +.cu-bar.btn-group button { + padding: 20upx 32upx; +} + +.cu-bar.btn-group button { + flex: 1; + margin: 0 20upx; + max-width: 50%; +} + +.cu-bar .search-form { + background-color: #f5f5f5; + line-height: 64upx; + height: 64upx; + font-size: 24upx; + color: #333333; + flex: 1; + display: flex; + align-items: center; + margin: 0 30upx; +} + +.cu-bar .search-form+.action { + margin-right: 30upx; +} + +.cu-bar .search-form input { + flex: 1; + padding-right: 30upx; + height: 64upx; + line-height: 64upx; + font-size: 26upx; + background-color: transparent; +} + +.cu-bar .search-form [class*="cuIcon-"] { + margin: 0 0.5em 0 0.8em; +} + +.cu-bar .search-form [class*="cuIcon-"]::before { + top: 0upx; +} + +.cu-bar.fixed, +.nav.fixed { + position: fixed; + width: 100%; + top: 0; + z-index: 1024; + box-shadow: 0 1upx 6upx rgba(0, 0, 0, 0.1); +} + +.cu-bar.foot { + position: fixed; + width: 100%; + bottom: 0; + z-index: 1024; + box-shadow: 0 -1upx 6upx rgba(0, 0, 0, 0.1); +} + +.cu-bar.tabbar { + padding: 0; + height: calc(100upx + env(safe-area-inset-bottom) / 2); + padding-bottom: calc(env(safe-area-inset-bottom) / 2); +} + +.cu-tabbar-height { + min-height: 100upx; + height: calc(100upx + env(safe-area-inset-bottom) / 2); +} + +.cu-bar.tabbar.shadow { + box-shadow: 0 -1upx 6upx rgba(0, 0, 0, 0.1); +} + +.cu-bar.tabbar .action { + font-size: 22upx; + position: relative; + flex: 1; + text-align: center; + padding: 0; + display: block; + height: auto; + line-height: 1; + margin: 0; + background-color: inherit; + overflow: initial; +} + +.cu-bar.tabbar.shop .action { + width: 140upx; + flex: initial; +} + +.cu-bar.tabbar .action.add-action { + position: relative; + z-index: 2; + padding-top: 50upx; +} + +.cu-bar.tabbar .action.add-action [class*="cuIcon-"] { + position: absolute; + width: 70upx; + z-index: 2; + height: 70upx; + border-radius: 50%; + line-height: 70upx; + font-size: 50upx; + top: -35upx; + left: 0; + right: 0; + margin: auto; + padding: 0; +} + +.cu-bar.tabbar .action.add-action::after { + content: ""; + position: absolute; + width: 100upx; + height: 100upx; + top: -50upx; + left: 0; + right: 0; + margin: auto; + box-shadow: 0 -3upx 8upx rgba(0, 0, 0, 0.08); + border-radius: 50upx; + background-color: inherit; + z-index: 0; +} + +.cu-bar.tabbar .action.add-action::before { + content: ""; + position: absolute; + width: 100upx; + height: 30upx; + bottom: 30upx; + left: 0; + right: 0; + margin: auto; + background-color: inherit; + z-index: 1; +} + +.cu-bar.tabbar .btn-group { + flex: 1; + display: flex; + justify-content: space-around; + align-items: center; + padding: 0 10upx; +} + +.cu-bar.tabbar button.action::after { + border: 0; +} + +.cu-bar.tabbar .action [class*="cuIcon-"] { + width: 100upx; + position: relative; + display: block; + height: auto; + margin: 0 auto 10upx; + text-align: center; + font-size: 40upx; +} + +.cu-bar.tabbar .action .cuIcon-cu-image { + margin: 0 auto; +} + +.cu-bar.tabbar .action .cuIcon-cu-image image { + width: 50upx; + height: 50upx; + display: inline-block; +} + +.cu-bar.tabbar .submit { + align-items: center; + display: flex; + justify-content: center; + text-align: center; + position: relative; + flex: 2; + align-self: stretch; +} + +.cu-bar.tabbar .submit:last-child { + flex: 2.6; +} + +.cu-bar.tabbar .submit+.submit { + flex: 2; +} + +.cu-bar.tabbar.border .action::before { + content: " "; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + transform: scale(0.5); + transform-origin: 0 0; + border-right: 1upx solid rgba(0, 0, 0, 0.1); + z-index: 3; +} + +.cu-bar.tabbar.border .action:last-child:before { + display: none; +} + +.cu-bar.input { + padding-right: 20upx; + background-color: #ffffff; +} + +.cu-bar.input input { + overflow: initial; + line-height: 64upx; + height: 64upx; + min-height: 64upx; + flex: 1; + font-size: 30upx; + margin: 0 20upx; +} + +.cu-bar.input .action { + margin-left: 20upx; +} + +.cu-bar.input .action [class*="cuIcon-"] { + font-size: 48upx; +} + +.cu-bar.input input+.action { + margin-right: 20upx; + margin-left: 0upx; +} + +.cu-bar.input .action:first-child [class*="cuIcon-"] { + margin-left: 0upx; +} + +.cu-custom { + display: block; + position: relative; +} + +.cu-custom .cu-bar .content { + width: calc(100% - 440upx); +} + +/* #ifdef MP-ALIPAY */ +.cu-custom .cu-bar .action .cuIcon-back { + opacity: 0; +} + +/* #endif */ + +.cu-custom .cu-bar .content image { + height: 60upx; + width: 240upx; +} + +.cu-custom .cu-bar { + min-height: 0px; + /* #ifdef MP-WEIXIN */ + padding-right: 220upx; + /* #endif */ + /* #ifdef MP-ALIPAY */ + padding-right: 150upx; + /* #endif */ + box-shadow: 0upx 0upx 0upx; + z-index: 9999; +} + +.cu-custom .cu-bar .border-custom { + position: relative; + background: rgba(0, 0, 0, 0.15); + border-radius: 1000upx; + height: 30px; +} + +.cu-custom .cu-bar .border-custom::after { + content: " "; + width: 200%; + height: 200%; + position: absolute; + top: 0; + left: 0; + border-radius: inherit; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; + box-sizing: border-box; + border: 1upx solid #ffffff; + opacity: 0.5; +} + +.cu-custom .cu-bar .border-custom::before { + content: " "; + width: 1upx; + height: 110%; + position: absolute; + top: 22.5%; + left: 0; + right: 0; + margin: auto; + transform: scale(0.5); + transform-origin: 0 0; + pointer-events: none; + box-sizing: border-box; + opacity: 0.6; + background-color: #ffffff; +} + +.cu-custom .cu-bar .border-custom text { + display: block; + flex: 1; + margin: auto !important; + text-align: center; + font-size: 34upx; +} + +/* ================== + 导航栏 + ==================== */ + +.nav { + white-space: nowrap; +} + +/* ::-webkit-scrollbar { + display: none; +} */ + +.nav .cu-item { + height: 90upx; + display: inline-block; + line-height: 90upx; + margin: 0 10upx; + padding: 0 20upx; +} + +.nav .cu-item.cur { + border-bottom: 4upx solid; +} + +/* ================== + 时间轴 + ==================== */ + +.cu-timeline { + display: block; + background-color: #ffffff; +} + +.cu-timeline .cu-time { + width: 120upx; + text-align: center; + padding: 20upx 0; + font-size: 26upx; + color: #888; + display: block; +} + +.cu-timeline>.cu-item { + padding: 30upx 30upx 30upx 120upx; + position: relative; + display: block; + z-index: 0; +} + +.cu-timeline>.cu-item:not([class*="text-"]) { + color: #ccc; +} + +.cu-timeline>.cu-item::after { + content: ""; + display: block; + position: absolute; + width: 1upx; + background-color: #ddd; + left: 60upx; + height: 100%; + top: 0; + z-index: 8; +} + +.cu-timeline>.cu-item::before { + font-family: "cuIcon"; + display: block; + position: absolute; + top: 36upx; + z-index: 9; + background-color: #ffffff; + width: 50upx; + height: 50upx; + text-align: center; + border: none; + line-height: 50upx; + left: 36upx; +} + +.cu-timeline>.cu-item:not([class*="cuIcon-"])::before { + content: "\e763"; +} + +.cu-timeline>.cu-item[class*="cuIcon-"]::before { + background-color: #ffffff; + width: 50upx; + height: 50upx; + text-align: center; + border: none; + line-height: 50upx; + left: 36upx; +} + +.cu-timeline>.cu-item>.content { + padding: 30upx; + border-radius: 6upx; + display: block; + line-height: 1.6; +} + +.cu-timeline>.cu-item>.content:not([class*="bg-"]) { + background-color: #f1f1f1; + color: #333333; +} + +.cu-timeline>.cu-item>.content+.content { + margin-top: 20upx; +} + +/* ================== + 聊天 + ==================== */ + +.cu-chat { + display: flex; + flex-direction: column; +} + +.cu-chat .cu-item { + display: flex; + padding: 30upx 30upx 70upx; + position: relative; +} + +.cu-chat .cu-item>.cu-avatar { + width: 80upx; + height: 80upx; +} + +.cu-chat .cu-item>.main { + max-width: calc(100% - 260upx); + margin: 0 40upx; + display: flex; + align-items: center; +} + +.cu-chat .cu-item>image { + height: 320upx; +} + +.cu-chat .cu-item>.main .content { + padding: 20upx; + border-radius: 6upx; + display: inline-flex; + max-width: 100%; + align-items: center; + font-size: 30upx; + position: relative; + min-height: 80upx; + line-height: 40upx; + text-align: left; +} + +.cu-chat .cu-item>.main .content:not([class*="bg-"]) { + background-color: #ffffff; + color: #333333; +} + +.cu-chat .cu-item .date { + position: absolute; + font-size: 24upx; + color: #8799a3; + width: calc(100% - 320upx); + bottom: 20upx; + left: 160upx; +} + +.cu-chat .cu-item .action { + padding: 0 30upx; + display: flex; + align-items: center; +} + +.cu-chat .cu-item>.main .content::after { + content: ""; + top: 27upx; + transform: rotate(45deg); + position: absolute; + z-index: 100; + display: inline-block; + overflow: hidden; + width: 24upx; + height: 24upx; + left: -12upx; + right: initial; + background-color: inherit; +} + +.cu-chat .cu-item.self>.main .content::after { + left: auto; + right: -12upx; +} + +.cu-chat .cu-item>.main .content::before { + content: ""; + top: 30upx; + transform: rotate(45deg); + position: absolute; + z-index: -1; + display: inline-block; + overflow: hidden; + width: 24upx; + height: 24upx; + left: -12upx; + right: initial; + background-color: inherit; + filter: blur(5upx); + opacity: 0.3; +} + +.cu-chat .cu-item>.main .content:not([class*="bg-"])::before { + background-color: #333333; + opacity: 0.1; +} + +.cu-chat .cu-item.self>.main .content::before { + left: auto; + right: -12upx; +} + +.cu-chat .cu-item.self { + justify-content: flex-end; + text-align: right; +} + +.cu-chat .cu-info { + display: inline-block; + margin: 20upx auto; + font-size: 24upx; + padding: 8upx 12upx; + background-color: rgba(0, 0, 0, 0.2); + border-radius: 6upx; + color: #ffffff; + max-width: 400upx; + line-height: 1.4; +} + +/* ================== + 卡片 + ==================== */ + +.cu-card { + display: block; + overflow: hidden; +} + +.cu-card>.cu-item { + display: block; + background-color: #ffffff; + overflow: hidden; + border-radius: 10upx; + margin: 30upx; +} + +.cu-card>.cu-item.shadow-blur { + overflow: initial; +} + +.cu-card.no-card>.cu-item { + margin: 0upx; + border-radius: 0upx; +} + +.cu-card .grid.grid-square { + margin-bottom: -20upx; +} + +.cu-card.case .image { + position: relative; +} + +.cu-card.case .image image { + width: 100%; +} + +.cu-card.case .image .cu-tag { + position: absolute; + right: 0; + top: 0; +} + +.cu-card.case .image .cu-bar { + position: absolute; + bottom: 0; + width: 100%; + background-color: transparent; + padding: 0upx 30upx; +} + +.cu-card.case.no-card .image { + margin: 30upx 30upx 0; + overflow: hidden; + border-radius: 10upx; +} + +.cu-card.dynamic { + display: block; +} + +.cu-card.dynamic>.cu-item { + display: block; + background-color: #ffffff; + overflow: hidden; +} + +.cu-card.dynamic>.cu-item>.text-content { + padding: 0 30upx 0; + max-height: 6.4em; + overflow: hidden; + font-size: 30upx; + margin-bottom: 20upx; +} + +.cu-card.dynamic>.cu-item .square-img { + width: 100%; + height: 200upx; + border-radius: 6upx; +} + +.cu-card.dynamic>.cu-item .only-img { + width: 100%; + height: 320upx; + border-radius: 6upx; +} + +/* card.dynamic>.cu-item .comment { + padding: 20upx; + background-color: #f1f1f1; + margin: 0 30upx 30upx; + border-radius: 6upx; +} */ + +.cu-card.article { + display: block; +} + +.cu-card.article>.cu-item { + padding-bottom: 30upx; +} + +.cu-card.article>.cu-item .title { + font-size: 30upx; + font-weight: 900; + color: #333333; + line-height: 100upx; + padding: 0 30upx; +} + +.cu-card.article>.cu-item .content { + display: flex; + padding: 0 30upx; +} + +.cu-card.article>.cu-item .content>image { + width: 240upx; + height: 6.4em; + margin-right: 20upx; + border-radius: 6upx; +} + +.cu-card.article>.cu-item .content .desc { + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.cu-card.article>.cu-item .content .text-content { + font-size: 28upx; + color: #888; + height: 4.8em; + overflow: hidden; +} + +/* ================== + 表单 + ==================== */ + +.cu-form-group { + background-color: #ffffff; + padding: 1upx 30upx; + display: flex; + align-items: center; + min-height: 100upx; + justify-content: space-between; +} + +.cu-form-group+.cu-form-group { + border-top: 1upx solid #eee; +} + +.cu-form-group .title { + text-align: justify; + padding-right: 30upx; + font-size: 30upx; + position: relative; + height: 60upx; + line-height: 60upx; +} + +.cu-form-group input { + flex: 1; + font-size: 30upx; + color: #555; + padding-right: 20upx; +} + +.cu-form-group>text[class*="cuIcon-"] { + font-size: 36upx; + padding: 0; + box-sizing: border-box; +} + +.cu-form-group textarea { + margin: 32upx 0 30upx; + height: 4.6em; + width: 100%; + line-height: 1.2em; + flex: 1; + font-size: 28upx; + padding: 0; +} + +.cu-form-group.align-start .title { + height: 1em; + margin-top: 32upx; + line-height: 1em; +} + +.cu-form-group picker { + flex: 1; + padding-right: 40upx; + overflow: hidden; + position: relative; +} + +.cu-form-group picker .picker { + line-height: 100upx; + font-size: 28upx; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + width: 100%; + text-align: right; +} + +.cu-form-group picker::after { + font-family: cuIcon; + display: block; + content: "\e6a3"; + position: absolute; + font-size: 34upx; + color: #8799a3; + line-height: 100upx; + width: 60upx; + text-align: center; + top: 0; + bottom: 0; + right: -20upx; + margin: auto; +} + +.cu-form-group textarea[disabled], +.cu-form-group textarea[disabled] .placeholder { + color: transparent; +} + +/* ================== + 模态窗口 + ==================== */ + +.cu-modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1110; + opacity: 0; + outline: 0; + text-align: center; + -ms-transform: scale(1.185); + transform: scale(1.185); + backface-visibility: hidden; + perspective: 2000upx; + background: rgba(0, 0, 0, 0.6); + transition: all 0.3s ease-in-out 0s; + pointer-events: none; +} + +.cu-modal::before { + content: "\200B"; + display: inline-block; + height: 100%; + vertical-align: middle; +} + +.cu-modal.show { + opacity: 1; + transition-duration: 0.3s; + -ms-transform: scale(1); + transform: scale(1); + overflow-x: hidden; + overflow-y: auto; + pointer-events: auto; +} + +.cu-dialog { + position: relative; + display: inline-block; + vertical-align: middle; + margin-left: auto; + margin-right: auto; + width: 680upx; + max-width: 100%; + background-color: #f8f8f8; + border-radius: 10upx; + overflow: hidden; +} + +.cu-modal.bottom-modal::before { + vertical-align: bottom; +} + +.cu-modal.bottom-modal .cu-dialog { + width: 100%; + border-radius: 0; +} + +.cu-modal.bottom-modal { + margin-bottom: -1000upx; +} + +.cu-modal.bottom-modal.show { + margin-bottom: 0; +} + +.cu-modal.drawer-modal { + transform: scale(1); + display: flex; +} + +.cu-modal.drawer-modal .cu-dialog { + height: 100%; + min-width: 200upx; + border-radius: 0; + margin: initial; + transition-duration: 0.3s; +} + +.cu-modal.drawer-modal.justify-start .cu-dialog { + transform: translateX(-100%); +} + +.cu-modal.drawer-modal.justify-end .cu-dialog { + transform: translateX(100%); +} + +.cu-modal.drawer-modal.show .cu-dialog { + transform: translateX(0%); +} + +.cu-modal .cu-dialog>.cu-bar:first-child .action { + min-width: 100rpx; + margin-right: 0; + min-height: 100rpx; +} + +/* ================== + 轮播 + ==================== */ +swiper .a-swiper-dot { + display: inline-block; + width: 16upx; + height: 16upx; + background: rgba(0, 0, 0, .3); + border-radius: 50%; + vertical-align: middle; +} + +swiper[class*="-dot"] .wx-swiper-dots, +swiper[class*="-dot"] .a-swiper-dots, +swiper[class*="-dot"] .uni-swiper-dots { + display: flex; + align-items: center; + width: 100%; + justify-content: center; +} + +swiper.square-dot .wx-swiper-dot, +swiper.square-dot .a-swiper-dot, +swiper.square-dot .uni-swiper-dot { + background-color: #ffffff; + opacity: 0.4; + width: 10upx; + height: 10upx; + border-radius: 20upx; + margin: 0 8upx !important; +} + +swiper.square-dot .wx-swiper-dot.wx-swiper-dot-active, +swiper.square-dot .a-swiper-dot.a-swiper-dot-active, +swiper.square-dot .uni-swiper-dot.uni-swiper-dot-active { + opacity: 1; + width: 30upx; +} + +swiper.round-dot .wx-swiper-dot, +swiper.round-dot .a-swiper-dot, +swiper.round-dot .uni-swiper-dot { + width: 10upx; + height: 10upx; + position: relative; + margin: 4upx 8upx !important; +} + +swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active::after, +swiper.round-dot .a-swiper-dot.a-swiper-dot-active::after, +swiper.round-dot .uni-swiper-dot.uni-swiper-dot-active::after { + content: ""; + position: absolute; + width: 10upx; + height: 10upx; + top: 0upx; + left: 0upx; + right: 0; + bottom: 0; + margin: auto; + background-color: #ffffff; + border-radius: 20upx; +} + +swiper.round-dot .wx-swiper-dot.wx-swiper-dot-active, +swiper.round-dot .a-swiper-dot.a-swiper-dot-active, +swiper.round-dot .uni-swiper-dot.uni-swiper-dot-active { + width: 18upx; + height: 18upx; +} + +.screen-swiper { + min-height: 375upx; +} + +.screen-swiper image, +.screen-swiper video, +.swiper-item image, +.swiper-item video { + width: 100%; + display: block; + height: 100%; + margin: 0; + pointer-events: none; +} + +.card-swiper { + height: 420upx !important; +} + +.card-swiper swiper-item { + width: 610upx !important; + left: 70upx; + box-sizing: border-box; + padding: 40upx 0upx 70upx; + overflow: initial; +} + +.card-swiper swiper-item .swiper-item { + width: 100%; + display: block; + height: 100%; + border-radius: 10upx; + transform: scale(0.9); + transition: all 0.2s ease-in 0s; + overflow: hidden; +} + +.card-swiper swiper-item.cur .swiper-item { + transform: none; + transition: all 0.2s ease-in 0s; +} + + +.tower-swiper { + height: 420upx; + position: relative; + max-width: 750upx; + overflow: hidden; +} + +.tower-swiper .tower-item { + position: absolute; + width: 300upx; + height: 380upx; + top: 0; + bottom: 0; + left: 50%; + margin: auto; + transition: all 0.2s ease-in 0s; + opacity: 1; +} + +.tower-swiper .tower-item.none { + opacity: 0; +} + +.tower-swiper .tower-item .swiper-item { + width: 100%; + height: 100%; + border-radius: 6upx; + overflow: hidden; +} + +/* ================== + 步骤条 + ==================== */ + +.cu-steps { + display: flex; +} + +scroll-view.cu-steps { + display: block; + white-space: nowrap; +} + +scroll-view.cu-steps .cu-item { + display: inline-block; +} + +.cu-steps .cu-item { + flex: 1; + text-align: center; + position: relative; + min-width: 100upx; +} + +.cu-steps .cu-item:not([class*="text-"]) { + color: #8799a3; +} + +.cu-steps .cu-item [class*="cuIcon-"], +.cu-steps .cu-item .num { + display: block; + font-size: 40upx; + line-height: 80upx; +} + +.cu-steps .cu-item::before, +.cu-steps .cu-item::after, +.cu-steps.steps-arrow .cu-item::before, +.cu-steps.steps-arrow .cu-item::after { + content: ""; + display: block; + position: absolute; + height: 0px; + width: calc(100% - 80upx); + border-bottom: 1px solid #ccc; + left: calc(0px - (100% - 80upx) / 2); + top: 40upx; + z-index: 0; +} + +.cu-steps.steps-arrow .cu-item::before, +.cu-steps.steps-arrow .cu-item::after { + content: "\e6a3"; + font-family: 'cuIcon'; + height: 30upx; + border-bottom-width: 0px; + line-height: 30upx; + top: 0; + bottom: 0; + margin: auto; + color: #ccc; +} + +.cu-steps.steps-bottom .cu-item::before, +.cu-steps.steps-bottom .cu-item::after { + bottom: 40upx; + top: initial; +} + +.cu-steps .cu-item::after { + border-bottom: 1px solid currentColor; + width: 0px; + transition: all 0.3s ease-in-out 0s; +} + +.cu-steps .cu-item[class*="text-"]::after { + width: calc(100% - 80upx); + color: currentColor; +} + +.cu-steps .cu-item:first-child::before, +.cu-steps .cu-item:first-child::after { + display: none; +} + +.cu-steps .cu-item .num { + width: 40upx; + height: 40upx; + border-radius: 50%; + line-height: 40upx; + margin: 20upx auto; + font-size: 24upx; + border: 1px solid currentColor; + position: relative; + overflow: hidden; +} + +.cu-steps .cu-item[class*="text-"] .num { + background-color: currentColor; +} + +.cu-steps .cu-item .num::before, +.cu-steps .cu-item .num::after { + content: attr(data-index); + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + margin: auto; + transition: all 0.3s ease-in-out 0s; + transform: translateY(0upx); +} + +.cu-steps .cu-item[class*="text-"] .num::before { + transform: translateY(-40upx); + color: #ffffff; +} + +.cu-steps .cu-item .num::after { + transform: translateY(40upx); + color: #ffffff; + transition: all 0.3s ease-in-out 0s; +} + +.cu-steps .cu-item[class*="text-"] .num::after { + content: "\e645"; + font-family: 'cuIcon'; + color: #ffffff; + transform: translateY(0upx); +} + +.cu-steps .cu-item[class*="text-"] .num.err::after { + content: "\e646"; +} + +/* ================== + 布局 + ==================== */ + +/* -- flex弹性布局 -- */ + +.flex { + display: flex; +} + +.basis-xs { + flex-basis: 20%; +} + +.basis-sm { + flex-basis: 40%; +} + +.basis-df { + flex-basis: 50%; +} + +.basis-lg { + flex-basis: 60%; +} + +.basis-xl { + flex-basis: 80%; +} + +.flex-sub { + flex: 1; +} + +.flex-twice { + flex: 2; +} + +.flex-treble { + flex: 3; +} + +.flex-direction { + flex-direction: column; +} + +.flex-wrap { + flex-wrap: wrap; +} + +.align-start { + align-items: flex-start; +} + +.align-end { + align-items: flex-end; +} + +.align-center { + align-items: center; +} + +.align-stretch { + align-items: stretch; +} + +.self-start { + align-self: flex-start; +} + +.self-center { + align-self: flex-center; +} + +.self-end { + align-self: flex-end; +} + +.self-stretch { + align-self: stretch; +} + +.align-stretch { + align-items: stretch; +} + +.justify-start { + justify-content: flex-start; +} + +.justify-end { + justify-content: flex-end; +} + +.justify-center { + justify-content: center; +} + +.justify-between { + justify-content: space-between; +} + +.justify-around { + justify-content: space-around; +} + +/* grid布局 */ + +.grid { + display: flex; + flex-wrap: wrap; +} + +.grid.grid-square { + overflow: hidden; +} + +.grid.grid-square .cu-tag { + position: absolute; + right: 0; + top: 0; + border-bottom-left-radius: 6upx; + padding: 6upx 12upx; + height: auto; + background-color: rgba(0, 0, 0, 0.5); +} + +.grid.grid-square>view>text[class*="cuIcon-"] { + font-size: 52upx; + position: absolute; + color: #8799a3; + margin: auto; + top: 0; + bottom: 0; + left: 0; + right: 0; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.grid.grid-square>view { + margin-right: 20upx; + margin-bottom: 20upx; + border-radius: 6upx; + position: relative; + overflow: hidden; +} + +.grid.grid-square>view.bg-img image { + width: 100%; + height: 100%; + position: absolute; +} + +.grid.col-1.grid-square>view { + padding-bottom: 100%; + height: 0; + margin-right: 0; +} + +.grid.col-2.grid-square>view { + padding-bottom: calc((100% - 20upx)/2); + height: 0; + width: calc((100% - 20upx)/2); +} + +.grid.col-3.grid-square>view { + padding-bottom: calc((100% - 40upx)/3); + height: 0; + width: calc((100% - 40upx)/3); +} + +.grid.col-4.grid-square>view { + padding-bottom: calc((100% - 60upx)/4); + height: 0; + width: calc((100% - 60upx)/4); +} + +.grid.col-5.grid-square>view { + padding-bottom: calc((100% - 80upx)/5); + height: 0; + width: calc((100% - 80upx)/5); +} + +.grid.col-2.grid-square>view:nth-child(2n), +.grid.col-3.grid-square>view:nth-child(3n), +.grid.col-4.grid-square>view:nth-child(4n), +.grid.col-5.grid-square>view:nth-child(5n) { + margin-right: 0; +} + +.grid.col-1>view { + width: 100%; +} + +.grid.col-2>view { + width: 50%; +} + +.grid.col-3>view { + width: 33.33%; +} + +.grid.col-4>view { + width: 25%; +} + +.grid.col-5>view { + width: 20%; +} + +/* -- 内外边距 -- */ + +.margin-0 { + margin: 0; +} + +.margin-xs { + margin: 10upx; +} + +.margin-sm { + margin: 20upx; +} + +.margin { + margin: 30upx; +} + +.margin-lg { + margin: 40upx; +} + +.margin-xl { + margin: 50upx; +} + +.margin-top-xs { + margin-top: 10upx; +} + +.margin-top-sm { + margin-top: 20upx; +} + +.margin-top { + margin-top: 30upx; +} + +.margin-top-lg { + margin-top: 40upx; +} + +.margin-top-xl { + margin-top: 50upx; +} + +.margin-right-xs { + margin-right: 10upx; +} + +.margin-right-sm { + margin-right: 20upx; +} + +.margin-right { + margin-right: 30upx; +} + +.margin-right-lg { + margin-right: 40upx; +} + +.margin-right-xl { + margin-right: 50upx; +} + +.margin-bottom-xs { + margin-bottom: 10upx; +} + +.margin-bottom-sm { + margin-bottom: 20upx; +} + +.margin-bottom { + margin-bottom: 30upx; +} + +.margin-bottom-lg { + margin-bottom: 40upx; +} + +.margin-bottom-xl { + margin-bottom: 50upx; +} + +.margin-left-xs { + margin-left: 10upx; +} + +.margin-left-sm { + margin-left: 20upx; +} + +.margin-left { + margin-left: 30upx; +} + +.margin-left-lg { + margin-left: 40upx; +} + +.margin-left-xl { + margin-left: 50upx; +} + +.margin-lr-xs { + margin-left: 10upx; + margin-right: 10upx; +} + +.margin-lr-sm { + margin-left: 20upx; + margin-right: 20upx; +} + +.margin-lr { + margin-left: 30upx; + margin-right: 30upx; +} + +.margin-lr-lg { + margin-left: 40upx; + margin-right: 40upx; +} + +.margin-lr-xl { + margin-left: 50upx; + margin-right: 50upx; +} + +.margin-tb-xs { + margin-top: 10upx; + margin-bottom: 10upx; +} + +.margin-tb-sm { + margin-top: 20upx; + margin-bottom: 20upx; +} + +.margin-tb { + margin-top: 30upx; + margin-bottom: 30upx; +} + +.margin-tb-lg { + margin-top: 40upx; + margin-bottom: 40upx; +} + +.margin-tb-xl { + margin-top: 50upx; + margin-bottom: 50upx; +} + +.padding-0 { + padding: 0; +} + +.padding-xs { + padding: 10upx; +} + +.padding-sm { + padding: 20upx; +} + +.padding { + padding: 30upx; +} + +.padding-lg { + padding: 40upx; +} + +.padding-xl { + padding: 50upx; +} + +.padding-top-xs { + padding-top: 10upx; +} + +.padding-top-sm { + padding-top: 20upx; +} + +.padding-top { + padding-top: 30upx; +} + +.padding-top-lg { + padding-top: 40upx; +} + +.padding-top-xl { + padding-top: 50upx; +} + +.padding-right-xs { + padding-right: 10upx; +} + +.padding-right-sm { + padding-right: 20upx; +} + +.padding-right { + padding-right: 30upx; +} + +.padding-right-lg { + padding-right: 40upx; +} + +.padding-right-xl { + padding-right: 50upx; +} + +.padding-bottom-xs { + padding-bottom: 10upx; +} + +.padding-bottom-sm { + padding-bottom: 20upx; +} + +.padding-bottom { + padding-bottom: 30upx; +} + +.padding-bottom-lg { + padding-bottom: 40upx; +} + +.padding-bottom-xl { + padding-bottom: 50upx; +} + +.padding-left-xs { + padding-left: 10upx; +} + +.padding-left-sm { + padding-left: 20upx; +} + +.padding-left { + padding-left: 30upx; +} + +.padding-left-lg { + padding-left: 40upx; +} + +.padding-left-xl { + padding-left: 50upx; +} + +.padding-lr-xs { + padding-left: 10upx; + padding-right: 10upx; +} + +.padding-lr-sm { + padding-left: 20upx; + padding-right: 20upx; +} + +.padding-lr { + padding-left: 30upx; + padding-right: 30upx; +} + +.padding-lr-lg { + padding-left: 40upx; + padding-right: 40upx; +} + +.padding-lr-xl { + padding-left: 50upx; + padding-right: 50upx; +} + +.padding-tb-xs { + padding-top: 10upx; + padding-bottom: 10upx; +} + +.padding-tb-sm { + padding-top: 20upx; + padding-bottom: 20upx; +} + +.padding-tb { + padding-top: 30upx; + padding-bottom: 30upx; +} + +.padding-tb-lg { + padding-top: 40upx; + padding-bottom: 40upx; +} + +.padding-tb-xl { + padding-top: 50upx; + padding-bottom: 50upx; +} + +/* -- 浮动 -- */ + +.cf::after, +.cf::before { + content: " "; + display: table; +} + +.cf::after { + clear: both; +} + +.fl { + float: left; +} + +.fr { + float: right; +} + +/* ================== + 背景 + ==================== */ + +.line-red::after, +.lines-red::after { + border-color: #FF0000; +} + +.line-orange::after, +.lines-orange::after { + border-color: #f37b1d; +} + +.line-yellow::after, +.lines-yellow::after { + border-color: #fbbd08; +} + +.line-olive::after, +.lines-olive::after { + border-color: #8dc63f; +} + +.line-green::after, +.lines-green::after { + border-color: #39b54a; +} + +.line-cyan::after, +.lines-cyan::after { + border-color: #1cbbb4; +} + +.line-blue::after, +.lines-blue::after { + border-color: #0081ff; +} + +.line-purple::after, +.lines-purple::after { + border-color: #6739b6; +} + +.line-mauve::after, +.lines-mauve::after { + border-color: #9c26b0; +} + +.line-pink::after, +.lines-pink::after { + border-color: #e03997; +} + +.line-brown::after, +.lines-brown::after { + border-color: #a5673f; +} + +.line-grey::after, +.lines-grey::after { + border-color: #8799a3; +} + +.line-gray::after, +.lines-gray::after { + border-color: #aaaaaa; +} + +.line-black::after, +.lines-black::after { + border-color: #333333; +} + +.line-white::after, +.lines-white::after { + border-color: #ffffff; +} + +.bg-red { + background-color: #FF0000; + color: #ffffff; +} + +.bg-orange { + background-color: #f37b1d; + color: #ffffff; +} + +.bg-yellow { + background-color: #fbbd08; + color: #333333; +} + +.bg-olive { + background-color: #8dc63f; + color: #ffffff; +} + +.bg-green { + background-color: #39b54a; + color: #ffffff; +} + +.bg-cyan { + background-color: #1cbbb4; + color: #ffffff; +} + +.bg-blue { + background-color: #0081ff; + color: #ffffff; +} + +.bg-purple { + background-color: #6739b6; + color: #ffffff; +} + +.bg-mauve { + background-color: #9c26b0; + color: #ffffff; +} + +.bg-pink { + background-color: #e03997; + color: #ffffff; +} + +.bg-brown { + background-color: #a5673f; + color: #ffffff; +} + +.bg-grey { + background-color: #8799a3; + color: #ffffff; +} + +.bg-gray { + background-color: #f0f0f0; + color: #333333; +} + +.bg-black { + background-color: #333333; + color: #ffffff; +} + +.bg-white { + background-color: #ffffff; + color: #666666; +} + +.bg-shadeTop { + background-image: linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.01)); + color: #ffffff; +} + +.bg-shadeBottom { + background-image: linear-gradient(rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 1)); + color: #ffffff; +} + +.bg-red.light { + color: #FF0000; + background-color: #fadbd9; +} + +.bg-orange.light { + color: #f37b1d; + background-color: #fde6d2; +} + +.bg-yellow.light { + color: #fbbd08; + background-color: #fef2ced2; +} + +.bg-olive.light { + color: #8dc63f; + background-color: #e8f4d9; +} + +.bg-green.light { + color: #39b54a; + background-color: #d7f0dbff; +} + +.bg-cyan.light { + color: #1cbbb4; + background-color: #d2f1f0; +} + +.bg-blue.light { + color: #0081ff; + background-color: #cce6ff; +} + +.bg-purple.light { + color: #6739b6; + background-color: #e1d7f0; +} + +.bg-mauve.light { + color: #9c26b0; + background-color: #ebd4ef; +} + +.bg-pink.light { + color: #e03997; + background-color: #f9d7ea; +} + +.bg-brown.light { + color: #a5673f; + background-color: #ede1d9; +} + +.bg-grey.light { + color: #8799a3; + background-color: #e7ebed; +} + +.bg-gradual-red { + background-image: linear-gradient(45deg, #f43f3b, #ec008c); + color: #ffffff; +} + +.bg-gradual-orange { + background-image: linear-gradient(45deg, #ff9700, #ed1c24); + color: #ffffff; +} + +.bg-gradual-green { + background-image: linear-gradient(45deg, #39b54a, #8dc63f); + color: #ffffff; +} + +.bg-gradual-purple { + background-image: linear-gradient(45deg, #9000ff, #5e00ff); + color: #ffffff; +} + +.bg-gradual-pink { + background-image: linear-gradient(45deg, #ec008c, #6739b6); + color: #ffffff; +} + +.bg-gradual-blue { + background-image: linear-gradient(45deg, #0081ff, #1cbbb4); + color: #ffffff; +} + +.shadow[class*="-red"] { + box-shadow: 6upx 6upx 8upx rgba(204, 69, 59, 0.2); +} + +.shadow[class*="-orange"] { + box-shadow: 6upx 6upx 8upx rgba(217, 109, 26, 0.2); +} + +.shadow[class*="-yellow"] { + box-shadow: 6upx 6upx 8upx rgba(224, 170, 7, 0.2); +} + +.shadow[class*="-olive"] { + box-shadow: 6upx 6upx 8upx rgba(124, 173, 55, 0.2); +} + +.shadow[class*="-green"] { + box-shadow: 6upx 6upx 8upx rgba(48, 156, 63, 0.2); +} + +.shadow[class*="-cyan"] { + box-shadow: 6upx 6upx 8upx rgba(28, 187, 180, 0.2); +} + +.shadow[class*="-blue"] { + box-shadow: 6upx 6upx 8upx rgba(0, 102, 204, 0.2); +} + +.shadow[class*="-purple"] { + box-shadow: 6upx 6upx 8upx rgba(88, 48, 156, 0.2); +} + +.shadow[class*="-mauve"] { + box-shadow: 6upx 6upx 8upx rgba(133, 33, 150, 0.2); +} + +.shadow[class*="-pink"] { + box-shadow: 6upx 6upx 8upx rgba(199, 50, 134, 0.2); +} + +.shadow[class*="-brown"] { + box-shadow: 6upx 6upx 8upx rgba(140, 88, 53, 0.2); +} + +.shadow[class*="-grey"] { + box-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); +} + +.shadow[class*="-gray"] { + box-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); +} + +.shadow[class*="-black"] { + box-shadow: 6upx 6upx 8upx rgba(26, 26, 26, 0.2); +} + +.shadow[class*="-white"] { + box-shadow: 6upx 6upx 8upx rgba(26, 26, 26, 0.2); +} + +.text-shadow[class*="-red"] { + text-shadow: 6upx 6upx 8upx rgba(204, 69, 59, 0.2); +} + +.text-shadow[class*="-orange"] { + text-shadow: 6upx 6upx 8upx rgba(217, 109, 26, 0.2); +} + +.text-shadow[class*="-yellow"] { + text-shadow: 6upx 6upx 8upx rgba(224, 170, 7, 0.2); +} + +.text-shadow[class*="-olive"] { + text-shadow: 6upx 6upx 8upx rgba(124, 173, 55, 0.2); +} + +.text-shadow[class*="-green"] { + text-shadow: 6upx 6upx 8upx rgba(48, 156, 63, 0.2); +} + +.text-shadow[class*="-cyan"] { + text-shadow: 6upx 6upx 8upx rgba(28, 187, 180, 0.2); +} + +.text-shadow[class*="-blue"] { + text-shadow: 6upx 6upx 8upx rgba(0, 102, 204, 0.2); +} + +.text-shadow[class*="-purple"] { + text-shadow: 6upx 6upx 8upx rgba(88, 48, 156, 0.2); +} + +.text-shadow[class*="-mauve"] { + text-shadow: 6upx 6upx 8upx rgba(133, 33, 150, 0.2); +} + +.text-shadow[class*="-pink"] { + text-shadow: 6upx 6upx 8upx rgba(199, 50, 134, 0.2); +} + +.text-shadow[class*="-brown"] { + text-shadow: 6upx 6upx 8upx rgba(140, 88, 53, 0.2); +} + +.text-shadow[class*="-grey"] { + text-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); +} + +.text-shadow[class*="-gray"] { + text-shadow: 6upx 6upx 8upx rgba(114, 130, 138, 0.2); +} + +.text-shadow[class*="-black"] { + text-shadow: 6upx 6upx 8upx rgba(26, 26, 26, 0.2); +} + +.bg-img { + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} + +.bg-mask { + background-color: #333333; + position: relative; +} + +.bg-mask::after { + content: ""; + border-radius: inherit; + width: 100%; + height: 100%; + display: block; + background-color: rgba(0, 0, 0, 0.4); + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; +} + +.bg-mask view, +.bg-mask cover-view { + z-index: 5; + position: relative; +} + +.bg-video { + position: relative; +} + +.bg-video video { + display: block; + height: 100%; + width: 100%; + -o-object-fit: cover; + object-fit: cover; + position: absolute; + top: 0; + z-index: 0; + pointer-events: none; +} + +/* ================== + 文本 + ==================== */ + +.text-xs { + font-size: 20upx; +} + +.text-sm { + font-size: 24upx; +} + +.text-df { + font-size: 28upx; +} + +.text-lg { + font-size: 32upx; +} + +.text-xl { + font-size: 36upx; +} + +.text-xxl { + font-size: 44upx; +} + +.text-sl { + font-size: 80upx; +} + +.text-xsl { + font-size: 120upx; +} + +.text-Abc { + text-transform: Capitalize; +} + +.text-ABC { + text-transform: Uppercase; +} + +.text-abc { + text-transform: Lowercase; +} + +.text-price::before { + content: "¥"; + font-size: 80%; + margin-right: 4upx; +} + +.text-cut { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.text-bold { + font-weight: bold; +} + +.text-center { + text-align: center; +} + +.text-content { + line-height: 1.6; +} + +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.text-red, +.line-red, +.lines-red { + color: #FF0000; +} + +.text-orange, +.line-orange, +.lines-orange { + color: #f37b1d; +} + +.text-yellow, +.line-yellow, +.lines-yellow { + color: #fbbd08; +} + +.text-olive, +.line-olive, +.lines-olive { + color: #8dc63f; +} + +.text-green, +.line-green, +.lines-green { + color: #39b54a; +} + +.text-cyan, +.line-cyan, +.lines-cyan { + color: #1cbbb4; +} + +.text-blue, +.line-blue, +.lines-blue { + color: #0081ff; +} + +.text-purple, +.line-purple, +.lines-purple { + color: #6739b6; +} + +.text-mauve, +.line-mauve, +.lines-mauve { + color: #9c26b0; +} + +.text-pink, +.line-pink, +.lines-pink { + color: #e03997; +} + +.text-brown, +.line-brown, +.lines-brown { + color: #a5673f; +} + +.text-grey, +.line-grey, +.lines-grey { + color: #8799a3; +} + +.text-gray, +.line-gray, +.lines-gray { + color: #aaaaaa; +} + +.text-black, +.line-black, +.lines-black { + color: #333333; +} + +.text-white, +.line-white, +.lines-white { + color: #ffffff; +} diff --git a/src/static/style/index.scss b/src/static/style/index.scss new file mode 100644 index 0000000..0e3de18 --- /dev/null +++ b/src/static/style/index.scss @@ -0,0 +1,121 @@ + +@import '@/static/style/colorui.css'; +@import './base.scss'; +@import './app.scss'; +page { + -webkit-overflow-scrolling: touch; // ios滑动不流畅 + height: 100%; + background: #f6f6f6; + width: 100%; + font-size: 30rpx; + font-family: Arial; + word-break: break-all; //英文文本不换行 + white-space: normal; + color: $u-main-color; + // padding-bottom: constant(safe-area-inset-bottom); + // padding-bottom: env(safe-area-inset-bottom); + // box-sizing: content-box; +} + +/* #ifdef MP-WEIXIN || APP-PLUS */ +::-webkit-scrollbar { + display: none; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + background: transparent; + color: transparent; +} +/* #endif */ + +uni-tabbar.uni-tabbar-bottom .uni-tabbar { + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); + box-sizing: content-box; +} +.box-safe-area { + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); + box-sizing: content-box; +} + +.u-tabs .uni-scroll-view::-webkit-scrollbar { + width: 0; + height: 0; + color: transparent; + display: none !important; +} + +.content-wrapper { + padding: 25rpx; +} + +.input-placeholder { + font-size: 28rpx !important; + color: #a6a6a6 !important; + font-weight: 400 !important; +} +.uni-input-input, .uni-textarea-textarea, { + font-size: 28rpx; + color: #333; +} +.value-form .u-form-item__body { + flex-wrap: wrap !important; + align-items: flex-start !important; +} +.u-form-item__body__right__message { + margin-left: 0 !important; + text-align: center; +} +.u-form-item__body { + padding-top: 30rpx !important; + padding-bottom: 30rpx !important; + .u-form-item__body__left { + margin-right: 30rpx !important; + } + .u-form-item__body__right { + font-size: 28rpx !important; + } +} + +.form-label { + font-size: 28rpx; + color: #666; + line-height: 1; +} +.form-value { + font-size: 28rpx; + color: #000; + line-height: 40rpx; +} + +.u-tabs__wrapper__nav__line { + bottom: 0 !important; +} + +.u-notice .uicon-volume { + font-size: 40rpx !important; +} + +.uni-modal__btn_primary { + color: $uni-color-primary !important; +} + +.u-empty__text { + font-size: 30rpx !important; +} + +.notice .u-icon__icon { + color: $uni-color-primary !important; +} + +.u-popup { + flex: none !important; + .u-popup__content__close { + padding: 15rpx; + } +} + +input[type='password'] { + font-size: 14px; +} diff --git a/src/uni.scss b/src/uni.scss new file mode 100644 index 0000000..5d864a9 --- /dev/null +++ b/src/uni.scss @@ -0,0 +1,76 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +/* 颜色变量 */ +@import '@/uni_modules/uview-plus/theme.scss'; +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:24rpx; +$uni-font-size-base:28rpx; +$uni-font-size-lg:32rpx; + +/* 图片尺寸 */ +$uni-img-size-sm:40rpx; +$uni-img-size-base:52rpx; +$uni-img-size-lg:80rpx; + +/* Border Radius */ +$uni-border-radius-sm: 4rpx; +$uni-border-radius-base: 6rpx; +$uni-border-radius-lg: 12rpx; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 10px; +$uni-spacing-row-base: 20rpx; +$uni-spacing-row-lg: 30rpx; + +/* 垂直间距 */ +$uni-spacing-col-sm: 8rpx; +$uni-spacing-col-base: 16rpx; +$uni-spacing-col-lg: 24rpx; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:40rpx; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:36rpx; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:30rpx; diff --git a/src/uni_modules/uview-plus/LICENSE b/src/uni_modules/uview-plus/LICENSE new file mode 100644 index 0000000..8e39ead --- /dev/null +++ b/src/uni_modules/uview-plus/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 www.uviewui.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/src/uni_modules/uview-plus/README.md b/src/uni_modules/uview-plus/README.md new file mode 100644 index 0000000..323b439 --- /dev/null +++ b/src/uni_modules/uview-plus/README.md @@ -0,0 +1,64 @@ +

+ logo +

+

uview-plus 3.0

+

多平台快速开发的UI框架

+ +[![stars](https://img.shields.io/github/stars/ijry/uview-plus?style=flat-square&logo=GitHub)](https://github.com/ijry/uview-plus) +[![forks](https://img.shields.io/github/forks/ijry/uview-plus?style=flat-square&logo=GitHub)](https://github.com/ijry/uview-plus) +[![issues](https://img.shields.io/github/issues/ijry/uview-plus?style=flat-square&logo=GitHub)](https://github.com/ijry/uview-plus/issues) +[![release](https://img.shields.io/github/v/release/ijry/uview-plus?style=flat-square)](https://gitee.com/uiadmin/uview-plus/releases) +[![license](https://img.shields.io/github/license/ijry/uview-plus?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License) + +## 说明 + +uview-plus,是uni-app全面兼容vue3/nvue的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水。uview-plus是基于uView2.x移植的支持vue3的版本,感谢uView。 + +## [官方文档:https://uiadmin.net/uview-plus](https://uiadmin.net/uview-plus) + + +## 预览 + +您可以通过**微信**扫码,查看最佳的演示效果。 +
+
+ + +## 链接 + +- [官方文档](https://uiadmin.net/uview-plus) +- [更新日志](https://uiadmin.net/uview-plus/components/changelog.html) +- [升级指南](https://uiadmin.net/uview-plus/components/changeGuide.html) +- [关于我们](https://uiadmin.net/uview-plus/cooperation/about.html) + +## 交流反馈 + +欢迎加入我们的QQ群交流反馈:[点此跳转](https://uiadmin.net/uview-plus/components/addQQGroup.html) + +## 关于PR + +> 我们非常乐意接受各位的优质PR,但在此之前我希望您了解uview-plus是一个需要兼容多个平台的(小程序、h5、ios app、android app)包括nvue页面、vue页面。 +> 所以希望在您修复bug并提交之前尽可能的去这些平台测试一下兼容性。最好能携带测试截图以方便审核。非常感谢! + +## 安装 + +#### **uni-app插件市场链接** —— [https://ext.dcloud.net.cn/plugin?name=uview-plus](https://ext.dcloud.net.cn/plugin?name=uview-plus) + +请通过[官网安装文档](https://uiadmin.net/uview-plus/components/install.html)了解更详细的内容 + +## 快速上手 + +请通过[快速上手](https://uiadmin.net/uview-plus/components/quickstart.html)了解更详细的内容 + +## 使用方法 +配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。 + +```html + +``` + +## 版权信息 +uview-plus遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uview-plus应用到您的产品中。 + diff --git a/src/uni_modules/uview-plus/changelog.md b/src/uni_modules/uview-plus/changelog.md new file mode 100644 index 0000000..d8bd8a6 --- /dev/null +++ b/src/uni_modules/uview-plus/changelog.md @@ -0,0 +1,22 @@ +## 3.1.31(2023-05-15) +本地累计修复一些问题提交 +## 3.0.9(2022-07-14) +修复u-search双向绑定 +## 3.0.8(2022-07-12) +修复u-tag默认宽度撑满容器 +## 3.0.7(2022-07-12) +修复u-navbar自定义插槽演示示例 +## 3.0.6(2022-07-11) +修复u-image缺少emits申明 +## 3.0.5(2022-07-11) +修复u-upload缺少emits申明 +## 3.0.4(2022-07-10) +修复u-textarea/u-input/u-datetime-picker/u-number-box/u-radio-group/u-switch/u-rate在vue3下数据绑定 +## 3.0.3(2022-07-09) +启用自建演示二维码 +## 3.0.2(2022-07-09) +修复dayjs/clipboard等导致打包报错 +## 3.0.1(2022-07-09) +增加插件市场地址 +## 3.0.0(2022-07-09) +# uview-plus(vue3)初步发布 diff --git a/src/uni_modules/uview-plus/components/u--form/u--form.vue b/src/uni_modules/uview-plus/components/u--form/u--form.vue new file mode 100644 index 0000000..b2b29a1 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u--form/u--form.vue @@ -0,0 +1,80 @@ + + + diff --git a/src/uni_modules/uview-plus/components/u--image/u--image.vue b/src/uni_modules/uview-plus/components/u--image/u--image.vue new file mode 100644 index 0000000..3060e52 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u--image/u--image.vue @@ -0,0 +1,50 @@ + + + \ No newline at end of file diff --git a/src/uni_modules/uview-plus/components/u--input/u--input.vue b/src/uni_modules/uview-plus/components/u--input/u--input.vue new file mode 100644 index 0000000..f402884 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u--input/u--input.vue @@ -0,0 +1,74 @@ + + + \ No newline at end of file diff --git a/src/uni_modules/uview-plus/components/u--text/u--text.vue b/src/uni_modules/uview-plus/components/u--text/u--text.vue new file mode 100644 index 0000000..bf40e18 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u--text/u--text.vue @@ -0,0 +1,45 @@ + + + diff --git a/src/uni_modules/uview-plus/components/u--textarea/u--textarea.vue b/src/uni_modules/uview-plus/components/u--textarea/u--textarea.vue new file mode 100644 index 0000000..8b69f1f --- /dev/null +++ b/src/uni_modules/uview-plus/components/u--textarea/u--textarea.vue @@ -0,0 +1,47 @@ + + + diff --git a/src/uni_modules/uview-plus/components/u-action-sheet/props.js b/src/uni_modules/uview-plus/components/u-action-sheet/props.js new file mode 100644 index 0000000..127f77c --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-action-sheet/props.js @@ -0,0 +1,55 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 操作菜单是否展示 (默认false) + show: { + type: Boolean, + default: defprops.actionSheet.show + }, + // 标题 + title: { + type: String, + default: defprops.actionSheet.title + }, + // 选项上方的描述信息 + description: { + type: String, + default: defprops.actionSheet.description + }, + // 数据 + actions: { + type: Array, + default: defprops.actionSheet.actions + }, + // 取消按钮的文字,不为空时显示按钮 + cancelText: { + type: String, + default: defprops.actionSheet.cancelText + }, + // 点击某个菜单项时是否关闭弹窗 + closeOnClickAction: { + type: Boolean, + default: defprops.actionSheet.closeOnClickAction + }, + // 处理底部安全区(默认true) + safeAreaInsetBottom: { + type: Boolean, + default: defprops.actionSheet.safeAreaInsetBottom + }, + // 小程序的打开方式 + openType: { + type: String, + default: defprops.actionSheet.openType + }, + // 点击遮罩是否允许关闭 (默认true) + closeOnClickOverlay: { + type: Boolean, + default: defprops.actionSheet.closeOnClickOverlay + }, + // 圆角值 + round: { + type: [Boolean, String, Number], + default: defprops.actionSheet.round + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue b/src/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue new file mode 100644 index 0000000..b8d2dbf --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue @@ -0,0 +1,279 @@ + + + + + + diff --git a/src/uni_modules/uview-plus/components/u-album/props.js b/src/uni_modules/uview-plus/components/u-album/props.js new file mode 100644 index 0000000..713fcef --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-album/props.js @@ -0,0 +1,60 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 图片地址,Array|Array形式 + urls: { + type: Array, + default: defprops.album.urls + }, + // 指定从数组的对象元素中读取哪个属性作为图片地址 + keyName: { + type: String, + default: defprops.album.keyName + }, + // 单图时,图片长边的长度 + singleSize: { + type: [String, Number], + default: defprops.album.singleSize + }, + // 多图时,图片边长 + multipleSize: { + type: [String, Number], + default: defprops.album.multipleSize + }, + // 多图时,图片水平和垂直之间的间隔 + space: { + type: [String, Number], + default: defprops.album.space + }, + // 单图时,图片缩放裁剪的模式 + singleMode: { + type: String, + default: defprops.album.singleMode + }, + // 多图时,图片缩放裁剪的模式 + multipleMode: { + type: String, + default: defprops.album.multipleMode + }, + // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量 + maxCount: { + type: [String, Number], + default: defprops.album.maxCount + }, + // 是否可以预览图片 + previewFullImage: { + type: Boolean, + default: defprops.album.previewFullImage + }, + // 每行展示图片数量,如设置,singleSize和multipleSize将会无效 + rowCount: { + type: [String, Number], + default: defprops.album.rowCount + }, + // 超出maxCount时是否显示查看更多的提示 + showMore: { + type: Boolean, + default: defprops.album.showMore + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-album/u-album.vue b/src/uni_modules/uview-plus/components/u-album/u-album.vue new file mode 100644 index 0000000..10c3281 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-album/u-album.vue @@ -0,0 +1,261 @@ + + + + + \ No newline at end of file diff --git a/src/uni_modules/uview-plus/components/u-alert/props.js b/src/uni_modules/uview-plus/components/u-alert/props.js new file mode 100644 index 0000000..6be6f3e --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-alert/props.js @@ -0,0 +1,45 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 显示文字 + title: { + type: String, + default: defprops.alert.title + }, + // 主题,success/warning/info/error + type: { + type: String, + default: defprops.alert.type + }, + // 辅助性文字 + description: { + type: String, + default: defprops.alert.description + }, + // 是否可关闭 + closable: { + type: Boolean, + default: defprops.alert.closable + }, + // 是否显示图标 + showIcon: { + type: Boolean, + default: defprops.alert.showIcon + }, + // 浅或深色调,light-浅色,dark-深色 + effect: { + type: String, + default: defprops.alert.effect + }, + // 文字是否居中 + center: { + type: Boolean, + default: defprops.alert.center + }, + // 字体大小 + fontSize: { + type: [String, Number], + default: defprops.alert.fontSize + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-alert/u-alert.vue b/src/uni_modules/uview-plus/components/u-alert/u-alert.vue new file mode 100644 index 0000000..8667763 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-alert/u-alert.vue @@ -0,0 +1,245 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-avatar-group/props.js b/src/uni_modules/uview-plus/components/u-avatar-group/props.js new file mode 100644 index 0000000..cd58ae6 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-avatar-group/props.js @@ -0,0 +1,53 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 头像图片组 + urls: { + type: Array, + default: defprops.avatarGroup.urls + }, + // 最多展示的头像数量 + maxCount: { + type: [String, Number], + default: defprops.avatarGroup.maxCount + }, + // 头像形状 + shape: { + type: String, + default: defprops.avatarGroup.shape + }, + // 图片裁剪模式 + mode: { + type: String, + default: defprops.avatarGroup.mode + }, + // 超出maxCount时是否显示查看更多的提示 + showMore: { + type: Boolean, + default: defprops.avatarGroup.showMore + }, + // 头像大小 + size: { + type: [String, Number], + default: defprops.avatarGroup.size + }, + // 指定从数组的对象元素中读取哪个属性作为图片地址 + keyName: { + type: String, + default: defprops.avatarGroup.keyName + }, + // 头像之间的遮挡比例 + gap: { + type: [String, Number], + validator(value) { + return value >= 0 && value <= 1 + }, + default: defprops.avatarGroup.gap + }, + // 需额外显示的值 + extraValue: { + type: [Number, String], + default: defprops.avatarGroup.extraValue + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-avatar-group/u-avatar-group.vue b/src/uni_modules/uview-plus/components/u-avatar-group/u-avatar-group.vue new file mode 100644 index 0000000..6c468cc --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-avatar-group/u-avatar-group.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-avatar/props.js b/src/uni_modules/uview-plus/components/u-avatar/props.js new file mode 100644 index 0000000..28d2ead --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-avatar/props.js @@ -0,0 +1,79 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 头像图片路径(不能为相对路径) + src: { + type: String, + default: defprops.avatar.src + }, + // 头像形状,circle-圆形,square-方形 + shape: { + type: String, + default: defprops.avatar.shape + }, + // 头像尺寸 + size: { + type: [String, Number], + default: defprops.avatar.size + }, + // 裁剪模式 + mode: { + type: String, + default: defprops.avatar.mode + }, + // 显示的文字 + text: { + type: String, + default: defprops.avatar.text + }, + // 背景色 + bgColor: { + type: String, + default: defprops.avatar.bgColor + }, + // 文字颜色 + color: { + type: String, + default: defprops.avatar.color + }, + // 文字大小 + fontSize: { + type: [String, Number], + default: defprops.avatar.fontSize + }, + // 显示的图标 + icon: { + type: String, + default: defprops.avatar.icon + }, + // 显示小程序头像,只对百度,微信,QQ小程序有效 + mpAvatar: { + type: Boolean, + default: defprops.avatar.mpAvatar + }, + // 是否使用随机背景色 + randomBgColor: { + type: Boolean, + default: defprops.avatar.randomBgColor + }, + // 加载失败的默认头像(组件有内置默认图片) + defaultUrl: { + type: String, + default: defprops.avatar.defaultUrl + }, + // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间 + colorIndex: { + type: [String, Number], + // 校验参数规则,索引在0-19之间 + validator(n) { + return uni.$u.test.range(n, [0, 19]) || n === '' + }, + default: defprops.avatar.colorIndex + }, + // 组件标识符 + name: { + type: String, + default: defprops.avatar.name + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-avatar/u-avatar.vue b/src/uni_modules/uview-plus/components/u-avatar/u-avatar.vue new file mode 100644 index 0000000..013e883 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-avatar/u-avatar.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-back-top/props.js b/src/uni_modules/uview-plus/components/u-back-top/props.js new file mode 100644 index 0000000..4f340ef --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-back-top/props.js @@ -0,0 +1,55 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 返回顶部的形状,circle-圆形,square-方形 + mode: { + type: String, + default: defprops.backtop.mode + }, + // 自定义图标 + icon: { + type: String, + default: defprops.backtop.icon + }, + // 提示文字 + text: { + type: String, + default: defprops.backtop.text + }, + // 返回顶部滚动时间 + duration: { + type: [String, Number], + default: defprops.backtop.duration + }, + // 滚动距离 + scrollTop: { + type: [String, Number], + default: defprops.backtop.scrollTop + }, + // 距离顶部多少距离显示,单位px + top: { + type: [String, Number], + default: defprops.backtop.top + }, + // 返回顶部按钮到底部的距离,单位px + bottom: { + type: [String, Number], + default: defprops.backtop.bottom + }, + // 返回顶部按钮到右边的距离,单位px + right: { + type: [String, Number], + default: defprops.backtop.right + }, + // 层级 + zIndex: { + type: [String, Number], + default: defprops.backtop.zIndex + }, + // 图标的样式,对象形式 + iconStyle: { + type: Object, + default: defprops.backtop.iconStyle + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-back-top/u-back-top.vue b/src/uni_modules/uview-plus/components/u-back-top/u-back-top.vue new file mode 100644 index 0000000..1cab697 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-back-top/u-back-top.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-badge/props.js b/src/uni_modules/uview-plus/components/u-badge/props.js new file mode 100644 index 0000000..1c01223 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-badge/props.js @@ -0,0 +1,78 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 是否显示圆点 + isDot: { + type: Boolean, + default: defprops.badge.isDot + }, + // 显示的内容 + value: { + type: [Number, String], + default: defprops.badge.value + }, + // 显示的内容 + modelValue: { + type: [Number, String], + default: defprops.badge.modelValue + }, + // 是否显示 + show: { + type: Boolean, + default: defprops.badge.show + }, + // 最大值,超过最大值会显示 '{max}+' + max: { + type: [Number, String], + default: defprops.badge.max + }, + // 主题类型,error|warning|success|primary + type: { + type: String, + default: defprops.badge.type + }, + // 当数值为 0 时,是否展示 Badge + showZero: { + type: Boolean, + default: defprops.badge.showZero + }, + // 背景颜色,优先级比type高,如设置,type参数会失效 + bgColor: { + type: [String, null], + default: defprops.badge.bgColor + }, + // 字体颜色 + color: { + type: [String, null], + default: defprops.badge.color + }, + // 徽标形状,circle-四角均为圆角,horn-左下角为直角 + shape: { + type: String, + default: defprops.badge.shape + }, + // 设置数字的显示方式,overflow|ellipsis|limit + // overflow会根据max字段判断,超出显示`${max}+` + // ellipsis会根据max判断,超出显示`${max}...` + // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数 + numberType: { + type: String, + default: defprops.badge.numberType + }, + // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效 + offset: { + type: Array, + default: defprops.badge.offset + }, + // 是否反转背景和字体颜色 + inverted: { + type: Boolean, + default: defprops.badge.inverted + }, + // 是否绝对定位 + absolute: { + type: Boolean, + default: defprops.badge.absolute + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-badge/u-badge.vue b/src/uni_modules/uview-plus/components/u-badge/u-badge.vue new file mode 100644 index 0000000..7ec0e1f --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-badge/u-badge.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-button/nvue.scss b/src/uni_modules/uview-plus/components/u-button/nvue.scss new file mode 100644 index 0000000..490db7d --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-button/nvue.scss @@ -0,0 +1,46 @@ +$u-button-active-opacity:0.75 !default; +$u-button-loading-text-margin-left:4px !default; +$u-button-text-color: #FFFFFF !default; +$u-button-text-plain-error-color:$u-error !default; +$u-button-text-plain-warning-color:$u-warning !default; +$u-button-text-plain-success-color:$u-success !default; +$u-button-text-plain-info-color:$u-info !default; +$u-button-text-plain-primary-color:$u-primary !default; +.u-button { + &--active { + opacity: $u-button-active-opacity; + } + + &--active--plain { + background-color: rgb(217, 217, 217); + } + + &__loading-text { + margin-left:$u-button-loading-text-margin-left; + } + + &__text, + &__loading-text { + color:$u-button-text-color; + } + + &__text--plain--error { + color:$u-button-text-plain-error-color; + } + + &__text--plain--warning { + color:$u-button-text-plain-warning-color; + } + + &__text--plain--success{ + color:$u-button-text-plain-success-color; + } + + &__text--plain--info { + color:$u-button-text-plain-info-color; + } + + &__text--plain--primary { + color:$u-button-text-plain-primary-color; + } +} \ No newline at end of file diff --git a/src/uni_modules/uview-plus/components/u-button/props.js b/src/uni_modules/uview-plus/components/u-button/props.js new file mode 100644 index 0000000..5c94506 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-button/props.js @@ -0,0 +1,162 @@ +/* + * @Author : LQ + * @Description : + * @version : 1.0 + * @Date : 2021-08-16 10:04:04 + * @LastAuthor : LQ + * @lastTime : 2021-08-16 10:04:24 + * @FilePath : /u-view2.0/uview-ui/components/u-button/props.js + */ +import defprops from '../../libs/config/props'; +export default { + props: { + // 是否细边框 + hairline: { + type: Boolean, + default: defprops.button.hairline + }, + // 按钮的预置样式,info,primary,error,warning,success + type: { + type: String, + default: defprops.button.type + }, + // 按钮尺寸,large,normal,small,mini + size: { + type: String, + default: defprops.button.size + }, + // 按钮形状,circle(两边为半圆),square(带圆角) + shape: { + type: String, + default: defprops.button.shape + }, + // 按钮是否镂空 + plain: { + type: Boolean, + default: defprops.button.plain + }, + // 是否禁止状态 + disabled: { + type: Boolean, + default: defprops.button.disabled + }, + // 是否加载中 + loading: { + type: Boolean, + default: defprops.button.loading + }, + // 加载中提示文字 + loadingText: { + type: [String, Number], + default: defprops.button.loadingText + }, + // 加载状态图标类型 + loadingMode: { + type: String, + default: defprops.button.loadingMode + }, + // 加载图标大小 + loadingSize: { + type: [String, Number], + default: defprops.button.loadingSize + }, + // 开放能力,具体请看uniapp稳定关于button组件部分说明 + // https://uniapp.dcloud.io/component/button + openType: { + type: String, + default: defprops.button.openType + }, + // 用于
组件,点击分别会触发 组件的 submit/reset 事件 + // 取值为submit(提交表单),reset(重置表单) + formType: { + type: String, + default: defprops.button.formType + }, + // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 + // 只微信小程序、QQ小程序有效 + appParameter: { + type: String, + default: defprops.button.appParameter + }, + // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效 + hoverStopPropagation: { + type: Boolean, + default: defprops.button.hoverStopPropagation + }, + // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效 + lang: { + type: String, + default: defprops.button.lang + }, + // 会话来源,open-type="contact"时有效。只微信小程序有效 + sessionFrom: { + type: String, + default: defprops.button.sessionFrom + }, + // 会话内消息卡片标题,open-type="contact"时有效 + // 默认当前标题,只微信小程序有效 + sendMessageTitle: { + type: String, + default: defprops.button.sendMessageTitle + }, + // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 + // 默认当前分享路径,只微信小程序有效 + sendMessagePath: { + type: String, + default: defprops.button.sendMessagePath + }, + // 会话内消息卡片图片,open-type="contact"时有效 + // 默认当前页面截图,只微信小程序有效 + sendMessageImg: { + type: String, + default: defprops.button.sendMessageImg + }, + // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示, + // 用户点击后可以快速发送小程序消息,open-type="contact"时有效 + showMessageCard: { + type: Boolean, + default: defprops.button.showMessageCard + }, + // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取 + dataName: { + type: String, + default: defprops.button.dataName + }, + // 节流,一定时间内只能触发一次 + throttleTime: { + type: [String, Number], + default: defprops.button.throttleTime + }, + // 按住后多久出现点击态,单位毫秒 + hoverStartTime: { + type: [String, Number], + default: defprops.button.hoverStartTime + }, + // 手指松开后点击态保留时间,单位毫秒 + hoverStayTime: { + type: [String, Number], + default: defprops.button.hoverStayTime + }, + // 按钮文字,之所以通过props传入,是因为slot传入的话 + // nvue中无法控制文字的样式 + text: { + type: [String, Number], + default: defprops.button.text + }, + // 按钮图标 + icon: { + type: String, + default: defprops.button.icon + }, + // 按钮图标 + iconColor: { + type: String, + default: defprops.button.icon + }, + // 按钮颜色,支持传入linear-gradient渐变色 + color: { + type: String, + default: defprops.button.color + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-button/u-button.vue b/src/uni_modules/uview-plus/components/u-button/u-button.vue new file mode 100644 index 0000000..432834e --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-button/u-button.vue @@ -0,0 +1,494 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-button/vue.scss b/src/uni_modules/uview-plus/components/u-button/vue.scss new file mode 100644 index 0000000..32019b2 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-button/vue.scss @@ -0,0 +1,80 @@ +// nvue下hover-class无效 +$u-button-before-top:50% !default; +$u-button-before-left:50% !default; +$u-button-before-width:100% !default; +$u-button-before-height:100% !default; +$u-button-before-transform:translate(-50%, -50%) !default; +$u-button-before-opacity:0 !default; +$u-button-before-background-color:#000 !default; +$u-button-before-border-color:#000 !default; +$u-button-active-before-opacity:.15 !default; +$u-button-icon-margin-left:4px !default; +$u-button-plain-u-button-info-color:$u-info; +$u-button-plain-u-button-success-color:$u-success; +$u-button-plain-u-button-error-color:$u-error; +$u-button-plain-u-button-warning-color:$u-error; + +.u-button { + width: 100%; + + &__text { + white-space: nowrap; + line-height: 1; + } + + &:before { + position: absolute; + top:$u-button-before-top; + left:$u-button-before-left; + width:$u-button-before-width; + height:$u-button-before-height; + border: inherit; + border-radius: inherit; + transform:$u-button-before-transform; + opacity:$u-button-before-opacity; + content: " "; + background-color:$u-button-before-background-color; + border-color:$u-button-before-border-color; + } + + &--active { + &:before { + opacity: .15 + } + } + + &__icon+&__text:not(:empty), + &__loading-text { + margin-left:$u-button-icon-margin-left; + } + + &--plain { + &.u-button--primary { + color: $u-primary; + } + } + + &--plain { + &.u-button--info { + color:$u-button-plain-u-button-info-color; + } + } + + &--plain { + &.u-button--success { + color:$u-button-plain-u-button-success-color; + } + } + + &--plain { + &.u-button--error { + color:$u-button-plain-u-button-error-color; + } + } + + &--plain { + &.u-button--warning { + color:$u-button-plain-u-button-warning-color; + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-calendar/header.vue b/src/uni_modules/uview-plus/components/u-calendar/header.vue new file mode 100644 index 0000000..dc4f7d0 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-calendar/header.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-calendar/month.vue b/src/uni_modules/uview-plus/components/u-calendar/month.vue new file mode 100644 index 0000000..55a644e --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-calendar/month.vue @@ -0,0 +1,583 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-calendar/props.js b/src/uni_modules/uview-plus/components/u-calendar/props.js new file mode 100644 index 0000000..b5ac560 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-calendar/props.js @@ -0,0 +1,145 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 日历顶部标题 + title: { + type: String, + default: defprops.calendar.title + }, + // 是否显示标题 + showTitle: { + type: Boolean, + default: defprops.calendar.showTitle + }, + // 是否显示副标题 + showSubtitle: { + type: Boolean, + default: defprops.calendar.showSubtitle + }, + // 日期类型选择,single-选择单个日期,multiple-可以选择多个日期,range-选择日期范围 + mode: { + type: String, + default: defprops.calendar.mode + }, + // mode=range时,第一个日期底部的提示文字 + startText: { + type: String, + default: defprops.calendar.startText + }, + // mode=range时,最后一个日期底部的提示文字 + endText: { + type: String, + default: defprops.calendar.endText + }, + // 自定义列表 + customList: { + type: Array, + default: defprops.calendar.customList + }, + // 主题色,对底部按钮和选中日期有效 + color: { + type: String, + default: defprops.calendar.color + }, + // 最小的可选日期 + minDate: { + type: [String, Number], + default: defprops.calendar.minDate + }, + // 最大可选日期 + maxDate: { + type: [String, Number], + default: defprops.calendar.maxDate + }, + // 默认选中的日期,mode为multiple或range是必须为数组格式 + defaultDate: { + type: [Array, String, Date, null], + default: defprops.calendar.defaultDate + }, + // mode=multiple时,最多可选多少个日期 + maxCount: { + type: [String, Number], + default: defprops.calendar.maxCount + }, + // 日期行高 + rowHeight: { + type: [String, Number], + default: defprops.calendar.rowHeight + }, + // 日期格式化函数 + formatter: { + type: [Function, null], + default: defprops.calendar.formatter + }, + // 是否显示农历 + showLunar: { + type: Boolean, + default: defprops.calendar.showLunar + }, + // 是否显示月份背景色 + showMark: { + type: Boolean, + default: defprops.calendar.showMark + }, + // 确定按钮的文字 + confirmText: { + type: String, + default: defprops.calendar.confirmText + }, + // 确认按钮处于禁用状态时的文字 + confirmDisabledText: { + type: String, + default: defprops.calendar.confirmDisabledText + }, + // 是否显示日历弹窗 + show: { + type: Boolean, + default: defprops.calendar.show + }, + // 是否允许点击遮罩关闭日历 + closeOnClickOverlay: { + type: Boolean, + default: defprops.calendar.closeOnClickOverlay + }, + // 是否为只读状态,只读状态下禁止选择日期 + readonly: { + type: Boolean, + default: defprops.calendar.readonly + }, + // 是否展示确认按钮 + showConfirm: { + type: Boolean, + default: defprops.calendar.showConfirm + }, + // 日期区间最多可选天数,默认无限制,mode = range时有效 + maxRange: { + type: [Number, String], + default: defprops.calendar.maxRange + }, + // 范围选择超过最多可选天数时的提示文案,mode = range时有效 + rangePrompt: { + type: String, + default: defprops.calendar.rangePrompt + }, + // 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效 + showRangePrompt: { + type: Boolean, + default: defprops.calendar.showRangePrompt + }, + // 是否允许日期范围的起止时间为同一天,mode = range时有效 + allowSameDay: { + type: Boolean, + default: defprops.calendar.allowSameDay + }, + // 圆角值 + round: { + type: [Boolean, String, Number], + default: defprops.calendar.round + }, + // 最多展示月份数量 + monthNum: { + type: [Number, String], + default: 3 + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-calendar/u-calendar.vue b/src/uni_modules/uview-plus/components/u-calendar/u-calendar.vue new file mode 100644 index 0000000..d87945f --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-calendar/u-calendar.vue @@ -0,0 +1,386 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-calendar/util.js b/src/uni_modules/uview-plus/components/u-calendar/util.js new file mode 100644 index 0000000..af854fd --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-calendar/util.js @@ -0,0 +1,86 @@ +import dayjs from 'dayjs' +export default { + methods: { + // 设置月份数据 + setMonth() { + // 月初是周几 + const day = dayjs(this.date).date(1).day() + const start = day == 0 ? 6 : day - 1 + + // 本月天数 + const days = dayjs(this.date).endOf('month').format('D') + + // 上个月天数 + const prevDays = dayjs(this.date).endOf('month').subtract(1, 'month').format('D') + + // 日期数据 + const arr = [] + // 清空表格 + this.month = [] + + // 添加上月数据 + arr.push( + ...new Array(start).fill(1).map((e, i) => { + const day = prevDays - start + i + 1 + + return { + value: day, + disabled: true, + date: dayjs(this.date).subtract(1, 'month').date(day).format('YYYY-MM-DD') + } + }) + ) + + // 添加本月数据 + arr.push( + ...new Array(days - 0).fill(1).map((e, i) => { + const day = i + 1 + + return { + value: day, + date: dayjs(this.date).date(day).format('YYYY-MM-DD') + } + }) + ) + + // 添加下个月 + arr.push( + ...new Array(42 - days - start).fill(1).map((e, i) => { + const day = i + 1 + + return { + value: day, + disabled: true, + date: dayjs(this.date).add(1, 'month').date(day).format('YYYY-MM-DD') + } + }) + ) + + // 分割数组 + for (let n = 0; n < arr.length; n += 7) { + this.month.push( + arr.slice(n, n + 7).map((e, i) => { + e.index = i + n + + // 自定义信息 + const custom = this.customList.find((c) => c.date == e.date) + + // 农历 + if (this.lunar) { + const { + IDayCn, + IMonthCn + } = this.getLunar(e.date) + e.lunar = IDayCn == '初一' ? IMonthCn : IDayCn + } + + return { + ...e, + ...custom + } + }) + ) + } + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-car-keyboard/props.js b/src/uni_modules/uview-plus/components/u-car-keyboard/props.js new file mode 100644 index 0000000..d4f00f0 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-car-keyboard/props.js @@ -0,0 +1,15 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 是否打乱键盘按键的顺序 + random: { + type: Boolean, + default: false + }, + // 输入一个中文后,是否自动切换到英文 + autoChange: { + type: Boolean, + default: false + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-car-keyboard/u-car-keyboard.vue b/src/uni_modules/uview-plus/components/u-car-keyboard/u-car-keyboard.vue new file mode 100644 index 0000000..3e7e0f1 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-car-keyboard/u-car-keyboard.vue @@ -0,0 +1,313 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-cell-group/props.js b/src/uni_modules/uview-plus/components/u-cell-group/props.js new file mode 100644 index 0000000..04be748 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-cell-group/props.js @@ -0,0 +1,15 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 分组标题 + title: { + type: String, + default: defprops.cellGroup.title + }, + // 是否显示外边框 + border: { + type: Boolean, + default: defprops.cellGroup.border + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue b/src/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue new file mode 100644 index 0000000..d4b92a4 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue @@ -0,0 +1,63 @@ + + + + + + diff --git a/src/uni_modules/uview-plus/components/u-cell/props.js b/src/uni_modules/uview-plus/components/u-cell/props.js new file mode 100644 index 0000000..37bcf9f --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-cell/props.js @@ -0,0 +1,111 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 标题 + title: { + type: [String, Number], + default: defprops.cell.title + }, + // 标题下方的描述信息 + label: { + type: [String, Number], + default: defprops.cell.label + }, + // 右侧的内容 + value: { + type: [String, Number], + default: defprops.cell.value + }, + // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址) + icon: { + type: String, + default: defprops.cell.icon + }, + // 是否禁用cell + disabled: { + type: Boolean, + default: defprops.cell.disabled + }, + // 是否显示下边框 + border: { + type: Boolean, + default: defprops.cell.border + }, + // 内容是否垂直居中(主要是针对右侧的value部分) + center: { + type: Boolean, + default: defprops.cell.center + }, + // 点击后跳转的URL地址 + url: { + type: String, + default: defprops.cell.url + }, + // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作 + linkType: { + type: String, + default: defprops.cell.linkType + }, + // 是否开启点击反馈(表现为点击时加上灰色背景) + clickable: { + type: Boolean, + default: defprops.cell.clickable + }, + // 是否展示右侧箭头并开启点击反馈 + isLink: { + type: Boolean, + default: defprops.cell.isLink + }, + // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件) + required: { + type: Boolean, + default: defprops.cell.required + }, + // 右侧的图标箭头 + rightIcon: { + type: String, + default: defprops.cell.rightIcon + }, + // 右侧箭头的方向,可选值为:left,up,down + arrowDirection: { + type: String, + default: defprops.cell.arrowDirection + }, + // 左侧图标样式 + iconStyle: { + type: [Object, String], + default: () => { + return uni.$u.props.cell.iconStyle + } + }, + // 右侧箭头图标的样式 + rightIconStyle: { + type: [Object, String], + default: () => { + return uni.$u.props.cell.rightIconStyle + } + }, + // 标题的样式 + titleStyle: { + type: [Object, String], + default: () => { + return uni.$u.props.cell.titleStyle + } + }, + // 单位元的大小,可选值为large + size: { + type: String, + default: defprops.cell.size + }, + // 点击cell是否阻止事件传播 + stop: { + type: Boolean, + default: defprops.cell.stop + }, + // 标识符,cell被点击时返回 + name: { + type: [Number, String], + default: defprops.cell.name + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-cell/u-cell.vue b/src/uni_modules/uview-plus/components/u-cell/u-cell.vue new file mode 100644 index 0000000..a986be3 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-cell/u-cell.vue @@ -0,0 +1,234 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-checkbox-group/props.js b/src/uni_modules/uview-plus/components/u-checkbox-group/props.js new file mode 100644 index 0000000..50d508e --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-checkbox-group/props.js @@ -0,0 +1,92 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 标识符 + name: { + type: String, + default: defprops.checkboxGroup.name + }, + // #ifdef VUE3 + // 绑定的值 + modelValue: { + type: Array, + default: defprops.checkboxGroup.value + }, + // #endif + // #ifdef VUE2 + // 绑定的值 + value: { + type: Array, + default: defprops.checkboxGroup.value + }, + // #endif + // 形状,circle-圆形,square-方形 + shape: { + type: String, + default: defprops.checkboxGroup.shape + }, + // 是否禁用全部checkbox + disabled: { + type: Boolean, + default: defprops.checkboxGroup.disabled + }, + + // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 + activeColor: { + type: String, + default: defprops.checkboxGroup.activeColor + }, + // 未选中的颜色 + inactiveColor: { + type: String, + default: defprops.checkboxGroup.inactiveColor + }, + + // 整个组件的尺寸,默认px + size: { + type: [String, Number], + default: defprops.checkboxGroup.size + }, + // 布局方式,row-横向,column-纵向 + placement: { + type: String, + default: defprops.checkboxGroup.placement + }, + // label的字体大小,px单位 + labelSize: { + type: [String, Number], + default: defprops.checkboxGroup.labelSize + }, + // label的字体颜色 + labelColor: { + type: [String], + default: defprops.checkboxGroup.labelColor + }, + // 是否禁止点击文本操作 + labelDisabled: { + type: Boolean, + default: defprops.checkboxGroup.labelDisabled + }, + // 图标颜色 + iconColor: { + type: String, + default: defprops.checkboxGroup.iconColor + }, + // 图标的大小,单位px + iconSize: { + type: [String, Number], + default: defprops.checkboxGroup.iconSize + }, + // 勾选图标的对齐方式,left-左边,right-右边 + iconPlacement: { + type: String, + default: defprops.checkboxGroup.iconPlacement + }, + // 竖向配列时,是否显示下划线 + borderBottom: { + type: Boolean, + default: defprops.checkboxGroup.borderBottom + } + + } +} diff --git a/src/uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.vue b/src/uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.vue new file mode 100644 index 0000000..1dcabf7 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-checkbox/props.js b/src/uni_modules/uview-plus/components/u-checkbox/props.js new file mode 100644 index 0000000..ae98f1b --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-checkbox/props.js @@ -0,0 +1,70 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // checkbox的名称 + name: { + type: [String, Number, Boolean], + default: defprops.checkbox.name + }, + // 形状,square为方形,circle为圆型 + shape: { + type: String, + default: defprops.checkbox.shape + }, + // 整体的大小 + size: { + type: [String, Number], + default: defprops.checkbox.size + }, + // 是否默认选中 + checked: { + type: Boolean, + default: defprops.checkbox.checked + }, + // 是否禁用 + disabled: { + type: [String, Boolean], + default: defprops.checkbox.disabled + }, + // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 + activeColor: { + type: String, + default: defprops.checkbox.activeColor + }, + // 未选中的颜色 + inactiveColor: { + type: String, + default: defprops.checkbox.inactiveColor + }, + // 图标的大小,单位px + iconSize: { + type: [String, Number], + default: defprops.checkbox.iconSize + }, + // 图标颜色 + iconColor: { + type: String, + default: defprops.checkbox.iconColor + }, + // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式 + label: { + type: [String, Number], + default: defprops.checkbox.label + }, + // label的字体大小,px单位 + labelSize: { + type: [String, Number], + default: defprops.checkbox.labelSize + }, + // label的颜色 + labelColor: { + type: String, + default: defprops.checkbox.labelColor + }, + // 是否禁止点击提示语选中复选框 + labelDisabled: { + type: [String, Boolean], + default: defprops.checkbox.labelDisabled + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-checkbox/u-checkbox.vue b/src/uni_modules/uview-plus/components/u-checkbox/u-checkbox.vue new file mode 100644 index 0000000..539a7ae --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-checkbox/u-checkbox.vue @@ -0,0 +1,359 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-circle-progress/props.js b/src/uni_modules/uview-plus/components/u-circle-progress/props.js new file mode 100644 index 0000000..7016b53 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-circle-progress/props.js @@ -0,0 +1,9 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + percentage: { + type: [String, Number], + default: defprops.circleProgress.percentage + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-circle-progress/u-circle-progress.vue b/src/uni_modules/uview-plus/components/u-circle-progress/u-circle-progress.vue new file mode 100644 index 0000000..f0cc1cf --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-circle-progress/u-circle-progress.vue @@ -0,0 +1,200 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-code-input/props.js b/src/uni_modules/uview-plus/components/u-code-input/props.js new file mode 100644 index 0000000..7d2812d --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-code-input/props.js @@ -0,0 +1,80 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 键盘弹起时,是否自动上推页面 + adjustPosition: { + type: Boolean, + default: defprops.codeInput.adjustPosition + }, + // 最大输入长度 + maxlength: { + type: [String, Number], + default: defprops.codeInput.maxlength + }, + // 是否用圆点填充 + dot: { + type: Boolean, + default: defprops.codeInput.dot + }, + // 显示模式,box-盒子模式,line-底部横线模式 + mode: { + type: String, + default: defprops.codeInput.mode + }, + // 是否细边框 + hairline: { + type: Boolean, + default: defprops.codeInput.hairline + }, + // 字符间的距离 + space: { + type: [String, Number], + default: defprops.codeInput.space + }, + // 预置值 + value: { + type: [String, Number], + default: defprops.codeInput.value + }, + // 是否自动获取焦点 + focus: { + type: Boolean, + default: defprops.codeInput.focus + }, + // 字体是否加粗 + bold: { + type: Boolean, + default: defprops.codeInput.bold + }, + // 字体颜色 + color: { + type: String, + default: defprops.codeInput.color + }, + // 字体大小 + fontSize: { + type: [String, Number], + default: defprops.codeInput.fontSize + }, + // 输入框的大小,宽等于高 + size: { + type: [String, Number], + default: defprops.codeInput.size + }, + // 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true + disabledKeyboard: { + type: Boolean, + default: defprops.codeInput.disabledKeyboard + }, + // 边框和线条颜色 + borderColor: { + type: String, + default: defprops.codeInput.borderColor + }, + // 是否禁止输入"."符号 + disabledDot: { + type: Boolean, + default: defprops.codeInput.disabledDot + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-code-input/u-code-input.vue b/src/uni_modules/uview-plus/components/u-code-input/u-code-input.vue new file mode 100644 index 0000000..ea23909 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-code-input/u-code-input.vue @@ -0,0 +1,254 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-code/props.js b/src/uni_modules/uview-plus/components/u-code/props.js new file mode 100644 index 0000000..effc2fc --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-code/props.js @@ -0,0 +1,35 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 倒计时总秒数 + seconds: { + type: [String, Number], + default: defprops.code.seconds + }, + // 尚未开始时提示 + startText: { + type: String, + default: defprops.code.startText + }, + // 正在倒计时中的提示 + changeText: { + type: String, + default: defprops.code.changeText + }, + // 倒计时结束时的提示 + endText: { + type: String, + default: defprops.code.endText + }, + // 是否在H5刷新或各端返回再进入时继续倒计时 + keepRunning: { + type: Boolean, + default: defprops.code.keepRunning + }, + // 为了区分多个页面,或者一个页面多个倒计时组件本地存储的继续倒计时变了 + uniqueKey: { + type: String, + default: defprops.code.uniqueKey + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-code/u-code.vue b/src/uni_modules/uview-plus/components/u-code/u-code.vue new file mode 100644 index 0000000..b00c1b2 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-code/u-code.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-col/props.js b/src/uni_modules/uview-plus/components/u-col/props.js new file mode 100644 index 0000000..cb5d3bd --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-col/props.js @@ -0,0 +1,30 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 占父容器宽度的多少等分,总分为12份 + span: { + type: [String, Number], + default: defprops.col.span + }, + // 指定栅格左侧的间隔数(总12栏) + offset: { + type: [String, Number], + default: defprops.col.offset + }, + // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`) + justify: { + type: String, + default: defprops.col.justify + }, + // 垂直对齐方式,可选值为top、center、bottom、stretch + align: { + type: String, + default: defprops.col.align + }, + // 文字对齐方式 + textAlign: { + type: String, + default: defprops.col.textAlign + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-col/u-col.vue b/src/uni_modules/uview-plus/components/u-col/u-col.vue new file mode 100644 index 0000000..b704b2a --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-col/u-col.vue @@ -0,0 +1,168 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-collapse-item/props.js b/src/uni_modules/uview-plus/components/u-collapse-item/props.js new file mode 100644 index 0000000..5435204 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-collapse-item/props.js @@ -0,0 +1,60 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 标题 + title: { + type: String, + default: defprops.collapseItem.title + }, + // 标题右侧内容 + value: { + type: String, + default: defprops.collapseItem.value + }, + // 标题下方的描述信息 + label: { + type: String, + default: defprops.collapseItem.label + }, + // 是否禁用折叠面板 + disabled: { + type: Boolean, + default: defprops.collapseItem.disabled + }, + // 是否展示右侧箭头并开启点击反馈 + isLink: { + type: Boolean, + default: defprops.collapseItem.isLink + }, + // 是否开启点击反馈 + clickable: { + type: Boolean, + default: defprops.collapseItem.clickable + }, + // 是否显示内边框 + border: { + type: Boolean, + default: defprops.collapseItem.border + }, + // 标题的对齐方式 + align: { + type: String, + default: defprops.collapseItem.align + }, + // 唯一标识符 + name: { + type: [String, Number], + default: defprops.collapseItem.name + }, + // 标题左侧图片,可为绝对路径的图片或内置图标 + icon: { + type: String, + default: defprops.collapseItem.icon + }, + // 面板展开收起的过渡时间,单位ms + duration: { + type: Number, + default: defprops.collapseItem.duration + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-collapse-item/u-collapse-item.vue b/src/uni_modules/uview-plus/components/u-collapse-item/u-collapse-item.vue new file mode 100644 index 0000000..f840385 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-collapse-item/u-collapse-item.vue @@ -0,0 +1,227 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-collapse/props.js b/src/uni_modules/uview-plus/components/u-collapse/props.js new file mode 100644 index 0000000..b45e38d --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-collapse/props.js @@ -0,0 +1,20 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 当前展开面板的name,非手风琴模式:[],手风琴模式:string | number + value: { + type: [String, Number, Array, null], + default: defprops.collapse.value + }, + // 是否手风琴模式 + accordion: { + type: Boolean, + default: defprops.collapse.accordion + }, + // 是否显示外边框 + border: { + type: Boolean, + default: defprops.collapse.border + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-collapse/u-collapse.vue b/src/uni_modules/uview-plus/components/u-collapse/u-collapse.vue new file mode 100644 index 0000000..c7cbd49 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-collapse/u-collapse.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-column-notice/props.js b/src/uni_modules/uview-plus/components/u-column-notice/props.js new file mode 100644 index 0000000..2b669e7 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-column-notice/props.js @@ -0,0 +1,56 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 显示的内容,字符串 + text: { + type: [Array], + default: defprops.columnNotice.text + }, + // 是否显示左侧的音量图标 + icon: { + type: String, + default: defprops.columnNotice.icon + }, + // 通告模式,link-显示右箭头,closable-显示右侧关闭图标 + mode: { + type: String, + default: defprops.columnNotice.mode + }, + // 文字颜色,各图标也会使用文字颜色 + color: { + type: String, + default: defprops.columnNotice.color + }, + // 背景颜色 + bgColor: { + type: String, + default: defprops.columnNotice.bgColor + }, + // 字体大小,单位px + fontSize: { + type: [String, Number], + default: defprops.columnNotice.fontSize + }, + // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度 + speed: { + type: [String, Number], + default: defprops.columnNotice.speed + }, + // direction = row时,是否使用步进形式滚动 + step: { + type: Boolean, + default: defprops.columnNotice.step + }, + // 滚动一个周期的时间长,单位ms + duration: { + type: [String, Number], + default: defprops.columnNotice.duration + }, + // 是否禁止用手滑动切换 + // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序 + disableTouch: { + type: Boolean, + default: defprops.columnNotice.disableTouch + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-column-notice/u-column-notice.vue b/src/uni_modules/uview-plus/components/u-column-notice/u-column-notice.vue new file mode 100644 index 0000000..5d6c7f7 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-column-notice/u-column-notice.vue @@ -0,0 +1,162 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-count-down/props.js b/src/uni_modules/uview-plus/components/u-count-down/props.js new file mode 100644 index 0000000..57c67e0 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-count-down/props.js @@ -0,0 +1,25 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 倒计时时长,单位ms + time: { + type: [String, Number], + default: defprops.countDown.time + }, + // 时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒 + format: { + type: String, + default: defprops.countDown.format + }, + // 是否自动开始倒计时 + autoStart: { + type: Boolean, + default: defprops.countDown.autoStart + }, + // 是否展示毫秒倒计时 + millisecond: { + type: Boolean, + default: defprops.countDown.millisecond + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-count-down/u-count-down.vue b/src/uni_modules/uview-plus/components/u-count-down/u-count-down.vue new file mode 100644 index 0000000..f7fa9aa --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-count-down/u-count-down.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-count-down/utils.js b/src/uni_modules/uview-plus/components/u-count-down/utils.js new file mode 100644 index 0000000..8c75005 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-count-down/utils.js @@ -0,0 +1,62 @@ +// 补0,如1 -> 01 +function padZero(num, targetLength = 2) { + let str = `${num}` + while (str.length < targetLength) { + str = `0${str}` + } + return str +} +const SECOND = 1000 +const MINUTE = 60 * SECOND +const HOUR = 60 * MINUTE +const DAY = 24 * HOUR +export function parseTimeData(time) { + const days = Math.floor(time / DAY) + const hours = Math.floor((time % DAY) / HOUR) + const minutes = Math.floor((time % HOUR) / MINUTE) + const seconds = Math.floor((time % MINUTE) / SECOND) + const milliseconds = Math.floor(time % SECOND) + return { + days, + hours, + minutes, + seconds, + milliseconds + } +} +export function parseFormat(format, timeData) { + let { + days, + hours, + minutes, + seconds, + milliseconds + } = timeData + // 如果格式化字符串中不存在DD(天),则将天的时间转为小时中去 + if (format.indexOf('DD') === -1) { + hours += days * 24 + } else { + // 对天补0 + format = format.replace('DD', padZero(days)) + } + // 其他同理于DD的格式化处理方式 + if (format.indexOf('HH') === -1) { + minutes += hours * 60 + } else { + format = format.replace('HH', padZero(hours)) + } + if (format.indexOf('mm') === -1) { + seconds += minutes * 60 + } else { + format = format.replace('mm', padZero(minutes)) + } + if (format.indexOf('ss') === -1) { + milliseconds += seconds * 1000 + } else { + format = format.replace('ss', padZero(seconds)) + } + return format.replace('SSS', padZero(milliseconds, 3)) +} +export function isSameSecond(time1, time2) { + return Math.floor(time1 / 1000) === Math.floor(time2 / 1000) +} diff --git a/src/uni_modules/uview-plus/components/u-count-to/props.js b/src/uni_modules/uview-plus/components/u-count-to/props.js new file mode 100644 index 0000000..27030af --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-count-to/props.js @@ -0,0 +1,60 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 开始的数值,默认从0增长到某一个数 + startVal: { + type: [String, Number], + default: defprops.countTo.startVal + }, + // 要滚动的目标数值,必须 + endVal: { + type: [String, Number], + default: defprops.countTo.endVal + }, + // 滚动到目标数值的动画持续时间,单位为毫秒(ms) + duration: { + type: [String, Number], + default: defprops.countTo.duration + }, + // 设置数值后是否自动开始滚动 + autoplay: { + type: Boolean, + default: defprops.countTo.autoplay + }, + // 要显示的小数位数 + decimals: { + type: [String, Number], + default: defprops.countTo.decimals + }, + // 是否在即将到达目标数值的时候,使用缓慢滚动的效果 + useEasing: { + type: Boolean, + default: defprops.countTo.useEasing + }, + // 十进制分割 + decimal: { + type: [String, Number], + default: defprops.countTo.decimal + }, + // 字体颜色 + color: { + type: String, + default: defprops.countTo.color + }, + // 字体大小 + fontSize: { + type: [String, Number], + default: defprops.countTo.fontSize + }, + // 是否加粗字体 + bold: { + type: Boolean, + default: defprops.countTo.bold + }, + // 千位分隔符,类似金额的分割(¥23,321.05中的",") + separator: { + type: String, + default: defprops.countTo.separator + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-count-to/u-count-to.vue b/src/uni_modules/uview-plus/components/u-count-to/u-count-to.vue new file mode 100644 index 0000000..42a32b7 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-count-to/u-count-to.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-datetime-picker/props.js b/src/uni_modules/uview-plus/components/u-datetime-picker/props.js new file mode 100644 index 0000000..a61fa9e --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-datetime-picker/props.js @@ -0,0 +1,126 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 是否打开组件 + show: { + type: Boolean, + default: defprops.datetimePicker.show + }, + // 是否展示顶部的操作栏 + showToolbar: { + type: Boolean, + default: defprops.datetimePicker.showToolbar + }, + // #ifdef VUE2 + // 绑定值 + value: { + type: [String, Number], + default: defprops.datetimePicker.value + }, + // #endif + // #ifdef VUE3 + // 绑定值 + modelValue: { + type: [String, Number], + default: defprops.datetimePicker.value + }, + // #endif + // 顶部标题 + title: { + type: String, + default: defprops.datetimePicker.title + }, + // 展示格式,mode=date为日期选择,mode=time为时间选择,mode=year-month为年月选择,mode=datetime为日期时间选择 + mode: { + type: String, + default: defprops.datetimePicker.mode + }, + // 可选的最大时间 + maxDate: { + type: Number, + // 最大默认值为后10年 + default: defprops.datetimePicker.maxDate + }, + // 可选的最小时间 + minDate: { + type: Number, + // 最小默认值为前10年 + default: defprops.datetimePicker.minDate + }, + // 可选的最小小时,仅mode=time有效 + minHour: { + type: Number, + default: defprops.datetimePicker.minHour + }, + // 可选的最大小时,仅mode=time有效 + maxHour: { + type: Number, + default: defprops.datetimePicker.maxHour + }, + // 可选的最小分钟,仅mode=time有效 + minMinute: { + type: Number, + default: defprops.datetimePicker.minMinute + }, + // 可选的最大分钟,仅mode=time有效 + maxMinute: { + type: Number, + default: defprops.datetimePicker.maxMinute + }, + // 选项过滤函数 + filter: { + type: [Function, null], + default: defprops.datetimePicker.filter + }, + // 选项格式化函数 + formatter: { + type: [Function, null], + default: defprops.datetimePicker.formatter + }, + // 是否显示加载中状态 + loading: { + type: Boolean, + default: defprops.datetimePicker.loading + }, + // 各列中,单个选项的高度 + itemHeight: { + type: [String, Number], + default: defprops.datetimePicker.itemHeight + }, + // 取消按钮的文字 + cancelText: { + type: String, + default: defprops.datetimePicker.cancelText + }, + // 确认按钮的文字 + confirmText: { + type: String, + default: defprops.datetimePicker.confirmText + }, + // 取消按钮的颜色 + cancelColor: { + type: String, + default: defprops.datetimePicker.cancelColor + }, + // 确认按钮的颜色 + confirmColor: { + type: String, + default: defprops.datetimePicker.confirmColor + }, + // 每列中可见选项的数量 + visibleItemCount: { + type: [String, Number], + default: defprops.datetimePicker.visibleItemCount + }, + // 是否允许点击遮罩关闭选择器 + closeOnClickOverlay: { + type: Boolean, + default: defprops.datetimePicker.closeOnClickOverlay + }, + // 各列的默认索引 + defaultIndex: { + type: Array, + default: defprops.datetimePicker.defaultIndex + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.vue b/src/uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.vue new file mode 100644 index 0000000..6ca1abf --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.vue @@ -0,0 +1,377 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-divider/props.js b/src/uni_modules/uview-plus/components/u-divider/props.js new file mode 100644 index 0000000..db17264 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-divider/props.js @@ -0,0 +1,45 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 是否虚线 + dashed: { + type: Boolean, + default: defprops.divider.dashed + }, + // 是否细线 + hairline: { + type: Boolean, + default: defprops.divider.hairline + }, + // 是否以点替代文字,优先于text字段起作用 + dot: { + type: Boolean, + default: defprops.divider.dot + }, + // 内容文本的位置,left-左边,center-中间,right-右边 + textPosition: { + type: String, + default: defprops.divider.textPosition + }, + // 文本内容 + text: { + type: [String, Number], + default: defprops.divider.text + }, + // 文本大小 + textSize: { + type: [String, Number], + default: defprops.divider.textSize + }, + // 文本颜色 + textColor: { + type: String, + default: defprops.divider.textColor + }, + // 线条颜色 + lineColor: { + type: String, + default: defprops.divider.lineColor + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-divider/u-divider.vue b/src/uni_modules/uview-plus/components/u-divider/u-divider.vue new file mode 100644 index 0000000..cc78b48 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-divider/u-divider.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-dropdown-item/props.js b/src/uni_modules/uview-plus/components/u-dropdown-item/props.js new file mode 100644 index 0000000..b564e3c --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-dropdown-item/props.js @@ -0,0 +1,37 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 当前选中项的value值 + value: { + type: [Number, String, Array], + default: '' + }, + // 菜单项标题 + title: { + type: [String, Number], + default: '' + }, + // 选项数据,如果传入了默认slot,此参数无效 + options: { + type: Array, + default() { + return [] + } + }, + // 是否禁用此菜单项 + disabled: { + type: Boolean, + default: false + }, + // 下拉弹窗的高度 + height: { + type: [Number, String], + default: 'auto' + }, + // 点击遮罩是否可以收起弹窗 + closeOnClickOverlay: { + type: Boolean, + default: true + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-dropdown-item/u-dropdown-item.vue b/src/uni_modules/uview-plus/components/u-dropdown-item/u-dropdown-item.vue new file mode 100644 index 0000000..c1c113d --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-dropdown-item/u-dropdown-item.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-dropdown/props.js b/src/uni_modules/uview-plus/components/u-dropdown/props.js new file mode 100644 index 0000000..499c8ca --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-dropdown/props.js @@ -0,0 +1,66 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 标题选中时的样式 + activeStyle: { + type: [String, Object], + default: () => ({ + color: '#2979ff', + fontSize: '14px' + }) + }, + // 标题未选中时的样式 + inactiveStyle: { + type: [String, Object], + default: () => ({ + color: '#606266', + fontSize: '14px' + }) + }, + // 点击遮罩是否关闭菜单 + closeOnClickMask: { + type: Boolean, + default: true + }, + // 点击当前激活项标题是否关闭菜单 + closeOnClickSelf: { + type: Boolean, + default: true + }, + // 过渡时间 + duration: { + type: [Number, String], + default: 300 + }, + // 标题菜单的高度 + height: { + type: [Number, String], + default: 40 + }, + // 是否显示下边框 + borderBottom: { + type: Boolean, + default: false + }, + // 标题的字体大小 + titleSize: { + type: [Number, String], + default: 14 + }, + // 下拉出来的内容部分的圆角值 + borderRadius: { + type: [Number, String], + default: 0 + }, + // 菜单右侧的icon图标 + menuIcon: { + type: String, + default: 'arrow-down' + }, + // 菜单右侧图标的大小 + menuIconSize: { + type: [Number, String], + default: 14 + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-dropdown/u-dropdown.vue b/src/uni_modules/uview-plus/components/u-dropdown/u-dropdown.vue new file mode 100644 index 0000000..7db5800 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-dropdown/u-dropdown.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-empty/props.js b/src/uni_modules/uview-plus/components/u-empty/props.js new file mode 100644 index 0000000..c433952 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-empty/props.js @@ -0,0 +1,60 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 内置图标名称,或图片路径,建议绝对路径 + icon: { + type: String, + default: defprops.empty.icon + }, + // 提示文字 + text: { + type: String, + default: defprops.empty.text + }, + // 文字颜色 + textColor: { + type: String, + default: defprops.empty.textColor + }, + // 文字大小 + textSize: { + type: [String, Number], + default: defprops.empty.textSize + }, + // 图标的颜色 + iconColor: { + type: String, + default: defprops.empty.iconColor + }, + // 图标的大小 + iconSize: { + type: [String, Number], + default: defprops.empty.iconSize + }, + // 选择预置的图标类型 + mode: { + type: String, + default: defprops.empty.mode + }, + // 图标宽度,单位px + width: { + type: [String, Number], + default: defprops.empty.width + }, + // 图标高度,单位px + height: { + type: [String, Number], + default: defprops.empty.height + }, + // 是否显示组件 + show: { + type: Boolean, + default: defprops.empty.show + }, + // 组件距离上一个元素之间的距离,默认px单位 + marginTop: { + type: [String, Number], + default: defprops.empty.marginTop + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-empty/u-empty.vue b/src/uni_modules/uview-plus/components/u-empty/u-empty.vue new file mode 100644 index 0000000..86d13c9 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-empty/u-empty.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-form-item/props.js b/src/uni_modules/uview-plus/components/u-form-item/props.js new file mode 100644 index 0000000..09b4277 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-form-item/props.js @@ -0,0 +1,44 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // input的label提示语 + label: { + type: String, + default: defprops.formItem.label + }, + // 绑定的值 + prop: { + type: String, + default: defprops.formItem.prop + }, + // 是否显示表单域的下划线边框 + borderBottom: { + type: [String, Boolean], + default: defprops.formItem.borderBottom + }, + // label的宽度,单位px + labelWidth: { + type: [String, Number], + default: defprops.formItem.labelWidth + }, + // 右侧图标 + rightIcon: { + type: String, + default: defprops.formItem.rightIcon + }, + // 左侧图标 + leftIcon: { + type: String, + default: defprops.formItem.leftIcon + }, + // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置 + required: { + type: Boolean, + default: defprops.formItem.required + }, + leftIconStyle: { + type: [String, Object], + default: defprops.formItem.leftIconStyle, + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-form-item/u-form-item.vue b/src/uni_modules/uview-plus/components/u-form-item/u-form-item.vue new file mode 100644 index 0000000..dbdd7a9 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-form-item/u-form-item.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-form/props.js b/src/uni_modules/uview-plus/components/u-form/props.js new file mode 100644 index 0000000..5c9d81b --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-form/props.js @@ -0,0 +1,46 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 当前form的需要验证字段的集合 + model: { + type: Object, + default: defprops.form.model + }, + // 验证规则 + rules: { + type: [Object, Function, Array], + default: defprops.form.rules + }, + // 有错误时的提示方式,message-提示信息,toast-进行toast提示 + // border-bottom-下边框呈现红色,none-无提示 + errorType: { + type: String, + default: defprops.form.errorType + }, + // 是否显示表单域的下划线边框 + borderBottom: { + type: Boolean, + default: defprops.form.borderBottom + }, + // label的位置,left-左边,top-上边 + labelPosition: { + type: String, + default: defprops.form.labelPosition + }, + // label的宽度,单位px + labelWidth: { + type: [String, Number], + default: defprops.form.labelWidth + }, + // lable字体的对齐方式 + labelAlign: { + type: String, + default: defprops.form.labelAlign + }, + // lable的样式,对象形式 + labelStyle: { + type: Object, + default: defprops.form.labelStyle + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-form/u-form.vue b/src/uni_modules/uview-plus/components/u-form/u-form.vue new file mode 100644 index 0000000..027961e --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-form/u-form.vue @@ -0,0 +1,216 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-gap/props.js b/src/uni_modules/uview-plus/components/u-gap/props.js new file mode 100644 index 0000000..8a59822 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-gap/props.js @@ -0,0 +1,25 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 背景颜色(默认transparent) + bgColor: { + type: String, + default: defprops.gap.bgColor + }, + // 分割槽高度,单位px(默认30) + height: { + type: [String, Number], + default: defprops.gap.height + }, + // 与上一个组件的距离 + marginTop: { + type: [String, Number], + default: defprops.gap.marginTop + }, + // 与下一个组件的距离 + marginBottom: { + type: [String, Number], + default: defprops.gap.marginBottom + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-gap/u-gap.vue b/src/uni_modules/uview-plus/components/u-gap/u-gap.vue new file mode 100644 index 0000000..3ba733c --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-gap/u-gap.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-grid-item/props.js b/src/uni_modules/uview-plus/components/u-grid-item/props.js new file mode 100644 index 0000000..19ff849 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-grid-item/props.js @@ -0,0 +1,15 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 宫格的name + name: { + type: [String, Number, null], + default: defprops.gridItem.name + }, + // 背景颜色 + bgColor: { + type: String, + default: defprops.gridItem.bgColor + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-grid-item/u-grid-item.vue b/src/uni_modules/uview-plus/components/u-grid-item/u-grid-item.vue new file mode 100644 index 0000000..c053623 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-grid-item/u-grid-item.vue @@ -0,0 +1,216 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-grid/props.js b/src/uni_modules/uview-plus/components/u-grid/props.js new file mode 100644 index 0000000..e78cfd2 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-grid/props.js @@ -0,0 +1,20 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 分成几列 + col: { + type: [String, Number], + default: defprops.grid.col + }, + // 是否显示边框 + border: { + type: Boolean, + default: defprops.grid.border + }, + // 宫格对齐方式,表现为数量少的时候,靠左,居中,还是靠右 + align: { + type: String, + default: defprops.grid.align + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-grid/u-grid.vue b/src/uni_modules/uview-plus/components/u-grid/u-grid.vue new file mode 100644 index 0000000..61ac2ab --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-grid/u-grid.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-icon/icons.js b/src/uni_modules/uview-plus/components/u-icon/icons.js new file mode 100644 index 0000000..f4d0fe2 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-icon/icons.js @@ -0,0 +1,214 @@ +export default { + 'uicon-level': '\ue693', + 'uicon-column-line': '\ue68e', + 'uicon-checkbox-mark': '\ue807', + 'uicon-folder': '\ue7f5', + 'uicon-movie': '\ue7f6', + 'uicon-star-fill': '\ue669', + 'uicon-star': '\ue65f', + 'uicon-phone-fill': '\ue64f', + 'uicon-phone': '\ue622', + 'uicon-apple-fill': '\ue881', + 'uicon-chrome-circle-fill': '\ue885', + 'uicon-backspace': '\ue67b', + 'uicon-attach': '\ue632', + 'uicon-cut': '\ue948', + 'uicon-empty-car': '\ue602', + 'uicon-empty-coupon': '\ue682', + 'uicon-empty-address': '\ue646', + 'uicon-empty-favor': '\ue67c', + 'uicon-empty-permission': '\ue686', + 'uicon-empty-news': '\ue687', + 'uicon-empty-search': '\ue664', + 'uicon-github-circle-fill': '\ue887', + 'uicon-rmb': '\ue608', + 'uicon-person-delete-fill': '\ue66a', + 'uicon-reload': '\ue788', + 'uicon-order': '\ue68f', + 'uicon-server-man': '\ue6bc', + 'uicon-search': '\ue62a', + 'uicon-fingerprint': '\ue955', + 'uicon-more-dot-fill': '\ue630', + 'uicon-scan': '\ue662', + 'uicon-share-square': '\ue60b', + 'uicon-map': '\ue61d', + 'uicon-map-fill': '\ue64e', + 'uicon-tags': '\ue629', + 'uicon-tags-fill': '\ue651', + 'uicon-bookmark-fill': '\ue63b', + 'uicon-bookmark': '\ue60a', + 'uicon-eye': '\ue613', + 'uicon-eye-fill': '\ue641', + 'uicon-mic': '\ue64a', + 'uicon-mic-off': '\ue649', + 'uicon-calendar': '\ue66e', + 'uicon-calendar-fill': '\ue634', + 'uicon-trash': '\ue623', + 'uicon-trash-fill': '\ue658', + 'uicon-play-left': '\ue66d', + 'uicon-play-right': '\ue610', + 'uicon-minus': '\ue618', + 'uicon-plus': '\ue62d', + 'uicon-info': '\ue653', + 'uicon-info-circle': '\ue7d2', + 'uicon-info-circle-fill': '\ue64b', + 'uicon-question': '\ue715', + 'uicon-error': '\ue6d3', + 'uicon-close': '\ue685', + 'uicon-checkmark': '\ue6a8', + 'uicon-android-circle-fill': '\ue67e', + 'uicon-android-fill': '\ue67d', + 'uicon-ie': '\ue87b', + 'uicon-IE-circle-fill': '\ue889', + 'uicon-google': '\ue87a', + 'uicon-google-circle-fill': '\ue88a', + 'uicon-setting-fill': '\ue872', + 'uicon-setting': '\ue61f', + 'uicon-minus-square-fill': '\ue855', + 'uicon-plus-square-fill': '\ue856', + 'uicon-heart': '\ue7df', + 'uicon-heart-fill': '\ue851', + 'uicon-camera': '\ue7d7', + 'uicon-camera-fill': '\ue870', + 'uicon-more-circle': '\ue63e', + 'uicon-more-circle-fill': '\ue645', + 'uicon-chat': '\ue620', + 'uicon-chat-fill': '\ue61e', + 'uicon-bag-fill': '\ue617', + 'uicon-bag': '\ue619', + 'uicon-error-circle-fill': '\ue62c', + 'uicon-error-circle': '\ue624', + 'uicon-close-circle': '\ue63f', + 'uicon-close-circle-fill': '\ue637', + 'uicon-checkmark-circle': '\ue63d', + 'uicon-checkmark-circle-fill': '\ue635', + 'uicon-question-circle-fill': '\ue666', + 'uicon-question-circle': '\ue625', + 'uicon-share': '\ue631', + 'uicon-share-fill': '\ue65e', + 'uicon-shopping-cart': '\ue621', + 'uicon-shopping-cart-fill': '\ue65d', + 'uicon-bell': '\ue609', + 'uicon-bell-fill': '\ue640', + 'uicon-list': '\ue650', + 'uicon-list-dot': '\ue616', + 'uicon-zhihu': '\ue6ba', + 'uicon-zhihu-circle-fill': '\ue709', + 'uicon-zhifubao': '\ue6b9', + 'uicon-zhifubao-circle-fill': '\ue6b8', + 'uicon-weixin-circle-fill': '\ue6b1', + 'uicon-weixin-fill': '\ue6b2', + 'uicon-twitter-circle-fill': '\ue6ab', + 'uicon-twitter': '\ue6aa', + 'uicon-taobao-circle-fill': '\ue6a7', + 'uicon-taobao': '\ue6a6', + 'uicon-weibo-circle-fill': '\ue6a5', + 'uicon-weibo': '\ue6a4', + 'uicon-qq-fill': '\ue6a1', + 'uicon-qq-circle-fill': '\ue6a0', + 'uicon-moments-circel-fill': '\ue69a', + 'uicon-moments': '\ue69b', + 'uicon-qzone': '\ue695', + 'uicon-qzone-circle-fill': '\ue696', + 'uicon-baidu-circle-fill': '\ue680', + 'uicon-baidu': '\ue681', + 'uicon-facebook-circle-fill': '\ue68a', + 'uicon-facebook': '\ue689', + 'uicon-car': '\ue60c', + 'uicon-car-fill': '\ue636', + 'uicon-warning-fill': '\ue64d', + 'uicon-warning': '\ue694', + 'uicon-clock-fill': '\ue638', + 'uicon-clock': '\ue60f', + 'uicon-edit-pen': '\ue612', + 'uicon-edit-pen-fill': '\ue66b', + 'uicon-email': '\ue611', + 'uicon-email-fill': '\ue642', + 'uicon-minus-circle': '\ue61b', + 'uicon-minus-circle-fill': '\ue652', + 'uicon-plus-circle': '\ue62e', + 'uicon-plus-circle-fill': '\ue661', + 'uicon-file-text': '\ue663', + 'uicon-file-text-fill': '\ue665', + 'uicon-pushpin': '\ue7e3', + 'uicon-pushpin-fill': '\ue86e', + 'uicon-grid': '\ue673', + 'uicon-grid-fill': '\ue678', + 'uicon-play-circle': '\ue647', + 'uicon-play-circle-fill': '\ue655', + 'uicon-pause-circle-fill': '\ue654', + 'uicon-pause': '\ue8fa', + 'uicon-pause-circle': '\ue643', + 'uicon-eye-off': '\ue648', + 'uicon-eye-off-outline': '\ue62b', + 'uicon-gift-fill': '\ue65c', + 'uicon-gift': '\ue65b', + 'uicon-rmb-circle-fill': '\ue657', + 'uicon-rmb-circle': '\ue677', + 'uicon-kefu-ermai': '\ue656', + 'uicon-server-fill': '\ue751', + 'uicon-coupon-fill': '\ue8c4', + 'uicon-coupon': '\ue8ae', + 'uicon-integral': '\ue704', + 'uicon-integral-fill': '\ue703', + 'uicon-home-fill': '\ue964', + 'uicon-home': '\ue965', + 'uicon-hourglass-half-fill': '\ue966', + 'uicon-hourglass': '\ue967', + 'uicon-account': '\ue628', + 'uicon-plus-people-fill': '\ue626', + 'uicon-minus-people-fill': '\ue615', + 'uicon-account-fill': '\ue614', + 'uicon-thumb-down-fill': '\ue726', + 'uicon-thumb-down': '\ue727', + 'uicon-thumb-up': '\ue733', + 'uicon-thumb-up-fill': '\ue72f', + 'uicon-lock-fill': '\ue979', + 'uicon-lock-open': '\ue973', + 'uicon-lock-opened-fill': '\ue974', + 'uicon-lock': '\ue97a', + 'uicon-red-packet-fill': '\ue690', + 'uicon-photo-fill': '\ue98b', + 'uicon-photo': '\ue98d', + 'uicon-volume-off-fill': '\ue659', + 'uicon-volume-off': '\ue644', + 'uicon-volume-fill': '\ue670', + 'uicon-volume': '\ue633', + 'uicon-red-packet': '\ue691', + 'uicon-download': '\ue63c', + 'uicon-arrow-up-fill': '\ue6b0', + 'uicon-arrow-down-fill': '\ue600', + 'uicon-play-left-fill': '\ue675', + 'uicon-play-right-fill': '\ue676', + 'uicon-rewind-left-fill': '\ue679', + 'uicon-rewind-right-fill': '\ue67a', + 'uicon-arrow-downward': '\ue604', + 'uicon-arrow-leftward': '\ue601', + 'uicon-arrow-rightward': '\ue603', + 'uicon-arrow-upward': '\ue607', + 'uicon-arrow-down': '\ue60d', + 'uicon-arrow-right': '\ue605', + 'uicon-arrow-left': '\ue60e', + 'uicon-arrow-up': '\ue606', + 'uicon-skip-back-left': '\ue674', + 'uicon-skip-forward-right': '\ue672', + 'uicon-rewind-right': '\ue66f', + 'uicon-rewind-left': '\ue671', + 'uicon-arrow-right-double': '\ue68d', + 'uicon-arrow-left-double': '\ue68c', + 'uicon-wifi-off': '\ue668', + 'uicon-wifi': '\ue667', + 'uicon-empty-data': '\ue62f', + 'uicon-empty-history': '\ue684', + 'uicon-empty-list': '\ue68b', + 'uicon-empty-page': '\ue627', + 'uicon-empty-order': '\ue639', + 'uicon-man': '\ue697', + 'uicon-woman': '\ue69c', + 'uicon-man-add': '\ue61c', + 'uicon-man-add-fill': '\ue64c', + 'uicon-man-delete': '\ue61a', + 'uicon-man-delete-fill': '\ue66a', + 'uicon-zh': '\ue70a', + 'uicon-en': '\ue692' +} diff --git a/src/uni_modules/uview-plus/components/u-icon/props.js b/src/uni_modules/uview-plus/components/u-icon/props.js new file mode 100644 index 0000000..843874b --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-icon/props.js @@ -0,0 +1,90 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 图标类名 + name: { + type: String, + default: defprops.icon.name + }, + // 图标颜色,可接受主题色 + color: { + type: String, + default: defprops.icon.color + }, + // 字体大小,单位px + size: { + type: [String, Number], + default: defprops.icon.size + }, + // 是否显示粗体 + bold: { + type: Boolean, + default: defprops.icon.bold + }, + // 点击图标的时候传递事件出去的index(用于区分点击了哪一个) + index: { + type: [String, Number], + default: defprops.icon.index + }, + // 触摸图标时的类名 + hoverClass: { + type: String, + default: defprops.icon.hoverClass + }, + // 自定义扩展前缀,方便用户扩展自己的图标库 + customPrefix: { + type: String, + default: defprops.icon.customPrefix + }, + // 图标右边或者下面的文字 + label: { + type: [String, Number], + default: defprops.icon.label + }, + // label的位置,只能右边或者下边 + labelPos: { + type: String, + default: defprops.icon.labelPos + }, + // label的大小 + labelSize: { + type: [String, Number], + default: defprops.icon.labelSize + }, + // label的颜色 + labelColor: { + type: String, + default: defprops.icon.labelColor + }, + // label与图标的距离 + space: { + type: [String, Number], + default: defprops.icon.space + }, + // 图片的mode + imgMode: { + type: String, + default: defprops.icon.imgMode + }, + // 用于显示图片小图标时,图片的宽度 + width: { + type: [String, Number], + default: defprops.icon.width + }, + // 用于显示图片小图标时,图片的高度 + height: { + type: [String, Number], + default: defprops.icon.height + }, + // 用于解决某些情况下,让图标垂直居中的用途 + top: { + type: [String, Number], + default: defprops.icon.top + }, + // 是否阻止事件传播 + stop: { + type: Boolean, + default: defprops.icon.stop + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-icon/u-icon.vue b/src/uni_modules/uview-plus/components/u-icon/u-icon.vue new file mode 100644 index 0000000..bbf19ad --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-icon/u-icon.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-image/props.js b/src/uni_modules/uview-plus/components/u-image/props.js new file mode 100644 index 0000000..3e8c53a --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-image/props.js @@ -0,0 +1,85 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 图片地址 + src: { + type: String, + default: defprops.image.src + }, + // 裁剪模式 + mode: { + type: String, + default: defprops.image.mode + }, + // 宽度,单位任意 + width: { + type: [String, Number], + default: defprops.image.width + }, + // 高度,单位任意 + height: { + type: [String, Number], + default: defprops.image.height + }, + // 图片形状,circle-圆形,square-方形 + shape: { + type: String, + default: defprops.image.shape + }, + // 圆角,单位任意 + radius: { + type: [String, Number], + default: defprops.image.radius + }, + // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序 + lazyLoad: { + type: Boolean, + default: defprops.image.lazyLoad + }, + // 开启长按图片显示识别微信小程序码菜单 + showMenuByLongpress: { + type: Boolean, + default: defprops.image.showMenuByLongpress + }, + // 加载中的图标,或者小图片 + loadingIcon: { + type: String, + default: defprops.image.loadingIcon + }, + // 加载失败的图标,或者小图片 + errorIcon: { + type: String, + default: defprops.image.errorIcon + }, + // 是否显示加载中的图标或者自定义的slot + showLoading: { + type: Boolean, + default: defprops.image.showLoading + }, + // 是否显示加载错误的图标或者自定义的slot + showError: { + type: Boolean, + default: defprops.image.showError + }, + // 是否需要淡入效果 + fade: { + type: Boolean, + default: defprops.image.fade + }, + // 只支持网络资源,只对微信小程序有效 + webp: { + type: Boolean, + default: defprops.image.webp + }, + // 过渡时间,单位ms + duration: { + type: [String, Number], + default: defprops.image.duration + }, + // 背景颜色,用于深色页面加载图片时,为了和背景色融合 + bgColor: { + type: String, + default: defprops.image.bgColor + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-image/u-image.vue b/src/uni_modules/uview-plus/components/u-image/u-image.vue new file mode 100644 index 0000000..c8d47c4 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-image/u-image.vue @@ -0,0 +1,235 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-index-anchor/props.js b/src/uni_modules/uview-plus/components/u-index-anchor/props.js new file mode 100644 index 0000000..dbdd7da --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-index-anchor/props.js @@ -0,0 +1,30 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 列表锚点文本内容 + text: { + type: [String, Number], + default: defprops.indexAnchor.text + }, + // 列表锚点文字颜色 + color: { + type: String, + default: defprops.indexAnchor.color + }, + // 列表锚点文字大小,单位默认px + size: { + type: [String, Number], + default: defprops.indexAnchor.size + }, + // 列表锚点背景颜色 + bgColor: { + type: String, + default: defprops.indexAnchor.bgColor + }, + // 列表锚点高度,单位默认px + height: { + type: [String, Number], + default: defprops.indexAnchor.height + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-index-anchor/u-index-anchor.vue b/src/uni_modules/uview-plus/components/u-index-anchor/u-index-anchor.vue new file mode 100644 index 0000000..739ef8e --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-index-anchor/u-index-anchor.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-index-item/props.js b/src/uni_modules/uview-plus/components/u-index-item/props.js new file mode 100644 index 0000000..40aa3c6 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-index-item/props.js @@ -0,0 +1,6 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + + } +} diff --git a/src/uni_modules/uview-plus/components/u-index-item/u-index-item.vue b/src/uni_modules/uview-plus/components/u-index-item/u-index-item.vue new file mode 100644 index 0000000..c1d122a --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-index-item/u-index-item.vue @@ -0,0 +1,89 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-index-list/props.js b/src/uni_modules/uview-plus/components/u-index-list/props.js new file mode 100644 index 0000000..103d2cb --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-index-list/props.js @@ -0,0 +1,30 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 右边锚点非激活的颜色 + inactiveColor: { + type: String, + default: defprops.indexList.inactiveColor + }, + // 右边锚点激活的颜色 + activeColor: { + type: String, + default: defprops.indexList.activeColor + }, + // 索引字符列表,数组形式 + indexList: { + type: Array, + default: defprops.indexList.indexList + }, + // 是否开启锚点自动吸顶 + sticky: { + type: Boolean, + default: defprops.indexList.sticky + }, + // 自定义导航栏的高度 + customNavHeight: { + type: [String, Number], + default: defprops.indexList.customNavHeight + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-index-list/u-index-list.vue b/src/uni_modules/uview-plus/components/u-index-list/u-index-list.vue new file mode 100644 index 0000000..f07f9cc --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-index-list/u-index-list.vue @@ -0,0 +1,442 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-input/props.js b/src/uni_modules/uview-plus/components/u-input/props.js new file mode 100644 index 0000000..927a6ae --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-input/props.js @@ -0,0 +1,196 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // #ifdef VUE3 + // 绑定的值 + modelValue: { + type: [String, Number], + default: defprops.input.value + }, + // #endif + // #ifdef VUE2 + // 绑定的值 + value: { + type: [String, Number], + default: defprops.input.value + }, + // #endif + // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数 + // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序 + // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序 + // text-文本输入键盘 + type: { + type: String, + default: defprops.input.type + }, + // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true, + // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序 + fixed: { + type: Boolean, + default: defprops.input.fixed + }, + // 是否禁用输入框 + disabled: { + type: Boolean, + default: defprops.input.disabled + }, + // 禁用状态时的背景色 + disabledColor: { + type: String, + default: defprops.input.disabledColor + }, + // 是否显示清除控件 + clearable: { + type: Boolean, + default: defprops.input.clearable + }, + // 是否密码类型 + password: { + type: Boolean, + default: defprops.input.password + }, + // 最大输入长度,设置为 -1 的时候不限制最大长度 + maxlength: { + type: [String, Number], + default: defprops.input.maxlength + }, + // 输入框为空时的占位符 + placeholder: { + type: String, + default: defprops.input.placeholder + }, + // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ + placeholderClass: { + type: String, + default: defprops.input.placeholderClass + }, + // 指定placeholder的样式 + placeholderStyle: { + type: [String, Object], + default: defprops.input.placeholderStyle + }, + // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效 + showWordLimit: { + type: Boolean, + default: defprops.input.showWordLimit + }, + // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档 + // https://uniapp.dcloud.io/component/input + // https://uniapp.dcloud.io/component/textarea + confirmType: { + type: String, + default: defprops.input.confirmType + }, + // 点击键盘右下角按钮时是否保持键盘不收起,H5无效 + confirmHold: { + type: Boolean, + default: defprops.input.confirmHold + }, + // focus时,点击页面的时候不收起键盘,微信小程序有效 + holdKeyboard: { + type: Boolean, + default: defprops.input.holdKeyboard + }, + // 自动获取焦点 + // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点 + focus: { + type: Boolean, + default: defprops.input.focus + }, + // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效 + autoBlur: { + type: Boolean, + default: defprops.input.autoBlur + }, + // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效 + disableDefaultPadding: { + type: Boolean, + default: defprops.input.disableDefaultPadding + }, + // 指定focus时光标的位置 + cursor: { + type: [String, Number], + default: defprops.input.cursor + }, + // 输入框聚焦时底部与键盘的距离 + cursorSpacing: { + type: [String, Number], + default: defprops.input.cursorSpacing + }, + // 光标起始位置,自动聚集时有效,需与selection-end搭配使用 + selectionStart: { + type: [String, Number], + default: defprops.input.selectionStart + }, + // 光标结束位置,自动聚集时有效,需与selection-start搭配使用 + selectionEnd: { + type: [String, Number], + default: defprops.input.selectionEnd + }, + // 键盘弹起时,是否自动上推页面 + adjustPosition: { + type: Boolean, + default: defprops.input.adjustPosition + }, + // 输入框内容对齐方式,可选值为:left|center|right + inputAlign: { + type: String, + default: defprops.input.inputAlign + }, + // 输入框字体的大小 + fontSize: { + type: [String, Number], + default: defprops.input.fontSize + }, + // 输入框字体颜色 + color: { + type: String, + default: defprops.input.color + }, + // 输入框前置图标 + prefixIcon: { + type: String, + default: defprops.input.prefixIcon + }, + // 前置图标样式,对象或字符串 + prefixIconStyle: { + type: [String, Object], + default: defprops.input.prefixIconStyle + }, + // 输入框后置图标 + suffixIcon: { + type: String, + default: defprops.input.suffixIcon + }, + // 后置图标样式,对象或字符串 + suffixIconStyle: { + type: [String, Object], + default: defprops.input.suffixIconStyle + }, + // 边框类型,surround-四周边框,bottom-底部边框,none-无边框 + border: { + type: String, + default: defprops.input.border + }, + // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会 + readonly: { + type: Boolean, + default: defprops.input.readonly + }, + // 输入框形状,circle-圆形,square-方形 + shape: { + type: String, + default: defprops.input.shape + }, + // 用于处理或者过滤输入框内容的方法 + formatter: { + type: [Function, null], + default: defprops.input.formatter + }, + // 是否忽略组件内对文本合成系统事件的处理 + ignoreCompositionEvent: { + type: Boolean, + default: true + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-input/u-input.vue b/src/uni_modules/uview-plus/components/u-input/u-input.vue new file mode 100644 index 0000000..49a0a5a --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-input/u-input.vue @@ -0,0 +1,386 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-keyboard/props.js b/src/uni_modules/uview-plus/components/u-keyboard/props.js new file mode 100644 index 0000000..fcea1c2 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-keyboard/props.js @@ -0,0 +1,85 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 键盘的类型,number-数字键盘,card-身份证键盘,car-车牌号键盘 + mode: { + type: String, + default: defprops.keyboard.mode + }, + // 是否显示键盘的"."符号 + dotDisabled: { + type: Boolean, + default: defprops.keyboard.dotDisabled + }, + // 是否显示顶部工具条 + tooltip: { + type: Boolean, + default: defprops.keyboard.tooltip + }, + // 是否显示工具条中间的提示 + showTips: { + type: Boolean, + default: defprops.keyboard.showTips + }, + // 工具条中间的提示文字 + tips: { + type: String, + default: defprops.keyboard.tips + }, + // 是否显示工具条左边的"取消"按钮 + showCancel: { + type: Boolean, + default: defprops.keyboard.showCancel + }, + // 是否显示工具条右边的"完成"按钮 + showConfirm: { + type: Boolean, + default: defprops.keyboard.showConfirm + }, + // 是否打乱键盘按键的顺序 + random: { + type: Boolean, + default: defprops.keyboard.random + }, + // 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距 + safeAreaInsetBottom: { + type: Boolean, + default: defprops.keyboard.safeAreaInsetBottom + }, + // 是否允许通过点击遮罩关闭键盘 + closeOnClickOverlay: { + type: Boolean, + default: defprops.keyboard.closeOnClickOverlay + }, + // 控制键盘的弹出与收起 + show: { + type: Boolean, + default: defprops.keyboard.show + }, + // 是否显示遮罩,某些时候数字键盘时,用户希望看到自己的数值,所以可能不想要遮罩 + overlay: { + type: Boolean, + default: defprops.keyboard.overlay + }, + // z-index值 + zIndex: { + type: [String, Number], + default: defprops.keyboard.zIndex + }, + // 取消按钮的文字 + cancelText: { + type: String, + default: defprops.keyboard.cancelText + }, + // 确认按钮的文字 + confirmText: { + type: String, + default: defprops.keyboard.confirmText + }, + // 输入一个中文后,是否自动切换到英文 + autoChange: { + type: Boolean, + default: defprops.keyboard.autoChange + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-keyboard/u-keyboard.vue b/src/uni_modules/uview-plus/components/u-keyboard/u-keyboard.vue new file mode 100644 index 0000000..3546453 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-keyboard/u-keyboard.vue @@ -0,0 +1,166 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-line-progress/props.js b/src/uni_modules/uview-plus/components/u-line-progress/props.js new file mode 100644 index 0000000..08a8cb6 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-line-progress/props.js @@ -0,0 +1,29 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 激活部分的颜色 + activeColor: { + type: String, + default: defprops.lineProgress.activeColor + }, + inactiveColor: { + type: String, + default: defprops.lineProgress.color + }, + // 进度百分比,数值 + percentage: { + type: [String, Number], + default: defprops.lineProgress.inactiveColor + }, + // 是否在进度条内部显示百分比的值 + showText: { + type: Boolean, + default: defprops.lineProgress.showText + }, + // 进度条的高度,单位px + height: { + type: [String, Number], + default: defprops.lineProgress.height + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-line-progress/u-line-progress.vue b/src/uni_modules/uview-plus/components/u-line-progress/u-line-progress.vue new file mode 100644 index 0000000..f26fbbd --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-line-progress/u-line-progress.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-line/props.js b/src/uni_modules/uview-plus/components/u-line/props.js new file mode 100644 index 0000000..89bcf4a --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-line/props.js @@ -0,0 +1,34 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + color: { + type: String, + default: defprops.line.color + }, + // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 + length: { + type: [String, Number], + default: defprops.line.length + }, + // 线条方向,col-竖向,row-横向 + direction: { + type: String, + default: defprops.line.direction + }, + // 是否显示细边框 + hairline: { + type: Boolean, + default: defprops.line.hairline + }, + // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px" + margin: { + type: [String, Number], + default: defprops.line.margin + }, + // 是否虚线,true-虚线,false-实线 + dashed: { + type: Boolean, + default: defprops.line.dashed + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-line/u-line.vue b/src/uni_modules/uview-plus/components/u-line/u-line.vue new file mode 100644 index 0000000..b42f375 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-line/u-line.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-link/props.js b/src/uni_modules/uview-plus/components/u-link/props.js new file mode 100644 index 0000000..6118b44 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-link/props.js @@ -0,0 +1,40 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 文字颜色 + color: { + type: String, + default: defprops.link.color + }, + // 字体大小,单位px + fontSize: { + type: [String, Number], + default: defprops.link.fontSize + }, + // 是否显示下划线 + underLine: { + type: Boolean, + default: defprops.link.underLine + }, + // 要跳转的链接 + href: { + type: String, + default: defprops.link.href + }, + // 小程序中复制到粘贴板的提示语 + mpTips: { + type: String, + default: defprops.link.mpTips + }, + // 下划线颜色 + lineColor: { + type: String, + default: defprops.link.lineColor + }, + // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色 + text: { + type: String, + default: defprops.link.text + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-link/u-link.vue b/src/uni_modules/uview-plus/components/u-link/u-link.vue new file mode 100644 index 0000000..16ce28e --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-link/u-link.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-list-item/props.js b/src/uni_modules/uview-plus/components/u-list-item/props.js new file mode 100644 index 0000000..b2c8076 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-list-item/props.js @@ -0,0 +1,10 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 用于滚动到指定item + anchor: { + type: [String, Number], + default: defprops.listItem.anchor + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-list-item/u-list-item.vue b/src/uni_modules/uview-plus/components/u-list-item/u-list-item.vue new file mode 100644 index 0000000..5e4b336 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-list-item/u-list-item.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-list/props.js b/src/uni_modules/uview-plus/components/u-list/props.js new file mode 100644 index 0000000..6eb13da --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-list/props.js @@ -0,0 +1,77 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 控制是否出现滚动条,仅nvue有效 + showScrollbar: { + type: Boolean, + default: defprops.list.showScrollbar + }, + // 距底部多少时触发scrolltolower事件 + lowerThreshold: { + type: [String, Number], + default: defprops.list.lowerThreshold + }, + // 距顶部多少时触发scrolltoupper事件,非nvue有效 + upperThreshold: { + type: [String, Number], + default: defprops.list.upperThreshold + }, + // 设置竖向滚动条位置 + scrollTop: { + type: [String, Number], + default: defprops.list.scrollTop + }, + // 控制 onscroll 事件触发的频率,仅nvue有效 + offsetAccuracy: { + type: [String, Number], + default: defprops.list.offsetAccuracy + }, + // 启用 flexbox 布局。开启后,当前节点声明了display: flex就会成为flex container,并作用于其孩子节点,仅微信小程序有效 + enableFlex: { + type: Boolean, + default: defprops.list.enableFlex + }, + // 是否按分页模式显示List,默认值false + pagingEnabled: { + type: Boolean, + default: defprops.list.pagingEnabled + }, + // 是否允许List滚动 + scrollable: { + type: Boolean, + default: defprops.list.scrollable + }, + // 值应为某子元素id(id不能以数字开头) + scrollIntoView: { + type: String, + default: defprops.list.scrollIntoView + }, + // 在设置滚动条位置时使用动画过渡 + scrollWithAnimation: { + type: Boolean, + default: defprops.list.scrollWithAnimation + }, + // iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只对微信小程序有效 + enableBackToTop: { + type: Boolean, + default: defprops.list.enableBackToTop + }, + // 列表的高度 + height: { + type: [String, Number], + default: defprops.list.height + }, + // 列表宽度 + width: { + type: [String, Number], + default: defprops.list.width + }, + // 列表前后预渲染的屏数,1代表一个屏幕的高度,1.5代表1个半屏幕高度 + preLoadScreen: { + type: [String, Number], + default: defprops.list.preLoadScreen + } + // vue下,是否开启虚拟列表 + + } +} diff --git a/src/uni_modules/uview-plus/components/u-list/u-list.vue b/src/uni_modules/uview-plus/components/u-list/u-list.vue new file mode 100644 index 0000000..1167387 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-list/u-list.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-loading-icon/props.js b/src/uni_modules/uview-plus/components/u-loading-icon/props.js new file mode 100644 index 0000000..996cf9b --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-loading-icon/props.js @@ -0,0 +1,60 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 是否显示组件 + show: { + type: Boolean, + default: defprops.loadingIcon.show + }, + // 颜色 + color: { + type: String, + default: defprops.loadingIcon.color + }, + // 提示文字颜色 + textColor: { + type: String, + default: defprops.loadingIcon.textColor + }, + // 文字和图标是否垂直排列 + vertical: { + type: Boolean, + default: defprops.loadingIcon.vertical + }, + // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形 + mode: { + type: String, + default: defprops.loadingIcon.mode + }, + // 图标大小,单位默认px + size: { + type: [String, Number], + default: defprops.loadingIcon.size + }, + // 文字大小 + textSize: { + type: [String, Number], + default: defprops.loadingIcon.textSize + }, + // 文字内容 + text: { + type: [String, Number], + default: defprops.loadingIcon.text + }, + // 动画模式 + timingFunction: { + type: String, + default: defprops.loadingIcon.timingFunction + }, + // 动画执行周期时间 + duration: { + type: [String, Number], + default: defprops.loadingIcon.duration + }, + // mode=circle时的暗边颜色 + inactiveColor: { + type: String, + default: defprops.loadingIcon.inactiveColor + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue b/src/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue new file mode 100644 index 0000000..e74950e --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue @@ -0,0 +1,345 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-loading-page/props.js b/src/uni_modules/uview-plus/components/u-loading-page/props.js new file mode 100644 index 0000000..02d5ff7 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-loading-page/props.js @@ -0,0 +1,50 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 提示内容 + loadingText: { + type: [String, Number], + default: defprops.loadingPage.loadingText + }, + // 文字上方用于替换loading动画的图片 + image: { + type: String, + default: defprops.loadingPage.image + }, + // 加载动画的模式,circle-圆形,spinner-花朵形,semicircle-半圆形 + loadingMode: { + type: String, + default: defprops.loadingPage.loadingMode + }, + // 是否加载中 + loading: { + type: Boolean, + default: defprops.loadingPage.loading + }, + // 背景色 + bgColor: { + type: String, + default: defprops.loadingPage.bgColor + }, + // 文字颜色 + color: { + type: String, + default: defprops.loadingPage.color + }, + // 文字大小 + fontSize: { + type: [String, Number], + default: defprops.loadingPage.fontSize + }, + // 图标大小 + iconSize: { + type: [String, Number], + default: defprops.loadingPage.fontSize + }, + // 加载中图标的颜色,只能rgb或者十六进制颜色值 + loadingColor: { + type: String, + default: defprops.loadingPage.loadingColor + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-loading-page/u-loading-page.vue b/src/uni_modules/uview-plus/components/u-loading-page/u-loading-page.vue new file mode 100644 index 0000000..3f8f601 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-loading-page/u-loading-page.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-loadmore/props.js b/src/uni_modules/uview-plus/components/u-loadmore/props.js new file mode 100644 index 0000000..bc0cb0f --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-loadmore/props.js @@ -0,0 +1,95 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态 + status: { + type: String, + default: defprops.loadmore.status + }, + // 组件背景色 + bgColor: { + type: String, + default: defprops.loadmore.bgColor + }, + // 是否显示加载中的图标 + icon: { + type: Boolean, + default: defprops.loadmore.icon + }, + // 字体大小 + fontSize: { + type: [String, Number], + default: defprops.loadmore.fontSize + }, + // 图标大小 + iconSize: { + type: [String, Number], + default: defprops.loadmore.iconSize + }, + // 字体颜色 + color: { + type: String, + default: defprops.loadmore.color + }, + // 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆 + loadingIcon: { + type: String, + default: defprops.loadmore.loadingIcon + }, + // 加载前的提示语 + loadmoreText: { + type: String, + default: defprops.loadmore.loadmoreText + }, + // 加载中提示语 + loadingText: { + type: String, + default: defprops.loadmore.loadingText + }, + // 没有更多的提示语 + nomoreText: { + type: String, + default: defprops.loadmore.nomoreText + }, + // 在“没有更多”状态下,是否显示粗点 + isDot: { + type: Boolean, + default: defprops.loadmore.isDot + }, + // 加载中图标的颜色 + iconColor: { + type: String, + default: defprops.loadmore.iconColor + }, + // 上边距 + marginTop: { + type: [String, Number], + default: defprops.loadmore.marginTop + }, + // 下边距 + marginBottom: { + type: [String, Number], + default: defprops.loadmore.marginBottom + }, + // 高度,单位px + height: { + type: [String, Number], + default: defprops.loadmore.height + }, + // 是否显示左边分割线 + line: { + type: Boolean, + default: defprops.loadmore.line + }, + // 线条颜色 + lineColor: { + type: String, + default: defprops.loadmore.lineColor + }, + // 是否虚线,true-虚线,false-实线 + dashed: { + type: Boolean, + default: defprops.loadmore.dashed + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-loadmore/u-loadmore.vue b/src/uni_modules/uview-plus/components/u-loadmore/u-loadmore.vue new file mode 100644 index 0000000..de473f2 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-loadmore/u-loadmore.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-modal/props.js b/src/uni_modules/uview-plus/components/u-modal/props.js new file mode 100644 index 0000000..fb0d089 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-modal/props.js @@ -0,0 +1,85 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 是否展示modal + show: { + type: Boolean, + default: defprops.modal.show + }, + // 标题 + title: { + type: [String], + default: defprops.modal.title + }, + // 弹窗内容 + content: { + type: String, + default: defprops.modal.content + }, + // 确认文案 + confirmText: { + type: String, + default: defprops.modal.confirmText + }, + // 取消文案 + cancelText: { + type: String, + default: defprops.modal.cancelText + }, + // 是否显示确认按钮 + showConfirmButton: { + type: Boolean, + default: defprops.modal.showConfirmButton + }, + // 是否显示取消按钮 + showCancelButton: { + type: Boolean, + default: defprops.modal.showCancelButton + }, + // 确认按钮颜色 + confirmColor: { + type: String, + default: defprops.modal.confirmColor + }, + // 取消文字颜色 + cancelColor: { + type: String, + default: defprops.modal.cancelColor + }, + // 对调确认和取消的位置 + buttonReverse: { + type: Boolean, + default: defprops.modal.buttonReverse + }, + // 是否开启缩放效果 + zoom: { + type: Boolean, + default: defprops.modal.zoom + }, + // 是否异步关闭,只对确定按钮有效 + asyncClose: { + type: Boolean, + default: defprops.modal.asyncClose + }, + // 是否允许点击遮罩关闭modal + closeOnClickOverlay: { + type: Boolean, + default: defprops.modal.closeOnClickOverlay + }, + // 给一个负的margin-top,往上偏移,避免和键盘重合的情况 + negativeTop: { + type: [String, Number], + default: defprops.modal.negativeTop + }, + // modal宽度,不支持百分比,可以数值,px,rpx单位 + width: { + type: [String, Number], + default: defprops.modal.width + }, + // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮 + confirmButtonShape: { + type: String, + default: defprops.modal.confirmButtonShape + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-modal/u-modal.vue b/src/uni_modules/uview-plus/components/u-modal/u-modal.vue new file mode 100644 index 0000000..c7491ed --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-modal/u-modal.vue @@ -0,0 +1,229 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-navbar/props.js b/src/uni_modules/uview-plus/components/u-navbar/props.js new file mode 100644 index 0000000..3d77d47 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-navbar/props.js @@ -0,0 +1,85 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 是否开启顶部安全区适配 + safeAreaInsetTop: { + type: Boolean, + default: defprops.navbar.safeAreaInsetTop + }, + // 固定在顶部时,是否生成一个等高元素,以防止塌陷 + placeholder: { + type: Boolean, + default: defprops.navbar.placeholder + }, + // 是否固定在顶部 + fixed: { + type: Boolean, + default: defprops.navbar.fixed + }, + // 是否显示下边框 + border: { + type: Boolean, + default: defprops.navbar.border + }, + // 左边的图标 + leftIcon: { + type: String, + default: defprops.navbar.leftIcon + }, + // 左边的提示文字 + leftText: { + type: String, + default: defprops.navbar.leftText + }, + // 左右的提示文字 + rightText: { + type: String, + default: defprops.navbar.rightText + }, + // 右边的图标 + rightIcon: { + type: String, + default: defprops.navbar.rightIcon + }, + // 标题 + title: { + type: [String, Number], + default: defprops.navbar.title + }, + // 背景颜色 + bgColor: { + type: String, + default: defprops.navbar.bgColor + }, + // 标题的宽度 + titleWidth: { + type: [String, Number], + default: defprops.navbar.titleWidth + }, + // 导航栏高度 + height: { + type: [String, Number], + default: defprops.navbar.height + }, + // 左侧返回图标的大小 + leftIconSize: { + type: [String, Number], + default: defprops.navbar.leftIconSize + }, + // 左侧返回图标的颜色 + leftIconColor: { + type: String, + default: defprops.navbar.leftIconColor + }, + // 点击左侧区域(返回图标),是否自动返回上一页 + autoBack: { + type: Boolean, + default: defprops.navbar.autoBack + }, + // 标题的样式,对象或字符串 + titleStyle: { + type: [String, Object], + default: defprops.navbar.titleStyle + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-navbar/u-navbar.vue b/src/uni_modules/uview-plus/components/u-navbar/u-navbar.vue new file mode 100644 index 0000000..57fb887 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-navbar/u-navbar.vue @@ -0,0 +1,188 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-no-network/props.js b/src/uni_modules/uview-plus/components/u-no-network/props.js new file mode 100644 index 0000000..9204600 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-no-network/props.js @@ -0,0 +1,20 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 页面文字提示 + tips: { + type: String, + default: defprops.noNetwork.tips + }, + // 一个z-index值,用于设置没有网络这个组件的层次,因为页面可能会有其他定位的元素层级过高,导致此组件被覆盖 + zIndex: { + type: [String, Number], + default: defprops.noNetwork.zIndex + }, + // image 没有网络的图片提示 + image: { + type: String, + default: defprops.noNetwork.image + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-no-network/u-no-network.vue b/src/uni_modules/uview-plus/components/u-no-network/u-no-network.vue new file mode 100644 index 0000000..efe8675 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-no-network/u-no-network.vue @@ -0,0 +1,222 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-notice-bar/props.js b/src/uni_modules/uview-plus/components/u-notice-bar/props.js new file mode 100644 index 0000000..d15125c --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-notice-bar/props.js @@ -0,0 +1,71 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 显示的内容,数组 + text: { + type: [Array, String], + default: defprops.noticeBar.text + }, + // 通告滚动模式,row-横向滚动,column-竖向滚动 + direction: { + type: String, + default: defprops.noticeBar.direction + }, + // direction = row时,是否使用步进形式滚动 + step: { + type: Boolean, + default: defprops.noticeBar.step + }, + // 是否显示左侧的音量图标 + icon: { + type: String, + default: defprops.noticeBar.icon + }, + // 通告模式,link-显示右箭头,closable-显示右侧关闭图标 + mode: { + type: String, + default: defprops.noticeBar.mode + }, + // 文字颜色,各图标也会使用文字颜色 + color: { + type: String, + default: defprops.noticeBar.color + }, + // 背景颜色 + bgColor: { + type: String, + default: defprops.noticeBar.bgColor + }, + // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度 + speed: { + type: [String, Number], + default: defprops.noticeBar.speed + }, + // 字体大小 + fontSize: { + type: [String, Number], + default: defprops.noticeBar.fontSize + }, + // 滚动一个周期的时间长,单位ms + duration: { + type: [String, Number], + default: defprops.noticeBar.duration + }, + // 是否禁止用手滑动切换 + // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序 + disableTouch: { + type: Boolean, + default: defprops.noticeBar.disableTouch + }, + // 跳转的页面路径 + url: { + type: String, + default: defprops.noticeBar.url + }, + // 页面跳转的类型 + linkType: { + type: String, + default: defprops.noticeBar.linkType + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-notice-bar/u-notice-bar.vue b/src/uni_modules/uview-plus/components/u-notice-bar/u-notice-bar.vue new file mode 100644 index 0000000..ea9013f --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-notice-bar/u-notice-bar.vue @@ -0,0 +1,103 @@ + + + + diff --git a/src/uni_modules/uview-plus/components/u-notify/props.js b/src/uni_modules/uview-plus/components/u-notify/props.js new file mode 100644 index 0000000..d7c8541 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-notify/props.js @@ -0,0 +1,50 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 到顶部的距离 + top: { + type: [String, Number], + default: defprops.notify.top + }, + // 是否展示组件 + // show: { + // type: Boolean, + // default: defprops.notify.show + // }, + // type主题,primary,success,warning,error + type: { + type: String, + default: defprops.notify.type + }, + // 字体颜色 + color: { + type: String, + default: defprops.notify.color + }, + // 背景颜色 + bgColor: { + type: String, + default: defprops.notify.bgColor + }, + // 展示的文字内容 + message: { + type: String, + default: defprops.notify.message + }, + // 展示时长,为0时不消失,单位ms + duration: { + type: [String, Number], + default: defprops.notify.duration + }, + // 字体大小 + fontSize: { + type: [String, Number], + default: defprops.notify.fontSize + }, + // 是否留出顶部安全距离(状态栏高度) + safeAreaInsetTop: { + type: Boolean, + default: defprops.notify.safeAreaInsetTop + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-notify/u-notify.vue b/src/uni_modules/uview-plus/components/u-notify/u-notify.vue new file mode 100644 index 0000000..039f7cd --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-notify/u-notify.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-number-box/props.js b/src/uni_modules/uview-plus/components/u-number-box/props.js new file mode 100644 index 0000000..cf76a5e --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-number-box/props.js @@ -0,0 +1,119 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 步进器标识符,在change回调返回 + name: { + type: [String, Number], + default: defprops.numberBox.name + }, + // #ifdef VUE2 + // 用于双向绑定的值,初始化时设置设为默认min值(最小值) + value: { + type: [String, Number], + default: defprops.numberBox.value + }, + // #endif + // #ifdef VUE3 + // 用于双向绑定的值,初始化时设置设为默认min值(最小值) + modelValue: { + type: [String, Number], + default: defprops.numberBox.value + }, + // #endif + // 最小值 + min: { + type: [String, Number], + default: defprops.numberBox.min + }, + // 最大值 + max: { + type: [String, Number], + default: defprops.numberBox.max + }, + // 加减的步长,可为小数 + step: { + type: [String, Number], + default: defprops.numberBox.step + }, + // 是否只允许输入整数 + integer: { + type: Boolean, + default: defprops.numberBox.integer + }, + // 是否禁用,包括输入框,加减按钮 + disabled: { + type: Boolean, + default: defprops.numberBox.disabled + }, + // 是否禁用输入框 + disabledInput: { + type: Boolean, + default: defprops.numberBox.disabledInput + }, + // 是否开启异步变更,开启后需要手动控制输入值 + asyncChange: { + type: Boolean, + default: defprops.numberBox.asyncChange + }, + // 输入框宽度,单位为px + inputWidth: { + type: [String, Number], + default: defprops.numberBox.inputWidth + }, + // 是否显示减少按钮 + showMinus: { + type: Boolean, + default: defprops.numberBox.showMinus + }, + // 是否显示增加按钮 + showPlus: { + type: Boolean, + default: defprops.numberBox.showPlus + }, + // 显示的小数位数 + decimalLength: { + type: [String, Number, null], + default: defprops.numberBox.decimalLength + }, + // 是否开启长按加减手势 + longPress: { + type: Boolean, + default: defprops.numberBox.longPress + }, + // 输入框文字和加减按钮图标的颜色 + color: { + type: String, + default: defprops.numberBox.color + }, + // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致 + buttonSize: { + type: [String, Number], + default: defprops.numberBox.buttonSize + }, + // 输入框和按钮的背景颜色 + bgColor: { + type: String, + default: defprops.numberBox.bgColor + }, + // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px + cursorSpacing: { + type: [String, Number], + default: defprops.numberBox.cursorSpacing + }, + // 是否禁用增加按钮 + disablePlus: { + type: Boolean, + default: defprops.numberBox.disablePlus + }, + // 是否禁用减少按钮 + disableMinus: { + type: Boolean, + default: defprops.numberBox.disableMinus + }, + // 加减按钮图标的样式 + iconStyle: { + type: [Object, String], + default: defprops.numberBox.iconStyle + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-number-box/u-number-box.vue b/src/uni_modules/uview-plus/components/u-number-box/u-number-box.vue new file mode 100644 index 0000000..238390c --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-number-box/u-number-box.vue @@ -0,0 +1,441 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-number-keyboard/props.js b/src/uni_modules/uview-plus/components/u-number-keyboard/props.js new file mode 100644 index 0000000..1fd7c8e --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-number-keyboard/props.js @@ -0,0 +1,20 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 键盘的类型,number-数字键盘,card-身份证键盘 + mode: { + type: String, + default: defprops.numberKeyboard.value + }, + // 是否显示键盘的"."符号 + dotDisabled: { + type: Boolean, + default: defprops.numberKeyboard.dotDisabled + }, + // 是否打乱键盘按键的顺序 + random: { + type: Boolean, + default: defprops.numberKeyboard.random + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-number-keyboard/u-number-keyboard.vue b/src/uni_modules/uview-plus/components/u-number-keyboard/u-number-keyboard.vue new file mode 100644 index 0000000..5145426 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-number-keyboard/u-number-keyboard.vue @@ -0,0 +1,198 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-overlay/props.js b/src/uni_modules/uview-plus/components/u-overlay/props.js new file mode 100644 index 0000000..4aca5c1 --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-overlay/props.js @@ -0,0 +1,25 @@ +import defprops from '../../libs/config/props'; +export default { + props: { + // 是否显示遮罩 + show: { + type: Boolean, + default: defprops.overlay.show + }, + // 层级z-index + zIndex: { + type: [String, Number], + default: defprops.overlay.zIndex + }, + // 遮罩的过渡时间,单位为ms + duration: { + type: [String, Number], + default: defprops.overlay.duration + }, + // 不透明度值,当做rgba的第四个参数 + opacity: { + type: [String, Number], + default: defprops.overlay.opacity + } + } +} diff --git a/src/uni_modules/uview-plus/components/u-overlay/u-overlay.vue b/src/uni_modules/uview-plus/components/u-overlay/u-overlay.vue new file mode 100644 index 0000000..99770ed --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-overlay/u-overlay.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/src/uni_modules/uview-plus/components/u-parse/node/node.vue b/src/uni_modules/uview-plus/components/u-parse/node/node.vue new file mode 100644 index 0000000..5cf0bbf --- /dev/null +++ b/src/uni_modules/uview-plus/components/u-parse/node/node.vue @@ -0,0 +1,576 @@ +