diff --git a/App.vue b/App.vue index 2a005e9..02c4faa 100644 --- a/App.vue +++ b/App.vue @@ -10,11 +10,11 @@ import { checkCurrVersion, getExtStoreId } from '@/commons/utils/versionManage.j onLaunch(() => { // console.log(uni.getExtConfigSync(),'uni.getExtConfigSync()') - getExtStoreId(); + // getExtStoreId(); uni.hideTabBar() // appConfig.env.JEEPAY_BASE_URL = "https://b.rscygroup.com" // 检查版本 - checkCurrVersion(); + // checkCurrVersion(); }); diff --git a/commons/utils/pushmsg/wxTextToSpeach.js b/commons/utils/pushmsg/wxTextToSpeach.js index c3a817a..bfd523d 100644 --- a/commons/utils/pushmsg/wxTextToSpeach.js +++ b/commons/utils/pushmsg/wxTextToSpeach.js @@ -16,7 +16,7 @@ export function getPushStatus () { } }) } -getPushStatus() +// getPushStatus() // 创建 背景音乐 function createBgMusice (file) { backgroundAudioManager = wx.getBackgroundAudioManager() diff --git a/components/my-components/libs/config/color.js b/components/my-components/libs/config/color.js deleted file mode 100644 index 56b4187..0000000 --- a/components/my-components/libs/config/color.js +++ /dev/null @@ -1,17 +0,0 @@ -// 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供 -// 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20) -const color = { - primary: '#3c9cff', - info: '#909399', - default: '#909399', - warning: '#f9ae3d', - error: '#f56c6c', - success: '#5ac725', - mainColor: '#303133', - contentColor: '#606266', - tipsColor: '#909399', - lightColor: '#c0c4cc', - borderColor: '#e4e7ed' -} - -export default color diff --git a/components/my-components/libs/config/config.js b/components/my-components/libs/config/config.js deleted file mode 100644 index 283b5a5..0000000 --- a/components/my-components/libs/config/config.js +++ /dev/null @@ -1,33 +0,0 @@ -const version = '3' - -// 开发环境才提示,生产环境不会提示 -if (process.env.NODE_ENV === 'development') { - console.log(`\n %c uview-plus V${version} %c https://ijry.github.io/uview-plus/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #ffffff; padding:5px 0;'); -} - -export default { - v: version, - version, - // 主题名称 - type: [ - 'primary', - 'success', - 'info', - 'error', - 'warning' - ], - // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持 - color: { - 'u-primary': '#2979ff', - 'u-warning': '#ff9900', - 'u-success': '#19be6b', - 'u-error': '#fa3534', - 'u-info': '#909399', - 'u-main-color': '#303133', - 'u-content-color': '#606266', - 'u-tips-color': '#909399', - 'u-light-color': '#c0c4cc' - }, - // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx - unit: 'px' -} diff --git a/components/my-components/libs/config/props.js b/components/my-components/libs/config/props.js deleted file mode 100644 index 0736108..0000000 --- a/components/my-components/libs/config/props.js +++ /dev/null @@ -1,190 +0,0 @@ -/** - * 此文件的作用为统一配置所有组件的props参数 - * 借此用户可以全局覆盖组件的props默认值 - * 无需在每个引入组件的页面中都配置一次 - */ -import config from './config' - -import ActionSheet from './props/actionSheet' -import Album from './props/album' -import Alert from './props/alert' -import Avatar from './props/avatar' -import AvatarGroup from './props/avatarGroup' -import Backtop from './props/backtop' -import Badge from './props/badge' -import Button from './props/button' -import Calendar from './props/calendar' -import CarKeyboard from './props/carKeyboard' -import Cell from './props/cell' -import CellGroup from './props/cellGroup' -import Checkbox from './props/checkbox' -import CheckboxGroup from './props/checkboxGroup' -import CircleProgress from './props/circleProgress' -import Code from './props/code' -import CodeInput from './props/codeInput' -import Col from './props/col' -import Collapse from './props/collapse' -import CollapseItem from './props/collapseItem' -import ColumnNotice from './props/columnNotice' -import CountDown from './props/countDown' -import CountTo from './props/countTo' -import DatetimePicker from './props/datetimePicker' -import Divider from './props/divider' -import Empty from './props/empty' -import Form from './props/form' -import GormItem from './props/formItem' -import Gap from './props/gap' -import Grid from './props/grid' -import GridItem from './props/gridItem' -import Icon from './props/icon' -import Image from './props/image' -import IndexAnchor from './props/indexAnchor' -import IndexList from './props/indexList' -import Input from './props/input' -import Keyboard from './props/keyboard' -import Line from './props/line' -import LineProgress from './props/lineProgress' -import Link from './props/link' -import List from './props/list' -import ListItem from './props/listItem' -import LoadingIcon from './props/loadingIcon' -import LoadingPage from './props/loadingPage' -import Loadmore from './props/loadmore' -import Modal from './props/modal' -import Navbar from './props/navbar' -import NoNetwork from './props/noNetwork' -import NoticeBar from './props/noticeBar' -import Notify from './props/notify' -import NumberBox from './props/numberBox' -import NumberKeyboard from './props/numberKeyboard' -import Overlay from './props/overlay' -import Parse from './props/parse' -import Picker from './props/picker' -import Popup from './props/popup' -import Radio from './props/radio' -import RadioGroup from './props/radioGroup' -import Rate from './props/rate' -import ReadMore from './props/readMore' -import Row from './props/row' -import RowNotice from './props/rowNotice' -import ScrollList from './props/scrollList' -import Search from './props/search' -import Section from './props/section' -import Skeleton from './props/skeleton' -import Slider from './props/slider' -import StatusBar from './props/statusBar' -import Steps from './props/steps' -import StepsItem from './props/stepsItem' -import Sticky from './props/sticky' -import Subsection from './props/subsection' -import SwipeAction from './props/swipeAction' -import SwipeActionItem from './props/swipeActionItem' -import Swiper from './props/swiper' -import SwipterIndicator from './props/swipterIndicator' -import Switch from './props/switch' -import Tabbar from './props/tabbar' -import TabbarItem from './props/tabbarItem' -import Tabs from './props/tabs' -import Tag from './props/tag' -import Text from './props/text' -import Textarea from './props/textarea' -import Toast from './props/toast' -import Toolbar from './props/toolbar' -import Tooltip from './props/tooltip' -import Transition from './props/transition' -import Upload from './props/upload' - -const { - color -} = config - -export default { - ...ActionSheet, - ...Album, - ...Alert, - ...Avatar, - ...AvatarGroup, - ...Backtop, - ...Badge, - ...Button, - ...Calendar, - ...CarKeyboard, - ...Cell, - ...CellGroup, - ...Checkbox, - ...CheckboxGroup, - ...CircleProgress, - ...Code, - ...CodeInput, - ...Col, - ...Collapse, - ...CollapseItem, - ...ColumnNotice, - ...CountDown, - ...CountTo, - ...DatetimePicker, - ...Divider, - ...Empty, - ...Form, - ...GormItem, - ...Gap, - ...Grid, - ...GridItem, - ...Icon, - ...Image, - ...IndexAnchor, - ...IndexList, - ...Input, - ...Keyboard, - ...Line, - ...LineProgress, - ...Link, - ...List, - ...ListItem, - ...LoadingIcon, - ...LoadingPage, - ...Loadmore, - ...Modal, - ...Navbar, - ...NoNetwork, - ...NoticeBar, - ...Notify, - ...NumberBox, - ...NumberKeyboard, - ...Overlay, - ...Parse, - ...Picker, - ...Popup, - ...Radio, - ...RadioGroup, - ...Rate, - ...ReadMore, - ...Row, - ...RowNotice, - ...ScrollList, - ...Search, - ...Section, - ...Skeleton, - ...Slider, - ...StatusBar, - ...Steps, - ...StepsItem, - ...Sticky, - ...Subsection, - ...SwipeAction, - ...SwipeActionItem, - ...Swiper, - ...SwipterIndicator, - ...Switch, - ...Tabbar, - ...TabbarItem, - ...Tabs, - ...Tag, - ...Text, - ...Textarea, - ...Toast, - ...Toolbar, - ...Tooltip, - ...Transition, - ...Upload -} diff --git a/components/my-components/libs/config/props/actionSheet.js b/components/my-components/libs/config/props/actionSheet.js deleted file mode 100644 index 086898d..0000000 --- a/components/my-components/libs/config/props/actionSheet.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:44:35 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/actionSheet.js - */ -export default { - // action-sheet组件 - actionSheet: { - show: false, - title: '', - description: '', - actions: [], - index: '', - cancelText: '', - closeOnClickAction: true, - safeAreaInsetBottom: true, - openType: '', - closeOnClickOverlay: true, - round: 0, - wrapMaxHeight: '600px' - } -} diff --git a/components/my-components/libs/config/props/album.js b/components/my-components/libs/config/props/album.js deleted file mode 100644 index 5310d25..0000000 --- a/components/my-components/libs/config/props/album.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:47:24 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/album.js - */ -export default { - // album 组件 - album: { - urls: [], - keyName: '', - singleSize: 180, - multipleSize: 70, - space: 6, - singleMode: 'scaleToFill', - multipleMode: 'aspectFill', - maxCount: 9, - previewFullImage: true, - rowCount: 3, - showMore: true, - autoWrap: false, - unit: 'px' - } -} diff --git a/components/my-components/libs/config/props/alert.js b/components/my-components/libs/config/props/alert.js deleted file mode 100644 index 8f8182c..0000000 --- a/components/my-components/libs/config/props/alert.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:48:53 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/alert.js - */ -export default { - // alert警告组件 - alert: { - title: '', - type: 'warning', - description: '', - closable: false, - showIcon: false, - effect: 'light', - center: false, - fontSize: 14 - } -} diff --git a/components/my-components/libs/config/props/avatar.js b/components/my-components/libs/config/props/avatar.js deleted file mode 100644 index c097d4e..0000000 --- a/components/my-components/libs/config/props/avatar.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:49:22 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/avatar.js - */ -export default { - // avatar 组件 - avatar: { - src: '', - shape: 'circle', - size: 40, - mode: 'scaleToFill', - text: '', - bgColor: '#c0c4cc', - color: '#ffffff', - fontSize: 18, - icon: '', - mpAvatar: false, - randomBgColor: false, - defaultUrl: '', - colorIndex: '', - name: '' - } -} diff --git a/components/my-components/libs/config/props/avatarGroup.js b/components/my-components/libs/config/props/avatarGroup.js deleted file mode 100644 index 29ad008..0000000 --- a/components/my-components/libs/config/props/avatarGroup.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:49:55 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/avatarGroup.js - */ -export default { - // avatarGroup 组件 - avatarGroup: { - urls: [], - maxCount: 5, - shape: 'circle', - mode: 'scaleToFill', - showMore: true, - size: 40, - keyName: '', - gap: 0.5, - extraValue: 0 - } -} diff --git a/components/my-components/libs/config/props/backtop.js b/components/my-components/libs/config/props/backtop.js deleted file mode 100644 index 13052ab..0000000 --- a/components/my-components/libs/config/props/backtop.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:50:18 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/backtop.js - */ -export default { - // backtop组件 - backtop: { - mode: 'circle', - icon: 'arrow-upward', - text: '', - duration: 100, - scrollTop: 0, - top: 400, - bottom: 100, - right: 20, - zIndex: 9, - iconStyle: { - color: '#909399', - fontSize: '19px' - } - } -} diff --git a/components/my-components/libs/config/props/badge.js b/components/my-components/libs/config/props/badge.js deleted file mode 100644 index 8818f98..0000000 --- a/components/my-components/libs/config/props/badge.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-23 19:51:50 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/badge.js - */ -export default { - // 徽标数组件 - badge: { - isDot: false, - value: '', - show: true, - max: 999, - type: 'error', - showZero: false, - bgColor: null, - color: null, - shape: 'circle', - numberType: 'overflow', - offset: [], - inverted: false, - absolute: false - } -} diff --git a/components/my-components/libs/config/props/button.js b/components/my-components/libs/config/props/button.js deleted file mode 100644 index acd65fc..0000000 --- a/components/my-components/libs/config/props/button.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:51:27 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/button.js - */ -export default { - // button组件 - button: { - hairline: false, - type: 'info', - size: 'normal', - shape: 'square', - plain: false, - disabled: false, - loading: false, - loadingText: '', - loadingMode: 'spinner', - loadingSize: 15, - openType: '', - formType: '', - appParameter: '', - hoverStopPropagation: true, - lang: 'en', - sessionFrom: '', - sendMessageTitle: '', - sendMessagePath: '', - sendMessageImg: '', - showMessageCard: false, - dataName: '', - throttleTime: 0, - hoverStartTime: 0, - hoverStayTime: 200, - text: '', - icon: '', - iconColor: '', - color: '' - } -} diff --git a/components/my-components/libs/config/props/calendar.js b/components/my-components/libs/config/props/calendar.js deleted file mode 100644 index 7f90beb..0000000 --- a/components/my-components/libs/config/props/calendar.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:52:43 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/calendar.js - */ -export default { - // calendar 组件 - calendar: { - title: '日期选择', - showTitle: true, - showSubtitle: true, - mode: 'single', - startText: '开始', - endText: '结束', - customList: [], - color: '#3c9cff', - minDate: 0, - maxDate: 0, - defaultDate: null, - maxCount: Number.MAX_SAFE_INTEGER, // Infinity - rowHeight: 56, - formatter: null, - showLunar: false, - showMark: true, - confirmText: '确定', - confirmDisabledText: '确定', - show: false, - closeOnClickOverlay: false, - readonly: false, - showConfirm: true, - maxRange: Number.MAX_SAFE_INTEGER, // Infinity - rangePrompt: '', - showRangePrompt: true, - allowSameDay: false, - round: 0, - monthNum: 3 - } -} diff --git a/components/my-components/libs/config/props/carKeyboard.js b/components/my-components/libs/config/props/carKeyboard.js deleted file mode 100644 index af1baa0..0000000 --- a/components/my-components/libs/config/props/carKeyboard.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:53:20 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/carKeyboard.js - */ -export default { - // 车牌号键盘 - carKeyboard: { - random: false - } -} diff --git a/components/my-components/libs/config/props/cell.js b/components/my-components/libs/config/props/cell.js deleted file mode 100644 index 425ea3f..0000000 --- a/components/my-components/libs/config/props/cell.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-23 20:53:09 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/cell.js - */ -export default { - // cell组件的props - cell: { - customClass: '', - title: '', - label: '', - value: '', - icon: '', - disabled: false, - border: true, - center: false, - url: '', - linkType: 'navigateTo', - clickable: false, - isLink: false, - required: false, - arrowDirection: '', - iconStyle: {}, - rightIconStyle: {}, - rightIcon: 'arrow-right', - titleStyle: {}, - size: '', - stop: true, - name: '' - } -} diff --git a/components/my-components/libs/config/props/cellGroup.js b/components/my-components/libs/config/props/cellGroup.js deleted file mode 100644 index d48a9cd..0000000 --- a/components/my-components/libs/config/props/cellGroup.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:54:16 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/cellGroup.js - */ -export default { - // cell-group组件的props - cellGroup: { - title: '', - border: true, - customStyle: {} - } -} diff --git a/components/my-components/libs/config/props/checkbox.js b/components/my-components/libs/config/props/checkbox.js deleted file mode 100644 index 2310901..0000000 --- a/components/my-components/libs/config/props/checkbox.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-23 21:06:59 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/checkbox.js - */ -export default { - // checkbox组件 - checkbox: { - name: '', - shape: '', - size: '', - checkbox: false, - disabled: '', - activeColor: '', - inactiveColor: '', - iconSize: '', - iconColor: '', - label: '', - labelSize: '', - labelColor: '', - labelDisabled: '' - } -} diff --git a/components/my-components/libs/config/props/checkboxGroup.js b/components/my-components/libs/config/props/checkboxGroup.js deleted file mode 100644 index d0e22b6..0000000 --- a/components/my-components/libs/config/props/checkboxGroup.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:54:47 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/checkboxGroup.js - */ -export default { - // checkbox-group组件 - checkboxGroup: { - name: '', - value: [], - shape: 'square', - disabled: false, - activeColor: '#2979ff', - inactiveColor: '#c8c9cc', - size: 18, - placement: 'row', - labelSize: 14, - labelColor: '#303133', - labelDisabled: false, - iconColor: '#ffffff', - iconSize: 12, - iconPlacement: 'left', - borderBottom: false - } -} diff --git a/components/my-components/libs/config/props/circleProgress.js b/components/my-components/libs/config/props/circleProgress.js deleted file mode 100644 index b3a9b43..0000000 --- a/components/my-components/libs/config/props/circleProgress.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:55:02 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/circleProgress.js - */ -export default { - // circleProgress 组件 - circleProgress: { - percentage: 30 - } -} diff --git a/components/my-components/libs/config/props/code.js b/components/my-components/libs/config/props/code.js deleted file mode 100644 index 693417a..0000000 --- a/components/my-components/libs/config/props/code.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:55:27 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/code.js - */ - -export default { - // code 组件 - code: { - seconds: 60, - startText: '获取验证码', - changeText: 'X秒重新获取', - endText: '重新获取', - keepRunning: false, - uniqueKey: '' - } -} diff --git a/components/my-components/libs/config/props/codeInput.js b/components/my-components/libs/config/props/codeInput.js deleted file mode 100644 index cac9265..0000000 --- a/components/my-components/libs/config/props/codeInput.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:55:58 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/codeInput.js - */ -export default { - // codeInput 组件 - codeInput: { - adjustPosition: true, - maxlength: 6, - dot: false, - mode: 'box', - hairline: false, - space: 10, - value: '', - focus: false, - bold: false, - color: '#606266', - fontSize: 18, - size: 35, - disabledKeyboard: false, - borderColor: '#c9cacc', - disabledDot: true - } -} diff --git a/components/my-components/libs/config/props/col.js b/components/my-components/libs/config/props/col.js deleted file mode 100644 index 7621653..0000000 --- a/components/my-components/libs/config/props/col.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:56:12 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/col.js - */ -export default { - // col 组件 - col: { - span: 12, - offset: 0, - justify: 'start', - align: 'stretch', - textAlign: 'left' - } -} diff --git a/components/my-components/libs/config/props/collapse.js b/components/my-components/libs/config/props/collapse.js deleted file mode 100644 index c2b9fdd..0000000 --- a/components/my-components/libs/config/props/collapse.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:56:30 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/collapse.js - */ -export default { - // collapse 组件 - collapse: { - value: null, - accordion: false, - border: true - } -} diff --git a/components/my-components/libs/config/props/collapseItem.js b/components/my-components/libs/config/props/collapseItem.js deleted file mode 100644 index 1225a7b..0000000 --- a/components/my-components/libs/config/props/collapseItem.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:56:42 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/collapseItem.js - */ -export default { - // collapseItem 组件 - collapseItem: { - title: '', - value: '', - label: '', - disabled: false, - isLink: true, - clickable: true, - border: true, - align: 'left', - name: '', - icon: '', - duration: 300, - showRight: true - } -} diff --git a/components/my-components/libs/config/props/columnNotice.js b/components/my-components/libs/config/props/columnNotice.js deleted file mode 100644 index 147c0aa..0000000 --- a/components/my-components/libs/config/props/columnNotice.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:57:16 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/columnNotice.js - */ -export default { - // columnNotice 组件 - columnNotice: { - text: '', - icon: 'volume', - mode: '', - color: '#f9ae3d', - bgColor: '#fdf6ec', - fontSize: 14, - speed: 80, - step: false, - duration: 1500, - disableTouch: true - } -} diff --git a/components/my-components/libs/config/props/countDown.js b/components/my-components/libs/config/props/countDown.js deleted file mode 100644 index 81e33b1..0000000 --- a/components/my-components/libs/config/props/countDown.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:11:29 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/countDown.js - */ -export default { - // u-count-down 计时器组件 - countDown: { - time: 0, - format: 'HH:mm:ss', - autoStart: true, - millisecond: false - } -} diff --git a/components/my-components/libs/config/props/countTo.js b/components/my-components/libs/config/props/countTo.js deleted file mode 100644 index a536cde..0000000 --- a/components/my-components/libs/config/props/countTo.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:57:32 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/countTo.js - */ -export default { - // countTo 组件 - countTo: { - startVal: 0, - endVal: 0, - duration: 2000, - autoplay: true, - decimals: 0, - useEasing: true, - decimal: '.', - color: '#606266', - fontSize: 22, - bold: false, - separator: '' - } -} diff --git a/components/my-components/libs/config/props/datetimePicker.js b/components/my-components/libs/config/props/datetimePicker.js deleted file mode 100644 index 96e8ab8..0000000 --- a/components/my-components/libs/config/props/datetimePicker.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:57:48 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/datetimePicker.js - */ -export default { - // datetimePicker 组件 - datetimePicker: { - show: false, - popupMode: 'bottom', - showToolbar: true, - value: '', - title: '', - mode: 'datetime', - maxDate: new Date(new Date().getFullYear() + 10, 0, 1).getTime(), - minDate: new Date(new Date().getFullYear() - 10, 0, 1).getTime(), - minHour: 0, - maxHour: 23, - minMinute: 0, - maxMinute: 59, - filter: null, - formatter: null, - loading: false, - itemHeight: 44, - cancelText: '取消', - confirmText: '确认', - cancelColor: '#909193', - confirmColor: '#3c9cff', - visibleItemCount: 5, - closeOnClickOverlay: false, - defaultIndex: [] - } -} diff --git a/components/my-components/libs/config/props/divider.js b/components/my-components/libs/config/props/divider.js deleted file mode 100644 index 55a8ce4..0000000 --- a/components/my-components/libs/config/props/divider.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:58:03 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/divider.js - */ -export default { - // divider组件 - divider: { - dashed: false, - hairline: true, - dot: false, - textPosition: 'center', - text: '', - textSize: 14, - textColor: '#909399', - lineColor: '#dcdfe6' - } - -} diff --git a/components/my-components/libs/config/props/empty.js b/components/my-components/libs/config/props/empty.js deleted file mode 100644 index fe20445..0000000 --- a/components/my-components/libs/config/props/empty.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:03:27 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/empty.js - */ -export default { - // empty组件 - empty: { - icon: '', - text: '', - textColor: '#c0c4cc', - textSize: 14, - iconColor: '#c0c4cc', - iconSize: 90, - mode: 'data', - width: 160, - height: 160, - show: true, - marginTop: 0 - } - -} diff --git a/components/my-components/libs/config/props/form.js b/components/my-components/libs/config/props/form.js deleted file mode 100644 index 204d845..0000000 --- a/components/my-components/libs/config/props/form.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:03:49 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/form.js - */ -export default { - // form 组件 - form: { - model: {}, - rules: {}, - errorType: 'message', - borderBottom: true, - labelPosition: 'left', - labelWidth: 45, - labelAlign: 'left', - labelStyle: {} - } -} diff --git a/components/my-components/libs/config/props/formItem.js b/components/my-components/libs/config/props/formItem.js deleted file mode 100644 index 5afc562..0000000 --- a/components/my-components/libs/config/props/formItem.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:04:32 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/formItem.js - */ -export default { - // formItem 组件 - formItem: { - label: '', - prop: '', - rules: [], - borderBottom: '', - labelPosition: '', - labelWidth: '', - rightIcon: '', - leftIcon: '', - required: false, - leftIconStyle: '', - } -} diff --git a/components/my-components/libs/config/props/gap.js b/components/my-components/libs/config/props/gap.js deleted file mode 100644 index 60a21af..0000000 --- a/components/my-components/libs/config/props/gap.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:05:25 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/gap.js - */ -export default { - // gap组件 - gap: { - bgColor: 'transparent', - height: 20, - marginTop: 0, - marginBottom: 0, - customStyle: {} - } -} diff --git a/components/my-components/libs/config/props/grid.js b/components/my-components/libs/config/props/grid.js deleted file mode 100644 index 60abeb7..0000000 --- a/components/my-components/libs/config/props/grid.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:05:57 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/grid.js - */ -export default { - // grid组件 - grid: { - col: 3, - border: false, - align: 'left' - } -} diff --git a/components/my-components/libs/config/props/gridItem.js b/components/my-components/libs/config/props/gridItem.js deleted file mode 100644 index 1b747f4..0000000 --- a/components/my-components/libs/config/props/gridItem.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:06:13 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/gridItem.js - */ -export default { - // grid-item组件 - gridItem: { - name: null, - bgColor: 'transparent' - } -} diff --git a/components/my-components/libs/config/props/icon.js b/components/my-components/libs/config/props/icon.js deleted file mode 100644 index 1d81d2d..0000000 --- a/components/my-components/libs/config/props/icon.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 18:00:14 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/icon.js - */ -import config from '../config' - -const { - color -} = config -export default { - // icon组件 - icon: { - name: '', - color: color['u-content-color'], - size: '16px', - bold: false, - index: '', - hoverClass: '', - customPrefix: 'uicon', - label: '', - labelPos: 'right', - labelSize: '15px', - labelColor: color['u-content-color'], - space: '3px', - imgMode: '', - width: '', - height: '', - top: 0, - stop: false - } -} diff --git a/components/my-components/libs/config/props/image.js b/components/my-components/libs/config/props/image.js deleted file mode 100644 index 2552db6..0000000 --- a/components/my-components/libs/config/props/image.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:01:51 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/image.js - */ -export default { - // image组件 - image: { - src: '', - mode: 'aspectFill', - width: '300', - height: '225', - shape: 'square', - radius: 0, - lazyLoad: true, - showMenuByLongpress: true, - loadingIcon: 'photo', - errorIcon: 'error-circle', - showLoading: true, - showError: true, - fade: true, - webp: false, - duration: 500, - bgColor: '#f3f4f6' - } -} diff --git a/components/my-components/libs/config/props/indexAnchor.js b/components/my-components/libs/config/props/indexAnchor.js deleted file mode 100644 index bb20d46..0000000 --- a/components/my-components/libs/config/props/indexAnchor.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:13:15 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/indexAnchor.js - */ -export default { - // indexAnchor 组件 - indexAnchor: { - text: '', - color: '#606266', - size: 14, - bgColor: '#dedede', - height: 32 - } -} diff --git a/components/my-components/libs/config/props/indexList.js b/components/my-components/libs/config/props/indexList.js deleted file mode 100644 index 4f31b37..0000000 --- a/components/my-components/libs/config/props/indexList.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:13:35 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/indexList.js - */ -export default { - // indexList 组件 - indexList: { - inactiveColor: '#606266', - activeColor: '#5677fc', - indexList: [], - sticky: true, - customNavHeight: 0, - safeBottomFix: false - } -} diff --git a/components/my-components/libs/config/props/input.js b/components/my-components/libs/config/props/input.js deleted file mode 100644 index 6c310ea..0000000 --- a/components/my-components/libs/config/props/input.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:13:55 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/input.js - */ -export default { - // index 组件 - input: { - value: '', - type: 'text', - fixed: false, - disabled: false, - disabledColor: '#f5f7fa', - clearable: false, - password: false, - maxlength: 140, - placeholder: null, - placeholderClass: 'input-placeholder', - placeholderStyle: 'color: #c0c4cc', - showWordLimit: false, - confirmType: 'done', - confirmHold: false, - holdKeyboard: false, - focus: false, - autoBlur: false, - disableDefaultPadding: false, - cursor: -1, - cursorSpacing: 30, - selectionStart: -1, - selectionEnd: -1, - adjustPosition: true, - inputAlign: 'left', - fontSize: '15px', - color: '#303133', - prefixIcon: '', - prefixIconStyle: '', - suffixIcon: '', - suffixIconStyle: '', - border: 'surround', - readonly: false, - shape: 'square', - formatter: null - } -} diff --git a/components/my-components/libs/config/props/keyboard.js b/components/my-components/libs/config/props/keyboard.js deleted file mode 100644 index 57182bd..0000000 --- a/components/my-components/libs/config/props/keyboard.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:07:49 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/keyboard.js - */ -export default { - // 键盘组件 - keyboard: { - mode: 'number', - dotDisabled: false, - tooltip: true, - showTips: true, - tips: '', - showCancel: true, - showConfirm: true, - random: false, - safeAreaInsetBottom: true, - closeOnClickOverlay: true, - show: false, - overlay: true, - zIndex: 10075, - cancelText: '取消', - confirmText: '确定', - autoChange: false - } -} diff --git a/components/my-components/libs/config/props/line.js b/components/my-components/libs/config/props/line.js deleted file mode 100644 index 2c87af2..0000000 --- a/components/my-components/libs/config/props/line.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:04:49 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/line.js - */ -export default { - // line组件 - line: { - color: '#d6d7d9', - length: '100%', - direction: 'row', - hairline: true, - margin: 0, - dashed: false - } -} diff --git a/components/my-components/libs/config/props/lineProgress.js b/components/my-components/libs/config/props/lineProgress.js deleted file mode 100644 index cdfcb0e..0000000 --- a/components/my-components/libs/config/props/lineProgress.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:14:11 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/lineProgress.js - */ -export default { - // lineProgress 组件 - lineProgress: { - activeColor: '#19be6b', - inactiveColor: '#ececec', - percentage: 0, - showText: true, - height: 12 - } -} diff --git a/components/my-components/libs/config/props/link.js b/components/my-components/libs/config/props/link.js deleted file mode 100644 index 6c4c883..0000000 --- a/components/my-components/libs/config/props/link.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:45:36 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/link.js - */ -import config from '../config' - -const { - color -} = config -export default { - // link超链接组件props参数 - link: { - color: color['u-primary'], - fontSize: 15, - underLine: false, - href: '', - mpTips: '链接已复制,请在浏览器打开', - lineColor: '', - text: '' - } -} diff --git a/components/my-components/libs/config/props/list.js b/components/my-components/libs/config/props/list.js deleted file mode 100644 index a830c32..0000000 --- a/components/my-components/libs/config/props/list.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:14:53 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/list.js - */ -export default { - // list 组件 - list: { - showScrollbar: false, - lowerThreshold: 50, - upperThreshold: 0, - scrollTop: 0, - offsetAccuracy: 10, - enableFlex: false, - pagingEnabled: false, - scrollable: true, - scrollIntoView: '', - scrollWithAnimation: false, - enableBackToTop: false, - height: 0, - width: 0, - preLoadScreen: 1 - } -} diff --git a/components/my-components/libs/config/props/listItem.js b/components/my-components/libs/config/props/listItem.js deleted file mode 100644 index 7fe2166..0000000 --- a/components/my-components/libs/config/props/listItem.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:15:40 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/listItem.js - */ -export default { - // listItem 组件 - listItem: { - anchor: '' - } -} diff --git a/components/my-components/libs/config/props/loadingIcon.js b/components/my-components/libs/config/props/loadingIcon.js deleted file mode 100644 index f4739c4..0000000 --- a/components/my-components/libs/config/props/loadingIcon.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:45:47 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadingIcon.js - */ -import config from '../config' - -const { - color -} = config -export default { - // loading-icon加载中图标组件 - loadingIcon: { - show: true, - color: color['u-tips-color'], - textColor: color['u-tips-color'], - vertical: false, - mode: 'spinner', - size: 24, - textSize: 15, - text: '', - timingFunction: 'ease-in-out', - duration: 1200, - inactiveColor: '' - } -} diff --git a/components/my-components/libs/config/props/loadingPage.js b/components/my-components/libs/config/props/loadingPage.js deleted file mode 100644 index 6ed7485..0000000 --- a/components/my-components/libs/config/props/loadingPage.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:00:23 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadingPage.js - */ -export default { - // loading-page组件 - loadingPage: { - loadingText: '正在加载', - image: '', - loadingMode: 'circle', - loading: false, - bgColor: '#ffffff', - color: '#C8C8C8', - fontSize: 19, - iconSize: 28, - loadingColor: '#C8C8C8', - zIndex: 10 - } -} diff --git a/components/my-components/libs/config/props/loadmore.js b/components/my-components/libs/config/props/loadmore.js deleted file mode 100644 index 67c1160..0000000 --- a/components/my-components/libs/config/props/loadmore.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:15:26 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadmore.js - */ -export default { - // loadmore 组件 - loadmore: { - status: 'loadmore', - bgColor: 'transparent', - icon: true, - fontSize: 14, - iconSize: 17, - color: '#606266', - loadingIcon: 'spinner', - loadmoreText: '加载更多', - loadingText: '正在加载...', - nomoreText: '没有更多了', - isDot: false, - iconColor: '#b7b7b7', - marginTop: 10, - marginBottom: 10, - height: 'auto', - line: false, - lineColor: '#E6E8EB', - dashed: false, - } -} diff --git a/components/my-components/libs/config/props/modal.js b/components/my-components/libs/config/props/modal.js deleted file mode 100644 index 02dadaa..0000000 --- a/components/my-components/libs/config/props/modal.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:15:59 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/modal.js - */ -export default { - // modal 组件 - modal: { - show: false, - title: '', - content: '', - confirmText: '确认', - cancelText: '取消', - showConfirmButton: true, - showCancelButton: false, - confirmColor: '#2979ff', - cancelColor: '#606266', - buttonReverse: false, - zoom: true, - asyncClose: false, - closeOnClickOverlay: false, - negativeTop: 0, - width: '650rpx', - confirmButtonShape: '', - contentTextAlign: 'left' - } -} diff --git a/components/my-components/libs/config/props/navbar.js b/components/my-components/libs/config/props/navbar.js deleted file mode 100644 index 614a99d..0000000 --- a/components/my-components/libs/config/props/navbar.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:16:18 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/navbar.js - */ -import color from '../color' -export default { - // navbar 组件 - navbar: { - safeAreaInsetTop: true, - placeholder: false, - fixed: true, - border: false, - leftIcon: 'arrow-left', - leftText: '', - rightText: '', - rightIcon: '', - title: '', - bgColor: '#ffffff', - titleWidth: '400rpx', - height: '44px', - leftIconSize: 20, - leftIconColor: color.mainColor, - autoBack: false, - titleStyle: '' - } - -} diff --git a/components/my-components/libs/config/props/noNetwork.js b/components/my-components/libs/config/props/noNetwork.js deleted file mode 100644 index 74dba1b..0000000 --- a/components/my-components/libs/config/props/noNetwork.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:16:39 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/noNetwork.js - */ -export default { - // noNetwork - noNetwork: { - tips: '哎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BAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBIGVhMD/D0fV/fpMMM+gAAAAAElFTkSuQmCC' - } - -} diff --git a/components/my-components/libs/config/props/noticeBar.js b/components/my-components/libs/config/props/noticeBar.js deleted file mode 100644 index f7465ac..0000000 --- a/components/my-components/libs/config/props/noticeBar.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:17:13 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/noticeBar.js - */ -export default { - // noticeBar - noticeBar: { - text: [], - direction: 'row', - step: false, - icon: 'volume', - mode: '', - color: '#f9ae3d', - bgColor: '#fdf6ec', - speed: 80, - fontSize: 14, - duration: 2000, - disableTouch: true, - url: '', - linkType: 'navigateTo' - } -} diff --git a/components/my-components/libs/config/props/notify.js b/components/my-components/libs/config/props/notify.js deleted file mode 100644 index 1042d2a..0000000 --- a/components/my-components/libs/config/props/notify.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:10:21 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/notify.js - */ -export default { - // notify组件 - notify: { - top: 0, - type: 'primary', - color: '#ffffff', - bgColor: '', - message: '', - duration: 3000, - fontSize: 15, - safeAreaInsetTop: false - } -} diff --git a/components/my-components/libs/config/props/numberBox.js b/components/my-components/libs/config/props/numberBox.js deleted file mode 100644 index 424f0ca..0000000 --- a/components/my-components/libs/config/props/numberBox.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:11:46 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/numberBox.js - */ -export default { - // 步进器组件 - numberBox: { - name: '', - value: 0, - min: 1, - max: Number.MAX_SAFE_INTEGER, - step: 1, - integer: false, - disabled: false, - disabledInput: false, - asyncChange: false, - inputWidth: 35, - showMinus: true, - showPlus: true, - decimalLength: null, - longPress: true, - color: '#323233', - buttonSize: 30, - bgColor: '#EBECEE', - cursorSpacing: 100, - disableMinus: false, - disablePlus: false, - iconStyle: '' - } -} diff --git a/components/my-components/libs/config/props/numberKeyboard.js b/components/my-components/libs/config/props/numberKeyboard.js deleted file mode 100644 index 7b45065..0000000 --- a/components/my-components/libs/config/props/numberKeyboard.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:08:05 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/numberKeyboard.js - */ -export default { - // 数字键盘 - numberKeyboard: { - mode: 'number', - dotDisabled: false, - random: false - } -} diff --git a/components/my-components/libs/config/props/overlay.js b/components/my-components/libs/config/props/overlay.js deleted file mode 100644 index c26d068..0000000 --- a/components/my-components/libs/config/props/overlay.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:06:50 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/overlay.js - */ -export default { - // overlay组件 - overlay: { - show: false, - zIndex: 10070, - duration: 300, - opacity: 0.5 - } -} diff --git a/components/my-components/libs/config/props/parse.js b/components/my-components/libs/config/props/parse.js deleted file mode 100644 index feb22b9..0000000 --- a/components/my-components/libs/config/props/parse.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:17:33 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/parse.js - */ -export default { - // parse - parse: { - copyLink: true, - errorImg: '', - lazyLoad: false, - loadingImg: '', - pauseVideo: true, - previewImg: true, - setTitle: true, - showImgMenu: true - } -} diff --git a/components/my-components/libs/config/props/picker.js b/components/my-components/libs/config/props/picker.js deleted file mode 100644 index ae8ee03..0000000 --- a/components/my-components/libs/config/props/picker.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:18:20 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/picker.js - */ -export default { - // picker - picker: { - show: false, - popupMode: 'bottom', - showToolbar: true, - title: '', - columns: [], - loading: false, - itemHeight: 44, - cancelText: '取消', - confirmText: '确定', - cancelColor: '#909193', - confirmColor: '#3c9cff', - visibleItemCount: 5, - keyName: 'text', - closeOnClickOverlay: false, - defaultIndex: [], - immediateChange: true - } -} diff --git a/components/my-components/libs/config/props/popup.js b/components/my-components/libs/config/props/popup.js deleted file mode 100644 index 5440c3c..0000000 --- a/components/my-components/libs/config/props/popup.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:06:33 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/popup.js - */ -export default { - // popup组件 - popup: { - show: false, - overlay: true, - mode: 'bottom', - duration: 300, - closeable: false, - overlayStyle: {}, - closeOnClickOverlay: true, - zIndex: 10075, - safeAreaInsetBottom: true, - safeAreaInsetTop: false, - closeIconPos: 'top-right', - round: 0, - zoom: true, - bgColor: '', - overlayOpacity: 0.5 - } -} diff --git a/components/my-components/libs/config/props/radio.js b/components/my-components/libs/config/props/radio.js deleted file mode 100644 index 4df200f..0000000 --- a/components/my-components/libs/config/props/radio.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:02:34 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/radio.js - */ -export default { - // radio组件 - radio: { - name: '', - shape: '', - disabled: '', - labelDisabled: '', - activeColor: '', - inactiveColor: '', - iconSize: '', - labelSize: '', - label: '', - labelColor: '', - size: '', - iconColor: '', - placement: '' - } -} diff --git a/components/my-components/libs/config/props/radioGroup.js b/components/my-components/libs/config/props/radioGroup.js deleted file mode 100644 index 728e9db..0000000 --- a/components/my-components/libs/config/props/radioGroup.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:03:12 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/radioGroup.js - */ -export default { - // radio-group组件 - radioGroup: { - value: '', - disabled: false, - shape: 'circle', - activeColor: '#2979ff', - inactiveColor: '#c8c9cc', - name: '', - size: 18, - placement: 'row', - label: '', - labelColor: '#303133', - labelSize: 14, - labelDisabled: false, - iconColor: '#ffffff', - iconSize: 12, - borderBottom: false, - iconPlacement: 'left' - } -} diff --git a/components/my-components/libs/config/props/rate.js b/components/my-components/libs/config/props/rate.js deleted file mode 100644 index d31c61a..0000000 --- a/components/my-components/libs/config/props/rate.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:05:09 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/rate.js - */ -export default { - // rate组件 - rate: { - value: 1, - count: 5, - disabled: false, - size: 18, - inactiveColor: '#b2b2b2', - activeColor: '#FA3534', - gutter: 4, - minCount: 1, - allowHalf: false, - activeIcon: 'star-fill', - inactiveIcon: 'star', - touchable: true - } -} diff --git a/components/my-components/libs/config/props/readMore.js b/components/my-components/libs/config/props/readMore.js deleted file mode 100644 index 09b11cc..0000000 --- a/components/my-components/libs/config/props/readMore.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:18:41 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/readMore.js - */ -export default { - // readMore - readMore: { - showHeight: 400, - toggle: false, - closeText: '展开阅读全文', - openText: '收起', - color: '#2979ff', - fontSize: 14, - textIndent: '2em', - name: '' - } -} diff --git a/components/my-components/libs/config/props/row.js b/components/my-components/libs/config/props/row.js deleted file mode 100644 index 573a431..0000000 --- a/components/my-components/libs/config/props/row.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:18:58 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/row.js - */ -export default { - // row - row: { - gutter: 0, - justify: 'start', - align: 'center' - } -} diff --git a/components/my-components/libs/config/props/rowNotice.js b/components/my-components/libs/config/props/rowNotice.js deleted file mode 100644 index cd9d0a0..0000000 --- a/components/my-components/libs/config/props/rowNotice.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:19:13 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/rowNotice.js - */ -export default { - // rowNotice - rowNotice: { - text: '', - icon: 'volume', - mode: '', - color: '#f9ae3d', - bgColor: '#fdf6ec', - fontSize: 14, - speed: 80 - } -} diff --git a/components/my-components/libs/config/props/scrollList.js b/components/my-components/libs/config/props/scrollList.js deleted file mode 100644 index 441e63a..0000000 --- a/components/my-components/libs/config/props/scrollList.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:19:28 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/scrollList.js - */ -export default { - // scrollList - scrollList: { - indicatorWidth: 50, - indicatorBarWidth: 20, - indicator: true, - indicatorColor: '#f2f2f2', - indicatorActiveColor: '#3c9cff', - indicatorStyle: '' - } -} diff --git a/components/my-components/libs/config/props/search.js b/components/my-components/libs/config/props/search.js deleted file mode 100644 index 8f393c8..0000000 --- a/components/my-components/libs/config/props/search.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:19:45 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/search.js - */ -export default { - // search - search: { - shape: 'round', - bgColor: '#f2f2f2', - placeholder: '请输入关键字', - clearabled: true, - focus: false, - showAction: true, - actionStyle: {}, - actionText: '搜索', - inputAlign: 'left', - inputStyle: {}, - disabled: false, - borderColor: 'transparent', - searchIconColor: '#909399', - searchIconSize: 22, - color: '#606266', - placeholderColor: '#909399', - searchIcon: 'search', - margin: '0', - animation: false, - value: '', - maxlength: '-1', - height: 32, - label: null - } -} diff --git a/components/my-components/libs/config/props/section.js b/components/my-components/libs/config/props/section.js deleted file mode 100644 index f432648..0000000 --- a/components/my-components/libs/config/props/section.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:07:33 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/section.js - */ -export default { - // u-section组件 - section: { - title: '', - subTitle: '更多', - right: true, - fontSize: 15, - bold: true, - color: '#303133', - subColor: '#909399', - showLine: true, - lineColor: '', - arrow: true - } -} diff --git a/components/my-components/libs/config/props/skeleton.js b/components/my-components/libs/config/props/skeleton.js deleted file mode 100644 index 83b777d..0000000 --- a/components/my-components/libs/config/props/skeleton.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:20:14 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/skeleton.js - */ -export default { - // skeleton - skeleton: { - loading: true, - animate: true, - rows: 0, - rowsWidth: '100%', - rowsHeight: 18, - title: true, - titleWidth: '50%', - titleHeight: 18, - avatar: false, - avatarSize: 32, - avatarShape: 'circle' - } -} diff --git a/components/my-components/libs/config/props/slider.js b/components/my-components/libs/config/props/slider.js deleted file mode 100644 index 4e3a31a..0000000 --- a/components/my-components/libs/config/props/slider.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:08:25 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/slider.js - */ -export default { - // slider组件 - slider: { - value: 0, - blockSize: 18, - min: 0, - max: 100, - step: 1, - activeColor: '#2979ff', - inactiveColor: '#c0c4cc', - blockColor: '#ffffff', - showValue: false, - disabled:false, - blockStyle: {}, - useNative: false, - height: '2px' - } -} diff --git a/components/my-components/libs/config/props/statusBar.js b/components/my-components/libs/config/props/statusBar.js deleted file mode 100644 index d237a83..0000000 --- a/components/my-components/libs/config/props/statusBar.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:20:39 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/statusBar.js - */ -export default { - // statusBar - statusBar: { - bgColor: 'transparent' - } -} diff --git a/components/my-components/libs/config/props/steps.js b/components/my-components/libs/config/props/steps.js deleted file mode 100644 index 881c39e..0000000 --- a/components/my-components/libs/config/props/steps.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:12:37 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/steps.js - */ -export default { - // steps组件 - steps: { - direction: 'row', - current: 0, - activeColor: '#3c9cff', - inactiveColor: '#969799', - activeIcon: '', - inactiveIcon: '', - dot: false - } -} diff --git a/components/my-components/libs/config/props/stepsItem.js b/components/my-components/libs/config/props/stepsItem.js deleted file mode 100644 index 5dba8f4..0000000 --- a/components/my-components/libs/config/props/stepsItem.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:12:55 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/stepsItem.js - */ -export default { - // steps-item组件 - stepsItem: { - title: '', - desc: '', - iconSize: 17, - error: false - } -} diff --git a/components/my-components/libs/config/props/sticky.js b/components/my-components/libs/config/props/sticky.js deleted file mode 100644 index b034604..0000000 --- a/components/my-components/libs/config/props/sticky.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:01:30 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/sticky.js - */ -export default { - // sticky组件 - sticky: { - offsetTop: 0, - customNavHeight: 0, - disabled: false, - bgColor: 'transparent', - zIndex: '', - index: '' - } -} diff --git a/components/my-components/libs/config/props/subsection.js b/components/my-components/libs/config/props/subsection.js deleted file mode 100644 index 9a165ff..0000000 --- a/components/my-components/libs/config/props/subsection.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:12:20 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/subsection.js - */ -export default { - // subsection组件 - subsection: { - list: [], - current: 0, - activeColor: '#3c9cff', - inactiveColor: '#303133', - mode: 'button', - fontSize: 12, - bold: true, - bgColor: '#eeeeef', - keyName: 'name' - } -} diff --git a/components/my-components/libs/config/props/swipeAction.js b/components/my-components/libs/config/props/swipeAction.js deleted file mode 100644 index 25051b8..0000000 --- a/components/my-components/libs/config/props/swipeAction.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:00:42 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/swipeAction.js - */ -export default { - // swipe-action组件 - swipeAction: { - autoClose: true - } -} diff --git a/components/my-components/libs/config/props/swipeActionItem.js b/components/my-components/libs/config/props/swipeActionItem.js deleted file mode 100644 index 40ef27c..0000000 --- a/components/my-components/libs/config/props/swipeActionItem.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:01:13 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/swipeActionItem.js - */ -export default { - // swipeActionItem 组件 - swipeActionItem: { - show: false, - name: '', - disabled: false, - threshold: 20, - autoClose: true, - options: [], - duration: 300 - } -} diff --git a/components/my-components/libs/config/props/swiper.js b/components/my-components/libs/config/props/swiper.js deleted file mode 100644 index 59af537..0000000 --- a/components/my-components/libs/config/props/swiper.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:21:38 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/swiper.js - */ -export default { - // swiper 组件 - swiper: { - list: [], - indicator: false, - indicatorActiveColor: '#FFFFFF', - indicatorInactiveColor: 'rgba(255, 255, 255, 0.35)', - indicatorStyle: '', - indicatorMode: 'line', - autoplay: true, - current: 0, - currentItemId: '', - interval: 3000, - duration: 300, - circular: false, - previousMargin: 0, - nextMargin: 0, - acceleration: false, - displayMultipleItems: 1, - easingFunction: 'default', - keyName: 'url', - imgMode: 'aspectFill', - height: 130, - bgColor: '#f3f4f6', - radius: 4, - loading: false, - showTitle: false - } - -} diff --git a/components/my-components/libs/config/props/swipterIndicator.js b/components/my-components/libs/config/props/swipterIndicator.js deleted file mode 100644 index 4b59e6e..0000000 --- a/components/my-components/libs/config/props/swipterIndicator.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:22:07 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/swiperIndicator.js - */ -export default { - // swiperIndicator 组件 - swiperIndicator: { - length: 0, - current: 0, - indicatorActiveColor: '', - indicatorInactiveColor: '', - indicatorMode: 'line' - } -} diff --git a/components/my-components/libs/config/props/switch.js b/components/my-components/libs/config/props/switch.js deleted file mode 100644 index e6400b4..0000000 --- a/components/my-components/libs/config/props/switch.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:22:24 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/switch.js - */ -export default { - // switch - switch: { - loading: false, - disabled: false, - size: 25, - activeColor: '#2979ff', - inactiveColor: '#ffffff', - value: false, - activeValue: true, - inactiveValue: false, - asyncChange: false, - space: 0 - } -} diff --git a/components/my-components/libs/config/props/tabbar.js b/components/my-components/libs/config/props/tabbar.js deleted file mode 100644 index 187112d..0000000 --- a/components/my-components/libs/config/props/tabbar.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:22:40 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabbar.js - */ -export default { - // tabbar - tabbar: { - value: null, - safeAreaInsetBottom: true, - border: true, - zIndex: 1, - activeColor: '#1989fa', - inactiveColor: '#7d7e80', - fixed: true, - placeholder: true - } -} diff --git a/components/my-components/libs/config/props/tabbarItem.js b/components/my-components/libs/config/props/tabbarItem.js deleted file mode 100644 index d036ce5..0000000 --- a/components/my-components/libs/config/props/tabbarItem.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:22:55 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabbarItem.js - */ -export default { - // - tabbarItem: { - name: null, - icon: '', - badge: null, - dot: false, - text: '', - badgeStyle: 'top: 6px;right:2px;' - } -} diff --git a/components/my-components/libs/config/props/tabs.js b/components/my-components/libs/config/props/tabs.js deleted file mode 100644 index 817e2d2..0000000 --- a/components/my-components/libs/config/props/tabs.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:23:14 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/tabs.js - */ -export default { - // - tabs: { - duration: 300, - list: [], - lineColor: '#3c9cff', - activeStyle: { - color: '#303133' - }, - inactiveStyle: { - color: '#606266' - }, - lineWidth: 20, - lineHeight: 3, - lineBgSize: 'cover', - itemStyle: { - height: '44px' - }, - scrollable: true, - current: 0, - keyName: 'name' - } -} diff --git a/components/my-components/libs/config/props/tag.js b/components/my-components/libs/config/props/tag.js deleted file mode 100644 index e686e50..0000000 --- a/components/my-components/libs/config/props/tag.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:23:37 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/tag.js - */ -export default { - // tag 组件 - tag: { - type: 'primary', - disabled: false, - size: 'medium', - shape: 'square', - text: '', - bgColor: '', - color: '', - borderColor: '', - closeColor: '#C6C7CB', - name: '', - plainFill: false, - plain: false, - closable: false, - show: true, - icon: '', - iconColor: '' - } -} \ No newline at end of file diff --git a/components/my-components/libs/config/props/text.js b/components/my-components/libs/config/props/text.js deleted file mode 100644 index c74cf6d..0000000 --- a/components/my-components/libs/config/props/text.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:23:58 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/text.js - */ -export default { - // text 组件 - text: { - type: '', - show: true, - text: '', - prefixIcon: '', - suffixIcon: '', - mode: '', - href: '', - format: '', - call: false, - openType: '', - bold: false, - block: false, - lines: '', - color: '#303133', - size: 15, - iconStyle: { - fontSize: '15px' - }, - decoration: 'none', - margin: 0, - lineHeight: '', - align: 'left', - wordWrap: 'normal' - } - -} diff --git a/components/my-components/libs/config/props/textarea.js b/components/my-components/libs/config/props/textarea.js deleted file mode 100644 index 44519f9..0000000 --- a/components/my-components/libs/config/props/textarea.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:24:32 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/textarea.js - */ -export default { - // textarea 组件 - textarea: { - value: '', - placeholder: '', - placeholderClass: 'textarea-placeholder', - placeholderStyle: 'color: #c0c4cc', - height: 70, - confirmType: 'done', - disabled: false, - count: false, - focus: false, - autoHeight: false, - fixed: false, - cursorSpacing: 0, - cursor: '', - showConfirmBar: true, - selectionStart: -1, - selectionEnd: -1, - adjustPosition: true, - disableDefaultPadding: false, - holdKeyboard: false, - maxlength: 140, - border: 'surround', - formatter: null - } -} diff --git a/components/my-components/libs/config/props/toast.js b/components/my-components/libs/config/props/toast.js deleted file mode 100644 index 2dd2ed1..0000000 --- a/components/my-components/libs/config/props/toast.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:07:07 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/toast.js - */ -export default { - // toast组件 - toast: { - zIndex: 10090, - loading: false, - text: '', - icon: '', - type: '', - loadingMode: '', - show: '', - overlay: false, - position: 'center', - params: {}, - duration: 2000, - isTab: false, - url: '', - callback: null, - back: false - } - -} diff --git a/components/my-components/libs/config/props/toolbar.js b/components/my-components/libs/config/props/toolbar.js deleted file mode 100644 index 3289967..0000000 --- a/components/my-components/libs/config/props/toolbar.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:24:55 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/toolbar.js - */ -export default { - // toolbar 组件 - toolbar: { - show: true, - cancelText: '取消', - confirmText: '确认', - cancelColor: '#909193', - confirmColor: '#3c9cff', - title: '' - } - -} diff --git a/components/my-components/libs/config/props/tooltip.js b/components/my-components/libs/config/props/tooltip.js deleted file mode 100644 index 875604d..0000000 --- a/components/my-components/libs/config/props/tooltip.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:25:14 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/tooltip.js - */ -export default { - // tooltip 组件 - tooltip: { - text: '', - copyText: '', - size: 14, - color: '#606266', - bgColor: 'transparent', - direction: 'top', - zIndex: 10071, - showCopy: true, - buttons: [], - overlay: true, - showToast: true - } -} diff --git a/components/my-components/libs/config/props/transition.js b/components/my-components/libs/config/props/transition.js deleted file mode 100644 index 0fad118..0000000 --- a/components/my-components/libs/config/props/transition.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 16:59:00 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/transition.js - */ -export default { - // transition动画组件的props - transition: { - show: false, - mode: 'fade', - duration: '300', - timingFunction: 'ease-out' - } -} diff --git a/components/my-components/libs/config/props/upload.js b/components/my-components/libs/config/props/upload.js deleted file mode 100644 index c727c27..0000000 --- a/components/my-components/libs/config/props/upload.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-20 16:44:21 - * @LastAuthor : LQ - * @lastTime : 2021-08-20 17:09:50 - * @FilePath : /u-view2.0/uview-ui/libs/config/props/upload.js - */ -export default { - // upload组件 - upload: { - accept: 'image', - extension: [], - capture: ['album', 'camera'], - compressed: true, - camera: 'back', - maxDuration: 60, - uploadIcon: 'camera-fill', - uploadIconColor: '#D3D4D6', - useBeforeRead: false, - previewFullImage: true, - maxCount: 52, - disabled: false, - imageMode: 'aspectFill', - name: '', - sizeType: ['original', 'compressed'], - multiple: false, - deletable: true, - maxSize: Number.MAX_VALUE, - fileList: [], - uploadText: '', - width: 80, - height: 80, - previewImage: true - } -} diff --git a/components/my-components/libs/config/zIndex.js b/components/my-components/libs/config/zIndex.js deleted file mode 100644 index 5fc3682..0000000 --- a/components/my-components/libs/config/zIndex.js +++ /dev/null @@ -1,20 +0,0 @@ -// uniapp在H5中各API的z-index值如下: -/** - * actionsheet: 999 - * modal: 999 - * navigate: 998 - * tabbar: 998 - * toast: 999 - */ - -export default { - toast: 10090, - noNetwork: 10080, - // popup包含popup,actionsheet,keyboard,picker的值 - popup: 10075, - mask: 10070, - navbar: 980, - topTips: 975, - sticky: 970, - indexListSticky: 965 -} diff --git a/components/my-components/libs/css/color.scss b/components/my-components/libs/css/color.scss deleted file mode 100644 index 3237ba4..0000000 --- a/components/my-components/libs/css/color.scss +++ /dev/null @@ -1,155 +0,0 @@ -.u-primary-light { - color: $u-primary-light; -} - -.u-warning-light { - color: $u-warning-light; -} - -.u-success-light { - color: $u-success-light; -} - -.u-error-light { - color: $u-error-light; -} - -.u-info-light { - color: $u-info-light; -} - -.u-primary-light-bg { - background-color: $u-primary-light; -} - -.u-warning-light-bg { - background-color: $u-warning-light; -} - -.u-success-light-bg { - background-color: $u-success-light; -} - -.u-error-light-bg { - background-color: $u-error-light; -} - -.u-info-light-bg { - background-color: $u-info-light; -} - -.u-primary-dark { - color: $u-primary-dark; -} - -.u-warning-dark { - color: $u-warning-dark; -} - -.u-success-dark { - color: $u-success-dark; -} - -.u-error-dark { - color: $u-error-dark; -} - -.u-info-dark { - color: $u-info-dark; -} - -.u-primary-dark-bg { - background-color: $u-primary-dark; -} - -.u-warning-dark-bg { - background-color: $u-warning-dark; -} - -.u-success-dark-bg { - background-color: $u-success-dark; -} - -.u-error-dark-bg { - background-color: $u-error-dark; -} - -.u-info-dark-bg { - background-color: $u-info-dark; -} - -.u-primary-disabled { - color: $u-primary-disabled; -} - -.u-warning-disabled { - color: $u-warning-disabled; -} - -.u-success-disabled { - color: $u-success-disabled; -} - -.u-error-disabled { - color: $u-error-disabled; -} - -.u-info-disabled { - color: $u-info-disabled; -} - -.u-primary { - color: $u-primary; -} - -.u-warning { - color: $u-warning; -} - -.u-success { - color: $u-success; -} - -.u-error { - color: $u-error; -} - -.u-info { - color: $u-info; -} - -.u-primary-bg { - background-color: $u-primary; -} - -.u-warning-bg { - background-color: $u-warning; -} - -.u-success-bg { - background-color: $u-success; -} - -.u-error-bg { - background-color: $u-error; -} - -.u-info-bg { - background-color: $u-info; -} - -.u-main-color { - color: $u-main-color; -} - -.u-content-color { - color: $u-content-color; -} - -.u-tips-color { - color: $u-tips-color; -} - -.u-light-color { - color: $u-light-color; -} diff --git a/components/my-components/libs/css/common.scss b/components/my-components/libs/css/common.scss deleted file mode 100644 index 8d27927..0000000 --- a/components/my-components/libs/css/common.scss +++ /dev/null @@ -1,102 +0,0 @@ -// 超出行数,自动显示行尾省略号,最多5行 -// 来自uview-plus的温馨提示:当您在控制台看到此报错,说明需要在App.vue的style标签加上【lang="scss"】 -@for $i from 1 through 5 { - .u-line-#{$i} { - /* #ifdef APP-NVUE */ - // nvue下,可以直接使用lines属性,这是weex特有样式 - lines: $i; - text-overflow: ellipsis; - overflow: hidden; - flex: 1; - /* #endif */ - - /* #ifndef APP-NVUE */ - // vue下,单行和多行显示省略号需要单独处理 - @if $i == '1' { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } @else { - display: -webkit-box!important; - overflow: hidden; - text-overflow: ellipsis; - word-break: break-all; - -webkit-line-clamp: $i; - -webkit-box-orient: vertical!important; - } - /* #endif */ - } -} - - -// 此处加上!important并非随意乱用,而是因为目前*.nvue页面编译到H5时, -// App.vue的样式会被uni-app的view元素的自带border属性覆盖,导致无效 -// 综上,这是uni-app的缺陷导致我们为了多端兼容,而必须要加上!important -// 移动端兼容性较好,直接使用0.5px去实现细边框,不使用伪元素形式实现 -.u-border { - border-width: 0.5px!important; - border-color: $u-border-color!important; - border-style: solid; -} - -.u-border-top { - border-top-width: 0.5px!important; - border-color: $u-border-color!important; - border-top-style: solid; -} - -.u-border-left { - border-left-width: 0.5px!important; - border-color: $u-border-color!important; - border-left-style: solid; -} - -.u-border-right { - border-right-width: 0.5px!important; - border-color: $u-border-color!important; - border-right-style: solid; -} - -.u-border-bottom { - border-bottom-width: 0.5px!important; - border-color: $u-border-color!important; - border-bottom-style: solid; -} - -.u-border-top-bottom { - border-top-width: 0.5px!important; - border-bottom-width: 0.5px!important; - border-color: $u-border-color!important; - border-top-style: solid; - border-bottom-style: solid; -} - -// 去除button的所有默认样式,让其表现跟普通的view、text元素一样 -.u-reset-button { - padding: 0; - background-color: transparent; - /* #ifndef APP-PLUS */ - font-size: inherit; - line-height: inherit; - color: inherit; - /* #endif */ - /* #ifdef APP-NVUE */ - border-width: 0; - /* #endif */ -} - -/* #ifndef APP-NVUE */ -.u-reset-button::after { - border: none; -} -/* #endif */ - -.u-hover-class { - opacity: 0.7; -} - -.cursor-pointer { - /* #ifdef H5 */ - cursor: pointer; - /* #endif */ -} diff --git a/components/my-components/libs/css/components.scss b/components/my-components/libs/css/components.scss deleted file mode 100644 index 223a2f5..0000000 --- a/components/my-components/libs/css/components.scss +++ /dev/null @@ -1,25 +0,0 @@ -@import "./mixin.scss"; - -/* #ifndef APP-NVUE */ -// 由于uview-plus是基于nvue环境进行开发的,此环境中普通元素默认为flex-direction: column; -// 所以在非nvue中,需要对元素进行重置为flex-direction: column; 否则可能会表现异常 -// 2024-04-09由于微信小程序会提示 Some selectors are not allowed in component wxss所以注释以下几行 // view, -// scroll-view, -// swiper-item, -.u-empty, -.u-empty__wrap, -.u-tabs, -.u-tabs__wrapper, -.u-tabs__wrapper__scroll-view-wrapper, -.u-tabs__wrapper__scroll-view, -.u-tabs__wrapper__nav, -.u-tabs__wrapper__nav__line { - display: flex; - flex-direction: column; - flex-shrink: 0; - flex-grow: 0; - flex-basis: auto; - align-items: stretch; - align-content: flex-start; -} -/* #endif */ diff --git a/components/my-components/libs/css/flex.scss b/components/my-components/libs/css/flex.scss deleted file mode 100644 index d24cd5a..0000000 --- a/components/my-components/libs/css/flex.scss +++ /dev/null @@ -1,302 +0,0 @@ -// .u-flex { -// @include vue-flex(row); -// } - -// .u-flex-x { -// @include vue-flex(row); -// } - -// .u-flex-y { -// @include vue-flex(column); -// } - -// .u-flex-xy-center { -// @include vue-flex(row); -// justify-content: center; -// align-items: center; -// } - -// .u-flex-x-center { -// @include vue-flex(row); -// justify-content: center; -// } - -// .u-flex-y-center { -// @include vue-flex(column); -// justify-content: center; -// } - - -// flex布局 -.u-flex, -.u-flex-row, -.u-flex-x { - @include flex; -} - -.u-flex-y, -.u-flex-column { - @include flex(column); -} - -.u-flex-x-center { - @include flex; - justify-content: center; -} - -.u-flex-xy-center { - @include flex; - justify-content: center; - align-items: center; -} - -.u-flex-y-center { - @include flex; - align-items: center; -} - -.u-flex-x-left { - @include flex; -} - -.u-flex-x-reverse, -.u-flex-row-reverse { - flex-direction: row-reverse; -} - -.u-flex-y-reverse, -.u-flex-column-reverse { - flex-direction: column-reverse; -} - -/* #ifndef APP-NVUE */ -// 此处为vue版本的简写,因为nvue不支持同时作用于两个类名的样式写法 -// nvue下只能写成class="u-flex-x u-flex-x-reverse的形式" -.u-flex.u-flex-reverse, -.u-flex-row.u-flex-reverse, -.u-flex-x.u-flex-reverse { - flex-direction: row-reverse; -} - -.u-flex-column.u-flex-reverse, -.u-flex-y.u-flex-reverse { - flex-direction: column-reverse; -} - -// 自动伸缩 -.u-flex-fill { - flex: 1 1 auto; -} - -// 边界自动伸缩 -.u-margin-top-auto, -.u-m-t-auto { - margin-top: auto !important; -} - -.u-margin-right-auto, -.u-m-r-auto { - margin-right: auto !important; -} - -.u-margin-bottom-auto, -.u-m-b-auto { - margin-bottom: auto !important; -} - -.u-margin-left-auto, -.u-m-l-auto { - margin-left: auto !important; -} - -.u-margin-center-auto, -.u-m-c-auto { - margin-left: auto !important; - margin-right: auto !important; -} - -.u-margin-middle-auto, -.u-m-m-auto { - margin-top: auto !important; - margin-bottom: auto !important; -} -/* #endif */ - -// 换行 -.u-flex-wrap { - flex-wrap: wrap; -} - -// 反向换行 -.u-flex-wrap-reverse { - flex-wrap: wrap-reverse; -} - -// 主轴起点对齐 -.u-flex-start { - justify-content: flex-start; -} - -// 主轴中间对齐 -.u-flex-center { - justify-content: center; -} - -// 主轴终点对齐 -.u-flex-end { - justify-content: flex-end; -} - -// 主轴等比间距 -.u-flex-between { - justify-content: space-between; -} - -// 主轴均分间距 -.u-flex-around { - justify-content: space-around; -} - -// 交叉轴起点对齐 -.u-flex-items-start { - align-items: flex-start; -} - -// 交叉轴中间对齐 -.u-flex-items-center { - align-items: center; -} - -// 交叉轴终点对齐 -.u-flex-items-end { - align-items: flex-end; -} - -// 交叉轴第一行文字基线对齐 -.u-flex-items-baseline { - /* #ifndef APP-NVUE */ - align-items: baseline; - /* #endif */ -} - -// 交叉轴方向拉伸对齐 -.u-flex-items-stretch { - align-items: stretch; -} - - -// 以下属于项目(子元素)的类 - -// 子元素交叉轴起点对齐 -/* #ifndef APP-NVUE */ -.u-flex-self-start { - align-self: flex-start; -} - -// 子元素交叉轴居中对齐 -.u-flex-self-center { - align-self: center; -} - -// 子元素交叉轴终点对齐 -.u-flex-self-end { - align-self: flex-end; -} - -// 子元素交叉轴第一行文字基线对齐 -.u-flex-self-baseline { - align-self: baseline; -} - -// 子元素交叉轴方向拉伸对齐 -.u-flex-self-stretch { - align-self: stretch; -} -/* #endif */ -// 多轴交叉时的对齐方式 - -// 起点对齐 -/* #ifndef APP-NVUE */ -.u-flex-content-start { - align-content: flex-start; -} - -// 居中对齐 -.u-flex-content-center { - align-content: center; -} - -// 终点对齐 -.u-flex-content-end { - align-content: flex-end; -} - -// 两端对齐 -.u-flex-content-between { - align-content: space-between; -} - -// 均分间距 -.u-flex-content-around { - align-content: space-around; -} - -// 全部居中对齐 -.u-flex-middle { - justify-content: center; - align-items: center; - align-self: center; - align-content: center; -} - -// 是否可以放大 -.u-flex-grow { - flex-grow: 1; -} - -// 是否可以缩小 -.u-flex-shrink { - flex-shrink: 1; -} - -/* #endif */ - -// 定义内外边距,历遍1-80 -@for $i from 0 through 80 { - // 只要双数和能被5除尽的数 - @if $i % 2 == 0 or $i % 5 == 0 { - // 得出:u-margin-30或者u-m-30 - .u-margin-#{$i}, .u-m-#{$i} { - margin: $i + rpx!important; - } - - // 得出:u-padding-30或者u-p-30 - .u-padding-#{$i}, .u-p-#{$i} { - padding: $i + rpx!important; - } - - @each $short, $long in l left, t top, r right, b bottom { - // 缩写版,结果如: u-m-l-30 - // 定义外边距 - .u-m-#{$short}-#{$i} { - margin-#{$long}: $i + rpx!important; - } - - // 定义内边距 - .u-p-#{$short}-#{$i} { - padding-#{$long}: $i + rpx!important; - } - - // 完整版,结果如:u-margin-left-30 - // 定义外边距 - .u-margin-#{$long}-#{$i} { - margin-#{$long}: $i + rpx!important; - } - - // 定义内边距 - .u-padding-#{$long}-#{$i} { - padding-#{$long}: $i + rpx!important; - } - } - } -} diff --git a/components/my-components/libs/css/h5.scss b/components/my-components/libs/css/h5.scss deleted file mode 100644 index e69de29..0000000 diff --git a/components/my-components/libs/css/mixin.scss b/components/my-components/libs/css/mixin.scss deleted file mode 100644 index 7e35b3b..0000000 --- a/components/my-components/libs/css/mixin.scss +++ /dev/null @@ -1,8 +0,0 @@ -// 通过scss的mixin功能,把原来需要写4行的css,变成一行 -// 目的是保持代码干净整洁,不至于在nvue下,到处都要写display:flex的条件编译 -@mixin flex($direction: row) { - /* #ifndef APP-NVUE */ - display: flex; - /* #endif */ - flex-direction: $direction; -} diff --git a/components/my-components/libs/css/mp.scss b/components/my-components/libs/css/mp.scss deleted file mode 100644 index e69de29..0000000 diff --git a/components/my-components/libs/css/nvue.scss b/components/my-components/libs/css/nvue.scss deleted file mode 100644 index e69de29..0000000 diff --git a/components/my-components/libs/css/vue.scss b/components/my-components/libs/css/vue.scss deleted file mode 100644 index 3ae4d29..0000000 --- a/components/my-components/libs/css/vue.scss +++ /dev/null @@ -1,27 +0,0 @@ -// 历遍生成4个方向的底部安全区 -@each $d in top, right, bottom, left { - .u-safe-area-inset-#{$d} { - padding-#{$d}: 0; - padding-#{$d}: constant(safe-area-inset-#{$d}); - padding-#{$d}: env(safe-area-inset-#{$d}); - } -} - -//提升H5端uni.toast()的层级,避免被uView的modal等遮盖 -/* #ifdef H5 */ -uni-toast { - z-index: 10090; -} -uni-toast .uni-toast { - z-index: 10090; -} -/* #endif */ - -// 隐藏scroll-view的滚动条 -::-webkit-scrollbar { - display: none; - width: 0 !important; - height: 0 !important; - -webkit-appearance: none; - background: transparent; -} \ No newline at end of file diff --git a/components/my-components/libs/function/colorGradient.js b/components/my-components/libs/function/colorGradient.js deleted file mode 100644 index 174f894..0000000 --- a/components/my-components/libs/function/colorGradient.js +++ /dev/null @@ -1,134 +0,0 @@ -/** - * 求两个颜色之间的渐变值 - * @param {string} startColor 开始的颜色 - * @param {string} endColor 结束的颜色 - * @param {number} step 颜色等分的份额 - * */ -export function colorGradient(startColor = 'rgb(0, 0, 0)', endColor = 'rgb(255, 255, 255)', step = 10) { - const startRGB = hexToRgb(startColor, false) // 转换为rgb数组模式 - const startR = startRGB[0] - const startG = startRGB[1] - const startB = startRGB[2] - - const endRGB = hexToRgb(endColor, false) - const endR = endRGB[0] - const endG = endRGB[1] - const endB = endRGB[2] - - const sR = (endR - startR) / step // 总差值 - const sG = (endG - startG) / step - const sB = (endB - startB) / step - const colorArr = [] - for (let i = 0; i < step; i++) { - // 计算每一步的hex值 - let hex = rgbToHex(`rgb(${Math.round((sR * i + startR))},${Math.round((sG * i + startG))},${Math.round((sB - * i + startB))})`) - // 确保第一个颜色值为startColor的值 - if (i === 0) hex = rgbToHex(startColor) - // 确保最后一个颜色值为endColor的值 - if (i === step - 1) hex = rgbToHex(endColor) - colorArr.push(hex) - } - return colorArr -} - -// 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式) -export function hexToRgb(sColor, str = true) { - const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/ - sColor = String(sColor).toLowerCase() - if (sColor && reg.test(sColor)) { - if (sColor.length === 4) { - let sColorNew = '#' - for (let i = 1; i < 4; i += 1) { - sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)) - } - sColor = sColorNew - } - // 处理六位的颜色值 - const sColorChange = [] - for (let i = 1; i < 7; i += 2) { - sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`)) - } - if (!str) { - return sColorChange - } - return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})` - } if (/^(rgb|RGB)/.test(sColor)) { - const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',') - return arr.map((val) => Number(val)) - } - return sColor -} - -// 将rgb表示方式转换为hex表示方式 -export function rgbToHex(rgb) { - const _this = rgb - const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/ - if (/^(rgb|RGB)/.test(_this)) { - const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',') - let strHex = '#' - for (let i = 0; i < aColor.length; i++) { - let hex = Number(aColor[i]).toString(16) - hex = String(hex).length == 1 ? `${0}${hex}` : hex // 保证每个rgb的值为2位 - if (hex === '0') { - hex += hex - } - strHex += hex - } - if (strHex.length !== 7) { - strHex = _this - } - return strHex - } if (reg.test(_this)) { - const aNum = _this.replace(/#/, '').split('') - if (aNum.length === 6) { - return _this - } if (aNum.length === 3) { - let numHex = '#' - for (let i = 0; i < aNum.length; i += 1) { - numHex += (aNum[i] + aNum[i]) - } - return numHex - } - } else { - return _this - } -} - -/** -* JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串 -* sHex为传入的十六进制的色值 -* alpha为rgba的透明度 -*/ -export function colorToRgba(color, alpha) { - color = rgbToHex(color) - // 十六进制颜色值的正则表达式 - const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/ - /* 16进制颜色转为RGB格式 */ - let sColor = String(color).toLowerCase() - if (sColor && reg.test(sColor)) { - if (sColor.length === 4) { - let sColorNew = '#' - for (let i = 1; i < 4; i += 1) { - sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1)) - } - sColor = sColorNew - } - // 处理六位的颜色值 - const sColorChange = [] - for (let i = 1; i < 7; i += 2) { - sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`)) - } - // return sColorChange.join(',') - return `rgba(${sColorChange.join(',')},${alpha})` - } - - return sColor -} - -export default { - colorGradient, - hexToRgb, - rgbToHex, - colorToRgba -} diff --git a/components/my-components/libs/function/debounce.js b/components/my-components/libs/function/debounce.js deleted file mode 100644 index d424aa4..0000000 --- a/components/my-components/libs/function/debounce.js +++ /dev/null @@ -1,29 +0,0 @@ -let timeout = null - -/** - * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数 - * - * @param {Function} func 要执行的回调函数 - * @param {Number} wait 延时的时间 - * @param {Boolean} immediate 是否立即执行 - * @return null - */ -export function debounce(func, wait = 500, immediate = false) { - // 清除定时器 - if (timeout !== null) clearTimeout(timeout) - // 立即执行,此类情况一般用不到 - if (immediate) { - const callNow = !timeout - timeout = setTimeout(() => { - timeout = null - }, wait) - if (callNow) typeof func === 'function' && func() - } else { - // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法 - timeout = setTimeout(() => { - typeof func === 'function' && func() - }, wait) - } -} - -export default debounce diff --git a/components/my-components/libs/function/digit.js b/components/my-components/libs/function/digit.js deleted file mode 100644 index 470bea6..0000000 --- a/components/my-components/libs/function/digit.js +++ /dev/null @@ -1,167 +0,0 @@ -let _boundaryCheckingState = true; // 是否进行越界检查的全局开关 - -/** - * 把错误的数据转正 - * @private - * @example strip(0.09999999999999998)=0.1 - */ -export function strip(num, precision = 15) { - return +parseFloat(Number(num).toPrecision(precision)); -} - -/** - * Return digits length of a number - * @private - * @param {*number} num Input number - */ -export function digitLength(num) { - // Get digit length of e - const eSplit = num.toString().split(/[eE]/); - const len = (eSplit[0].split('.')[1] || '').length - +(eSplit[1] || 0); - return len > 0 ? len : 0; -} - -/** - * 把小数转成整数,如果是小数则放大成整数 - * @private - * @param {*number} num 输入数 - */ -export function float2Fixed(num) { - if (num.toString().indexOf('e') === -1) { - return Number(num.toString().replace('.', '')); - } - const dLen = digitLength(num); - return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num); -} - -/** - * 检测数字是否越界,如果越界给出提示 - * @private - * @param {*number} num 输入数 - */ -export function checkBoundary(num) { - if (_boundaryCheckingState) { - if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) { - console.warn(`${num} 超出了精度限制,结果可能不正确`); - } - } -} - -/** - * 把递归操作扁平迭代化 - * @param {number[]} arr 要操作的数字数组 - * @param {function} operation 迭代操作 - * @private - */ -export function iteratorOperation(arr, operation) { - const [num1, num2, ...others] = arr; - let res = operation(num1, num2); - - others.forEach((num) => { - res = operation(res, num); - }); - - return res; -} - -/** - * 高精度乘法 - * @export - */ -export function times(...nums) { - if (nums.length > 2) { - return iteratorOperation(nums, times); - } - - const [num1, num2] = nums; - const num1Changed = float2Fixed(num1); - const num2Changed = float2Fixed(num2); - const baseNum = digitLength(num1) + digitLength(num2); - const leftValue = num1Changed * num2Changed; - - checkBoundary(leftValue); - - return leftValue / Math.pow(10, baseNum); -} - -/** - * 高精度加法 - * @export - */ -export function plus(...nums) { - if (nums.length > 2) { - return iteratorOperation(nums, plus); - } - - const [num1, num2] = nums; - // 取最大的小数位 - const baseNum = Math.pow(10, Math.max(digitLength(num1), digitLength(num2))); - // 把小数都转为整数然后再计算 - return (times(num1, baseNum) + times(num2, baseNum)) / baseNum; -} - -/** - * 高精度减法 - * @export - */ -export function minus(...nums) { - if (nums.length > 2) { - return iteratorOperation(nums, minus); - } - - const [num1, num2] = nums; - const baseNum = Math.pow(10, Math.max(digitLength(num1), digitLength(num2))); - return (times(num1, baseNum) - times(num2, baseNum)) / baseNum; -} - -/** - * 高精度除法 - * @export - */ -export function divide(...nums) { - if (nums.length > 2) { - return iteratorOperation(nums, divide); - } - - const [num1, num2] = nums; - const num1Changed = float2Fixed(num1); - const num2Changed = float2Fixed(num2); - checkBoundary(num1Changed); - checkBoundary(num2Changed); - // 重要,这里必须用strip进行修正 - return times(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1)))); -} - -/** - * 四舍五入 - * @export - */ -export function round(num, ratio) { - const base = Math.pow(10, ratio); - let result = divide(Math.round(Math.abs(times(num, base))), base); - if (num < 0 && result !== 0) { - result = times(result, -1); - } - // 位数不足则补0 - return result; -} - -/** - * 是否进行边界检查,默认开启 - * @param flag 标记开关,true 为开启,false 为关闭,默认为 true - * @export - */ -export function enableBoundaryChecking(flag = true) { - _boundaryCheckingState = flag; -} - - -export default { - times, - plus, - minus, - divide, - round, - enableBoundaryChecking, -}; - diff --git a/components/my-components/libs/function/index.js b/components/my-components/libs/function/index.js deleted file mode 100644 index 6cc5c4a..0000000 --- a/components/my-components/libs/function/index.js +++ /dev/null @@ -1,727 +0,0 @@ -import { - number as testNumber, - array as testArray, - empty as testEmpty -} from './test' -import { round } from './digit.js' -import config from '../config/config'; -/** - * @description 如果value小于min,取min;如果value大于max,取max - * @param {number} min - * @param {number} max - * @param {number} value - */ -export function range(min = 0, max = 0, value = 0) { - return Math.max(min, Math.min(max, Number(value))) -} - -/** - * @description 用于获取用户传递值的px值 如果用户传递了"xxpx"或者"xxrpx",取出其数值部分,如果是"xxxrpx"还需要用过uni.rpx2px进行转换 - * @param {number|string} value 用户传递值的px值 - * @param {boolean} unit - * @returns {number|string} - */ -export function getPx(value, unit = false) { - if (testNumber(value)) { - return unit ? `${value}px` : Number(value) - } - // 如果带有rpx,先取出其数值部分,再转为px值 - if (/(rpx|upx)$/.test(value)) { - return unit ? `${uni.upx2px(parseInt(value))}px` : Number(uni.upx2px(parseInt(value))) - } - return unit ? `${parseInt(value)}px` : parseInt(value) -} - -/** - * @description 进行延时,以达到可以简写代码的目的 比如: await uni.$u.sleep(20)将会阻塞20ms - * @param {number} value 堵塞时间 单位ms 毫秒 - * @returns {Promise} 返回promise - */ -export function sleep(value = 30) { - return new Promise((resolve) => { - setTimeout(() => { - resolve() - }, value) - }) -} -/** - * @description 运行期判断平台 - * @returns {string} 返回所在平台(小写) - * @link 运行期判断平台 https://uniapp.dcloud.io/frame?id=判断平台 - */ -export function os() { - return uni.getSystemInfoSync().platform.toLowerCase() -} -/** - * @description 获取系统信息同步接口 - * @link 获取系统信息同步接口 https://uniapp.dcloud.io/api/system/info?id=getsysteminfosync - */ -export function sys() { - return uni.getSystemInfoSync() -} - -/** - * @description 取一个区间数 - * @param {Number} min 最小值 - * @param {Number} max 最大值 - */ -export function random(min, max) { - if (min >= 0 && max > 0 && max >= min) { - const gab = max - min + 1 - return Math.floor(Math.random() * gab + min) - } - return 0 -} - -/** - * @param {Number} len uuid的长度 - * @param {Boolean} firstU 将返回的首字母置为"u" - * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制 - */ -export function guid(len = 32, firstU = true, radix = null) { - const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('') - const uuid = [] - radix = radix || chars.length - - if (len) { - // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位 - for (let i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix] - } else { - let r - // rfc4122标准要求返回的uuid中,某些位为固定的字符 - uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-' - uuid[14] = '4' - - for (let i = 0; i < 36; i++) { - if (!uuid[i]) { - r = 0 | Math.random() * 16 - uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r] - } - } - } - // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class - if (firstU) { - uuid.shift() - return `u${uuid.join('')}` - } - return uuid.join('') -} - -/** -* @description 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法 - this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx - 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name - 值(默认为undefined),就是查找最顶层的$parent -* @param {string|undefined} name 父组件的参数名 -*/ -export function $parent(name = undefined) { - let parent = this.$parent - // 通过while历遍,这里主要是为了H5需要多层解析的问题 - while (parent) { - // 父组件 - if (parent.$options && parent.$options.name !== name) { - // 如果组件的name不相等,继续上一级寻找 - parent = parent.$parent - } else { - return parent - } - } - return false -} - -/** - * @description 样式转换 - * 对象转字符串,或者字符串转对象 - * @param {object | string} customStyle 需要转换的目标 - * @param {String} target 转换的目的,object-转为对象,string-转为字符串 - * @returns {object|string} - */ -export function addStyle(customStyle, target = 'object') { - // 字符串转字符串,对象转对象情形,直接返回 - if (testEmpty(customStyle) || typeof(customStyle) === 'object' && target === 'object' || target === 'string' && - typeof(customStyle) === 'string') { - return customStyle - } - // 字符串转对象 - if (target === 'object') { - // 去除字符串样式中的两端空格(中间的空格不能去掉,比如padding: 20px 0如果去掉了就错了),空格是无用的 - customStyle = trim(customStyle) - // 根据";"将字符串转为数组形式 - const styleArray = customStyle.split(';') - const style = {} - // 历遍数组,拼接成对象 - for (let i = 0; i < styleArray.length; i++) { - // 'font-size:20px;color:red;',如此最后字符串有";"的话,会导致styleArray最后一个元素为空字符串,这里需要过滤 - if (styleArray[i]) { - const item = styleArray[i].split(':') - style[trim(item[0])] = trim(item[1]) - } - } - return style - } - // 这里为对象转字符串形式 - let string = '' - if (typeof customStyle === 'object') { - customStyle.forEach((val, i) => { - // 驼峰转为中划线的形式,否则css内联样式,无法识别驼峰样式属性名 - const key = i.replace(/([A-Z])/g, '-$1').toLowerCase() - string += `${key}:${val};` - }) - } - // 去除两端空格 - return trim(string) -} - -/** - * @description 添加单位,如果有rpx,upx,%,px等单位结尾或者值为auto,直接返回,否则加上px单位结尾 - * @param {string|number} value 需要添加单位的值 - * @param {string} unit 添加的单位名 比如px - */ -export function addUnit(value = 'auto', unit = '') { - if (!unit) { - unit = config.unit || 'px' - } - if (unit == 'rpx') { - value = value * 2 - } - value = String(value) - // 用内置验证规则中的number判断是否为数值 - return testNumber(value) ? `${value}${unit}` : value -} - -/** - * @description 深度克隆 - * @param {object} obj 需要深度克隆的对象 - * @returns {*} 克隆后的对象或者原值(不是对象) - */ -export function deepClone(obj) { - // 对常见的“非”值,直接返回原来值 - if ([null, undefined, NaN, false].includes(obj)) return obj - if (typeof obj !== 'object' && typeof obj !== 'function') { - // 原始类型直接返回 - return obj - } - const o = testArray(obj) ? [] : {} - for (const i in obj) { - if (obj.hasOwnProperty(i)) { - o[i] = typeof obj[i] === 'object' ? deepClone(obj[i]) : obj[i] - } - } - return o -} - -/** - * @description JS对象深度合并 - * @param {object} target 需要拷贝的对象 - * @param {object} source 拷贝的来源对象 - * @returns {object|boolean} 深度合并后的对象或者false(入参有不是对象) - */ -export function deepMerge(targetOrigin = {}, source = {}) { - let target = deepClone(targetOrigin) - if (typeof target !== 'object' || typeof source !== 'object') return false - for (const prop in source) { - if (!source.hasOwnProperty(prop)) continue - if (prop in target) { - if (source[prop] == null) { - target[prop] = source[prop] - }else if (typeof target[prop] !== 'object') { - target[prop] = source[prop] - } else if (typeof source[prop] !== 'object') { - target[prop] = source[prop] - } else if (target[prop].concat && source[prop].concat) { - target[prop] = target[prop].concat(source[prop]) - } else { - target[prop] = deepMerge(target[prop], source[prop]) - } - } else { - target[prop] = source[prop] - } - } - return target -} -/** - * @description JS对象深度合并 - * @param {object} target 需要拷贝的对象 - * @param {object} source 拷贝的来源对象 - * @returns {object|boolean} 深度合并后的对象或者false(入参有不是对象) - */ -export function shallowMerge(target, source = {}) { - if (typeof target !== 'object' || typeof source !== 'object') return false - for (const prop in source) { - if (!source.hasOwnProperty(prop)) continue - if (prop in target) { - if (source[prop] == null) { - target[prop] = source[prop] - }else if (typeof target[prop] !== 'object') { - target[prop] = source[prop] - } else if (typeof source[prop] !== 'object') { - target[prop] = source[prop] - } else if (target[prop].concat && source[prop].concat) { - target[prop] = target[prop].concat(source[prop]) - } else { - target[prop] = shallowMerge(target[prop], source[prop]) - } - } else { - target[prop] = source[prop] - } - } - return target -} - -/** - * @description error提示 - * @param {*} err 错误内容 - */ -export function error(err) { - // 开发环境才提示,生产环境不会提示 - if (process.env.NODE_ENV === 'development') { - console.error(`uView提示:${err}`) - } -} - -/** - * @description 打乱数组 - * @param {array} array 需要打乱的数组 - * @returns {array} 打乱后的数组 - */ -export function randomArray(array = []) { - // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0 - return array.sort(() => Math.random() - 0.5) -} - -// padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序 -// 所以这里做一个兼容polyfill的兼容处理 -if (!String.prototype.padStart) { - // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解 - String.prototype.padStart = function(maxLength, fillString = ' ') { - if (Object.prototype.toString.call(fillString) !== '[object String]') { - throw new TypeError( - 'fillString must be String' - ) - } - const str = this - // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉 - if (str.length >= maxLength) return String(str) - - const fillLength = maxLength - str.length - let times = Math.ceil(fillLength / fillString.length) - while (times >>= 1) { - fillString += fillString - if (times === 1) { - fillString += fillString - } - } - return fillString.slice(0, fillLength) + str - } -} - -/** - * @description 格式化时间 - * @param {String|Number} dateTime 需要格式化的时间戳 - * @param {String} fmt 格式化规则 yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合 默认yyyy-mm-dd - * @returns {string} 返回格式化后的字符串 - */ -export function timeFormat(dateTime = null, formatStr = 'yyyy-mm-dd') { - let date - // 若传入时间为假值,则取当前时间 - if (!dateTime) { - date = new Date() - } - // 若为unix秒时间戳,则转为毫秒时间戳(逻辑有点奇怪,但不敢改,以保证历史兼容) - else if (/^\d{10}$/.test(dateTime.toString().trim())) { - date = new Date(dateTime * 1000) - } - // 若用户传入字符串格式时间戳,new Date无法解析,需做兼容 - else if (typeof dateTime === 'string' && /^\d+$/.test(dateTime.trim())) { - date = new Date(Number(dateTime)) - } - // 其他都认为符合 RFC 2822 规范 - else { - // 处理平台性差异,在Safari/Webkit中,new Date仅支持/作为分割符的字符串时间 - date = new Date( - typeof dateTime === 'string' - ? dateTime.replace(/-/g, '/') - : dateTime - ) - } - - const timeSource = { - 'y': date.getFullYear().toString(), // 年 - 'm': (date.getMonth() + 1).toString().padStart(2, '0'), // 月 - 'd': date.getDate().toString().padStart(2, '0'), // 日 - 'h': date.getHours().toString().padStart(2, '0'), // 时 - 'M': date.getMinutes().toString().padStart(2, '0'), // 分 - 's': date.getSeconds().toString().padStart(2, '0') // 秒 - // 有其他格式化字符需求可以继续添加,必须转化成字符串 - } - - for (const key in timeSource) { - const [ret] = new RegExp(`${key}+`).exec(formatStr) || [] - if (ret) { - // 年可能只需展示两位 - const beginIndex = key === 'y' && ret.length === 2 ? 2 : 0 - formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex)) - } - } - - return formatStr -} - -/** - * @description 时间戳转为多久之前 - * @param {String|Number} timestamp 时间戳 - * @param {String|Boolean} format - * 格式化规则如果为时间格式字符串,超出一定时间范围,返回固定的时间格式; - * 如果为布尔值false,无论什么时间,都返回多久以前的格式 - * @returns {string} 转化后的内容 - */ -export function timeFrom(timestamp = null, format = 'yyyy-mm-dd') { - if (timestamp == null) timestamp = Number(new Date()) - timestamp = parseInt(timestamp) - // 判断用户输入的时间戳是秒还是毫秒,一般前端js获取的时间戳是毫秒(13位),后端传过来的为秒(10位) - if (timestamp.toString().length == 10) timestamp *= 1000 - let timer = (new Date()).getTime() - timestamp - timer = parseInt(timer / 1000) - // 如果小于5分钟,则返回"刚刚",其他以此类推 - let tips = '' - switch (true) { - case timer < 300: - tips = '刚刚' - break - case timer >= 300 && timer < 3600: - tips = `${parseInt(timer / 60)}分钟前` - break - case timer >= 3600 && timer < 86400: - tips = `${parseInt(timer / 3600)}小时前` - break - case timer >= 86400 && timer < 2592000: - tips = `${parseInt(timer / 86400)}天前` - break - default: - // 如果format为false,则无论什么时间戳,都显示xx之前 - if (format === false) { - if (timer >= 2592000 && timer < 365 * 86400) { - tips = `${parseInt(timer / (86400 * 30))}个月前` - } else { - tips = `${parseInt(timer / (86400 * 365))}年前` - } - } else { - tips = timeFormat(timestamp, format) - } - } - return tips -} - -/** - * @description 去除空格 - * @param String str 需要去除空格的字符串 - * @param String pos both(左右)|left|right|all 默认both - */ -export function trim(str, pos = 'both') { - str = String(str) - if (pos == 'both') { - return str.replace(/^\s+|\s+$/g, '') - } - if (pos == 'left') { - return str.replace(/^\s*/, '') - } - if (pos == 'right') { - return str.replace(/(\s*$)/g, '') - } - if (pos == 'all') { - return str.replace(/\s+/g, '') - } - return str -} - -/** - * @description 对象转url参数 - * @param {object} data,对象 - * @param {Boolean} isPrefix,是否自动加上"?" - * @param {string} arrayFormat 规则 indices|brackets|repeat|comma - */ -export function queryParams(data = {}, isPrefix = true, arrayFormat = 'brackets') { - const prefix = isPrefix ? '?' : '' - const _result = [] - if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets' - for (const key in data) { - const value = data[key] - // 去掉为空的参数 - if (['', undefined, null].indexOf(value) >= 0) { - continue - } - // 如果值为数组,另行处理 - if (value.constructor === Array) { - // e.g. {ids: [1, 2, 3]} - switch (arrayFormat) { - case 'indices': - // 结果: ids[0]=1&ids[1]=2&ids[2]=3 - for (let i = 0; i < value.length; i++) { - _result.push(`${key}[${i}]=${value[i]}`) - } - break - case 'brackets': - // 结果: ids[]=1&ids[]=2&ids[]=3 - value.forEach((_value) => { - _result.push(`${key}[]=${_value}`) - }) - break - case 'repeat': - // 结果: ids=1&ids=2&ids=3 - value.forEach((_value) => { - _result.push(`${key}=${_value}`) - }) - break - case 'comma': - // 结果: ids=1,2,3 - let commaStr = '' - value.forEach((_value) => { - commaStr += (commaStr ? ',' : '') + _value - }) - _result.push(`${key}=${commaStr}`) - break - default: - value.forEach((_value) => { - _result.push(`${key}[]=${_value}`) - }) - } - } else { - _result.push(`${key}=${value}`) - } - } - return _result.length ? prefix + _result.join('&') : '' -} - -/** - * 显示消息提示框 - * @param {String} title 提示的内容,长度与 icon 取值有关。 - * @param {Number} duration 提示的延迟时间,单位毫秒,默认:2000 - */ -export function toast(title, duration = 2000) { - uni.showToast({ - title: String(title), - icon: 'none', - duration - }) -} - -/** - * @description 根据主题type值,获取对应的图标 - * @param {String} type 主题名称,primary|info|error|warning|success - * @param {boolean} fill 是否使用fill填充实体的图标 - */ -export function type2icon(type = 'success', fill = false) { - // 如果非预置值,默认为success - if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success' - let iconName = '' - // 目前(2019-12-12),info和primary使用同一个图标 - switch (type) { - case 'primary': - iconName = 'info-circle' - break - case 'info': - iconName = 'info-circle' - break - case 'error': - iconName = 'close-circle' - break - case 'warning': - iconName = 'error-circle' - break - case 'success': - iconName = 'checkmark-circle' - break - default: - iconName = 'checkmark-circle' - } - // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的 - if (fill) iconName += '-fill' - return iconName -} - -/** - * @description 数字格式化 - * @param {number|string} number 要格式化的数字 - * @param {number} decimals 保留几位小数 - * @param {string} decimalPoint 小数点符号 - * @param {string} thousandsSeparator 千分位符号 - * @returns {string} 格式化后的数字 - */ -export function priceFormat(number, decimals = 0, decimalPoint = '.', thousandsSeparator = ',') { - number = (`${number}`).replace(/[^0-9+-Ee.]/g, '') - const n = !isFinite(+number) ? 0 : +number - const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals) - const sep = (typeof thousandsSeparator === 'undefined') ? ',' : thousandsSeparator - const dec = (typeof decimalPoint === 'undefined') ? '.' : decimalPoint - let s = '' - - s = (prec ? round(n, prec) + '' : `${Math.round(n)}`).split('.') - const re = /(-?\d+)(\d{3})/ - while (re.test(s[0])) { - s[0] = s[0].replace(re, `$1${sep}$2`) - } - - if ((s[1] || '').length < prec) { - s[1] = s[1] || '' - s[1] += new Array(prec - s[1].length + 1).join('0') - } - return s.join(dec) -} - -/** - * @description 获取duration值 - * 如果带有ms或者s直接返回,如果大于一定值,认为是ms单位,小于一定值,认为是s单位 - * 比如以30位阈值,那么300大于30,可以理解为用户想要的是300ms,而不是想花300s去执行一个动画 - * @param {String|number} value 比如: "1s"|"100ms"|1|100 - * @param {boolean} unit 提示: 如果是false 默认返回number - * @return {string|number} - */ -export function getDuration(value, unit = true) { - const valueNum = parseInt(value) - if (unit) { - if (/s$/.test(value)) return value - return value > 30 ? `${value}ms` : `${value}s` - } - if (/ms$/.test(value)) return valueNum - if (/s$/.test(value)) return valueNum > 30 ? valueNum : valueNum * 1000 - return valueNum -} - -/** - * @description 日期的月或日补零操作 - * @param {String} value 需要补零的值 - */ -export function padZero(value) { - return `00${value}`.slice(-2) -} - -/** - * @description 在u-form的子组件内容发生变化,或者失去焦点时,尝试通知u-form执行校验方法 - * @param {*} instance - * @param {*} event - */ -export function formValidate(instance, event) { - const formItem = $parent.call(instance, 'u-form-item') - const form = $parent.call(instance, 'u-form') - // 如果发生变化的input或者textarea等,其父组件中有u-form-item或者u-form等,就执行form的validate方法 - // 同时将form-item的pros传递给form,让其进行精确对象验证 - if (formItem && form) { - form.validateField(formItem.prop, () => {}, event) - } -} - -/** - * @description 获取某个对象下的属性,用于通过类似'a.b.c'的形式去获取一个对象的的属性的形式 - * @param {object} obj 对象 - * @param {string} key 需要获取的属性字段 - * @returns {*} - */ -export function getProperty(obj, key) { - if (typeof obj !== 'object' || null == obj) { - return '' - } - if (typeof key !== 'string' || key === '') { - return '' - } - if (key.indexOf('.') !== -1) { - const keys = key.split('.') - let firstObj = obj[keys[0]] || {} - - for (let i = 1; i < keys.length; i++) { - if (firstObj) { - firstObj = firstObj[keys[i]] - } - } - return firstObj - } - return obj[key] -} - -/** - * @description 设置对象的属性值,如果'a.b.c'的形式进行设置 - * @param {object} obj 对象 - * @param {string} key 需要设置的属性 - * @param {string} value 设置的值 - */ -export function setProperty(obj, key, value) { - if (typeof obj !== 'object' || null == obj) { - return - } - // 递归赋值 - const inFn = function(_obj, keys, v) { - // 最后一个属性key - if (keys.length === 1) { - _obj[keys[0]] = v - return - } - // 0~length-1个key - while (keys.length > 1) { - const k = keys[0] - if (!_obj[k] || (typeof _obj[k] !== 'object')) { - _obj[k] = {} - } - const key = keys.shift() - // 自调用判断是否存在属性,不存在则自动创建对象 - inFn(_obj[k], keys, v) - } - } - - if (typeof key !== 'string' || key === '') { - - } else if (key.indexOf('.') !== -1) { // 支持多层级赋值操作 - const keys = key.split('.') - inFn(obj, keys, value) - } else { - obj[key] = value - } -} - -/** - * @description 获取当前页面路径 - */ -export function page() { - const pages = getCurrentPages() - // 某些特殊情况下(比如页面进行redirectTo时的一些时机),pages可能为空数组 - return `/${pages[pages.length - 1].route || ''}` -} - -/** - * @description 获取当前路由栈实例数组 - */ -export function pages() { - const pages = getCurrentPages() - return pages -} - -export default { - range, - getPx, - sleep, - os, - sys, - random, - guid, - $parent, - addStyle, - addUnit, - deepClone, - deepMerge, - shallowMerge, - error, - randomArray, - timeFormat, - timeFrom, - trim, - queryParams, - toast, - type2icon, - priceFormat, - getDuration, - padZero, - formValidate, - getProperty, - setProperty, - page, - pages, - // setConfig -} diff --git a/components/my-components/libs/function/platform.js b/components/my-components/libs/function/platform.js deleted file mode 100644 index 904fccc..0000000 --- a/components/my-components/libs/function/platform.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * 注意: - * 此部分内容,在vue-cli模式下,需要在vue.config.js加入如下内容才有效: - * module.exports = { - * transpileDependencies: ['uview-v2'] - * } - */ - -let platform = 'none' - -// #ifdef VUE3 -platform = 'vue3' -// #endif - -// #ifdef VUE2 -platform = 'vue2' -// #endif - -// #ifdef APP-PLUS -platform = 'plus' -// #endif - -// #ifdef APP-NVUE -platform = 'nvue' -// #endif - -// #ifdef H5 -platform = 'h5' -// #endif - -// #ifdef MP -platform = 'mp' -// #endif - -// #ifdef MP-WEIXIN -platform = 'weixin' -// #endif - -// #ifdef MP-ALIPAY -platform = 'alipay' -// #endif - -// #ifdef MP-BAIDU -platform = 'baidu' -// #endif - -// #ifdef MP-TOUTIAO -platform = 'toutiao' -// #endif - -// #ifdef MP-QQ -platform = 'qq' -// #endif - -// #ifdef MP-KUAISHOU -platform = 'kuaishou' -// #endif - -// #ifdef MP-360 -platform = '360' -// #endif - -// #ifdef QUICKAPP-WEBVIEW -platform = 'quickapp-webview' -// #endif - -// #ifdef QUICKAPP-WEBVIEW-HUAWEI -platform = 'quickapp-webview-huawei' -// #endif - -// #ifdef QUICKAPP-WEBVIEW-UNION -platform = 'quckapp-webview-union' -// #endif - -export default platform diff --git a/components/my-components/libs/function/test.js b/components/my-components/libs/function/test.js deleted file mode 100644 index f97a30f..0000000 --- a/components/my-components/libs/function/test.js +++ /dev/null @@ -1,288 +0,0 @@ -/** - * 验证电子邮箱格式 - */ -export function email(value) { - return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value) -} - -/** - * 验证手机格式 - */ -export function mobile(value) { - return /^1[23456789]\d{9}$/.test(value) -} - -/** - * 验证URL格式 - */ -export function url(value) { - return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/ - .test(value) -} - -/** - * 验证日期格式 - */ -export function date(value) { - if (!value) return false - // 判断是否数值或者字符串数值(意味着为时间戳),转为数值,否则new Date无法识别字符串时间戳 - if (number(value)) value = +value - return !/Invalid|NaN/.test(new Date(value).toString()) -} - -/** - * 验证ISO类型的日期格式 - */ -export function dateISO(value) { - return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value) -} - -/** - * 验证十进制数字 - */ -export function number(value) { - return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value) -} - -/** - * 验证字符串 - */ -export function string(value) { - return typeof value === 'string' -} - -/** - * 验证整数 - */ -export function digits(value) { - return /^\d+$/.test(value) -} - -/** - * 验证身份证号码 - */ -export function idCard(value) { - return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test( - value - ) -} - -/** - * 是否车牌号 - */ -export function carNo(value) { - // 新能源车牌 - const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/ - // 旧车牌 - const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/ - if (value.length === 7) { - return creg.test(value) - } if (value.length === 8) { - return xreg.test(value) - } - return false -} - -/** - * 金额,只允许2位小数 - */ -export function amount(value) { - // 金额,只允许保留两位小数 - return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value) -} - -/** - * 中文 - */ -export function chinese(value) { - const reg = /^[\u4e00-\u9fa5]+$/gi - return reg.test(value) -} - -/** - * 只能输入字母 - */ -export function letter(value) { - return /^[a-zA-Z]*$/.test(value) -} - -/** - * 只能是字母或者数字 - */ -export function enOrNum(value) { - // 英文或者数字 - const reg = /^[0-9a-zA-Z]*$/g - return reg.test(value) -} - -/** - * 验证是否包含某个值 - */ -export function contains(value, param) { - return value.indexOf(param) >= 0 -} - -/** - * 验证一个值范围[min, max] - */ -export function range(value, param) { - return value >= param[0] && value <= param[1] -} - -/** - * 验证一个长度范围[min, max] - */ -export function rangeLength(value, param) { - return value.length >= param[0] && value.length <= param[1] -} - -/** - * 是否固定电话 - */ -export function landline(value) { - const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/ - return reg.test(value) -} - -/** - * 判断是否为空 - */ -export function empty(value) { - switch (typeof value) { - case 'undefined': - return true - case 'string': - if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true - break - case 'boolean': - if (!value) return true - break - case 'number': - if (value === 0 || isNaN(value)) return true - break - case 'object': - if (value === null || value.length === 0) return true - for (const i in value) { - return false - } - return true - } - return false -} - -/** - * 是否json字符串 - */ -export function jsonString(value) { - if (typeof value === 'string') { - try { - const obj = JSON.parse(value) - if (typeof obj === 'object' && obj) { - return true - } - return false - } catch (e) { - return false - } - } - return false -} - -/** - * 是否数组 - */ -export function array(value) { - if (typeof Array.isArray === 'function') { - return Array.isArray(value) - } - return Object.prototype.toString.call(value) === '[object Array]' -} - -/** - * 是否对象 - */ -export function object(value) { - return Object.prototype.toString.call(value) === '[object Object]' -} - -/** - * 是否短信验证码 - */ -export function code(value, len = 6) { - return new RegExp(`^\\d{${len}}$`).test(value) -} - -/** - * 是否函数方法 - * @param {Object} value - */ -export function func(value) { - return typeof value === 'function' -} - -/** - * 是否promise对象 - * @param {Object} value - */ -export function promise(value) { - return object(value) && func(value.then) && func(value.catch) -} - -/** 是否图片格式 - * @param {Object} value - */ -export function image(value) { - const newValue = value.split('?')[0] - const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i - return IMAGE_REGEXP.test(newValue) -} - -/** - * 是否视频格式 - * @param {Object} value - */ -export function video(value) { - const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i - return VIDEO_REGEXP.test(value) -} - -/** - * 是否为正则对象 - * @param {Object} - * @return {Boolean} - */ -export function regExp(o) { - return o && Object.prototype.toString.call(o) === '[object RegExp]' -} - -export default { - email, - mobile, - url, - date, - dateISO, - number, - digits, - idCard, - carNo, - amount, - chinese, - letter, - enOrNum, - contains, - range, - rangeLength, - empty, - isEmpty: empty, - jsonString, - landline, - object, - array, - code, - func, - promise, - video, - image, - regExp, - string -} diff --git a/components/my-components/libs/function/throttle.js b/components/my-components/libs/function/throttle.js deleted file mode 100644 index 55cb1c7..0000000 --- a/components/my-components/libs/function/throttle.js +++ /dev/null @@ -1,30 +0,0 @@ -let timer; -let flag; -/** - * 节流原理:在一定时间内,只能触发一次 - * - * @param {Function} func 要执行的回调函数 - * @param {Number} wait 延时的时间 - * @param {Boolean} immediate 是否立即执行 - * @return null - */ -export function throttle(func, wait = 500, immediate = true) { - if (immediate) { - if (!flag) { - flag = true - // 如果是立即执行,则在wait毫秒内开始时执行 - typeof func === 'function' && func() - timer = setTimeout(() => { - flag = false - }, wait) - } - } else if (!flag) { - flag = true - // 如果是非立即执行,则在wait毫秒内的结束处执行 - timer = setTimeout(() => { - flag = false - typeof func === 'function' && func() - }, wait) - } -} -export default throttle diff --git a/components/my-components/libs/luch-request/adapters/index.js b/components/my-components/libs/luch-request/adapters/index.js deleted file mode 100644 index e03cf5f..0000000 --- a/components/my-components/libs/luch-request/adapters/index.js +++ /dev/null @@ -1,97 +0,0 @@ -import buildURL from '../helpers/buildURL' -import buildFullPath from '../core/buildFullPath' -import settle from '../core/settle' -import { isUndefined } from '../utils' - -/** - * 返回可选值存在的配置 - * @param {Array} keys - 可选值数组 - * @param {Object} config2 - 配置 - * @return {{}} - 存在的配置项 - */ -const mergeKeys = (keys, config2) => { - const config = {} - keys.forEach((prop) => { - if (!isUndefined(config2[prop])) { - config[prop] = config2[prop] - } - }) - return config -} -export default (config) => new Promise((resolve, reject) => { - const fullPath = buildURL(buildFullPath(config.baseURL, config.url), config.params) - const _config = { - url: fullPath, - header: config.header, - complete: (response) => { - config.fullPath = fullPath - response.config = config - try { - // 对可能字符串不是json 的情况容错 - if (typeof response.data === 'string') { - response.data = JSON.parse(response.data) - } - // eslint-disable-next-line no-empty - } catch (e) { - } - settle(resolve, reject, response) - } - } - let requestTask - if (config.method === 'UPLOAD') { - delete _config.header['content-type'] - delete _config.header['Content-Type'] - const otherConfig = { - // #ifdef MP-ALIPAY - fileType: config.fileType, - // #endif - filePath: config.filePath, - name: config.name - } - const optionalKeys = [ - // #ifdef APP-PLUS || H5 - 'files', - // #endif - // #ifdef H5 - 'file', - // #endif - // #ifdef H5 || APP-PLUS - 'timeout', - // #endif - 'formData' - ] - requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys(optionalKeys, config) }) - } else if (config.method === 'DOWNLOAD') { - // #ifdef H5 || APP-PLUS - if (!isUndefined(config.timeout)) { - _config.timeout = config.timeout - } - // #endif - requestTask = uni.downloadFile(_config) - } else { - const optionalKeys = [ - 'data', - 'method', - // #ifdef H5 || APP-PLUS || MP-ALIPAY || MP-WEIXIN - 'timeout', - // #endif - 'dataType', - // #ifndef MP-ALIPAY - 'responseType', - // #endif - // #ifdef APP-PLUS - 'sslVerify', - // #endif - // #ifdef H5 - 'withCredentials', - // #endif - // #ifdef APP-PLUS - 'firstIpv4' - // #endif - ] - requestTask = uni.request({ ..._config, ...mergeKeys(optionalKeys, config) }) - } - if (config.getTask) { - config.getTask(requestTask, config) - } -}) diff --git a/components/my-components/libs/luch-request/core/InterceptorManager.js b/components/my-components/libs/luch-request/core/InterceptorManager.js deleted file mode 100644 index 3e8728d..0000000 --- a/components/my-components/libs/luch-request/core/InterceptorManager.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict' - -function InterceptorManager() { - this.handlers = [] -} - -/** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ -InterceptorManager.prototype.use = function use(fulfilled, rejected) { - this.handlers.push({ - fulfilled, - rejected - }) - return this.handlers.length - 1 -} - -/** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ -InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null - } -} - -/** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ -InterceptorManager.prototype.forEach = function forEach(fn) { - this.handlers.forEach((h) => { - if (h !== null) { - fn(h) - } - }) -} - -export default InterceptorManager diff --git a/components/my-components/libs/luch-request/core/Request.js b/components/my-components/libs/luch-request/core/Request.js deleted file mode 100644 index cc48566..0000000 --- a/components/my-components/libs/luch-request/core/Request.js +++ /dev/null @@ -1,198 +0,0 @@ -/** - * @Class Request - * @description luch-request http请求插件 - * @version 3.0.7 - * @Author lu-ch - * @Date 2021-09-04 - * @Email webwork.s@qq.com - * 文档: https://www.quanzhan.co/luch-request/ - * github: https://github.com/lei-mu/luch-request - * DCloud: http://ext.dcloud.net.cn/plugin?id=392 - * HBuilderX: beat-3.0.4 alpha-3.0.4 - */ - -import dispatchRequest from './dispatchRequest' -import InterceptorManager from './InterceptorManager' -import mergeConfig from './mergeConfig' -import defaults from './defaults' -import { isPlainObject } from '../utils' -import clone from '../utils/clone' - -export default class Request { - /** - * @param {Object} arg - 全局配置 - * @param {String} arg.baseURL - 全局根路径 - * @param {Object} arg.header - 全局header - * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式 - * @param {String} arg.dataType = [json] - 全局默认的dataType - * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持 - * @param {Object} arg.custom - 全局默认的自定义参数 - * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序 - * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+) - * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+) - * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+) - * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300 - */ - constructor(arg = {}) { - if (!isPlainObject(arg)) { - arg = {} - console.warn('设置全局参数必须接收一个Object') - } - this.config = clone({ ...defaults, ...arg }) - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - } - } - - /** - * @Function - * @param {Request~setConfigCallback} f - 设置全局默认配置 - */ - setConfig(f) { - this.config = f(this.config) - } - - middleware(config) { - config = mergeConfig(this.config, config) - const chain = [dispatchRequest, undefined] - let promise = Promise.resolve(config) - - this.interceptors.request.forEach((interceptor) => { - chain.unshift(interceptor.fulfilled, interceptor.rejected) - }) - - this.interceptors.response.forEach((interceptor) => { - chain.push(interceptor.fulfilled, interceptor.rejected) - }) - - while (chain.length) { - promise = promise.then(chain.shift(), chain.shift()) - } - - return promise - } - - /** - * @Function - * @param {Object} config - 请求配置项 - * @prop {String} options.url - 请求路径 - * @prop {Object} options.data - 请求参数 - * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型 - * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse - * @prop {Object} [options.header = config.header] - 请求header - * @prop {Object} [options.method = config.method] - 请求方法 - * @returns {Promise} - */ - request(config = {}) { - return this.middleware(config) - } - - get(url, options = {}) { - return this.middleware({ - url, - method: 'GET', - ...options - }) - } - - post(url, data, options = {}) { - return this.middleware({ - url, - data, - method: 'POST', - ...options - }) - } - - // #ifndef MP-ALIPAY - put(url, data, options = {}) { - return this.middleware({ - url, - data, - method: 'PUT', - ...options - }) - } - - // #endif - - // #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-BAIDU - delete(url, data, options = {}) { - return this.middleware({ - url, - data, - method: 'DELETE', - ...options - }) - } - - // #endif - - // #ifdef H5 || MP-WEIXIN - connect(url, data, options = {}) { - return this.middleware({ - url, - data, - method: 'CONNECT', - ...options - }) - } - - // #endif - - // #ifdef H5 || MP-WEIXIN || MP-BAIDU - head(url, data, options = {}) { - return this.middleware({ - url, - data, - method: 'HEAD', - ...options - }) - } - - // #endif - - // #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-BAIDU - options(url, data, options = {}) { - return this.middleware({ - url, - data, - method: 'OPTIONS', - ...options - }) - } - - // #endif - - // #ifdef H5 || MP-WEIXIN - trace(url, data, options = {}) { - return this.middleware({ - url, - data, - method: 'TRACE', - ...options - }) - } - - // #endif - - upload(url, config = {}) { - config.url = url - config.method = 'UPLOAD' - return this.middleware(config) - } - - download(url, config = {}) { - config.url = url - config.method = 'DOWNLOAD' - return this.middleware(config) - } -} - -/** - * setConfig回调 - * @return {Object} - 返回操作后的config - * @callback Request~setConfigCallback - * @param {Object} config - 全局默认config - */ diff --git a/components/my-components/libs/luch-request/core/buildFullPath.js b/components/my-components/libs/luch-request/core/buildFullPath.js deleted file mode 100644 index 5eb8a17..0000000 --- a/components/my-components/libs/luch-request/core/buildFullPath.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict' - -import isAbsoluteURL from '../helpers/isAbsoluteURL' -import combineURLs from '../helpers/combineURLs' - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * @returns {string} The combined full path - */ -export default function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { - return combineURLs(baseURL, requestedURL) - } - return requestedURL -} diff --git a/components/my-components/libs/luch-request/core/defaults.js b/components/my-components/libs/luch-request/core/defaults.js deleted file mode 100644 index be375a9..0000000 --- a/components/my-components/libs/luch-request/core/defaults.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * 默认的全局配置 - */ - -export default { - baseURL: '', - header: {}, - method: 'GET', - dataType: 'json', - // #ifndef MP-ALIPAY - responseType: 'text', - // #endif - custom: {}, - // #ifdef H5 || APP-PLUS || MP-ALIPAY || MP-WEIXIN - timeout: 60000, - // #endif - // #ifdef APP-PLUS - sslVerify: true, - // #endif - // #ifdef H5 - withCredentials: false, - // #endif - // #ifdef APP-PLUS - firstIpv4: false, - // #endif - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300 - } -} diff --git a/components/my-components/libs/luch-request/core/dispatchRequest.js b/components/my-components/libs/luch-request/core/dispatchRequest.js deleted file mode 100644 index 724545c..0000000 --- a/components/my-components/libs/luch-request/core/dispatchRequest.js +++ /dev/null @@ -1,3 +0,0 @@ -import adapter from '../adapters/index' - -export default (config) => adapter(config) diff --git a/components/my-components/libs/luch-request/core/mergeConfig.js b/components/my-components/libs/luch-request/core/mergeConfig.js deleted file mode 100644 index 08f8b9b..0000000 --- a/components/my-components/libs/luch-request/core/mergeConfig.js +++ /dev/null @@ -1,103 +0,0 @@ -import { deepMerge, isUndefined } from '../utils' - -/** - * 合并局部配置优先的配置,如果局部有该配置项则用局部,如果全局有该配置项则用全局 - * @param {Array} keys - 配置项 - * @param {Object} globalsConfig - 当前的全局配置 - * @param {Object} config2 - 局部配置 - * @return {{}} - */ -const mergeKeys = (keys, globalsConfig, config2) => { - const config = {} - keys.forEach((prop) => { - if (!isUndefined(config2[prop])) { - config[prop] = config2[prop] - } else if (!isUndefined(globalsConfig[prop])) { - config[prop] = globalsConfig[prop] - } - }) - return config -} -/** - * - * @param globalsConfig - 当前实例的全局配置 - * @param config2 - 当前的局部配置 - * @return - 合并后的配置 - */ -export default (globalsConfig, config2 = {}) => { - const method = config2.method || globalsConfig.method || 'GET' - let config = { - baseURL: globalsConfig.baseURL || '', - method, - url: config2.url || '', - params: config2.params || {}, - custom: { ...(globalsConfig.custom || {}), ...(config2.custom || {}) }, - header: deepMerge(globalsConfig.header || {}, config2.header || {}) - } - const defaultToConfig2Keys = ['getTask', 'validateStatus'] - config = { ...config, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) } - - // eslint-disable-next-line no-empty - if (method === 'DOWNLOAD') { - // #ifdef H5 || APP-PLUS - if (!isUndefined(config2.timeout)) { - config.timeout = config2.timeout - } else if (!isUndefined(globalsConfig.timeout)) { - config.timeout = globalsConfig.timeout - } - // #endif - } else if (method === 'UPLOAD') { - delete config.header['content-type'] - delete config.header['Content-Type'] - const uploadKeys = [ - // #ifdef APP-PLUS || H5 - 'files', - // #endif - // #ifdef MP-ALIPAY - 'fileType', - // #endif - // #ifdef H5 - 'file', - // #endif - 'filePath', - 'name', - // #ifdef H5 || APP-PLUS - 'timeout', - // #endif - 'formData' - ] - uploadKeys.forEach((prop) => { - if (!isUndefined(config2[prop])) { - config[prop] = config2[prop] - } - }) - // #ifdef H5 || APP-PLUS - if (isUndefined(config.timeout) && !isUndefined(globalsConfig.timeout)) { - config.timeout = globalsConfig.timeout - } - // #endif - } else { - const defaultsKeys = [ - 'data', - // #ifdef H5 || APP-PLUS || MP-ALIPAY || MP-WEIXIN - 'timeout', - // #endif - 'dataType', - // #ifndef MP-ALIPAY - 'responseType', - // #endif - // #ifdef APP-PLUS - 'sslVerify', - // #endif - // #ifdef H5 - 'withCredentials', - // #endif - // #ifdef APP-PLUS - 'firstIpv4' - // #endif - ] - config = { ...config, ...mergeKeys(defaultsKeys, globalsConfig, config2) } - } - - return config -} diff --git a/components/my-components/libs/luch-request/core/settle.js b/components/my-components/libs/luch-request/core/settle.js deleted file mode 100644 index 8d3638f..0000000 --- a/components/my-components/libs/luch-request/core/settle.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ -export default function settle(resolve, reject, response) { - const { validateStatus } = response.config - const status = response.statusCode - if (status && (!validateStatus || validateStatus(status))) { - resolve(response) - } else { - reject(response) - } -} diff --git a/components/my-components/libs/luch-request/helpers/buildURL.js b/components/my-components/libs/luch-request/helpers/buildURL.js deleted file mode 100644 index 472ad6a..0000000 --- a/components/my-components/libs/luch-request/helpers/buildURL.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict' - -import * as utils from '../utils' - -function encode(val) { - return encodeURIComponent(val) - .replace(/%40/gi, '@') - .replace(/%3A/gi, ':') - .replace(/%24/g, '$') - .replace(/%2C/gi, ',') - .replace(/%20/g, '+') - .replace(/%5B/gi, '[') - .replace(/%5D/gi, ']') -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @returns {string} The formatted url - */ -export default function buildURL(url, params) { - /* eslint no-param-reassign:0 */ - if (!params) { - return url - } - - let serializedParams - if (utils.isURLSearchParams(params)) { - serializedParams = params.toString() - } else { - const parts = [] - - utils.forEach(params, (val, key) => { - if (val === null || typeof val === 'undefined') { - return - } - - if (utils.isArray(val)) { - key = `${key}[]` - } else { - val = [val] - } - - utils.forEach(val, (v) => { - if (utils.isDate(v)) { - v = v.toISOString() - } else if (utils.isObject(v)) { - v = JSON.stringify(v) - } - parts.push(`${encode(key)}=${encode(v)}`) - }) - }) - - serializedParams = parts.join('&') - } - - if (serializedParams) { - const hashmarkIndex = url.indexOf('#') - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex) - } - - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams - } - - return url -} diff --git a/components/my-components/libs/luch-request/helpers/combineURLs.js b/components/my-components/libs/luch-request/helpers/combineURLs.js deleted file mode 100644 index ac7c124..0000000 --- a/components/my-components/libs/luch-request/helpers/combineURLs.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ -export default function combineURLs(baseURL, relativeURL) { - return relativeURL - ? `${baseURL.replace(/\/+$/, '')}/${relativeURL.replace(/^\/+/, '')}` - : baseURL -} diff --git a/components/my-components/libs/luch-request/helpers/isAbsoluteURL.js b/components/my-components/libs/luch-request/helpers/isAbsoluteURL.js deleted file mode 100644 index 63c6647..0000000 --- a/components/my-components/libs/luch-request/helpers/isAbsoluteURL.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -export default function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url) -} diff --git a/components/my-components/libs/luch-request/index.d.ts b/components/my-components/libs/luch-request/index.d.ts deleted file mode 100644 index e939ce1..0000000 --- a/components/my-components/libs/luch-request/index.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -type AnyObject = Record -type HttpPromise = Promise>; -type Tasks = UniApp.RequestTask | UniApp.UploadTask | UniApp.DownloadTask -export interface RequestTask { - abort: () => void; - offHeadersReceived: () => void; - onHeadersReceived: () => void; -} -export interface HttpRequestConfig { - /** 请求基地址 */ - baseURL?: string; - /** 请求服务器接口地址 */ - url?: string; - - /** 请求查询参数,自动拼接为查询字符串 */ - params?: AnyObject; - /** 请求体参数 */ - data?: AnyObject; - - /** 文件对应的 key */ - name?: string; - /** HTTP 请求中其他额外的 form data */ - formData?: AnyObject; - /** 要上传文件资源的路径。 */ - filePath?: string; - /** 需要上传的文件列表。使用 files 时,filePath 和 name 不生效,App、H5( 2.6.15+) */ - files?: Array<{ - name?: string; - file?: File; - uri: string; - }>; - /** 要上传的文件对象,仅H5(2.6.15+)支持 */ - file?: File; - - /** 请求头信息 */ - header?: AnyObject; - /** 请求方式 */ - method?: "GET" | "POST" | "PUT" | "DELETE" | "CONNECT" | "HEAD" | "OPTIONS" | "TRACE" | "UPLOAD" | "DOWNLOAD"; - /** 如果设为 json,会尝试对返回的数据做一次 JSON.parse */ - dataType?: string; - /** 设置响应的数据类型,支付宝小程序不支持 */ - responseType?: "text" | "arraybuffer"; - /** 自定义参数 */ - custom?: AnyObject; - /** 超时时间,仅微信小程序(2.10.0)、支付宝小程序支持 */ - timeout?: number; - /** DNS解析时优先使用ipv4,仅 App-Android 支持 (HBuilderX 2.8.0+) */ - firstIpv4?: boolean; - /** 验证 ssl 证书 仅5+App安卓端支持(HBuilderX 2.3.3+) */ - sslVerify?: boolean; - /** 跨域请求时是否携带凭证(cookies)仅H5支持(HBuilderX 2.6.15+) */ - withCredentials?: boolean; - - /** 返回当前请求的task, options。请勿在此处修改options。 */ - getTask?: (task: T, options: HttpRequestConfig) => void; - /** 全局自定义验证器 */ - validateStatus?: (statusCode: number) => boolean | void; -} -export interface HttpResponse { - config: HttpRequestConfig; - statusCode: number; - cookies: Array; - data: T; - errMsg: string; - header: AnyObject; -} -export interface HttpUploadResponse { - config: HttpRequestConfig; - statusCode: number; - data: T; - errMsg: string; -} -export interface HttpDownloadResponse extends HttpResponse { - tempFilePath: string; -} -export interface HttpError { - config: HttpRequestConfig; - statusCode?: number; - cookies?: Array; - data?: any; - errMsg: string; - header?: AnyObject; -} -export interface HttpInterceptorManager { - use( - onFulfilled?: (config: V) => Promise | V, - onRejected?: (config: E) => Promise | E - ): void; - eject(id: number): void; -} -export abstract class HttpRequestAbstract { - constructor(config?: HttpRequestConfig); - config: HttpRequestConfig; - interceptors: { - request: HttpInterceptorManager; - response: HttpInterceptorManager; - } - middleware(config: HttpRequestConfig): HttpPromise; - request(config: HttpRequestConfig): HttpPromise; - get(url: string, config?: HttpRequestConfig): HttpPromise; - upload(url: string, config?: HttpRequestConfig): HttpPromise; - delete(url: string, data?: AnyObject, config?: HttpRequestConfig): HttpPromise; - head(url: string, data?: AnyObject, config?: HttpRequestConfig): HttpPromise; - post(url: string, data?: AnyObject, config?: HttpRequestConfig): HttpPromise; - put(url: string, data?: AnyObject, config?: HttpRequestConfig): HttpPromise; - connect(url: string, data?: AnyObject, config?: HttpRequestConfig): HttpPromise; - options(url: string, data?: AnyObject, config?: HttpRequestConfig): HttpPromise; - trace(url: string, data?: AnyObject, config?: HttpRequestConfig): HttpPromise; - - download(url: string, config?: HttpRequestConfig): Promise; - - setConfig(onSend: (config: HttpRequestConfig) => HttpRequestConfig): void; -} - -declare class HttpRequest extends HttpRequestAbstract { } -export default HttpRequest; diff --git a/components/my-components/libs/luch-request/index.js b/components/my-components/libs/luch-request/index.js deleted file mode 100644 index 8fb2b44..0000000 --- a/components/my-components/libs/luch-request/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import Request from './core/Request' - -export default Request diff --git a/components/my-components/libs/luch-request/utils.js b/components/my-components/libs/luch-request/utils.js deleted file mode 100644 index 847283d..0000000 --- a/components/my-components/libs/luch-request/utils.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict' - -// utils is a library of generic helper functions non-specific to axios - -const { toString } = Object.prototype - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ -export function isArray(val) { - return toString.call(val) === '[object Array]' -} - -/** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ -export function isObject(val) { - return val !== null && typeof val === 'object' -} - -/** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ -export function isDate(val) { - return toString.call(val) === '[object Date]' -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -export function isURLSearchParams(val) { - return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams -} - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ -export function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /* eslint no-param-reassign:0 */ - obj = [obj] - } - - if (isArray(obj)) { - // Iterate over array values - for (let i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj) - } - } else { - // Iterate over object keys - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj) - } - } - } -} - -/** - * 是否为boolean 值 - * @param val - * @returns {boolean} - */ -export function isBoolean(val) { - return typeof val === 'boolean' -} - -/** - * 是否为真正的对象{} new Object - * @param {any} obj - 检测的对象 - * @returns {boolean} - */ -export function isPlainObject(obj) { - return Object.prototype.toString.call(obj) === '[object Object]' -} - -/** - * Function equal to merge with the difference being that no reference - * to original objects is kept. - * - * @see merge - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -export function deepMerge(/* obj1, obj2, obj3, ... */) { - const result = {} - function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { - result[key] = deepMerge(result[key], val) - } else if (typeof val === 'object') { - result[key] = deepMerge({}, val) - } else { - result[key] = val - } - } - for (let i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue) - } - return result -} - -export function isUndefined(val) { - return typeof val === 'undefined' -} diff --git a/components/my-components/libs/luch-request/utils/clone.js b/components/my-components/libs/luch-request/utils/clone.js deleted file mode 100644 index 2fee704..0000000 --- a/components/my-components/libs/luch-request/utils/clone.js +++ /dev/null @@ -1,264 +0,0 @@ -/* eslint-disable */ -var clone = (function() { - 'use strict'; - - function _instanceof(obj, type) { - return type != null && obj instanceof type; - } - - var nativeMap; - try { - nativeMap = Map; - } catch(_) { - // maybe a reference error because no `Map`. Give it a dummy value that no - // value will ever be an instanceof. - nativeMap = function() {}; - } - - var nativeSet; - try { - nativeSet = Set; - } catch(_) { - nativeSet = function() {}; - } - - var nativePromise; - try { - nativePromise = Promise; - } catch(_) { - nativePromise = function() {}; - } - - /** - * Clones (copies) an Object using deep copying. - * - * This function supports circular references by default, but if you are certain - * there are no circular references in your object, you can save some CPU time - * by calling clone(obj, false). - * - * Caution: if `circular` is false and `parent` contains circular references, - * your program may enter an infinite loop and crash. - * - * @param `parent` - the object to be cloned - * @param `circular` - set to true if the object to be cloned may contain - * circular references. (optional - true by default) - * @param `depth` - set to a number if the object is only to be cloned to - * a particular depth. (optional - defaults to Infinity) - * @param `prototype` - sets the prototype to be used when cloning an object. - * (optional - defaults to parent prototype). - * @param `includeNonEnumerable` - set to true if the non-enumerable properties - * should be cloned as well. Non-enumerable properties on the prototype - * chain will be ignored. (optional - false by default) - */ - function clone(parent, circular, depth, prototype, includeNonEnumerable) { - if (typeof circular === 'object') { - depth = circular.depth; - prototype = circular.prototype; - includeNonEnumerable = circular.includeNonEnumerable; - circular = circular.circular; - } - // maintain two arrays for circular references, where corresponding parents - // and children have the same index - var allParents = []; - var allChildren = []; - - var useBuffer = typeof Buffer != 'undefined'; - - if (typeof circular == 'undefined') - circular = true; - - if (typeof depth == 'undefined') - depth = Infinity; - - // recurse this function so we don't reset allParents and allChildren - function _clone(parent, depth) { - // cloning null always returns null - if (parent === null) - return null; - - if (depth === 0) - return parent; - - var child; - var proto; - if (typeof parent != 'object') { - return parent; - } - - if (_instanceof(parent, nativeMap)) { - child = new nativeMap(); - } else if (_instanceof(parent, nativeSet)) { - child = new nativeSet(); - } else if (_instanceof(parent, nativePromise)) { - child = new nativePromise(function (resolve, reject) { - parent.then(function(value) { - resolve(_clone(value, depth - 1)); - }, function(err) { - reject(_clone(err, depth - 1)); - }); - }); - } else if (clone.__isArray(parent)) { - child = []; - } else if (clone.__isRegExp(parent)) { - child = new RegExp(parent.source, __getRegExpFlags(parent)); - if (parent.lastIndex) child.lastIndex = parent.lastIndex; - } else if (clone.__isDate(parent)) { - child = new Date(parent.getTime()); - } else if (useBuffer && Buffer.isBuffer(parent)) { - if (Buffer.from) { - // Node.js >= 5.10.0 - child = Buffer.from(parent); - } else { - // Older Node.js versions - child = new Buffer(parent.length); - parent.copy(child); - } - return child; - } else if (_instanceof(parent, Error)) { - child = Object.create(parent); - } else { - if (typeof prototype == 'undefined') { - proto = Object.getPrototypeOf(parent); - child = Object.create(proto); - } - else { - child = Object.create(prototype); - proto = prototype; - } - } - - if (circular) { - var index = allParents.indexOf(parent); - - if (index != -1) { - return allChildren[index]; - } - allParents.push(parent); - allChildren.push(child); - } - - if (_instanceof(parent, nativeMap)) { - parent.forEach(function(value, key) { - var keyChild = _clone(key, depth - 1); - var valueChild = _clone(value, depth - 1); - child.set(keyChild, valueChild); - }); - } - if (_instanceof(parent, nativeSet)) { - parent.forEach(function(value) { - var entryChild = _clone(value, depth - 1); - child.add(entryChild); - }); - } - - for (var i in parent) { - var attrs = Object.getOwnPropertyDescriptor(parent, i); - if (attrs) { - child[i] = _clone(parent[i], depth - 1); - } - - try { - var objProperty = Object.getOwnPropertyDescriptor(parent, i); - if (objProperty.set === 'undefined') { - // no setter defined. Skip cloning this property - continue; - } - child[i] = _clone(parent[i], depth - 1); - } catch(e){ - if (e instanceof TypeError) { - // when in strict mode, TypeError will be thrown if child[i] property only has a getter - // we can't do anything about this, other than inform the user that this property cannot be set. - continue - } else if (e instanceof ReferenceError) { - //this may happen in non strict mode - continue - } - } - - } - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(parent); - for (var i = 0; i < symbols.length; i++) { - // Don't need to worry about cloning a symbol because it is a primitive, - // like a number or string. - var symbol = symbols[i]; - var descriptor = Object.getOwnPropertyDescriptor(parent, symbol); - if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { - continue; - } - child[symbol] = _clone(parent[symbol], depth - 1); - Object.defineProperty(child, symbol, descriptor); - } - } - - if (includeNonEnumerable) { - var allPropertyNames = Object.getOwnPropertyNames(parent); - for (var i = 0; i < allPropertyNames.length; i++) { - var propertyName = allPropertyNames[i]; - var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName); - if (descriptor && descriptor.enumerable) { - continue; - } - child[propertyName] = _clone(parent[propertyName], depth - 1); - Object.defineProperty(child, propertyName, descriptor); - } - } - - return child; - } - - return _clone(parent, depth); - } - - /** - * Simple flat clone using prototype, accepts only objects, usefull for property - * override on FLAT configuration object (no nested props). - * - * USE WITH CAUTION! This may not behave as you wish if you do not know how this - * works. - */ - clone.clonePrototype = function clonePrototype(parent) { - if (parent === null) - return null; - - var c = function () {}; - c.prototype = parent; - return new c(); - }; - -// private utility functions - - function __objToStr(o) { - return Object.prototype.toString.call(o); - } - clone.__objToStr = __objToStr; - - function __isDate(o) { - return typeof o === 'object' && __objToStr(o) === '[object Date]'; - } - clone.__isDate = __isDate; - - function __isArray(o) { - return typeof o === 'object' && __objToStr(o) === '[object Array]'; - } - clone.__isArray = __isArray; - - function __isRegExp(o) { - return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; - } - clone.__isRegExp = __isRegExp; - - function __getRegExpFlags(re) { - var flags = ''; - if (re.global) flags += 'g'; - if (re.ignoreCase) flags += 'i'; - if (re.multiline) flags += 'm'; - return flags; - } - clone.__getRegExpFlags = __getRegExpFlags; - - return clone; -})(); - -export default clone diff --git a/components/my-components/libs/mixin/button.js b/components/my-components/libs/mixin/button.js deleted file mode 100644 index 73b047e..0000000 --- a/components/my-components/libs/mixin/button.js +++ /dev/null @@ -1,18 +0,0 @@ -import { defineMixin } from '../vue' - -export const buttonMixin = defineMixin({ - props: { - lang: String, - sessionFrom: String, - sendMessageTitle: String, - sendMessagePath: String, - sendMessageImg: String, - showMessageCard: Boolean, - appParameter: String, - formType: String, - openType: String - } -}) - -export default buttonMixin - diff --git a/components/my-components/libs/mixin/mixin.js b/components/my-components/libs/mixin/mixin.js deleted file mode 100644 index 3973e9d..0000000 --- a/components/my-components/libs/mixin/mixin.js +++ /dev/null @@ -1,198 +0,0 @@ -import { defineMixin } from '../vue' -import { deepMerge, $parent, sleep } from '../function/index' -import test from '../function/test' -import route from '../util/route' -// #ifdef APP-NVUE -// 由于weex为阿里的KPI业绩考核的产物,所以不支持百分比单位,这里需要通过dom查询组件的宽度 -const dom = uni.requireNativePlugin('dom') -// #endif - -export const mixin = defineMixin({ - // 定义每个组件都可能需要用到的外部样式以及类名 - props: { - // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式 - customStyle: { - type: [Object, String], - default: () => ({}) - }, - customClass: { - type: String, - default: '' - }, - // 跳转的页面路径 - url: { - type: String, - default: '' - }, - // 页面跳转的类型 - linkType: { - type: String, - default: 'navigateTo' - } - }, - data() { - return {} - }, - onLoad() { - // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出 - this.$u.getRect = this.$uGetRect - }, - created() { - // 组件当中,只有created声明周期,为了能在组件使用,故也在created中将方法挂载到$u - this.$u.getRect = this.$uGetRect - }, - computed: { - // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式 - // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx - // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大) - $u() { - // #ifndef APP-NVUE - // 在非nvue端,移除props,http,mixin等对象,避免在小程序setData时数据过大影响性能 - return deepMerge(uni.$u, { - props: undefined, - http: undefined, - mixin: undefined - }) - // #endif - // #ifdef APP-NVUE - return uni.$u - // #endif - }, - /** - * 生成bem规则类名 - * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用 - * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式 - * @param {String} name 组件名称 - * @param {Array} fixed 一直会存在的类名 - * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名 - * @returns {Array|string} - */ - bem() { - return function (name, fixed, change) { - // 类名前缀 - const prefix = `u-${name}--` - const classes = {} - if (fixed) { - fixed.map((item) => { - // 这里的类名,会一直存在 - classes[prefix + this[item]] = true - }) - } - if (change) { - change.map((item) => { - // 这里的类名,会根据this[item]的值为true或者false,而进行添加或者移除某一个类 - this[item] ? (classes[prefix + item] = this[item]) : (delete classes[prefix + item]) - }) - } - return Object.keys(classes) - // 支付宝,头条小程序无法动态绑定一个数组类名,否则解析出来的结果会带有",",而导致失效 - // #ifdef MP-ALIPAY || MP-TOUTIAO || MP-LARK - .join(' ') - // #endif - } - } - }, - methods: { - // 跳转某一个页面 - openPage(urlKey = 'url') { - const url = this[urlKey] - if (url) { - // h5官方回应:发行h5会自动摇树优化,所有使用uni的地方,都会被直接转换成具体的API调用 https://ask.dcloud.net.cn/question/161523?notification_id-1201922__rf-false__item_id-226372 - // 使用封装的 route 进行跳转(直接调用方法),不使用 uni 对象 - route({ type: this.linkType, url }) - // 执行类似uni.navigateTo的方法 - // uni[this.linkType]({ - // url - // }) - } - }, - // 查询节点信息 - // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21) - // 解决办法为在组件根部再套一个没有任何作用的view元素 - $uGetRect(selector, all) { - return new Promise((resolve) => { - // #ifndef APP-NVUE - uni.createSelectorQuery() - .in(this)[all ? 'selectAll' : 'select'](selector) - .boundingClientRect((rect) => { - if (all && Array.isArray(rect) && rect.length) { - resolve(rect) - } - if (!all && rect) { - resolve(rect) - } - }) - .exec() - // #endif - - // #ifdef APP-NVUE - sleep(30).then(() => { - let selectorNvue = selector.substring(1) // 去掉开头的#或者. - let selectorRef = this.$refs[selectorNvue] - if (!selectorRef) { - // console.log('不存在元素,请检查是否设置了ref属性' + selectorNvue + '。') - resolve({ - with: 0, - height: 0, - left: 0, - right: 0, - top: 0, - bottom: 0 - }) - } - dom.getComponentRect(selectorRef, res => { - // console.log(res) - resolve(res.size) - }) - }) - // #endif - }) - }, - getParentData(parentName = '') { - // 避免在created中去定义parent变量 - if (!this.parent) this.parent = {} - // 这里的本质原理是,通过获取父组件实例(也即类似u-radio的父组件u-radio-group的this) - // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性 - // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化 - // 此处并不会自动更新子组件的数据,而是依赖父组件u-radio-group去监听data的变化,手动调用更新子组件的方法去重新获取 - this.parent = $parent.call(this, parentName) - if (this.parent.children) { - // 如果父组件的children不存在本组件的实例,才将本实例添加到父组件的children中 - this.parent.children.indexOf(this) === -1 && this.parent.children.push(this) - } - if (this.parent && this.parentData) { - // 历遍parentData中的属性,将parent中的同名属性赋值给parentData - Object.keys(this.parentData).map((key) => { - this.parentData[key] = this.parent[key] - }) - } - }, - // 阻止事件冒泡 - preventEvent(e) { - e && typeof (e.stopPropagation) === 'function' && e.stopPropagation() - }, - // 空操作 - noop(e) { - this.preventEvent(e) - } - }, - onReachBottom() { - uni.$emit('uOnReachBottom') - }, - beforeUnmount() { - // 判断当前页面是否存在parent和chldren,一般在checkbox和checkbox-group父子联动的场景会有此情况 - // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱 - if (this.parent && test.array(this.parent.children)) { - // 组件销毁时,移除父组件中的children数组中对应的实例 - const childrenList = this.parent.children - childrenList.map((child, index) => { - // 如果相等,则移除 - if (child === this) { - childrenList.splice(index, 1) - } - }) - } - } -}) - -export default mixin diff --git a/components/my-components/libs/mixin/mpMixin.js b/components/my-components/libs/mixin/mpMixin.js deleted file mode 100644 index ff224c4..0000000 --- a/components/my-components/libs/mixin/mpMixin.js +++ /dev/null @@ -1,13 +0,0 @@ -import { defineMixin } from '../vue' - -export const mpMixin = defineMixin({ - // #ifdef MP-WEIXIN - // 将自定义节点设置成虚拟的,更加接近Vue组件的表现,能更好的使用flex属性 - options: { - virtualHost: true - } - // #endif -}) - -export default mpMixin - diff --git a/components/my-components/libs/mixin/mpShare.js b/components/my-components/libs/mixin/mpShare.js deleted file mode 100644 index caf53c3..0000000 --- a/components/my-components/libs/mixin/mpShare.js +++ /dev/null @@ -1,26 +0,0 @@ -import { defineMixin } from '../vue' -import { queryParams } from '../function/index' -export const mpShare = defineMixin({ - data() { - return { - mpShare: { - title: '', // 默认为小程序名称 - path: '', // 默认为当前页面路径 - imageUrl: '' // 默认为当前页面的截图 - } - } - }, - async onLoad(options) { - var pages = getCurrentPages(); - var page = pages[pages.length - 1]; - this.mpShare.path = page.route + queryParams(options); - }, - onShareAppMessage(res) { - if (res.from === 'button') {// 来自页面内分享按钮 - console.log(res.target) - } - return this.mpShare; - } -}) - -export default mpShare diff --git a/components/my-components/libs/mixin/openType.js b/components/my-components/libs/mixin/openType.js deleted file mode 100644 index a3619d5..0000000 --- a/components/my-components/libs/mixin/openType.js +++ /dev/null @@ -1,27 +0,0 @@ -import { defineMixin } from '../vue' - -export const openType = defineMixin({ - props: { - openType: String - }, - methods: { - onGetUserInfo(event) { - this.$emit('getuserinfo', event.detail) - }, - onContact(event) { - this.$emit('contact', event.detail) - }, - onGetPhoneNumber(event) { - this.$emit('getphonenumber', event.detail) - }, - onError(event) { - this.$emit('error', event.detail) - }, - onLaunchApp(event) { - this.$emit('launchapp', event.detail) - }, - onOpenSetting(event) { - this.$emit('opensetting', event.detail) - } - } -}) diff --git a/components/my-components/libs/mixin/style.js b/components/my-components/libs/mixin/style.js deleted file mode 100644 index 2b34c76..0000000 --- a/components/my-components/libs/mixin/style.js +++ /dev/null @@ -1,249 +0,0 @@ -import { defineMixin } from '../vue' -import { addStyle, deepMerge, addUnit, trim } from '../function/index' - -export const style = defineMixin({ - props: { - // flex排列方式 - flexDirection: { - type: String, - default: '' - }, - // flex-direction的简写 - fd: { - type: String, - default: '' - }, - // 展示类型 - display: { - type: String, - default: '' - }, - // display简写 - d: { - type: String, - default: '' - }, - // 主轴排列方式 - justifyContent: { - type: String, - default: '' - }, - // justifyContent的简写 - jc: { - type: String, - default: '' - }, - // 纵轴排列方式 - alignItems: { - type: String, - default: '' - }, - // align-items的简写 - ai: { - type: String, - default: '' - }, - color: { - type: String, - default: '' - }, - // color简写 - c: { - type: String, - default: '' - }, - // 字体大小 - fontSize: { - type: [String, Number], - default: 0 - }, - // font-size简写 - fs: { - type: [String, Number], - default: '' - }, - margin: { - type: [String, Number], - default: 0 - }, - // margin简写 - m: { - type: [String, Number], - default: 0 - }, - // margin-top - marginTop: { - type: [String, Number], - default: 0 - }, - // margin-top简写 - mt: { - type: [String, Number], - default: 0 - }, - // margin-right - marginRight: { - type: [String, Number], - default: 0 - }, - // margin-right简写 - mr: { - type: [String, Number], - default: 0 - }, - // margin-bottom - marginBottom: { - type: [String, Number], - default: 0 - }, - // margin-bottom简写 - mb: { - type: [String, Number], - default: 0 - }, - // margin-left - marginLeft: { - type: [String, Number], - default: 0 - }, - // margin-left简写 - ml: { - type: [String, Number], - default: 0 - }, - // padding-left - paddingLeft: { - type: [String, Number], - default: 0 - }, - // padding-left简写 - pl: { - type: [String, Number], - default: 0 - }, - // padding-top - paddingTop: { - type: [String, Number], - default: 0 - }, - // padding-top简写 - pt: { - type: [String, Number], - default: 0 - }, - // padding-right - paddingRight: { - type: [String, Number], - default: 0 - }, - // padding-right简写 - pr: { - type: [String, Number], - default: 0 - }, - // padding-bottom - paddingBottom: { - type: [String, Number], - default: 0 - }, - // padding-bottom简写 - pb: { - type: [String, Number], - default: 0 - }, - // border-radius - borderRadius: { - type: [String, Number], - default: 0 - }, - // border-radius简写 - radius: { - type: [String, Number], - default: 0 - }, - // transform - transform: { - type: String, - default: '' - }, - // 定位 - position: { - type: String, - default: '' - }, - // position简写 - pos: { - type: String, - default: '' - }, - // 宽度 - width: { - type: [String, Number], - default: null - }, - // width简写 - w: { - type: [String, Number], - default: null - }, - // 高度 - height: { - type: [String, Number], - default: null - }, - // height简写 - h: { - type: [String, Number], - default: null - }, - top: { - type: [String, Number], - default: 0 - }, - right: { - type: [String, Number], - default: 0 - }, - bottom: { - type: [String, Number], - default: 0 - }, - left: { - type: [String, Number], - default: 0 - } - }, - computed: { - viewStyle() { - const style = {} - const addStyleTmp = addStyle(this.width || this.w) - && (style.width = addStyle(this.width || this.w))(this.height || this.h) - && (style.height = addStyle(this.height || this.h))(this.margin || this.m) - && (style.margin = addStyle(this.margin || this.m))(this.marginTop || this.mt) - && (style.marginTop = addStyle(this.marginTop || this.mt))(this.marginRight || this.mr) - && (style.marginRight = addStyle(this.marginRight || this.mr))(this.marginBottom || this.mb) - && (style.marginBottom = addStyle(this.marginBottom || this.mb))(this.marginLeft || this.ml) - && (style.marginLeft = addStyle(this.marginLeft || this.ml))(this.padding || this.p) - && (style.padding = addStyle(this.padding || this.p))(this.paddingTop || this.pt) - && (style.paddingTop = addStyle(this.paddingTop || this.pt))(this.paddingRight || this.pr) - && (style.paddingRight = addStyle(this.paddingRight || this.pr))(this.paddingBottom || this.pb) - && (style.paddingBottom = addStyle(this.paddingBottom || this.pb))(this.paddingLeft || this.pl) - && (style.paddingLeft = addStyle(this.paddingLeft || this.pl))(this.color || this.c) - && (style.color = this.color || this.c)(this.fontSize || this.fs) - && (style.fontSize = this.fontSize || this.fs)(this.borderRadius || this.radius) - && (style.borderRadius = this.borderRadius || this.radius)(this.position || this.pos) - && (this.position = this.position || this.pos)(this.flexDirection || this.fd) - && (this.flexDirection = this.flexDirection || this.fd)(this.justifyContent || jc) - && (this.justifyContent = this.justifyContent || jc)(this.alignItems || ai) - && (this.alignItems = this.alignItems || ai) - return deepMerge(style, addStyleTmp(this.customStyle)) - } - }, - methods: { - // 获取margin或者padding的单位,比如padding: 0 20转为padding: 0 20px - getUnit(unit = '') { - // 取出两端空格,分隔成数组,再对数组的每个元素添加单位,最后再合并成字符串 - return trim(unit).split(' ').map((item) => addUnit(item)).join(' ') - } - } -}) diff --git a/components/my-components/libs/mixin/touch.js b/components/my-components/libs/mixin/touch.js deleted file mode 100644 index 9dfc2c6..0000000 --- a/components/my-components/libs/mixin/touch.js +++ /dev/null @@ -1,61 +0,0 @@ -import { defineMixin } from '../vue' - -const MIN_DISTANCE = 10 - -function getDirection(x, y) { - if (x > y && x > MIN_DISTANCE) { - return 'horizontal' - } - if (y > x && y > MIN_DISTANCE) { - return 'vertical' - } - return '' -} - -export const touchMixin = defineMixin({ - methods: { - getTouchPoint(e) { - if (!e) { - return { - x: 0, - y: 0 - } - } if (e.touches && e.touches[0]) { - return { - x: e.touches[0].pageX, - y: e.touches[0].pageY - } - } if (e.changedTouches && e.changedTouches[0]) { - return { - x: e.changedTouches[0].pageX, - y: e.changedTouches[0].pageY - } - } - return { - x: e.clientX || 0, - y: e.clientY || 0 - } - }, - resetTouchStatus() { - this.direction = '' - this.deltaX = 0 - this.deltaY = 0 - this.offsetX = 0 - this.offsetY = 0 - }, - touchStart(event) { - this.resetTouchStatus() - const touch = this.getTouchPoint(event) - this.startX = touch.x - this.startY = touch.y - }, - touchMove(event) { - const touch = this.getTouchPoint(event) - this.deltaX = touch.x - this.startX - this.deltaY = touch.y - this.startY - this.offsetX = Math.abs(this.deltaX) - this.offsetY = Math.abs(this.deltaY) - this.direction = this.direction || getDirection(this.offsetX, this.offsetY) - } - } -}) diff --git a/components/my-components/libs/util/async-validator.js b/components/my-components/libs/util/async-validator.js deleted file mode 100644 index 9e114df..0000000 --- a/components/my-components/libs/util/async-validator.js +++ /dev/null @@ -1,1343 +0,0 @@ -function _extends() { - _extends = Object.assign || function (target) { - for (let i = 1; i < arguments.length; i++) { - const source = arguments[i] - - for (const key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target - } - - return _extends.apply(this, arguments) -} - -/* eslint no-console:0 */ -const formatRegExp = /%[sdj%]/g -let warning = function warning() {} // don't print warning message when in production env or node runtime - -if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production' && typeof window - !== 'undefined' && typeof document !== 'undefined') { - warning = function warning(type, errors) { - if (typeof console !== 'undefined' && console.warn) { - if (errors.every((e) => typeof e === 'string')) { - console.warn(type, errors) - } - } - } -} - -function convertFieldsError(errors) { - if (!errors || !errors.length) return null - const fields = {} - errors.forEach((error) => { - const { field } = error - fields[field] = fields[field] || [] - fields[field].push(error) - }) - return fields -} - -function format() { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key] - } - - let i = 1 - const f = args[0] - const len = args.length - - if (typeof f === 'function') { - return f.apply(null, args.slice(1)) - } - - if (typeof f === 'string') { - let str = String(f).replace(formatRegExp, (x) => { - if (x === '%%') { - return '%' - } - - if (i >= len) { - return x - } - - switch (x) { - case '%s': - return String(args[i++]) - - case '%d': - return Number(args[i++]) - - case '%j': - try { - return JSON.stringify(args[i++]) - } catch (_) { - return '[Circular]' - } - - break - - default: - return x - } - }) - - for (let arg = args[i]; i < len; arg = args[++i]) { - str += ` ${arg}` - } - - return str - } - - return f -} - -function isNativeStringType(type) { - return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern' -} - -function isEmptyValue(value, type) { - if (value === undefined || value === null) { - return true - } - - if (type === 'array' && Array.isArray(value) && !value.length) { - return true - } - - if (isNativeStringType(type) && typeof value === 'string' && !value) { - return true - } - - return false -} - -function asyncParallelArray(arr, func, callback) { - const results = [] - let total = 0 - const arrLength = arr.length - - function count(errors) { - results.push.apply(results, errors) - total++ - - if (total === arrLength) { - callback(results) - } - } - - arr.forEach((a) => { - func(a, count) - }) -} - -function asyncSerialArray(arr, func, callback) { - let index = 0 - const arrLength = arr.length - - function next(errors) { - if (errors && errors.length) { - callback(errors) - return - } - - const original = index - index += 1 - - if (original < arrLength) { - func(arr[original], next) - } else { - callback([]) - } - } - - next([]) -} - -function flattenObjArr(objArr) { - const ret = [] - Object.keys(objArr).forEach((k) => { - ret.push.apply(ret, objArr[k]) - }) - return ret -} - -function asyncMap(objArr, option, func, callback) { - if (option.first) { - const _pending = new Promise((resolve, reject) => { - const next = function next(errors) { - callback(errors) - return errors.length ? reject({ - errors, - fields: convertFieldsError(errors) - }) : resolve() - } - - const flattenArr = flattenObjArr(objArr) - asyncSerialArray(flattenArr, func, next) - }) - - _pending.catch((e) => e) - - return _pending - } - - let firstFields = option.firstFields || [] - - if (firstFields === true) { - firstFields = Object.keys(objArr) - } - - const objArrKeys = Object.keys(objArr) - const objArrLength = objArrKeys.length - let total = 0 - const results = [] - const pending = new Promise((resolve, reject) => { - const next = function next(errors) { - results.push.apply(results, errors) - total++ - - if (total === objArrLength) { - callback(results) - return results.length ? reject({ - errors: results, - fields: convertFieldsError(results) - }) : resolve() - } - } - - if (!objArrKeys.length) { - callback(results) - resolve() - } - - objArrKeys.forEach((key) => { - const arr = objArr[key] - - if (firstFields.indexOf(key) !== -1) { - asyncSerialArray(arr, func, next) - } else { - asyncParallelArray(arr, func, next) - } - }) - }) - pending.catch((e) => e) - return pending -} - -function complementError(rule) { - return function (oe) { - if (oe && oe.message) { - oe.field = oe.field || rule.fullField - return oe - } - - return { - message: typeof oe === 'function' ? oe() : oe, - field: oe.field || rule.fullField - } - } -} - -function deepMerge(target, source) { - if (source) { - for (const s in source) { - if (source.hasOwnProperty(s)) { - const value = source[s] - - if (typeof value === 'object' && typeof target[s] === 'object') { - target[s] = { ...target[s], ...value } - } else { - target[s] = value - } - } - } - } - - return target -} - -/** - * Rule for validating required fields. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param source The source object being validated. - * @param errors An array of errors that this rule may add - * validation errors to. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function required(rule, value, source, errors, options, type) { - if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) { - errors.push(format(options.messages.required, rule.fullField)) - } -} - -/** - * Rule for validating whitespace. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param source The source object being validated. - * @param errors An array of errors that this rule may add - * validation errors to. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function whitespace(rule, value, source, errors, options) { - if (/^\s+$/.test(value) || value === '') { - errors.push(format(options.messages.whitespace, rule.fullField)) - } -} - -/* eslint max-len:0 */ - -const pattern = { - // http://emailregex.com/ - email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, - url: new RegExp( - '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', - 'i' - ), - hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i -} -var types = { - integer: function integer(value) { - return /^(-)?\d+$/.test(value); - }, - float: function float(value) { - return /^(-)?\d+(\.\d+)?$/.test(value); - }, - array: function array(value) { - return Array.isArray(value) - }, - regexp: function regexp(value) { - if (value instanceof RegExp) { - return true - } - - try { - return !!new RegExp(value) - } catch (e) { - return false - } - }, - date: function date(value) { - return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear - === 'function' - }, - number: function number(value) { - if (isNaN(value)) { - return false - } - - // 修改源码,将字符串数值先转为数值 - return typeof +value === 'number' - }, - object: function object(value) { - return typeof value === 'object' && !types.array(value) - }, - method: function method(value) { - return typeof value === 'function' - }, - email: function email(value) { - return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255 - }, - url: function url(value) { - return typeof value === 'string' && !!value.match(pattern.url) - }, - hex: function hex(value) { - return typeof value === 'string' && !!value.match(pattern.hex) - } -} -/** - * Rule for validating the type of a value. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param source The source object being validated. - * @param errors An array of errors that this rule may add - * validation errors to. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function type(rule, value, source, errors, options) { - if (rule.required && value === undefined) { - required(rule, value, source, errors, options) - return - } - - const custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'] - const ruleType = rule.type - - if (custom.indexOf(ruleType) > -1) { - if (!types[ruleType](value)) { - errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)) - } // straight typeof check - } else if (ruleType && typeof value !== rule.type) { - errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)) - } -} - -/** - * Rule for validating minimum and maximum allowed values. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param source The source object being validated. - * @param errors An array of errors that this rule may add - * validation errors to. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function range(rule, value, source, errors, options) { - const len = typeof rule.len === 'number' - const min = typeof rule.min === 'number' - const max = typeof rule.max === 'number' // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane) - - const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g - let val = value - let key = null - const num = typeof value === 'number' - const str = typeof value === 'string' - const arr = Array.isArray(value) - - if (num) { - key = 'number' - } else if (str) { - key = 'string' - } else if (arr) { - key = 'array' - } // if the value is not of a supported type for range validation - // the validation rule rule should use the - // type property to also test for a particular type - - if (!key) { - return false - } - - if (arr) { - val = value.length - } - - if (str) { - // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3 - val = value.replace(spRegexp, '_').length - } - - if (len) { - if (val !== rule.len) { - errors.push(format(options.messages[key].len, rule.fullField, rule.len)) - } - } else if (min && !max && val < rule.min) { - errors.push(format(options.messages[key].min, rule.fullField, rule.min)) - } else if (max && !min && val > rule.max) { - errors.push(format(options.messages[key].max, rule.fullField, rule.max)) - } else if (min && max && (val < rule.min || val > rule.max)) { - errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max)) - } -} - -const ENUM = 'enum' -/** - * Rule for validating a value exists in an enumerable list. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param source The source object being validated. - * @param errors An array of errors that this rule may add - * validation errors to. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function enumerable(rule, value, source, errors, options) { - rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [] - - if (rule[ENUM].indexOf(value) === -1) { - errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', '))) - } -} - -/** - * Rule for validating a regular expression pattern. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param source The source object being validated. - * @param errors An array of errors that this rule may add - * validation errors to. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function pattern$1(rule, value, source, errors, options) { - if (rule.pattern) { - if (rule.pattern instanceof RegExp) { - // if a RegExp instance is passed, reset `lastIndex` in case its `global` - // flag is accidentally set to `true`, which in a validation scenario - // is not necessary and the result might be misleading - rule.pattern.lastIndex = 0 - - if (!rule.pattern.test(value)) { - errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)) - } - } else if (typeof rule.pattern === 'string') { - const _pattern = new RegExp(rule.pattern) - - if (!_pattern.test(value)) { - errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)) - } - } - } -} - -const rules = { - required, - whitespace, - type, - range, - enum: enumerable, - pattern: pattern$1 -} - -/** - * Performs validation for string types. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function string(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value, 'string') && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options, 'string') - - if (!isEmptyValue(value, 'string')) { - rules.type(rule, value, source, errors, options) - rules.range(rule, value, source, errors, options) - rules.pattern(rule, value, source, errors, options) - - if (rule.whitespace === true) { - rules.whitespace(rule, value, source, errors, options) - } - } - } - - callback(errors) -} - -/** - * Validates a function. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function method(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options) - - if (value !== undefined) { - rules.type(rule, value, source, errors, options) - } - } - - callback(errors) -} - -/** - * Validates a number. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function number(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (value === '') { - value = undefined - } - - if (isEmptyValue(value) && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options) - - if (value !== undefined) { - rules.type(rule, value, source, errors, options) - rules.range(rule, value, source, errors, options) - } - } - - callback(errors) -} - -/** - * Validates a boolean. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function _boolean(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options) - - if (value !== undefined) { - rules.type(rule, value, source, errors, options) - } - } - - callback(errors) -} - -/** - * Validates the regular expression type. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function regexp(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options) - - if (!isEmptyValue(value)) { - rules.type(rule, value, source, errors, options) - } - } - - callback(errors) -} - -/** - * Validates a number is an integer. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function integer(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options) - - if (value !== undefined) { - rules.type(rule, value, source, errors, options) - rules.range(rule, value, source, errors, options) - } - } - - callback(errors) -} - -/** - * Validates a number is a floating point number. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function floatFn(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options) - - if (value !== undefined) { - rules.type(rule, value, source, errors, options) - rules.range(rule, value, source, errors, options) - } - } - - callback(errors) -} - -/** - * Validates an array. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function array(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value, 'array') && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options, 'array') - - if (!isEmptyValue(value, 'array')) { - rules.type(rule, value, source, errors, options) - rules.range(rule, value, source, errors, options) - } - } - - callback(errors) -} - -/** - * Validates an object. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function object(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options) - - if (value !== undefined) { - rules.type(rule, value, source, errors, options) - } - } - - callback(errors) -} - -const ENUM$1 = 'enum' -/** - * Validates an enumerable list. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function enumerable$1(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options) - - if (value !== undefined) { - rules[ENUM$1](rule, value, source, errors, options) - } - } - - callback(errors) -} - -/** - * Validates a regular expression pattern. - * - * Performs validation when a rule only contains - * a pattern property but is not declared as a string type. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function pattern$2(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value, 'string') && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options) - - if (!isEmptyValue(value, 'string')) { - rules.pattern(rule, value, source, errors, options) - } - } - - callback(errors) -} - -function date(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options) - - if (!isEmptyValue(value)) { - let dateObject - - if (typeof value === 'number') { - dateObject = new Date(value) - } else { - dateObject = value - } - - rules.type(rule, dateObject, source, errors, options) - - if (dateObject) { - rules.range(rule, dateObject.getTime(), source, errors, options) - } - } - } - - callback(errors) -} - -function required$1(rule, value, callback, source, options) { - const errors = [] - const type = Array.isArray(value) ? 'array' : typeof value - rules.required(rule, value, source, errors, options, type) - callback(errors) -} - -function type$1(rule, value, callback, source, options) { - const ruleType = rule.type - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value, ruleType) && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options, ruleType) - - if (!isEmptyValue(value, ruleType)) { - rules.type(rule, value, source, errors, options) - } - } - - callback(errors) -} - -/** - * Performs validation for any type. - * - * @param rule The validation rule. - * @param value The value of the field on the source object. - * @param callback The callback function. - * @param source The source object being validated. - * @param options The validation options. - * @param options.messages The validation messages. - */ - -function any(rule, value, callback, source, options) { - const errors = [] - const validate = rule.required || !rule.required && source.hasOwnProperty(rule.field) - - if (validate) { - if (isEmptyValue(value) && !rule.required) { - return callback() - } - - rules.required(rule, value, source, errors, options) - } - - callback(errors) -} - -const validators = { - string, - method, - number, - boolean: _boolean, - regexp, - integer, - float: floatFn, - array, - object, - enum: enumerable$1, - pattern: pattern$2, - date, - url: type$1, - hex: type$1, - email: type$1, - required: required$1, - any -} - -function newMessages() { - return { - default: 'Validation error on field %s', - required: '%s is required', - enum: '%s must be one of %s', - whitespace: '%s cannot be empty', - date: { - format: '%s date %s is invalid for format %s', - parse: '%s date could not be parsed, %s is invalid ', - invalid: '%s date %s is invalid' - }, - types: { - string: '%s is not a %s', - method: '%s is not a %s (function)', - array: '%s is not an %s', - object: '%s is not an %s', - number: '%s is not a %s', - date: '%s is not a %s', - boolean: '%s is not a %s', - integer: '%s is not an %s', - float: '%s is not a %s', - regexp: '%s is not a valid %s', - email: '%s is not a valid %s', - url: '%s is not a valid %s', - hex: '%s is not a valid %s' - }, - string: { - len: '%s must be exactly %s characters', - min: '%s must be at least %s characters', - max: '%s cannot be longer than %s characters', - range: '%s must be between %s and %s characters' - }, - number: { - len: '%s must equal %s', - min: '%s cannot be less than %s', - max: '%s cannot be greater than %s', - range: '%s must be between %s and %s' - }, - array: { - len: '%s must be exactly %s in length', - min: '%s cannot be less than %s in length', - max: '%s cannot be greater than %s in length', - range: '%s must be between %s and %s in length' - }, - pattern: { - mismatch: '%s value %s does not match pattern %s' - }, - clone: function clone() { - const cloned = JSON.parse(JSON.stringify(this)) - cloned.clone = this.clone - return cloned - } - } -} -const messages = newMessages() - -/** - * Encapsulates a validation schema. - * - * @param descriptor An object declaring validation rules - * for this schema. - */ - -function Schema(descriptor) { - this.rules = null - this._messages = messages - this.define(descriptor) -} - -Schema.prototype = { - messages: function messages(_messages) { - if (_messages) { - this._messages = deepMerge(newMessages(), _messages) - } - - return this._messages - }, - define: function define(rules) { - if (!rules) { - throw new Error('Cannot configure a schema with no rules') - } - - if (typeof rules !== 'object' || Array.isArray(rules)) { - throw new Error('Rules must be an object') - } - - this.rules = {} - let z - let item - - for (z in rules) { - if (rules.hasOwnProperty(z)) { - item = rules[z] - this.rules[z] = Array.isArray(item) ? item : [item] - } - } - }, - validate: function validate(source_, o, oc) { - const _this = this - - if (o === void 0) { - o = {} - } - - if (oc === void 0) { - oc = function oc() {} - } - - let source = source_ - let options = o - let callback = oc - - if (typeof options === 'function') { - callback = options - options = {} - } - - if (!this.rules || Object.keys(this.rules).length === 0) { - if (callback) { - callback() - } - - return Promise.resolve() - } - - function complete(results) { - let i - let errors = [] - let fields = {} - - function add(e) { - if (Array.isArray(e)) { - let _errors - - errors = (_errors = errors).concat.apply(_errors, e) - } else { - errors.push(e) - } - } - - for (i = 0; i < results.length; i++) { - add(results[i]) - } - - if (!errors.length) { - errors = null - fields = null - } else { - fields = convertFieldsError(errors) - } - - callback(errors, fields) - } - - if (options.messages) { - let messages$1 = this.messages() - - if (messages$1 === messages) { - messages$1 = newMessages() - } - - deepMerge(messages$1, options.messages) - options.messages = messages$1 - } else { - options.messages = this.messages() - } - - let arr - let value - const series = {} - const keys = options.keys || Object.keys(this.rules) - keys.forEach((z) => { - arr = _this.rules[z] - value = source[z] - arr.forEach((r) => { - let rule = r - - if (typeof rule.transform === 'function') { - if (source === source_) { - source = { ...source } - } - - value = source[z] = rule.transform(value) - } - - if (typeof rule === 'function') { - rule = { - validator: rule - } - } else { - rule = { ...rule } - } - - rule.validator = _this.getValidationMethod(rule) - rule.field = z - rule.fullField = rule.fullField || z - rule.type = _this.getType(rule) - - if (!rule.validator) { - return - } - - series[z] = series[z] || [] - series[z].push({ - rule, - value, - source, - field: z - }) - }) - }) - const errorFields = {} - return asyncMap(series, options, (data, doIt) => { - const { rule } = data - let deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField - === 'object') - deep = deep && (rule.required || !rule.required && data.value) - rule.field = data.field - - function addFullfield(key, schema) { - return { ...schema, fullField: `${rule.fullField}.${key}` } - } - - function cb(e) { - if (e === void 0) { - e = [] - } - - let errors = e - - if (!Array.isArray(errors)) { - errors = [errors] - } - - if (!options.suppressWarning && errors.length) { - Schema.warning('async-validator:', errors) - } - - if (errors.length && rule.message) { - errors = [].concat(rule.message) - } - - errors = errors.map(complementError(rule)) - - if (options.first && errors.length) { - errorFields[rule.field] = 1 - return doIt(errors) - } - - if (!deep) { - doIt(errors) - } else { - // if rule is required but the target object - // does not exist fail at the rule level and don't - // go deeper - if (rule.required && !data.value) { - if (rule.message) { - errors = [].concat(rule.message).map(complementError(rule)) - } else if (options.error) { - errors = [options.error(rule, format(options.messages.required, rule.field))] - } else { - errors = [] - } - - return doIt(errors) - } - - let fieldsSchema = {} - - if (rule.defaultField) { - for (const k in data.value) { - if (data.value.hasOwnProperty(k)) { - fieldsSchema[k] = rule.defaultField - } - } - } - - fieldsSchema = { ...fieldsSchema, ...data.rule.fields } - - for (const f in fieldsSchema) { - if (fieldsSchema.hasOwnProperty(f)) { - const fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]] - fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f)) - } - } - - const schema = new Schema(fieldsSchema) - schema.messages(options.messages) - - if (data.rule.options) { - data.rule.options.messages = options.messages - data.rule.options.error = options.error - } - - schema.validate(data.value, data.rule.options || options, (errs) => { - const finalErrors = [] - - if (errors && errors.length) { - finalErrors.push.apply(finalErrors, errors) - } - - if (errs && errs.length) { - finalErrors.push.apply(finalErrors, errs) - } - - doIt(finalErrors.length ? finalErrors : null) - }) - } - } - - let res - - if (rule.asyncValidator) { - res = rule.asyncValidator(rule, data.value, cb, data.source, options) - } else if (rule.validator) { - res = rule.validator(rule, data.value, cb, data.source, options) - - if (res === true) { - cb() - } else if (res === false) { - cb(rule.message || `${rule.field} fails`) - } else if (res instanceof Array) { - cb(res) - } else if (res instanceof Error) { - cb(res.message) - } - } - - if (res && res.then) { - res.then(() => cb(), (e) => cb(e)) - } - }, (results) => { - complete(results) - }) - }, - getType: function getType(rule) { - if (rule.type === undefined && rule.pattern instanceof RegExp) { - rule.type = 'pattern' - } - - if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) { - throw new Error(format('Unknown rule type %s', rule.type)) - } - - return rule.type || 'string' - }, - getValidationMethod: function getValidationMethod(rule) { - if (typeof rule.validator === 'function') { - return rule.validator - } - - const keys = Object.keys(rule) - const messageIndex = keys.indexOf('message') - - if (messageIndex !== -1) { - keys.splice(messageIndex, 1) - } - - if (keys.length === 1 && keys[0] === 'required') { - return validators.required - } - - return validators[this.getType(rule)] || false - } -} - -Schema.register = function register(type, validator) { - if (typeof validator !== 'function') { - throw new Error('Cannot register a validator by type, validator is not a function') - } - - validators[type] = validator -} - -Schema.warning = warning -Schema.messages = messages - -export default Schema -// # sourceMappingURL=index.js.map diff --git a/components/my-components/libs/util/calendar.js b/components/my-components/libs/util/calendar.js deleted file mode 100644 index 5afcd30..0000000 --- a/components/my-components/libs/util/calendar.js +++ /dev/null @@ -1,546 +0,0 @@ -/** -* @1900-2100区间内的公历、农历互转 -* @charset UTF-8 -* @github https://github.com/jjonline/calendar.js -* @Author Jea杨(JJonline@JJonline.Cn) -* @Time 2014-7-21 -* @Time 2016-8-13 Fixed 2033hex、Attribution Annals -* @Time 2016-9-25 Fixed lunar LeapMonth Param Bug -* @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year -* @Version 1.0.3 -* @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0] -* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0] -*/ -/* eslint-disable */ -var Calendar = { - - /** - * 农历1900-2100的润大小信息表 - * @Array Of Property - * @return Hex - */ - lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, // 1900-1909 - 0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919 - 0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929 - 0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939 - 0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949 - 0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959 - 0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969 - 0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979 - 0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989 - 0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999 - 0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009 - 0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019 - 0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029 - 0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039 - 0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049 - /** Add By JJonline@JJonline.Cn**/ - 0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059 - 0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069 - 0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079 - 0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089 - 0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099 - 0x0d520], // 2100 - - /** - * 公历每个月份的天数普通表 - * @Array Of Property - * @return Number - */ - solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], - - /** - * 天干地支之天干速查表 - * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"] - * @return Cn string - */ - Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'], - - /** - * 天干地支之地支速查表 - * @Array Of Property - * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"] - * @return Cn string - */ - Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149', '\u620c', '\u4ea5'], - - /** - * 天干地支之地支速查表<=>生肖 - * @Array Of Property - * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"] - * @return Cn string - */ - Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21', '\u72d7', '\u732a'], - - /** - * 24节气速查表 - * @Array Of Property - * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"] - * @return Cn string - */ - solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206', '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3', '\u5c0f\u6691', '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732', '\u971c\u964d', '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'], - - /** - * 1900-2100各年的24节气日期速查表 - * @Array Of Property - * @return 0x string For splice - */ - sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', - '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', - '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', - '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', - 'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f', - '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa', - '97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', - '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f', - '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', - '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', - '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', - '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', - '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', - '97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', - '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722', - '9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f', - '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e', - '97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', - '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722', - '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', - '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', - '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', - '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722', - '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', - '97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', - '97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', - '9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', - '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e', - '97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', - '9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722', - '7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', - '7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', - '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', - '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', - '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', - '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa', - '97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', - '9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', - '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721', - '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2', - '977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722', - '7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', - '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd', - '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', - '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', - '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', - '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', - '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', - '977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', - '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721', - '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5', - '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722', - '7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', - '7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd', - '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', - '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', - '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721', - '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd', - '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35', - '7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', - '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721', - '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5', - '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35', - '665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', - '7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd', - '7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35', - '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'], - - /** - * 数字转中文速查表 - * @Array Of Property - * @trans ['日','一','二','三','四','五','六','七','八','九','十'] - * @return Cn string - */ - nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341'], - - /** - * 日期转农历称呼速查表 - * @Array Of Property - * @trans ['初','十','廿','卅'] - * @return Cn string - */ - nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'], - - /** - * 月份转农历称呼速查表 - * @Array Of Property - * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊'] - * @return Cn string - */ - nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341', '\u51ac', '\u814a'], - - /** - * 返回农历y年一整年的总天数 - * @param lunar Year - * @return Number - * @eg:var count = calendar.lYearDays(1987) ;//count=387 - */ - lYearDays: function (y) { - var i; var sum = 348 - for (i = 0x8000; i > 0x8; i >>= 1) { sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0 } - return (sum + this.leapDays(y)) - }, - - /** - * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0 - * @param lunar Year - * @return Number (0-12) - * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6 - */ - leapMonth: function (y) { // 闰字编码 \u95f0 - return (this.lunarInfo[y - 1900] & 0xf) - }, - - /** - * 返回农历y年闰月的天数 若该年没有闰月则返回0 - * @param lunar Year - * @return Number (0、29、30) - * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29 - */ - leapDays: function (y) { - if (this.leapMonth(y)) { - return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29) - } - return (0) - }, - - /** - * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法 - * @param lunar Year - * @return Number (-1、29、30) - * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29 - */ - monthDays: function (y, m) { - if (m > 12 || m < 1) { return -1 }// 月份参数从1至12,参数错误返回-1 - return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29) - }, - - /** - * 返回公历(!)y年m月的天数 - * @param solar Year - * @return Number (-1、28、29、30、31) - * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30 - */ - solarDays: function (y, m) { - if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1 - var ms = m - 1 - if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29 - return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28) - } else { - return (this.solarMonth[ms]) - } - }, - - /** - * 农历年份转换为干支纪年 - * @param lYear 农历年的年份数 - * @return Cn string - */ - toGanZhiYear: function (lYear) { - var ganKey = (lYear - 3) % 10 - var zhiKey = (lYear - 3) % 12 - if (ganKey == 0) ganKey = 10// 如果余数为0则为最后一个天干 - if (zhiKey == 0) zhiKey = 12// 如果余数为0则为最后一个地支 - return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1] - }, - - /** - * 公历月、日判断所属星座 - * @param cMonth [description] - * @param cDay [description] - * @return Cn string - */ - toAstro: function (cMonth, cDay) { - var s = '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf' - var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22] - return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7'// 座 - }, - - /** - * 传入offset偏移量返回干支 - * @param offset 相对甲子的偏移量 - * @return Cn string - */ - toGanZhi: function (offset) { - return this.Gan[offset % 10] + this.Zhi[offset % 12] - }, - - /** - * 传入公历(!)y年获得该年第n个节气的公历日期 - * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起 - * @return day Number - * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春 - */ - getTerm: function (y, n) { - if (y < 1900 || y > 2100) { return -1 } - if (n < 1 || n > 24) { return -1 } - var _table = this.sTermInfo[y - 1900] - var _info = [ - parseInt('0x' + _table.substr(0, 5)).toString(), - parseInt('0x' + _table.substr(5, 5)).toString(), - parseInt('0x' + _table.substr(10, 5)).toString(), - parseInt('0x' + _table.substr(15, 5)).toString(), - parseInt('0x' + _table.substr(20, 5)).toString(), - parseInt('0x' + _table.substr(25, 5)).toString() - ] - var _calday = [ - _info[0].substr(0, 1), - _info[0].substr(1, 2), - _info[0].substr(3, 1), - _info[0].substr(4, 2), - - _info[1].substr(0, 1), - _info[1].substr(1, 2), - _info[1].substr(3, 1), - _info[1].substr(4, 2), - - _info[2].substr(0, 1), - _info[2].substr(1, 2), - _info[2].substr(3, 1), - _info[2].substr(4, 2), - - _info[3].substr(0, 1), - _info[3].substr(1, 2), - _info[3].substr(3, 1), - _info[3].substr(4, 2), - - _info[4].substr(0, 1), - _info[4].substr(1, 2), - _info[4].substr(3, 1), - _info[4].substr(4, 2), - - _info[5].substr(0, 1), - _info[5].substr(1, 2), - _info[5].substr(3, 1), - _info[5].substr(4, 2) - ] - return parseInt(_calday[n - 1]) - }, - - /** - * 传入农历数字月份返回汉语通俗表示法 - * @param lunar month - * @return Cn string - * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月' - */ - toChinaMonth: function (m) { // 月 => \u6708 - if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1 - var s = this.nStr3[m - 1] - s += '\u6708'// 加上月字 - return s - }, - - /** - * 传入农历日期数字返回汉字表示法 - * @param lunar day - * @return Cn string - * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一' - */ - toChinaDay: function (d) { // 日 => \u65e5 - var s - switch (d) { - case 10: - s = '\u521d\u5341'; break - case 20: - s = '\u4e8c\u5341'; break - break - case 30: - s = '\u4e09\u5341'; break - break - default: - s = this.nStr2[Math.floor(d / 10)] - s += this.nStr1[d % 10] - } - return (s) - }, - - /** - * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春” - * @param y year - * @return Cn string - * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔' - */ - getAnimal: function (y) { - return this.Animals[(y - 4) % 12] - }, - - /** - * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON - * @param y solar year - * @param m solar month - * @param d solar day - * @return JSON object - * @eg:console.log(calendar.solar2lunar(1987,11,01)); - */ - solar2lunar: function (y, m, d) { // 参数区间1900.1.31~2100.12.31 - // 年份限定、上限 - if (y < 1900 || y > 2100) { - return -1// undefined转换为数字变为NaN - } - // 公历传参最下限 - if (y == 1900 && m == 1 && d < 31) { - return -1 - } - // 未传参 获得当天 - if (!y) { - var objDate = new Date() - } else { - var objDate = new Date(y, parseInt(m) - 1, d) - } - var i; var leap = 0; var temp = 0 - // 修正ymd参数 - var y = objDate.getFullYear() - var m = objDate.getMonth() + 1 - var d = objDate.getDate() - var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 86400000 - for (i = 1900; i < 2101 && offset > 0; i++) { - temp = this.lYearDays(i) - offset -= temp - } - if (offset < 0) { - offset += temp; i-- - } - - // 是否今天 - var isTodayObj = new Date() - var isToday = false - if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) { - isToday = true - } - // 星期几 - var nWeek = objDate.getDay() - var cWeek = this.nStr1[nWeek] - // 数字表示周几顺应天朝周一开始的惯例 - if (nWeek == 0) { - nWeek = 7 - } - // 农历年 - var year = i - var leap = this.leapMonth(i) // 闰哪个月 - var isLeap = false - - // 效验闰月 - for (i = 1; i < 13 && offset > 0; i++) { - // 闰月 - if (leap > 0 && i == (leap + 1) && isLeap == false) { - --i - isLeap = true; temp = this.leapDays(year) // 计算农历闰月天数 - } else { - temp = this.monthDays(year, i)// 计算农历普通月天数 - } - // 解除闰月 - if (isLeap == true && i == (leap + 1)) { isLeap = false } - offset -= temp - } - // 闰月导致数组下标重叠取反 - if (offset == 0 && leap > 0 && i == leap + 1) { - if (isLeap) { - isLeap = false - } else { - isLeap = true; --i - } - } - if (offset < 0) { - offset += temp; --i - } - // 农历月 - var month = i - // 农历日 - var day = offset + 1 - // 天干地支处理 - var sm = m - 1 - var gzY = this.toGanZhiYear(year) - - // 当月的两个节气 - // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year` - var firstNode = this.getTerm(y, (m * 2 - 1))// 返回当月「节」为几日开始 - var secondNode = this.getTerm(y, (m * 2))// 返回当月「节」为几日开始 - - // 依据12节气修正干支月 - var gzM = this.toGanZhi((y - 1900) * 12 + m + 11) - if (d >= firstNode) { - gzM = this.toGanZhi((y - 1900) * 12 + m + 12) - } - - // 传入的日期的节气与否 - var isTerm = false - var Term = null - if (firstNode == d) { - isTerm = true - Term = this.solarTerm[m * 2 - 2] - } - if (secondNode == d) { - isTerm = true - Term = this.solarTerm[m * 2 - 1] - } - // 日柱 当月一日与 1900/1/1 相差天数 - var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10 - var gzD = this.toGanZhi(dayCyclical + d - 1) - // 该日期所属的星座 - var astro = this.toAstro(m, d) - - return { 'lYear': year, 'lMonth': month, 'lDay': day, 'Animal': this.getAnimal(year), 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month), 'IDayCn': this.toChinaDay(day), 'cYear': y, 'cMonth': m, 'cDay': d, 'gzYear': gzY, 'gzMonth': gzM, 'gzDay': gzD, 'isToday': isToday, 'isLeap': isLeap, 'nWeek': nWeek, 'ncWeek': '\u661f\u671f' + cWeek, 'isTerm': isTerm, 'Term': Term, 'astro': astro } - }, - - /** - * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON - * @param y lunar year - * @param m lunar month - * @param d lunar day - * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可] - * @return JSON object - * @eg:console.log(calendar.lunar2solar(1987,9,10)); - */ - lunar2solar: function (y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1 - var isLeapMonth = !!isLeapMonth - var leapOffset = 0 - var leapMonth = this.leapMonth(y) - var leapDay = this.leapDays(y) - if (isLeapMonth && (leapMonth != m)) { return -1 }// 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同 - if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) { return -1 }// 超出了最大极限值 - var day = this.monthDays(y, m) - var _day = day - // bugFix 2016-9-25 - // if month is leap, _day use leapDays method - if (isLeapMonth) { - _day = this.leapDays(y, m) - } - if (y < 1900 || y > 2100 || d > _day) { return -1 }// 参数合法性效验 - - // 计算农历的时间差 - var offset = 0 - for (var i = 1900; i < y; i++) { - offset += this.lYearDays(i) - } - var leap = 0; var isAdd = false - for (var i = 1; i < m; i++) { - leap = this.leapMonth(y) - if (!isAdd) { // 处理闰月 - if (leap <= i && leap > 0) { - offset += this.leapDays(y); isAdd = true - } - } - offset += this.monthDays(y, i) - } - // 转换闰月农历 需补充该年闰月的前一个月的时差 - if (isLeapMonth) { offset += day } - // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点) - var stmap = Date.UTC(1900, 1, 30, 0, 0, 0) - var calObj = new Date((offset + d - 31) * 86400000 + stmap) - var cY = calObj.getUTCFullYear() - var cM = calObj.getUTCMonth() + 1 - var cD = calObj.getUTCDate() - - return this.solar2lunar(cY, cM, cD) - } -} - -export default Calendar diff --git a/components/my-components/libs/util/emitter.js b/components/my-components/libs/util/emitter.js deleted file mode 100644 index 1e64044..0000000 --- a/components/my-components/libs/util/emitter.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * 递归使用 call 方式this指向 - * @param componentName // 需要找的组件的名称 - * @param eventName // 事件名称 - * @param params // 需要传递的参数 - */ -function broadcast(componentName, eventName, params) { - // 循环子节点找到名称一样的子节点 否则 递归 当前子节点 - this.$children.map((child) => { - if (componentName === child.$options.name) { - child.$emit.apply(child, [eventName].concat(params)) - } else { - broadcast.apply(child, [componentName, eventName].concat(params)) - } - }) -} -export default { - methods: { - /** - * 派发 (向上查找) (一个) - * @param componentName // 需要找的组件的名称 - * @param eventName // 事件名称 - * @param params // 需要传递的参数 - */ - dispatch(componentName, eventName, params) { - let parent = this.$parent || this.$root// $parent 找到最近的父节点 $root 根节点 - let { name } = parent.$options // 获取当前组件实例的name - // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点 - // 循环出当前名称的一样的组件实例 - while (parent && (!name || name !== componentName)) { - parent = parent.$parent - if (parent) { - name = parent.$options.name - } - } - // 有节点表示当前找到了name一样的实例 - if (parent) { - parent.$emit.apply(parent, [eventName].concat(params)) - } - }, - /** - * 广播 (向下查找) (广播多个) - * @param componentName // 需要找的组件的名称 - * @param eventName // 事件名称 - * @param params // 需要传递的参数 - */ - broadcast(componentName, eventName, params) { - broadcast.call(this, componentName, eventName, params) - } - } -} diff --git a/components/my-components/libs/util/route.js b/components/my-components/libs/util/route.js deleted file mode 100644 index 4e474f5..0000000 --- a/components/my-components/libs/util/route.js +++ /dev/null @@ -1,124 +0,0 @@ -/** - * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷 - * 并且带有路由拦截功能 - */ -import { queryParams, deepMerge, page } from '../function/index'; -class Router { - constructor() { - // 原始属性定义 - this.config = { - type: 'navigateTo', - url: '', - delta: 1, // navigateBack页面后退时,回退的层数 - params: {}, // 传递的参数 - animationType: 'pop-in', // 窗口动画,只在APP有效 - animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效 - intercept: false // 是否需要拦截 - } - // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文 - // 这里在构造函数中进行this绑定 - this.route = this.route.bind(this) - } - - // 判断url前面是否有"/",如果没有则加上,否则无法跳转 - addRootPath(url) { - return url[0] === '/' ? url : `/${url}` - } - - // 整合路由参数 - mixinParam(url, params) { - url = url && this.addRootPath(url) - - // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary" - // 如果有url中有get参数,转换后无需带上"?" - let query = '' - if (/.*\/.*\?.*=.*/.test(url)) { - // object对象转为get类型的参数 - query = queryParams(params, false) - // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开 - return url += `&${query}` - } - // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号 - query = queryParams(params) - return url += query - } - - // 对外的方法名称 - async route(options = {}, params = {}) { - // 合并用户的配置和内部的默认配置 - let mergeConfig = {} - - if (typeof options === 'string') { - // 如果options为字符串,则为route(url, params)的形式 - mergeConfig.url = this.mixinParam(options, params) - mergeConfig.type = 'navigateTo' - } else { - mergeConfig = deepMerge(this.config, options) - // 否则正常使用mergeConfig中的url和params进行拼接 - mergeConfig.url = this.mixinParam(options.url, options.params) - } - - // 如果本次跳转的路径和本页面路径一致,不执行跳转,防止用户快速点击跳转按钮,造成多次跳转同一个页面的问题 - if (mergeConfig.url === page()) return - - if (params.intercept) { - this.config.intercept = params.intercept - } - // params参数也带给拦截器 - mergeConfig.params = params - // 合并内外部参数 - mergeConfig = deepMerge(this.config, mergeConfig) - // 判断用户是否定义了拦截器 - if (typeof uni.$u.routeIntercept === 'function') { - // 定一个promise,根据用户执行resolve(true)或者resolve(false)来决定是否进行路由跳转 - const isNext = await new Promise((resolve, reject) => { - uni.$u.routeIntercept(mergeConfig, resolve) - }) - // 如果isNext为true,则执行路由跳转 - isNext && this.openPage(mergeConfig) - } else { - this.openPage(mergeConfig) - } - } - - // 执行路由跳转 - openPage(config) { - // 解构参数 - const { - url, - type, - delta, - animationType, - animationDuration - } = config - if (config.type == 'navigateTo' || config.type == 'to') { - uni.navigateTo({ - url, - animationType, - animationDuration - }) - } - if (config.type == 'redirectTo' || config.type == 'redirect') { - uni.redirectTo({ - url - }) - } - if (config.type == 'switchTab' || config.type == 'tab') { - uni.switchTab({ - url - }) - } - if (config.type == 'reLaunch' || config.type == 'launch') { - uni.reLaunch({ - url - }) - } - if (config.type == 'navigateBack' || config.type == 'back') { - uni.navigateBack({ - delta - }) - } - } -} - -export default (new Router()).route diff --git a/components/my-components/libs/vue.js b/components/my-components/libs/vue.js deleted file mode 100644 index 0a34916..0000000 --- a/components/my-components/libs/vue.js +++ /dev/null @@ -1,3 +0,0 @@ -export const defineMixin = (options) => { - return options -} diff --git a/components/my-components/my-avatar.vue b/components/my-components/my-avatar.vue deleted file mode 100644 index 549cefc..0000000 --- a/components/my-components/my-avatar.vue +++ /dev/null @@ -1,180 +0,0 @@ - - - - - diff --git a/components/my-components/my-sticky.vue b/components/my-components/my-sticky.vue deleted file mode 100644 index 5d776b1..0000000 --- a/components/my-components/my-sticky.vue +++ /dev/null @@ -1,216 +0,0 @@ - - - - - diff --git a/components/my-components/prop/avatar.js b/components/my-components/prop/avatar.js deleted file mode 100644 index 2f81b72..0000000 --- a/components/my-components/prop/avatar.js +++ /dev/null @@ -1,81 +0,0 @@ -import { defineMixin } from '../libs/vue' -import defProps from '../libs/config/props.js' -import test from '../libs/function/test'; -export const props = defineMixin({ - 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 test.range(n, [0, 19]) || n === '' - }, - default: () => defProps.avatar.colorIndex - }, - // 组件标识符 - name: { - type: String, - default: () => defProps.avatar.name - } - } -}) diff --git a/components/my-components/prop/steps-item.js b/components/my-components/prop/steps-item.js deleted file mode 100644 index ddab8cd..0000000 --- a/components/my-components/prop/steps-item.js +++ /dev/null @@ -1,44 +0,0 @@ -import { defineMixin } from '../libs/vue' -import defProps from '../libs/config/props.js' -export const props = defineMixin({ - props: { - // 标题 - title: { - type: [String, Number], - default: () => defProps.stepsItem.title - }, - color:{ - type: [String], - default:'#318AFE' - }, - titleColor:{ - type: [String], - default:'#318AFE' - }, - descColor:{ - type: [String], - default:'#318AFE' - }, - // 描述文本 - desc: { - type: [String, Number], - default: () => defProps.stepsItem.desc - }, - - // 图标大小 - iconSize: { - type: [String, Number], - default: () => defProps.stepsItem.iconSize - }, - // 当前步骤是否处于失败状态 - error: { - type: Boolean, - default: () => defProps.stepsItem.error - }, - // 自定义样式 - itemStyle: { - type: [Object], - default: {} - }, - } -}) diff --git a/components/my-components/prop/steps.js b/components/my-components/prop/steps.js deleted file mode 100644 index 0bbd9eb..0000000 --- a/components/my-components/prop/steps.js +++ /dev/null @@ -1,41 +0,0 @@ -import { defineMixin } from '../libs/vue' -import defProps from '../libs/config/props.js' -export const props = defineMixin({ - props: { - // 排列方向 - direction: { - type: String, - default: () => defProps.steps.direction - }, - // 设置第几个步骤 - current: { - type: [String, Number], - default: () => defProps.steps.current - }, - // 激活状态颜色 - activeColor: { - type: String, - default: () => defProps.steps.activeColor - }, - // 未激活状态颜色 - inactiveColor: { - type: String, - default: () => defProps.steps.inactiveColor - }, - // 激活状态的图标 - activeIcon: { - type: String, - default: () => defProps.steps.activeIcon - }, - // 未激活状态图标 - inactiveIcon: { - type: String, - default: () => defProps.steps.inactiveIcon - }, - // 是否显示点类型 - dot: { - type: Boolean, - default: () => defProps.steps.dot - } - } -}) diff --git a/components/my-components/prop/sticky.js b/components/my-components/prop/sticky.js deleted file mode 100644 index 3847106..0000000 --- a/components/my-components/prop/sticky.js +++ /dev/null @@ -1,42 +0,0 @@ -import { defineMixin } from '../libs/vue' -import defProps from '../libs/config/props.js' -export const props = defineMixin({ - props: { - // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px - offsetTop: { - type: [String, Number], - default: () => defProps.sticky.offsetTop - }, - // 自定义导航栏的高度 - customNavHeight: { - type: [String, Number], - // #ifdef H5 - // H5端的导航栏属于“自定义”导航栏的范畴,因为它是非原生的,与普通元素一致 - default: 44, - // #endif - // #ifndef H5 - default: () => defProps.sticky.customNavHeight - // #endif - }, - // 是否开启吸顶功能 - disabled: { - type: Boolean, - default: () => defProps.sticky.disabled - }, - // 吸顶区域的背景颜色 - bgColor: { - type: String, - default: () => defProps.sticky.bgColor - }, - // z-index值 - zIndex: { - type: [String, Number], - default: () => defProps.sticky.zIndex - }, - // 列表中的索引值 - index: { - type: [String, Number], - default: () => defProps.sticky.index - } - } -}) diff --git a/components/my-components/u-icon/icons.js b/components/my-components/u-icon/icons.js deleted file mode 100644 index f4d0fe2..0000000 --- a/components/my-components/u-icon/icons.js +++ /dev/null @@ -1,214 +0,0 @@ -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/components/my-components/u-icon/props.js b/components/my-components/u-icon/props.js deleted file mode 100644 index 7c0aa40..0000000 --- a/components/my-components/u-icon/props.js +++ /dev/null @@ -1,91 +0,0 @@ -import { defineMixin } from '../libs/vue' -import defProps from '../libs/config/props.js' -export const props = defineMixin({ - 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/components/my-components/u-icon/u-icon.vue b/components/my-components/u-icon/u-icon.vue deleted file mode 100644 index 93d91ff..0000000 --- a/components/my-components/u-icon/u-icon.vue +++ /dev/null @@ -1,242 +0,0 @@ - - - - - diff --git a/components/my-components/u-link/props.js b/components/my-components/u-link/props.js deleted file mode 100644 index 86a89fa..0000000 --- a/components/my-components/u-link/props.js +++ /dev/null @@ -1,41 +0,0 @@ -import { defineMixin } from '../libs/vue' -import defProps from '../libs/config/props.js' -export const props = defineMixin({ - 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/components/my-components/u-link/u-link.vue b/components/my-components/u-link/u-link.vue deleted file mode 100644 index 3776e3e..0000000 --- a/components/my-components/u-link/u-link.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - - - diff --git a/components/my-components/u-text/props.js b/components/my-components/u-text/props.js deleted file mode 100644 index 1c359cf..0000000 --- a/components/my-components/u-text/props.js +++ /dev/null @@ -1,112 +0,0 @@ -import { defineMixin } from '../libs/vue' -import defProps from '../libs/config/props.js' -export const props = defineMixin({ - props: { - // 主题颜色 - type: { - type: String, - default: () => defProps.text.type - }, - // 是否显示 - show: { - type: Boolean, - default: () => defProps.text.show - }, - // 显示的值 - text: { - type: [String, Number], - default: () => defProps.text.text - }, - // 前置图标 - prefixIcon: { - type: String, - default: () => defProps.text.prefixIcon - }, - // 后置图标 - suffixIcon: { - type: String, - default: () => defProps.text.suffixIcon - }, - // 文本处理的匹配模式 - // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接 - mode: { - type: String, - default: () => defProps.text.mode - }, - // mode=link下,配置的链接 - href: { - type: String, - default: () => defProps.text.href - }, - // 格式化规则 - format: { - type: [String, Function], - default: () => defProps.text.format - }, - // mode=phone时,点击文本是否拨打电话 - call: { - type: Boolean, - default: () => defProps.text.call - }, - // 小程序的打开方式 - openType: { - type: String, - default: () => defProps.text.openType - }, - // 是否粗体,默认normal - bold: { - type: Boolean, - default: () => defProps.text.bold - }, - // 是否块状 - block: { - type: Boolean, - default: () => defProps.text.block - }, - // 文本显示的行数,如果设置,超出此行数,将会显示省略号 - lines: { - type: [String, Number], - default: () => defProps.text.lines - }, - // 文本颜色 - color: { - type: String, - default: () => defProps.text.color - }, - // 字体大小 - size: { - type: [String, Number], - default: () => defProps.text.size - }, - // 图标的样式 - iconStyle: { - type: [Object, String], - default: () => defProps.text.iconStyle - }, - // 文字装饰,下划线,中划线等,可选值 none|underline|line-through - decoration: { - tepe: String, - default: () => defProps.text.decoration - }, - // 外边距,对象、字符串,数值形式均可 - margin: { - type: [Object, String, Number], - default: () => defProps.text.margin - }, - // 文本行高 - lineHeight: { - type: [String, Number], - default: () => defProps.text.lineHeight - }, - // 文本对齐方式,可选值left|center|right - align: { - type: String, - default: () => defProps.text.align - }, - // 文字换行,可选值break-word|normal|anywhere - wordWrap: { - type: String, - default: () => defProps.text.wordWrap - } - } -}) diff --git a/components/my-components/u-text/u-text.vue b/components/my-components/u-text/u-text.vue deleted file mode 100644 index a45b113..0000000 --- a/components/my-components/u-text/u-text.vue +++ /dev/null @@ -1,228 +0,0 @@ - - - - - diff --git a/components/my-components/u-text/value.js b/components/my-components/u-text/value.js deleted file mode 100644 index fe417a3..0000000 --- a/components/my-components/u-text/value.js +++ /dev/null @@ -1,87 +0,0 @@ -import { error, priceFormat, timeFormat } from '../libs/function/index'; -import test from '../libs/function/test'; -export default { - computed: { - // 经处理后需要显示的值 - value() { - const { - text, - mode, - format, - href - } = this - // 价格类型 - if (mode === 'price') { - // 如果text不为金额进行提示 - if (!/^\d+(\.\d+)?$/.test(text)) { - error('金额模式下,text参数需要为金额格式'); - } - // 进行格式化,判断用户传入的format参数为正则,或者函数,如果没有传入format,则使用默认的金额格式化处理 - if (test.func(format)) { - // 如果用户传入的是函数,使用函数格式化 - return format(text) - } - // 如果format非正则,非函数,则使用默认的金额格式化方法进行操作 - return priceFormat(text, 2) - } if (mode === 'date') { - // 判断是否合法的日期或者时间戳 - !test.date(text) && error('日期模式下,text参数需要为日期或时间戳格式') - // 进行格式化,判断用户传入的format参数为正则,或者函数,如果没有传入format,则使用默认的格式化处理 - if (test.func(format)) { - // 如果用户传入的是函数,使用函数格式化 - return format(text) - } if (format) { - // 如果format非正则,非函数,则使用默认的时间格式化方法进行操作 - return timeFormat(text, format) - } - // 如果没有设置format,则设置为默认的时间格式化形式 - return timeFormat(text, 'yyyy-mm-dd') - } if (mode === 'phone') { - // 判断是否合法的手机号 - // !test.mobile(text) && error('手机号模式下,text参数需要为手机号码格式') - if (test.func(format)) { - // 如果用户传入的是函数,使用函数格式化 - return format(text) - } if (format === 'encrypt') { - // 如果format为encrypt,则将手机号进行星号加密处理 - return `${text.substr(0, 3)}****${text.substr(7)}` - } - return text - } if (mode === 'name') { - // 判断是否合法的字符粗 - !(typeof (text) === 'string') && error('姓名模式下,text参数需要为字符串格式') - if (test.func(format)) { - // 如果用户传入的是函数,使用函数格式化 - return format(text) - } if (format === 'encrypt') { - // 如果format为encrypt,则将姓名进行星号加密处理 - return this.formatName(text) - } - return text - } if (mode === 'link') { - // 判断是否合法的字符粗 - !test.url(href) && error('超链接模式下,href参数需要为URL格式') - return text - } - return text - } - }, - methods: { - // 默认的姓名脱敏规则 - formatName(name) { - let value = '' - if (name.length === 2) { - value = name.substr(0, 1) + '*' - } else if (name.length > 2) { - let char = '' - for (let i = 0, len = name.length - 2; i < len; i++) { - char += '*' - } - value = name.substr(0, 1) + char + name.substr(-1, 1) - } else { - value = name - } - return value - } - } -} diff --git a/pageProduct/add-Product/add-Product.vue b/pageProduct/add-Product/add-Product.vue index 9b4779f..6268391 100644 --- a/pageProduct/add-Product/add-Product.vue +++ b/pageProduct/add-Product/add-Product.vue @@ -1,8 +1,8 @@