diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a70bc78 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/unpackage +/node_modules diff --git a/apis/index.js b/apis/index.js index 9401cc2..f38d316 100644 --- a/apis/index.js +++ b/apis/index.js @@ -10,7 +10,7 @@ import router from '../router' // 基础配置 const config = { - apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境 + apiUrl : 'http://api.zh.shangkelian.cn/api/', // 正式环境 timeout : 60000 } diff --git a/node_modules/uni-read-pages/README.md b/node_modules/uni-read-pages/README.md deleted file mode 100644 index 9552873..0000000 --- a/node_modules/uni-read-pages/README.md +++ /dev/null @@ -1,108 +0,0 @@ -# uni-read-pages - -![coverage](https://img.shields.io/badge/coverage%20-98%25-green) ![npm](https://img.shields.io/badge/npm%20-v2.6.11-blue) ![license](https://img.shields.io/badge/license-MIT-red) ![size](https://img.shields.io/badge/size-1.48%20kb-yellowgreen) - -通过 [vue.config.js](https://cli.vuejs.org/zh/config/) 配合此库,可以随心所欲的读取 `pages.json` 下的所有配置 - -## 安装 - -您可以使用 `Yarn` 或 `npm` 安装该软件包(选择一个): - -##### Yarn - -```sh -yarn add uni-read-pages -``` -##### npm - -```sh -npm install uni-read-pages -``` -## 开始 -配置 `vue.config.js` 通过 `webpack` 注入全局变量 [查看文档](https://www.webpackjs.com/plugins/define-plugin/) - -#### 配置 `vue.config.js` -```js -//vue.config.js -const TransformPages = require('uni-read-pages') -const tfPages = new TransformPages() -module.exports = { - configureWebpack: { - plugins: [ - new tfPages.webpack.DefinePlugin({ - ROUTES: JSON.stringify(tfPages.routes) - }) - ] - } -} -``` -借助`webpack.DefinePlugin` 轻松注入全局变量。`ROUTES` 及可全局使用 - -#### 使用 -```js -// xxx.vue - -``` -## API -#### options -```js -//默认值 -const CONFIG={ - cli:false, //当前是否为脚手架初始化的项目 - includes:['path','aliasPath','name'] //需要获取包涵的字段 -} -``` - -#### Instance method - -* **getPagesRoutes** - * 通过读取 `pages.json` 文件 生成直接可用的routes - -* **parsePages(pageCallback, subPageCallback)** - * 单条page对象解析 - -* **resolvePath(dir)** - * 解析绝对路径 - -#### Instance attr - -* **CONFIG** - * 当前配置项 - -* **webpack** - * 当前工程下需要用到 `webpack` - -* **uniPagesJSON** - * 当前 `uni-app` 内置对象,可以通过此属性调用一些内置方法 - -* **routes** - * 通过 **includes** 解析后得到的路由表 **可直接使用** - -#### getter - -* **pagesJson** - * 获取所有 `pages.json` 下的内容 返回 `json` - - -#### uniPagesJSON method - -* getMainEntry() -* getNVueMainEntry() -* parsePages (pagesJson, pageCallback, subPageCallback) -* parseEntry (pagesJson) -* getPagesJson() -* parsePagesJson (content, loader) - -#### uniPagesJSON attr -* pagesJsonJsFileName //默认值 pages.js \ No newline at end of file diff --git a/node_modules/uni-read-pages/index.js b/node_modules/uni-read-pages/index.js deleted file mode 100644 index a938961..0000000 --- a/node_modules/uni-read-pages/index.js +++ /dev/null @@ -1,83 +0,0 @@ -const path = require('path') -const CONFIG = { - includes: ['path', 'aliasPath', 'name'] -} -const rootPath = path.resolve(process.cwd(), 'node_modules'); - -/** 解析绝对路径 - * @param {Object} dir - */ -function resolvePath(dir) { - return path.resolve(rootPath, dir); -} - -class TransformPages { - constructor(config) { - config = { - ...CONFIG, - ...config - }; - this.CONFIG = config; - this.webpack = require(resolvePath('webpack')); - this.uniPagesJSON = require(resolvePath('@dcloudio/uni-cli-shared/lib/pages.js')); - this.routes = this.getPagesRoutes().concat(this.getNotMpRoutes()); - } - /** - * 获取所有pages.json下的内容 返回json - */ - get pagesJson() { - return this.uniPagesJSON.getPagesJson(); - } - /** - * 通过读取pages.json文件 生成直接可用的routes - */ - getPagesRoutes(pages = this.pagesJson.pages, rootPath = null) { - const routes = []; - for (let i = 0; i < pages.length; i++) { - const item = pages[i]; - const route = {}; - for (let j = 0; j < this.CONFIG.includes.length; j++) { - const key = this.CONFIG.includes[j]; - let value = item[key]; - if (key === 'path') { - value = rootPath ? `/${rootPath}/${value}` : `/${value}` - } - if (key === 'aliasPath' && i == 0 && rootPath == null) { - route[key] = route[key] || '/' - } else if (value !== undefined) { - route[key] = value; - } - } - routes.push(route); - } - return routes; - } - /** - * 解析小程序分包路径 - */ - getNotMpRoutes() { - const { - subPackages - } = this.pagesJson; - let routes = []; - if (subPackages == null || subPackages.length == 0) { - return []; - } - for (let i = 0; i < subPackages.length; i++) { - const subPages = subPackages[i].pages; - const root = subPackages[i].root; - const subRoutes = this.getPagesRoutes(subPages, root); - routes = routes.concat(subRoutes) - } - return routes - } - /** - * 单条page对象解析 - * @param {Object} pageCallback - * @param {Object} subPageCallback - */ - parsePages(pageCallback, subPageCallback) { - this.uniPagesJSON.parsePages(this.pagesJson, pageCallback, subPageCallback) - } -} -module.exports = TransformPages \ No newline at end of file diff --git a/node_modules/uni-read-pages/package.json b/node_modules/uni-read-pages/package.json deleted file mode 100644 index d658b8b..0000000 --- a/node_modules/uni-read-pages/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "_from": "uni-read-pages", - "_id": "uni-read-pages@1.0.5", - "_inBundle": false, - "_integrity": "sha512-GkrrZ0LX0vn9R5k6RKEi0Ez3Q3e2vUpjXQ8Z6/K/d28KudI9ajqgt8WEjQFlG5EPm1K6uTArN8LlqmZTEixDUA==", - "_location": "/uni-read-pages", - "_phantomChildren": {}, - "_requested": { - "type": "tag", - "registry": true, - "raw": "uni-read-pages", - "name": "uni-read-pages", - "escapedName": "uni-read-pages", - "rawSpec": "", - "saveSpec": null, - "fetchSpec": "latest" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz", - "_shasum": "452c8dcaa8977bbaef600909be926c8d9704387c", - "_spec": "uni-read-pages", - "_where": "/Users/WebTmm/Desktop/ZhHealth", - "author": "", - "bugs": { - "url": "https://github.com/SilurianYang/uni-read-pages/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "read `pages.json` file to generate the routes table", - "directories": { - "example": "examples" - }, - "homepage": "https://github.com/SilurianYang/uni-read-pages#readme", - "keywords": [], - "license": "ISC", - "main": "index.js", - "name": "uni-read-pages", - "repository": { - "type": "git", - "url": "git+https://github.com/SilurianYang/uni-read-pages.git" - }, - "scripts": { - "build": "webpack --progress --config webpack/webpack.prod.js", - "dev": "webpack --watch --progress --config webpack/webpack.dev.js", - "postinstall": "node -e \"console.log('\\x1b[91m','\\n\\n uni-simple-router 垫脚片,欢迎下载!\\n \\n 开源不易,需要鼓励。去给 uni-read-pages 项目 点个 star 吧 \\n\\n')\"" - }, - "version": "1.0.5" -} diff --git a/node_modules/uni-simple-router/.eslintignore b/node_modules/uni-simple-router/.eslintignore deleted file mode 100644 index 3661113..0000000 --- a/node_modules/uni-simple-router/.eslintignore +++ /dev/null @@ -1,6 +0,0 @@ -dist -/node_modules -/webpack -/src/global.d.ts -/test -/jest.config.js \ No newline at end of file diff --git a/node_modules/uni-simple-router/.eslintrc.js b/node_modules/uni-simple-router/.eslintrc.js deleted file mode 100644 index e792a31..0000000 --- a/node_modules/uni-simple-router/.eslintrc.js +++ /dev/null @@ -1,257 +0,0 @@ -module.exports = { - root: true, - env: { - browser: true, - node: true, - es6: true - }, - globals: { - uni: true, - plus: true, - getCurrentPages: true, - getApp: true, - __uniConfig: true, - __uniRoutes: true, - $npm_package_name: true - }, - parser: '@typescript-eslint/parser', - extends: ['eslint:recommended'], - plugins: ['@typescript-eslint'], - rules: { - '@typescript-eslint/consistent-type-definitions': [ - 'error', - 'interface' - ], - 'accessor-pairs': 2, - 'arrow-spacing': [ - 2, - { - before: true, - after: true - } - ], - 'block-spacing': [2, 'always'], - 'brace-style': [ - 2, - '1tbs', - { - allowSingleLine: true - } - ], - camelcase: [ - 0, - { - properties: 'always' - } - ], - 'comma-dangle': [2, 'never'], - 'comma-spacing': [ - 2, - { - before: false, - after: true - } - ], - 'comma-style': [2, 'last'], - 'constructor-super': 2, - curly: [2, 'multi-line'], - 'dot-location': [2, 'property'], - 'eol-last': 2, - eqeqeq: ['error', 'always', {null: 'ignore'}], - 'generator-star-spacing': [ - 2, - { - before: true, - after: true - } - ], - 'handle-callback-err': [2, '^(err|error)$'], - indent: ['error', 4], - 'jsx-quotes': [2, 'prefer-single'], - 'key-spacing': [ - 2, - { - beforeColon: false, - afterColon: true - } - ], - 'keyword-spacing': [ - 2, - { - before: true, - after: true - } - ], - 'new-cap': [ - 2, - { - newIsCap: true, - capIsNew: false - } - ], - 'new-parens': 2, - 'no-array-constructor': 2, - 'no-caller': 2, - 'no-console': 'off', - 'no-class-assign': 2, - 'no-cond-assign': 2, - 'no-const-assign': 2, - 'no-control-regex': 0, - 'no-delete-var': 2, - 'no-dupe-args': 2, - 'no-dupe-class-members': 2, - 'no-dupe-keys': 2, - 'no-duplicate-case': 2, - 'no-empty-character-class': 2, - 'no-empty-pattern': 2, - 'no-eval': 2, - 'no-ex-assign': 2, - 'no-extend-native': 2, - 'no-extra-bind': 2, - 'no-extra-boolean-cast': 2, - 'no-extra-parens': [2, 'functions'], - 'no-fallthrough': 2, - 'no-floating-decimal': 2, - 'no-func-assign': 2, - 'no-implied-eval': 2, - 'no-inner-declarations': [2, 'functions'], - 'no-invalid-regexp': 2, - 'no-irregular-whitespace': 2, - 'no-iterator': 2, - 'no-label-var': 2, - 'no-labels': [ - 2, - { - allowLoop: false, - allowSwitch: false - } - ], - 'no-lone-blocks': 2, - 'no-mixed-spaces-and-tabs': 2, - 'no-multi-spaces': 2, - 'no-multi-str': 2, - 'no-multiple-empty-lines': [ - 2, - { - max: 1 - } - ], - 'no-native-reassign': 2, - 'no-negated-in-lhs': 2, - 'no-new-object': 2, - 'no-new-require': 2, - 'no-new-symbol': 2, - 'no-new-wrappers': 2, - 'no-obj-calls': 2, - 'no-octal': 2, - 'no-octal-escape': 2, - 'no-path-concat': 2, - 'no-proto': 2, - 'no-redeclare': 2, - 'no-regex-spaces': 2, - 'no-return-assign': [2, 'except-parens'], - 'no-self-assign': 2, - 'no-self-compare': 2, - 'no-sequences': 2, - 'no-shadow-restricted-names': 2, - 'no-spaced-func': 2, - 'no-sparse-arrays': 2, - 'no-this-before-super': 2, - 'no-throw-literal': 2, - 'no-trailing-spaces': 2, - 'no-undef': 2, - 'no-undef-init': 2, - 'no-unexpected-multiline': 2, - 'no-unmodified-loop-condition': 2, - 'no-unneeded-ternary': [ - 2, - { - defaultAssignment: false - } - ], - 'no-unreachable': 2, - 'no-unsafe-finally': 2, - 'no-unused-vars': [ - 2, - { - vars: 'all', - args: 'none' - } - ], - 'no-useless-call': 2, - 'no-useless-computed-key': 2, - 'no-useless-constructor': 2, - 'no-useless-escape': 0, - 'no-whitespace-before-property': 2, - 'no-with': 2, - 'one-var': [ - 2, - { - initialized: 'never' - } - ], - 'operator-linebreak': [ - 2, - 'after', - { - overrides: { - '?': 'before', - ':': 'before' - } - } - ], - 'padded-blocks': [2, 'never'], - quotes: [ - 2, - 'single', - { - avoidEscape: true, - allowTemplateLiterals: true - } - ], - semi: 'off', - 'semi-spacing': [ - 2, - { - before: false, - after: true - } - ], - 'space-before-blocks': [2, 'always'], - 'space-before-function-paren': [2, 'never'], - 'space-in-parens': [2, 'never'], - 'space-infix-ops': 2, - 'space-unary-ops': [ - 2, - { - words: true, - nonwords: false - } - ], - 'spaced-comment': [ - 2, - 'always', - { - markers: [ - 'global', - 'globals', - 'eslint', - 'eslint-disable', - '*package', - '!', - ',' - ] - } - ], - 'template-curly-spacing': [2, 'never'], - 'use-isnan': 2, - 'valid-typeof': 2, - 'wrap-iife': [2, 'any'], - 'yield-star-spacing': [2, 'both'], - yoda: [2, 'never'], - 'prefer-const': 2, - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - 'object-curly-spacing': 'off', - 'array-bracket-spacing': [2, 'never'] - } -}; diff --git a/node_modules/uni-simple-router/.github/ISSUE_TEMPLATE/bug_report.md b/node_modules/uni-simple-router/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index ac848ad..0000000 --- a/node_modules/uni-simple-router/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: 报告问题(Bug report) -about: 详细描述你遇到的问题并寻求社区帮助 -title: '' -labels: '' -assignees: '' - ---- - -**问题描述** -[问题描述:尽可能简洁清晰地把问题描述清楚] - -**复现步骤** -[复现问题的步骤] -1. 启动 '...' -2. 点击 '....' -3. 查看 - -[或者可以直接贴源代码] - -**预期结果** -[使用简洁清晰的语言描述你希望生效的预期结果] - -**实际结果** -[这里请贴上你的报错截图或文字] - - -**系统信息:** - - 发行平台: [如 微信小程序、H5平台、5+ App等] - - 操作系统 [如 iOS 12.1.2、Android 7.0] - - HBuilderX版本 [如使用HBuilderX,则需提供 HBuilderX 版本号] - - 项目创建方法 [如使用Vue-cli创建/HBuilderX] - - 设备信息 [如 iPhone8 Plus] - - uni-simple-router版本 [如 v1.5.4] - - -**补充信息** -[可选] -[根据你的分析,出现这个问题的原因可能在哪里?] diff --git a/node_modules/uni-simple-router/.github/ISSUE_TEMPLATE/feature_request.md b/node_modules/uni-simple-router/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 6559ac3..0000000 --- a/node_modules/uni-simple-router/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: 建议新功能(Feature Request) -about: 对 uni-simple-router 提出改善建议 -title: '' -labels: '' -assignees: '' - ---- - -**新功能描述** -简洁描述你希望补充完善的增强功能 - -**现状及问题** -[当前现状及由此导致的不便] - -**尝试方案** -[如果你有尝试绕开或其它解决方案,在这里描述你的建议方案] - -**补充信息** -[其它你认为有参考价值的信息] - diff --git a/node_modules/uni-simple-router/CODE_OF_CONDUCT.md b/node_modules/uni-simple-router/CODE_OF_CONDUCT.md deleted file mode 100644 index d8f066b..0000000 --- a/node_modules/uni-simple-router/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,76 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at 1606726660@qq.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/node_modules/uni-simple-router/LICENSE b/node_modules/uni-simple-router/LICENSE deleted file mode 100644 index 7eddf4c..0000000 --- a/node_modules/uni-simple-router/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 hhyang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/uni-simple-router/README.md b/node_modules/uni-simple-router/README.md deleted file mode 100644 index 1dbb5d8..0000000 --- a/node_modules/uni-simple-router/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# uni-simple-router - -> 一个更为简洁的[Vue-router](https://router.vuejs.org/zh/),专为 [uni-app](https://uniapp.dcloud.io/) 量身打造 - -## 介绍 - -`uni-simple-router` 是专为 [uni-app](https://uniapp.dcloud.io/) 打造的路由器。它与 [uni-app](https://uniapp.dcloud.io/) 核心深度集成,使使用 [uni-app](https://uniapp.dcloud.io/) 轻松构建单页应用程序变得轻而易举。功能包括: - -* `H5端` 能完全使用 `vue-router` 进行开发。 - -* 模块化,基于组件的路由器配置。 - -* 路由参数,查询,通配符。 - -* `H5端` 查看由 `uni-simple-router` 过渡系统提供动力的过渡效果。 - -* 更细粒度的导航控制。 - -* `H端`自动控制活动的CSS类链接。 - -* 通配小程序端、APP端、H5端。 - - -开始使用 [查看文档](http://hhyang.cn),或 [使用示例](https://github.com/SilurianYang/uni-simple-router/tree/master/examples)(请参见下面的示例)。 - -## 问题 -在提交问题的之前,请确保阅读 [“问题报告清单”](https://github.com/SilurianYang/uni-simple-router/issues/new?assignees=&labels=&template=bug_report.md&title=) 。不符合准则的问题可能会立即被解决。 - -## 贡献 -提出拉取请求之前,请务必先阅读 [查看文档](http://hhyang.cn)(请参见下面的示例)。。 - -## 变更日志 -[发行说明](https://github.com/SilurianYang/uni-simple-router/releases) 中记录了每个发行版的详细信息更改。 - -## 特别感谢 - -特别感谢 [markrgba](https://github.com/markrgba) 一直以来对文档和相关测试的维护。 - -## 技术交流 - -uni-app  插件 - - -## 成品预览 - -
-

uni-simple-router@2.0+ts+uni-app

- -
\ No newline at end of file diff --git a/node_modules/uni-simple-router/RFC.md b/node_modules/uni-simple-router/RFC.md deleted file mode 100644 index d96f6e8..0000000 --- a/node_modules/uni-simple-router/RFC.md +++ /dev/null @@ -1,38 +0,0 @@ -```flow - -st=>start: 开始跳转 -e=>end: 跳转结束 -platform=>operation: 平台选择 -H5=>condition: H5 -APP=>condition: APP -applets=>condition: 小程序 -routerBeforeEach=>operation: routerBeforeEach -lock=>condition: 跳转加锁 - -runH5=>operation: H5 -runAPP=>parallel: APP -runapplets=>parallel: 小程序 - -beforeRouteLeave=>condition: beforeRouteLeave -beforeEach=>condition: beforeEach -beforeEnter=>condition: beforeEnter -afterEach=>operation: afterEach -runJump=>condition: 执行跳转成功或者失败 -stopJump=>operation: next(false) 停止跳转 -errorJump=>operation: 跳转失败 -routerErrorEach=>operation: routerErrorEach -routerAfterEach=>operation: routerAfterEach - -st->platform(right)->applets(yes)->routerBeforeEach -applets(no)->APP(yes)->routerBeforeEach -APP(no)->H5(yes)->routerBeforeEach -routerBeforeEach->lock(yes)->runAPP(path1)->runapplets(path1)->beforeRouteLeave -lock(no)->runH5->beforeRouteLeave(no)->stopJump->routerErrorEach -beforeRouteLeave(yes)->beforeEach(no)->stopJump->routerErrorEach -beforeEach(yes)->beforeEnter(no)->stopJump->routerErrorEach -beforeEnter(yes)->runJump(no)->errorJump->routerErrorEach -runJump(yes)->afterEach->routerAfterEach -routerAfterEach->e -routerErrorEach->e - -``` \ No newline at end of file diff --git a/node_modules/uni-simple-router/api-extractor.json b/node_modules/uni-simple-router/api-extractor.json deleted file mode 100644 index 5458aab..0000000 --- a/node_modules/uni-simple-router/api-extractor.json +++ /dev/null @@ -1,50 +0,0 @@ -// this the shared base config for all packages. -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - "mainEntryPointFilePath": "./dist/src/index.d.ts", - - "apiReport": { - "enabled": true, - "reportFolder": "./temp/" - }, - - "docModel": { - "enabled": true - }, - - "dtsRollup": { - "enabled": true, - "untrimmedFilePath": "./dist/.d.ts" - }, - - "tsdocMetadata": { - "enabled": false - }, - - "messages": { - "compilerMessageReporting": { - "default": { - "logLevel": "warning" - } - }, - - "extractorMessageReporting": { - "default": { - "logLevel": "warning", - "addToApiReportFile": true - }, - - "ae-missing-release-tag": { - "logLevel": "none" - } - }, - - "tsdocMessageReporting": { - "default": { - "logLevel": "warning" - } - } - } - } - \ No newline at end of file diff --git a/node_modules/uni-simple-router/dist/link.vue b/node_modules/uni-simple-router/dist/link.vue deleted file mode 100644 index 873f412..0000000 --- a/node_modules/uni-simple-router/dist/link.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - diff --git a/node_modules/uni-simple-router/dist/uni-simple-router.d.ts b/node_modules/uni-simple-router/dist/uni-simple-router.d.ts deleted file mode 100644 index a5769eb..0000000 --- a/node_modules/uni-simple-router/dist/uni-simple-router.d.ts +++ /dev/null @@ -1,312 +0,0 @@ - -export declare interface AppConfig { - registerLoadingPage?: boolean; - loadingPageStyle?: () => object; - loadingPageHook?: (view: any) => void; - launchedHook?: () => void; - animation?: startAnimationRule; -} - -export declare interface appletConfig { - animationDuration?: number; -} - -export declare type backTypeRule = 'backbutton' | 'navigateBack'; - -export declare function createRouter(params: InstantiateConfig): Router; - -export declare interface debuggerArrayConfig { - error?: boolean; - warn?: boolean; - log?: boolean; -} - -export declare type debuggerConfig = boolean | debuggerArrayConfig; - -export declare interface endAnimationRule { - animationType?: endAnimationType; - animationDuration?: number; -} - -export declare type endAnimationType = 'slide-out-right' | 'slide-out-left' | 'slide-out-top' | 'slide-out-bottom' | 'pop-out' | 'fade-out' | 'zoom-in' | 'zoom-fade-in' | 'none'; - -export declare type guardHookRule = (to: totalNextRoute, from: totalNextRoute, next: (rule?: navtoRule | false) => void) => void; - -export declare interface H5Config { - paramsToQuery?: boolean; - vueRouterDev?: boolean; - vueNext?: boolean; - mode?: string; - base?: string; - linkActiveClass?: string; - linkExactActiveClass?: string; - scrollBehavior?: Function; - fallback?: boolean; -} - -export declare interface h5NextRule { - fullPath?: string | undefined; - hash?: string | undefined; - matched?: Array; - meta?: object; - name?: undefined | string; - type?: undefined | string; -} - -export declare type hookListRule = Array<(router: Router, to: totalNextRoute, from: totalNextRoute, toRoute: RoutesRule, next: Function) => void>; - -export declare interface hookObjectRule { - options: Array; - hook: Function; -} - -export declare enum hookToggle { - 'beforeHooks' = "beforeEach", - 'afterHooks' = "afterEach", - 'enterHooks' = "beforeEnter" -} - -export declare interface InstantiateConfig { - [key: string]: any; - keepUniOriginNav?: boolean; - platform: platformRule; - h5?: H5Config; - APP?: AppConfig; - applet?: appletConfig; - debugger?: debuggerConfig; - routerBeforeEach?: (to: navtoRule, from: navtoRule, next: (rule?: navtoRule | false) => void) => void; - routerAfterEach?: (to: navtoRule, from: navtoRule, next?: Function) => void; - routerErrorEach?: (error: navErrorRule, router: Router) => void; - resolveQuery?: (jsonQuery: objectAny) => objectAny; - parseQuery?: (jsonQuery: objectAny) => objectAny; - detectBeforeLock?: (router: Router, to: string | number | totalNextRoute | navRoute, navType: NAVTYPE) => void; - routes: RoutesRule[]; -} - -export declare interface LifeCycleConfig { - beforeHooks: hookListRule; - afterHooks: hookListRule; - routerBeforeHooks: hookListRule; - routerAfterHooks: hookListRule; - routerErrorHooks: Array<(error: navErrorRule, router: Router) => void>; -} - -export declare interface navErrorRule { - type: navRuleStatus; - msg: string; - to?: totalNextRoute; - from?: totalNextRoute; - nextTo?: any; - [propName: string]: any; -} - -export declare type navMethodRule = Promise; - -export declare interface navRoute extends h5NextRule, navtoRule { -} - -export declare type navRuleStatus = 0 | 1 | 2 | 3; - -export declare interface navtoRule { - NAVTYPE?: NAVTYPE; - path?: string; - name?: string | undefined; - query?: objectAny; - params?: objectAny; - animationType?: startAnimationType | endAnimationType; - animationDuration?: number; - events?: objectAny; - success?: Function; - fail?: Function; - complete?: Function; -} - -export declare type NAVTYPE = 'push' | 'replace' | 'replaceAll' | 'pushTab' | 'back'; - -export declare enum navtypeToggle { - 'push' = "navigateTo", - 'replace' = "redirectTo", - 'replaceAll' = "reLaunch", - 'pushTab' = "switchTab", - 'back' = "navigateBack" -} - -export declare type objectAny = { - [propName: string]: any; -}; - -export declare interface originMixins extends uniNavApiRule { - BACKTYPE: '' | backTypeRule; -} - -export declare type pageTypeRule = 'app' | 'page' | 'component'; - -export declare type platformRule = 'h5' | 'app-plus' | 'app-lets' | 'mp-weixin' | 'mp-baidu' | 'mp-alipay' | 'mp-toutiao' | 'mp-qq' | 'mp-360'; - -export declare type PromiseResolve = (value?: void | PromiseLike | undefined) => void; - -export declare type proxyDepsRule = { - resetIndex: Array; - hooks: { - [key: number]: { - proxyHook: () => void; - callHook: (enterPath: string) => void; - resetHook: () => void; - }; - }; - options: { - [key: number]: Array; - }; -}; - -export declare type proxyHookName = 'beforeHooks' | 'afterHooks'; - -export declare type reloadNavRule = totalNextRoute | false | undefined | string; - -export declare type reNavMethodRule = 'navigateTo' | 'redirectTo' | 'reLaunch' | 'switchTab'; - -export declare type reNotNavMethodRule = 'navigateBack'; - -export declare enum rewriteMethodToggle { - 'navigateTo' = "push", - 'navigate' = "push", - 'redirectTo' = "replace", - 'reLaunch' = "replaceAll", - 'switchTab' = "pushTab", - 'navigateBack' = "back" -} - -export declare interface Router { - [key: string]: any; - readonly lifeCycle: LifeCycleConfig; - readonly options: InstantiateConfig; - $lockStatus: boolean; - $route: object | null; - enterPath: string; - Vue: any; - appMain: { - NAVTYPE: reNavMethodRule | reNotNavMethodRule; - path: string; - } | {}; - proxyHookDeps: proxyDepsRule; - routesMap: routesMapRule | {}; - mount: Array<{ - app: any; - el: string; - }>; - install(Vue: any): void; - push(to: totalNextRoute | navRoute | string, from?: totalNextRoute): void; - replace(to: totalNextRoute | navRoute | string, from?: totalNextRoute): void; - replaceAll(to: totalNextRoute | navRoute | string, from?: totalNextRoute): void; - pushTab(to: totalNextRoute | navRoute | string, from?: totalNextRoute): void; - back(level: number | undefined, origin?: uniBackRule | uniBackApiRule): void; - forceGuardEach(navType: NAVTYPE | undefined, forceNav: boolean): void; - beforeEach(userGuard: guardHookRule): void; - afterEach(userGuard: (to: totalNextRoute, from: totalNextRoute) => void): void; -} - -export declare function RouterMount(Vim: any, router: Router, el?: string | undefined): void | never; - -export declare interface routeRule { - name: string | undefined; - meta: objectAny; - path: string; - query: objectAny; - params: objectAny; - fullPath: string; - NAVTYPE: NAVTYPE | ''; - BACKTYPE?: backTypeRule | ''; - [propName: string]: any; -} - -export declare type routesMapKeysRule = 'finallyPathList' | 'finallyPathMap' | 'aliasPathMap' | 'pathMap' | 'nameMap' | 'vueRouteMap'; - -export declare interface routesMapRule { - [key: string]: any; - finallyPathList: Array; - finallyPathMap: RoutesRule; - aliasPathMap: RoutesRule; - pathMap: RoutesRule; - nameMap: RoutesRule; - vueRouteMap: objectAny; -} - -export declare interface RoutesRule { - path: string; - component?: object; - name?: string; - components?: object; - redirect?: string | Function; - props?: boolean | object | Function; - aliasPath?: string; - alias?: string | Array; - children?: Array; - beforeEnter?: guardHookRule; - meta?: any; - [propName: string]: any; -} - -export declare function runtimeQuit(title?: string | undefined): void; - -export declare interface startAnimationRule { - animationType?: startAnimationType; - animationDuration?: number; -} - -export declare type startAnimationType = 'slide-in-right' | 'slide-in-left' | 'slide-in-top' | 'slide-in-bottom' | 'pop-in' | 'fade-in' | 'zoom-out' | 'zoom-fade-out' | 'none'; - -export declare interface totalNextRoute extends h5NextRule, navtoRule { - path: string; - delta?: number; - [propName: string]: any; -} - -export declare interface uniBackApiRule { - delta?: number; - animationDuration?: number; - animationType?: endAnimationType; -} - -export declare interface uniBackRule { - from: backTypeRule; -} - -export declare interface uniNavApiRule { - url: string; - openType?: 'appLaunch'; - query?: objectAny; - path?: string; - delta?: number; - detail?: { - [propName: string]: any; - }; - animationType?: startAnimationType; - animationDuration?: number; - events?: { - [propName: string]: any; - }; - success?: Function; - fail?: Function; - complete?: Function; - animation?: { - animationType?: startAnimationType; - animationDuration?: number; - }; -} - -export declare type vueHookNameRule = 'onLaunch' | 'onShow' | 'onHide' | 'onError' | 'onInit' | 'onLoad' | 'onReady' | 'onUnload' | 'onResize' | 'created' | 'beforeMount' | 'mounted' | 'beforeDestroy' | 'destroyed'; - -export declare type vueOptionRule = { - [propName in vueHookNameRule]: Array | undefined; -}; - -export { } - -// @ts-ignore -declare module 'vue/types/vue' { - interface Vue { - $Router: Router; - $Route: routeRule; - } -} - \ No newline at end of file diff --git a/node_modules/uni-simple-router/dist/uni-simple-router.js b/node_modules/uni-simple-router/dist/uni-simple-router.js deleted file mode 100644 index 7e25d3c..0000000 --- a/node_modules/uni-simple-router/dist/uni-simple-router.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Router=t():e.Router=t()}(self,(function(){return e={779:(e,t,r)=>{var o=r(173);e.exports=function e(t,r,n){return o(r)||(n=r||n,r=[]),n=n||{},t instanceof RegExp?function(e,t){var r=e.source.match(/\((?!\?)/g);if(r)for(var o=0;o{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},844:function(e,t,r){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,o=arguments.length;r0?t.vueEachArray[r](e,o,(function(){n&&n()})):t.myEachHook(e,o,(function(a){!1===a?n(!1):t.vueEachArray[r](e,o,(function(e){n(a)}))}),t.router,!0)}},t}(Array);t.MyArray=n,t.proxyEachHook=function(e,t){for(var r=["beforeHooks","afterHooks"],o=0;o0)return!1;window.location.reload()}),0)}else e.mount[0].app.$mount(),e.mount=[]}},814:function(e,t){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,r=1,o=arguments.length;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEnterPath=void 0,t.getEnterPath=function(e,t){switch(t.options.platform){case"mp-alipay":case"mp-weixin":case"mp-toutiao":case"mp-qq":return e.$options.mpInstance.route;case"mp-baidu":return e.$options.mpInstance.is||e.$options.mpInstance.pageinstance.route}return e.$options.mpInstance.route}},282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.proxyHookName=t.proxyHookDeps=t.lifeCycle=t.baseConfig=t.mpPlatformReg=void 0;var o=r(883);t.mpPlatformReg="(^mp-weixin$)|(^mp-baidu$)|(^mp-alipay$)|(^mp-toutiao$)|(^mp-qq$)|(^mp-360$)",t.baseConfig={h5:{paramsToQuery:!1,vueRouterDev:!1,vueNext:!1,mode:"hash",base:"/",linkActiveClass:"router-link-active",linkExactActiveClass:"router-link-exact-active",scrollBehavior:function(e,t,r){return{x:0,y:0}},fallback:!0},APP:{registerLoadingPage:!0,loadingPageStyle:function(){return JSON.parse('{"backgroundColor":"#FFF"}')},loadingPageHook:function(e){e.show()},launchedHook:function(){plus.navigator.closeSplashscreen()},animation:{}},applet:{animationDuration:300},platform:"h5",keepUniOriginNav:!1,debugger:!1,routerBeforeEach:function(e,t,r){r()},routerAfterEach:function(e,t){},routerErrorEach:function(e,t){t.$lockStatus=!1,o.err(e,t,!0)},detectBeforeLock:function(e,t,r){},routes:[{path:"/choose-location"},{path:"/open-location"},{path:"/preview-image"}]},t.lifeCycle={beforeHooks:[],afterHooks:[],routerBeforeHooks:[],routerAfterHooks:[],routerErrorHooks:[]},t.proxyHookDeps={resetIndex:[],hooks:{},options:{}},t.proxyHookName=["onLaunch","onShow","onHide","onError","onInit","onLoad","onReady","onUnload","onResize","created","beforeMount","mounted","beforeDestroy","destroyed"]},801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createRouteMap=void 0;var o=r(883),n=r(789);t.createRouteMap=function(e,t){var r={finallyPathList:[],finallyPathMap:Object.create(null),aliasPathMap:Object.create(null),pathMap:Object.create(null),vueRouteMap:Object.create(null),nameMap:Object.create(null)};return t.forEach((function(t){var a=n.getRoutePath(t,e),i=a.finallyPath,u=a.aliasPath,l=a.path;if(null==l)throw new Error("请提供一个完整的路由对象,包括以绝对路径开始的 ‘path’ 字符串 "+JSON.stringify(t));if(i instanceof Array&&!e.options.h5.vueRouterDev&&"h5"===e.options.platform)throw new Error("非 vueRouterDev 模式下,route.alias 目前无法提供数组类型! "+JSON.stringify(t));var p=i,c=u;"h5"!==e.options.platform&&0!==p.indexOf("/")&&"*"!==l&&o.warn("当前路由对象下,route:"+JSON.stringify(t)+" 是否缺少了前缀 ‘/’",e,!0),r.finallyPathMap[p]||(r.finallyPathMap[p]=t,r.aliasPathMap[c]=t,r.pathMap[l]=t,r.finallyPathList.push(p),null!=t.name&&(r.nameMap[t.name]=t))})),r}},662:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerEachHooks=t.registerRouterHooks=t.registerHook=void 0;var o=r(366),n=r(169);function a(e,t){e[0]=t}t.registerHook=a,t.registerRouterHooks=function(e,t){return a(e.routerBeforeHooks,(function(e,r,o){t.routerBeforeEach(e,r,o)})),a(e.routerAfterHooks,(function(e,r){t.routerAfterEach(e,r)})),a(e.routerErrorHooks,(function(e,r){t.routerErrorEach(e,r)})),e},t.registerEachHooks=function(e,t,r){a(e.lifeCycle[t],(function(e,a,i,u,l){l?n.onTriggerEachHook(e,a,u,o.hookToggle[t],i):r(e,a,i)}))}},460:function(e,t,r){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,r=1,o=arguments.length;r0)return P}if(""!==u)return h(t);throw new Error(r+" 路径无法在路由表中找到!检查跳转路径及路由表")},t.getDataType=v,t.copyData=function(e){return JSON.parse(JSON.stringify(e))},t.getUniCachePage=function(e){var t=getCurrentPages();if(null==e)return t;if(0===t.length)return t;var r=t.reverse()[e];return null==r?[]:r},t.urlToJson=function(e){var t={},r=e.split("?"),o=r[0],n=r[1];if(null!=n)for(var a=0,i=n.split("&");a3},t.baseClone=y,t.deepClone=g,t.lockDetectWarn=function(e,t,r,o,n,a){if(void 0===n&&(n={}),"afterHooks"===a)o();else{var i=e.options.detectBeforeLock;i&&i(e,t,r),e.$lockStatus?e.options.routerErrorEach({type:2,msg:"当前页面正在处于跳转状态,请稍后再进行跳转....",NAVTYPE:r,uniActualData:n},e):o()}},t.assertParentChild=function(e,t){for(;null!=t.$parent;){var r=t.$parent.$mp;if(r.page&&r.page.is===e)return!0;t=t.$parent}try{if(t.$mp.page.is===e||t.$mp.page.route===e)return!0}catch(e){return!1}return!1},t.resolveAbsolutePath=function(e,t){var r=/^\/?([^\?\s]+)(\?.+)?$/,o=e.trim();if(!r.test(o))throw new Error("【"+e+"】 路径错误,请提供完整的路径(10001)。");var n=o.match(r);if(null==n)throw new Error("【"+e+"】 路径错误,请提供完整的路径(10002)。");var a=n[2]||"";if(/^\.\/[^\.]+/.test(o))return(t.currentRoute.path+e).replace(/[^\/]+\.\//,"");var i=n[1].replace(/\//g,"\\/").replace(/\.\./g,"[^\\/]+").replace(/\./g,"\\."),u=new RegExp("^\\/"+i+"$"),l=t.options.routes.filter((function(e){return u.test(e.path)}));if(1!==l.length)throw new Error("【"+e+"】 路径错误,尝试转成绝对路径失败,请手动转成绝对路径(10003)。");return l[0].path+a},t.deepDecodeQuery=function e(t){for(var r="[object Array]"===v(t)?[]:{},o=Object.keys(t),n=0;n{"use strict";function r(e,t,r,o){if(void 0===o&&(o=!1),!o){var n="[object Object]"===t.toString();if(!1===t)return!1;if(n&&!1===t[e])return!1}return console[e](r),!0}Object.defineProperty(t,"__esModule",{value:!0}),t.warnLock=t.log=t.warn=t.err=t.isLog=void 0,t.isLog=r,t.err=function(e,t,o){r("error",t.options.debugger,e,o)},t.warn=function(e,t,o){r("warn",t.options.debugger,e,o)},t.log=function(e,t,o){r("log",t.options.debugger,e,o)},t.warnLock=function(e){console.warn(e)}},607:function(e,t,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createRouter=t.RouterMount=t.runtimeQuit=void 0,n(r(366),t),n(r(309),t);var a=r(814);Object.defineProperty(t,"runtimeQuit",{enumerable:!0,get:function(){return a.runtimeQuit}});var i=r(963);Object.defineProperty(t,"RouterMount",{enumerable:!0,get:function(){return i.RouterMount}}),Object.defineProperty(t,"createRouter",{enumerable:!0,get:function(){return i.createRouter}})},366:(e,t)=>{"use strict";var r,o,n;Object.defineProperty(t,"__esModule",{value:!0}),t.rewriteMethodToggle=t.navtypeToggle=t.hookToggle=void 0,(n=t.hookToggle||(t.hookToggle={})).beforeHooks="beforeEach",n.afterHooks="afterEach",n.enterHooks="beforeEnter",(o=t.navtypeToggle||(t.navtypeToggle={})).push="navigateTo",o.replace="redirectTo",o.replaceAll="reLaunch",o.pushTab="switchTab",o.back="navigateBack",(r=t.rewriteMethodToggle||(t.rewriteMethodToggle={})).navigateTo="push",r.navigate="push",r.redirectTo="replace",r.reLaunch="replaceAll",r.switchTab="pushTab",r.navigateBack="back"},309:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},169:function(e,t,r){"use strict";var o=this&&this.__rest||function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n0){var u=void 0;switch("h5"===e.options.platform?u=i.$options.beforeRouteLeave:null!=i.$vm&&(u=i.$vm.$options.beforeRouteLeave),n.getDataType(u)){case"[object Array]":a=(a=u[0]).bind(i);break;case"[object Function]":a=u.bind(i.$vm)}}return p(a,t,r,e,o)}function p(e,t,r,o,n,a){void 0===a&&(a=!0),null!=e&&e instanceof Function?!0===a?e(t,r,n,o,!1):(e(t,r,(function(){}),o,!1),n()):n()}function c(e,t,r,o,a,i){var u=n.forMatNextToFrom(e,t,r),l=u.matTo,p=u.matFrom;"h5"===e.options.platform?s(a,0,i,e,l,p,o):s(a.slice(0,4),0,(function(){i((function(){s(a.slice(4),0,n.voidFun,e,l,p,o)}))}),e,l,p,o)}function s(e,r,i,l,p,c,f){var h=n.routesForMapRoute(l,p.path,["finallyPathMap","pathMap"]);if(e.length-1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetPageHook=t.resetAndCallPageHook=t.proxyPageHook=t.createFullPath=t.createToFrom=void 0;var o=r(282),n=r(789),a=r(890),i=r(99);function u(e){for(var t=e.proxyHookDeps,r=0,o=Object.entries(t.hooks);r{[propName: string]: any;}",t):e[r]=u}else{if(!n.assertDeepObject(o))return e;var l=JSON.stringify(o);e[r]={query:l}}return e},t.parseQuery=function(e,t){var r=t.options.parseQuery;if(r)e=r(n.copyData(e)),"[object Object]"!==n.getDataType(e)&&i.warn("请按格式返回参数: parseQuery?:(jsonQuery:{[propName: string]: any;})=>{[propName: string]: any;}",t);else if(Reflect.get(e,"query")){var o=Reflect.get(e,"query");if("string"==typeof o)try{o=JSON.parse(o)}catch(e){i.warn("尝试解析深度对象失败,按原样输出。"+e,t)}if("object"==typeof o)return n.deepDecodeQuery(o)}return e},t.stringifyQuery=function(e){var t=e?Object.keys(e).map((function(t){var r=e[t];if(void 0===r)return"";if(null===r)return c(t);if(Array.isArray(r)){var o=[];return r.forEach((function(e){void 0!==e&&(null===e?o.push(c(t)):o.push(c(t)+"="+c(e)))})),o.join("&")}return c(t)+"="+c(r)})).filter((function(e){return e.length>0})).join("&"):null;return t?"?"+t:""}},314:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rewriteMethod=void 0;var o=r(366),n=r(789),a=r(883),i=r(809),u=["navigateTo","redirectTo","reLaunch","switchTab","navigateBack"];t.rewriteMethod=function(e){!1===e.options.keepUniOriginNav&&u.forEach((function(t){var r=uni[t];uni[t]=function(u,l,p,c){void 0===l&&(l=!1),l?i.uniOriginJump(e,r,t,u,p,c):("app-plus"===e.options.platform&&0===Object.keys(e.appMain).length&&(e.appMain={NAVTYPE:t,path:u.url}),function(e,t,r){if("app-plus"===r.options.platform){var i=null;e&&(i=e.openType),null!=i&&"appLaunch"===i&&(t="reLaunch")}if("reLaunch"===t&&'{"url":"/"}'===JSON.stringify(e)&&(a.warn("uni-app 原生方法:reLaunch({url:'/'}) 默认被重写啦!你可以使用 this.$Router.replaceAll() 或者 uni.reLaunch({url:'/?xxx=xxx'})",r,!0),t="navigateBack",e={from:"backbutton"}),"navigateBack"===t){var u=1;null==e&&(e={delta:1}),"[object Number]"===n.getDataType(e.delta)&&(u=e.delta),r.back(u,e)}else{var l=o.rewriteMethodToggle[t],p=e.url;if(!p.startsWith("/")){var c=n.resolveAbsolutePath(p,r);p=c,e.url=c}if("switchTab"===t){var s=n.routesForMapRoute(r,p,["pathMap","finallyPathList"]),f=n.getRoutePath(s,r).finallyPath;if("[object Array]"===n.getDataType(f)&&a.warn("uni-app 原生方法跳转路径为:"+p+"。此路为是tab页面时,不允许设置 alias 为数组的情况,并且不能为动态路由!当然你可以通过通配符*解决!",r,!0),"*"===f&&a.warn("uni-app 原生方法跳转路径为:"+p+"。在路由表中找不到相关路由表!当然你可以通过通配符*解决!",r,!0),"h5"===r.options.platform){var h=e.success;e.success=function(){for(var t=[],r=0;r0&&Reflect.has(t,"index")){var r=n.getUniCachePage(0);if(0===Object.keys(r).length)return!1;var o=r,a=o.$options.onTabItemTap;if(a)for(var i=0;i0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1] 提交信息不能为空! \n \n" - fi - done - ;; - - # 推送到服务端 - "push") - read -p "请输入提交的分支(不输入默认主分支 [master] ):" branch - printf "\n\n -------------- 正在推送github,请稍后.... --------------- \n\n" - if [[ "$branch" == "" ]]; then - git push - else - eval "git push origin ${branch}" - fi - printf "\n -------------- 推送github完成 --------------- \n\n" - ;; - - # 拉取最新代码 - "pull") - printf "\n\n -------------- 正在拉取,请稍后.... --------------- \n\n" - git pull - printf "\n -------------- 正在拉取完成 --------------- \n\n" - ;; - - # 切换分支操作 - "branch") - read -p "请输入添加更多指令 【分支】 :" branchs - if [[ "$branchs" == "" ]]; then - printf "\n分支列表如下:\n\n" - git branch - else - eval "git branch ${branchs}" - fi - printf "\n -------------- 分支操作完毕 --------------- \n\n" - ;; - # - "checkout") - read -p "请输入添加更多指令 【默认切换到master】 :" out - if [[ "$out" == "" ]]; then - git checkout master - else - eval "git checkout ${out}" - fi - printf "\n -------------- 执行完毕 --------------- \n\n" - ;; - # 自定义指令 - *) - while read -p "请输入自定义命令 【输入:q退出】:" code; do - if [[ "$code" == ":q" ]];then - printf "\n" - break - fi - printf "\n\n -------------- 正在执行,请稍后.... --------------- \n\n" - eval "$code" - printf "\n -------------- 执行完毕 --------------- \n\n" - done - esac -done diff --git a/node_modules/uni-simple-router/jest.config.js b/node_modules/uni-simple-router/jest.config.js deleted file mode 100644 index 6bad1fa..0000000 --- a/node_modules/uni-simple-router/jest.config.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - preset: 'ts-jest', - testEnvironment: 'node', - moduleDirectories:['node_modules','src'] -}; \ No newline at end of file diff --git a/node_modules/uni-simple-router/package.json b/node_modules/uni-simple-router/package.json deleted file mode 100644 index 1732f21..0000000 --- a/node_modules/uni-simple-router/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "uni-simple-router@2.0.7", - "_id": "uni-simple-router@2.0.7", - "_inBundle": false, - "_integrity": "sha512-8FKv5dw7Eoonm0gkO8udprrxzin0fNUI0+AvIphFkFRH5ZmP5ZWJ2pvnWzb2NiiqQSECTSU5VSB7HhvOSwD5eA==", - "_location": "/uni-simple-router", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "uni-simple-router@2.0.7", - "name": "uni-simple-router", - "escapedName": "uni-simple-router", - "rawSpec": "2.0.7", - "saveSpec": null, - "fetchSpec": "2.0.7" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/uni-simple-router/-/uni-simple-router-2.0.7.tgz", - "_shasum": "04e0b5be6cd733a1ecb9d35a3dbe82f27f48204e", - "_spec": "uni-simple-router@2.0.7", - "_where": "/Users/WebTmm/Desktop/ZhHealth", - "author": { - "name": "hhyang" - }, - "bugs": { - "url": "https://github.com/SilurianYang/uni-simple-router/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "> 一个更为简洁的[Vue-router](https://router.vuejs.org/zh/),专为 [uni-app](https://uniapp.dcloud.io/) 量身打造", - "homepage": "https://github.com/SilurianYang/uni-simple-router#readme", - "keywords": [ - "router", - "uni-app-router", - "interceptor", - "uni-app", - "uniapp" - ], - "license": "MIT", - "main": "dist/uni-simple-router.js", - "name": "uni-simple-router", - "repository": { - "type": "git", - "url": "git+https://github.com/SilurianYang/uni-simple-router.git" - }, - "scripts": { - "build": "node ./publish/build.js", - "dev": "webpack --watch --progress --config webpack/webpack.dev.js", - "dist": "webpack --progress --config webpack/webpack.prod.js", - "dist:dts": "api-extractor run --local --verbose", - "lint": "eslint --ext .js,.ts src", - "lintFix": "eslint --ext .js,.ts src --fix", - "publish": "node ./publish/index.js", - "test": "jest test/query-toggle.spec.ts" - }, - "types": "dist/uni-simple-router.d.ts", - "version": "2.0.7" -} diff --git a/node_modules/uni-simple-router/progress.md b/node_modules/uni-simple-router/progress.md deleted file mode 100644 index 97f7684..0000000 --- a/node_modules/uni-simple-router/progress.md +++ /dev/null @@ -1,16 +0,0 @@ -## Fixes bug -* `小程序` 端 `onLoad`、`onShow` 执行不标准的BUG。(#206,#224,#291) -* `小程序` 端 启动页必须写 `onLoad` 才会执行的BUG。 -* `APP` 端 tab 拦截后无法自动还原选中区域现在已修复。 -* H5端设置 `aliasPath` 后,无法使用 `aliasPath` 跨端跳转 (#302) -* 重写代理生命周期逻辑、保证执行各端执行顺序 (#312) - -## Revise -* 参数可以直接传递 `null`。但是需要注意:**在非深度对象传参的情况下,小程序会将 `null` 解析为字符串`undefined`** -* 多端情况下自定义启动参数不仅限制于 `query` 传递深度参数,任何组合都可以 (#307,#301) -* 去除 `keyword` 白名单字段 -* 调整小程序启动页面生命周期的执行,让在小程序下的生命周期能更贴近App、H5 -* `routerErrorEach` 新增回调参数、包括:`NAVTYPE`、`uniActualData`、`level` - -## Known Issues -* `APP` 端启动页为tab时,拦截到其他页面后底部tabbar 还依然存在,请避免把原生 `tabbar` 页设置成启动页。你可以在 `beforeEach` 中使用 next 到tabbar页效果一致 \ No newline at end of file diff --git a/node_modules/uni-simple-router/src/H5/buildRouter.ts b/node_modules/uni-simple-router/src/H5/buildRouter.ts deleted file mode 100644 index b733a2f..0000000 --- a/node_modules/uni-simple-router/src/H5/buildRouter.ts +++ /dev/null @@ -1,76 +0,0 @@ -import {RoutesRule, Router, routesMapRule, totalNextRoute, hookToggle, navtoRule} from '../options/base'; -import {H5Config} from '../options/config'; -import {warn} from '../helpers/warn' -import {getDataType, getRoutePath} from '../helpers/utils' -import { onTriggerEachHook } from '../public/hooks'; - -export function buildVueRoutes(router: Router, vueRouteMap:RoutesRule):RoutesRule { - const {pathMap, finallyPathList} = (router.routesMap as routesMapRule); - const vueRoutePathList:Array = Object.keys(vueRouteMap); - for (let i = 0; i < vueRoutePathList.length; i++) { - const path = vueRoutePathList[i]; - const myRoute:RoutesRule = pathMap[path]; - const vueRoute:RoutesRule = vueRouteMap[path]; - if (!myRoute) { - warn(`${path} 路由地址在路由表中未找到,确定是否传递漏啦`, router, true); - } else { - const {finallyPath} = getRoutePath(myRoute, router); - if (finallyPath instanceof Array) { - throw new Error(`非 vueRouterDev 模式下,alias、aliasPath、path 无法提供数组类型! ${JSON.stringify(myRoute)}`); - } - if (myRoute.name != null) { - vueRoute.name = myRoute.name; - } - const vuePath = vueRoute['path']; - const vueAlias = vueRoute['alias']; - delete vueRoute['alias']; - vueRoute['path'] = (finallyPath as string); - if (vuePath === '/' && vueAlias != null) { - vueRoute['alias'] = vueAlias; - vueRoute['path'] = vuePath; - } - const beforeEnter = myRoute.beforeEnter; - if (beforeEnter) { - vueRoute['beforeEnter'] = function( - to:totalNextRoute, - from: totalNextRoute, - next:(rule?: navtoRule|false)=>void, - ):void{ - onTriggerEachHook(to, from, router, hookToggle['enterHooks'], next) - }; - } - } - } - if (finallyPathList.includes('*')) { - vueRouteMap['*'] = pathMap['*'] - } - return vueRouteMap -} - -export function buildVueRouter(router:Router, vueRouter:any, vueRouteMap:RoutesRule|RoutesRule[]) :void |never { - let routes:RoutesRule[] = []; - if (getDataType(vueRouteMap) === '[object Array]') { - routes = (vueRouteMap as RoutesRule[]); - } else { - routes = Object.values(vueRouteMap); - } - const {scrollBehavior, fallback} = router.options.h5 as H5Config; - const oldScrollBehavior = vueRouter.options.scrollBehavior; - vueRouter.options.scrollBehavior = function proxyScrollBehavior( - to:totalNextRoute, - from:totalNextRoute, - savedPosition:any - ) { - oldScrollBehavior && oldScrollBehavior(to, from, savedPosition); - return (scrollBehavior as Function)(to, from, savedPosition) - } - vueRouter.fallback = fallback; - // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 - const newVueRouter:any = new vueRouter.constructor({ - ...router.options.h5, - base: vueRouter.options.base, - mode: vueRouter.options.mode, - routes - }); - vueRouter.matcher = newVueRouter.matcher; -} diff --git a/node_modules/uni-simple-router/src/H5/proxyHook.ts b/node_modules/uni-simple-router/src/H5/proxyHook.ts deleted file mode 100644 index a1d6c29..0000000 --- a/node_modules/uni-simple-router/src/H5/proxyHook.ts +++ /dev/null @@ -1,71 +0,0 @@ -import {Router, proxyHookName, totalNextRoute, navtoRule} from '../options/base'; - -export class MyArray extends Array { - constructor( - private router:Router, - private vueEachArray:Array, - private myEachHook:Function, - private hookName:'beforeHooks'| 'afterHooks', - ) { - super(); - Object.setPrototypeOf(this, MyArray.prototype) - } - push(v:any):any { - this.vueEachArray.push(v); - const index = this.length; - this[this.length] = (to: totalNextRoute, from: totalNextRoute, next:(rule?: navtoRule|false)=>void) => { - if (index > 0) { - this.vueEachArray[index](to, from, () => { - next && next() - }); - } else { - this.myEachHook(to, from, (nextTo?:navtoRule|false) => { - // Fixe https://github.com/SilurianYang/uni-simple-router/issues/241 2021年3月6日22:15:27 - // 目前不调用uni-app的守卫函数,因为会丢失页面栈信息 - if (nextTo === false) { - next(false); - } else { - this.vueEachArray[index](to, from, (uniNextTo?:navtoRule|false) => { - next(nextTo); - }) - } - }, this.router, true); - } - }; - } -} - -export function proxyEachHook(router:Router, vueRouter:any):void { - const hookList:Array<'beforeHooks'| 'afterHooks'> = ['beforeHooks', 'afterHooks']; - for (let i = 0; i < hookList.length; i++) { - const hookName = hookList[i]; - const myEachHook = router.lifeCycle[(hookName as proxyHookName)][0]; - if (myEachHook) { - const vueEachArray:Array = vueRouter[hookName]; - vueRouter[hookName] = new MyArray(router, vueEachArray, myEachHook, hookName); - } - } -} -export function proxyH5Mount(router:Router):void { - if (router.mount.length === 0) { - if (router.options.h5?.vueRouterDev) { - return - } - const uAgent = navigator.userAgent; - const isIos = !!uAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) - if (isIos) { - // 【Fixe】 https://github.com/SilurianYang/uni-simple-router/issues/109 - setTimeout(() => { - const element = document.getElementsByTagName('uni-page'); - if (element.length > 0) { - return false - } - window.location.reload(); - }, 0); - } - } else { - const [{app}] = router.mount; - app.$mount(); - router.mount = []; - } -} diff --git a/node_modules/uni-simple-router/src/app/appPatch.ts b/node_modules/uni-simple-router/src/app/appPatch.ts deleted file mode 100644 index c9b07ba..0000000 --- a/node_modules/uni-simple-router/src/app/appPatch.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { objectAny, Router, totalNextRoute } from '../options/base'; -import { AppConfig } from '../options/config'; - -let quitBefore:number|null = null; -let TABBAR:objectAny|null = null; - -export function registerLoddingPage( - router:Router, -):void{ - if (router.options.registerLoadingPage) { - const { loadingPageHook, loadingPageStyle } = router.options.APP as AppConfig; // 获取app所有配置 - const view = new plus.nativeObj.View('router-loadding', { - top: '0px', - left: '0px', - height: '100%', - width: '100%', - ...(loadingPageStyle as Function)() - }); - (loadingPageHook as Function)(view); // 触发等待页面生命周期 - } -} - -export function runtimeQuit( - title:string|undefined = '再按一次退出应用' -):void{ - const nowTime = +new Date(); - if (!quitBefore) { - quitBefore = nowTime; - uni.showToast({ - title, - icon: 'none', - position: 'bottom', - duration: 1000 - }); - setTimeout(() => { quitBefore = null }, 1000); - } else { - if (nowTime - quitBefore < 1000) { - plus.runtime.quit(); - } - } -} - -export function tabIndexSelect( - to:totalNextRoute, - from:totalNextRoute -):boolean { - if (!(__uniConfig.tabBar && Array.isArray(__uniConfig.tabBar.list))) { - return false - } - const tabBarList = __uniConfig.tabBar.list; - const routes:Array = []; - let activeIndex:number = 0; - for (let i = 0; i < tabBarList.length; i++) { - const route:totalNextRoute = tabBarList[i]; - if ('/' + route.pagePath === to.path || '/' + route.pagePath === from.path) { - if (route.pagePath === from.path) { - activeIndex = i; - } - routes.push(route); - } - if (routes.length === 2) { - break - } - } - if (routes.length !== 2) { - return false - } - if (TABBAR == null) { - TABBAR = uni.requireNativePlugin('uni-tabview') - } - (TABBAR as objectAny).switchSelect({ - index: activeIndex - }) - return true -} diff --git a/node_modules/uni-simple-router/src/applets/appletPatch.ts b/node_modules/uni-simple-router/src/applets/appletPatch.ts deleted file mode 100644 index 4f4f9ac..0000000 --- a/node_modules/uni-simple-router/src/applets/appletPatch.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Router} from '../options/base'; - -export function getEnterPath( - vueVim:any, - router:Router, -) :string { - switch (router.options.platform) { - case 'mp-alipay': - case 'mp-weixin': - case 'mp-toutiao': - case 'mp-qq': - return vueVim.$options.mpInstance.route; - case 'mp-baidu': - // 【Fixe】 https://github.com/SilurianYang/uni-simple-router/issues/251 - return vueVim.$options.mpInstance.is || vueVim.$options.mpInstance.pageinstance.route; - } - return vueVim.$options.mpInstance.route; // 这是暂时的 因为除了以上的小程序 其他没测试 先这样写 -} diff --git a/node_modules/uni-simple-router/src/component/link.vue b/node_modules/uni-simple-router/src/component/link.vue deleted file mode 100644 index 873f412..0000000 --- a/node_modules/uni-simple-router/src/component/link.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - diff --git a/node_modules/uni-simple-router/src/global.d.ts b/node_modules/uni-simple-router/src/global.d.ts deleted file mode 100644 index 74a6427..0000000 --- a/node_modules/uni-simple-router/src/global.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare var uni:any; -declare var plus:any; -declare var __uniConfig:any; -declare var __uniRoutes:any; -declare function getCurrentPages(isAll:boolean|undefined=false):any; -declare function getApp(args?:{allowDefault: true}):any; -declare var $npm_package_name:string; \ No newline at end of file diff --git a/node_modules/uni-simple-router/src/helpers/config.ts b/node_modules/uni-simple-router/src/helpers/config.ts deleted file mode 100644 index 1c376f0..0000000 --- a/node_modules/uni-simple-router/src/helpers/config.ts +++ /dev/null @@ -1,78 +0,0 @@ -import {err} from './warn' -import { InstantiateConfig, LifeCycleConfig} from '../options/config' -import { vueHookNameRule, proxyDepsRule } from '../options/base'; - -export const mpPlatformReg = '(^mp-weixin$)|(^mp-baidu$)|(^mp-alipay$)|(^mp-toutiao$)|(^mp-qq$)|(^mp-360$)' // 小程序下不能直接导出正则 需要重新组装成正则 不然bug一推 诡异 - -export const baseConfig:InstantiateConfig = { - h5: { - paramsToQuery: false, - vueRouterDev: false, - vueNext: false, - mode: 'hash', - base: '/', - linkActiveClass: 'router-link-active', - linkExactActiveClass: 'router-link-exact-active', - scrollBehavior: (to:any, from:any, savedPostion:Function) => ({ x: 0, y: 0 }), - fallback: true - }, - APP: { - registerLoadingPage: true, - loadingPageStyle: () => JSON.parse('{"backgroundColor":"#FFF"}'), - loadingPageHook: (view:any) => { view.show(); }, - launchedHook: () => { plus.navigator.closeSplashscreen(); }, - animation: {} - }, - applet: { - animationDuration: 300 - }, - platform: 'h5', - keepUniOriginNav: false, - debugger: false, - routerBeforeEach: (to, from, next) => { next() }, - routerAfterEach: (to, from) => {}, - routerErrorEach: (error, router) => { router.$lockStatus = false; err(error, router, true); }, - detectBeforeLock: (router, to, navType) => {}, - routes: [ - { - path: '/choose-location' - }, - { - path: '/open-location' - }, - { - path: '/preview-image' - } - ] -} - -export const lifeCycle:LifeCycleConfig = { - beforeHooks: [], - afterHooks: [], - routerBeforeHooks: [], - routerAfterHooks: [], - routerErrorHooks: [] -}; - -export const proxyHookDeps:proxyDepsRule = { - resetIndex: [], // 还原时执行的生命周期的索引 - hooks: {}, - options: {} -} - -export const proxyHookName:Array = [ - 'onLaunch', - 'onShow', - 'onHide', - 'onError', - 'onInit', - 'onLoad', - 'onReady', - 'onUnload', - 'onResize', - 'created', - 'beforeMount', - 'mounted', - 'beforeDestroy', - 'destroyed' -] diff --git a/node_modules/uni-simple-router/src/helpers/createRouteMap.ts b/node_modules/uni-simple-router/src/helpers/createRouteMap.ts deleted file mode 100644 index 288cc37..0000000 --- a/node_modules/uni-simple-router/src/helpers/createRouteMap.ts +++ /dev/null @@ -1,47 +0,0 @@ -import {RoutesRule, Router, routesMapRule} from '../options/base'; -import {H5Config} from '../options/config'; -import {warn} from './warn' -import {getRoutePath} from './utils' - -export function createRouteMap( - router: Router, - routes: RoutesRule[], -): routesMapRule|never { - const routesMap:routesMapRule = { - finallyPathList: [], - finallyPathMap: Object.create(null), - aliasPathMap: Object.create(null), - pathMap: Object.create(null), - vueRouteMap: Object.create(null), - nameMap: Object.create(null) - } - routes.forEach(route => { - const { finallyPath, aliasPath, path} = getRoutePath(route, router); - if (path == null) { - throw new Error(`请提供一个完整的路由对象,包括以绝对路径开始的 ‘path’ 字符串 ${JSON.stringify(route)}`); - } - if (finallyPath instanceof Array) { - if (!(router.options.h5 as H5Config).vueRouterDev && router.options.platform === 'h5') { - throw new Error(`非 vueRouterDev 模式下,route.alias 目前无法提供数组类型! ${JSON.stringify(route)}`); - } - } - const strFinallyPath = (finallyPath as string); - const strAliasPath = (aliasPath as string); - if (router.options.platform !== 'h5') { - if (strFinallyPath.indexOf('/') !== 0 && path !== '*') { - warn(`当前路由对象下,route:${JSON.stringify(route)} 是否缺少了前缀 ‘/’`, router, true); - } - } - if (!routesMap.finallyPathMap[strFinallyPath]) { - routesMap.finallyPathMap[strFinallyPath] = route; - routesMap.aliasPathMap[strAliasPath] = route; - routesMap.pathMap[path] = route; - routesMap.finallyPathList.push(strFinallyPath); - if (route.name != null) { - routesMap.nameMap[route.name] = route; - } - } - }) - - return routesMap; -} diff --git a/node_modules/uni-simple-router/src/helpers/lifeCycle.ts b/node_modules/uni-simple-router/src/helpers/lifeCycle.ts deleted file mode 100644 index a2ab776..0000000 --- a/node_modules/uni-simple-router/src/helpers/lifeCycle.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { navtoRule, navErrorRule, Router, proxyHookName, guardHookRule, totalNextRoute, hookToggle} from '../options/base'; -import { LifeCycleConfig, InstantiateConfig} from '../options/config'; -import {onTriggerEachHook} from '../public/hooks' - -export function registerHook(list:Array, fn:Function):void { - list[0] = fn; -} - -export function registerRouterHooks(cycleHooks:T, options:InstantiateConfig):T { - registerHook(cycleHooks.routerBeforeHooks, function(to:totalNextRoute, from: totalNextRoute, next:(rule?: navtoRule|false)=>void):void { - (options.routerBeforeEach as Function)(to, from, next); - }) - registerHook(cycleHooks.routerAfterHooks, function(to:totalNextRoute, from: totalNextRoute):void { - (options.routerAfterEach as Function)(to, from); - }) - registerHook(cycleHooks.routerErrorHooks, function(error:navErrorRule, router:Router):void { - (options.routerErrorEach as Function)(error, router); - }) - return cycleHooks; -} - -export function registerEachHooks(router:Router, hookType:proxyHookName, userGuard:guardHookRule) { - registerHook(router.lifeCycle[hookType], function( - to:totalNextRoute, - from: totalNextRoute, - next:(rule?: navtoRule|false)=>void, - router:Router, - auto:boolean, - ):void { - if (auto) { // h5端 vue-router自动触发 非自己调用触发 - onTriggerEachHook(to, from, router, hookToggle[hookType], next) - } else { - userGuard(to, from, next) - } - }) -} diff --git a/node_modules/uni-simple-router/src/helpers/mixins.ts b/node_modules/uni-simple-router/src/helpers/mixins.ts deleted file mode 100644 index 9a02f34..0000000 --- a/node_modules/uni-simple-router/src/helpers/mixins.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Router, routesMapRule, RoutesRule, pageTypeRule} from '../options/base'; -import {createRouteMap} from '../helpers/createRouteMap' -import {buildVueRoutes, buildVueRouter} from '../H5/buildRouter' -import {proxyEachHook} from '../H5/proxyHook' -import {registerLoddingPage} from '../app/appPatch'; -import { proxyPageHook } from '../public/page'; -import { forceGuardEach } from '../public/methods'; -import { assertParentChild, voidFun } from './utils'; -import { getEnterPath } from '../applets/appletPatch'; -import { mpPlatformReg } from './config'; - -let registerRouter:boolean = false; -let onloadProxyOk:boolean = false; - -const appletProxy:{ - app:boolean; - page:string; -} = { - app: false, - page: '' -} - -export function getMixins(Vue:any, router: Router):{ - beforeCreate(this: any): void; -} | { - beforeCreate(): void; -} | { - onLaunch(): void; -} { - let platform = router.options.platform; - if (new RegExp(mpPlatformReg, 'g').test(platform)) { - platform = 'app-lets'; - } - const toggleHooks = { - h5: { - beforeCreate(this: any): void { - if (this.$options.router) { - router.$route = this.$options.router; // 挂载vue-router到路由对象下 - let vueRouteMap:RoutesRule[]|RoutesRule = []; - if (router.options.h5?.vueRouterDev) { - vueRouteMap = router.options.routes; - } else { - vueRouteMap = createRouteMap(router, this.$options.router.options.routes).finallyPathMap; - (router.routesMap as routesMapRule).vueRouteMap = vueRouteMap; - buildVueRoutes(router, vueRouteMap); - } - buildVueRouter(router, this.$options.router, vueRouteMap); - proxyEachHook(router, this.$options.router); - } - } - }, - 'app-plus': { - beforeCreate(this: any): void { - if (!registerRouter) { - registerRouter = true; - proxyPageHook(this, router, 'app'); - registerLoddingPage(router); - } - } - }, - 'app-lets': { - beforeCreate(this: any): void { - // 保证这个函数不会被重写 - const pluginMark = $npm_package_name; - voidFun(pluginMark); - - let isProxy:boolean = true; - const pageType:pageTypeRule = this.$options.mpType; - - if (onloadProxyOk) { - return - } - - if (pageType === 'component') { - isProxy = assertParentChild(appletProxy['page'], this); - } else { - if (pageType === 'page') { - appletProxy[pageType] = getEnterPath(this, router); - router.enterPath = appletProxy[pageType]; // 我不确定在不同端是否都是同样的变现?可能有的为非绝对路径? - } else { - appletProxy[pageType] = true; - } - } - if (isProxy) { - proxyPageHook(this, router, pageType); - } - }, - onLoad(this: any):void{ - // 保证这个函数不会被重写,否则必须在启动页写onLoad - const pluginMark = $npm_package_name; - voidFun(pluginMark); - - if (!onloadProxyOk && assertParentChild(appletProxy['page'], this)) { - onloadProxyOk = true; - forceGuardEach(router); - } - } - } - }; - return toggleHooks[(platform as 'h5'|'app-plus'|'app-lets')]; -} -export function initMixins(Vue: any, router: Router) { - const routesMap = createRouteMap(router, router.options.routes); - router.routesMap = routesMap; // 挂载自身路由表到路由对象下 - // Vue.util.defineReactive(router, '_Route', createRoute(router, 19970806)) - Vue.mixin({ - ...getMixins(Vue, router) - }); -} diff --git a/node_modules/uni-simple-router/src/helpers/utils.ts b/node_modules/uni-simple-router/src/helpers/utils.ts deleted file mode 100644 index 7fbd76f..0000000 --- a/node_modules/uni-simple-router/src/helpers/utils.ts +++ /dev/null @@ -1,452 +0,0 @@ -import {H5Config, InstantiateConfig} from '../options/config'; -import {RoutesRule, routesMapRule, routesMapKeysRule, Router, totalNextRoute, objectAny, navErrorRule, NAVTYPE, navRoute, uniBackApiRule, uniBackRule} from '../options/base'; -import {baseConfig} from '../helpers/config'; -import {ERRORHOOK} from '../public/hooks' -import {warnLock} from '../helpers/warn' -import { createRoute, navjump } from '../public/methods'; -const Regexp = require('path-to-regexp'); - -export function voidFun(...args:any):void{} - -export function def( - defObject:objectAny, - key:string, - getValue:Function -) { - Object.defineProperty(defObject, key, { - get() { - return getValue(); - } - }) -} - -export function timeOut(time:number):Promise { - return new Promise(resolve => { - setTimeout(() => { - resolve(); - }, time) - }) -} - -export function mergeConfig(baseConfig: T, userConfig: T): T { - const config: {[key: string]: any} = Object.create(null); - const baseConfigKeys: Array = Object.keys(baseConfig).concat(['resolveQuery', 'parseQuery']); - for (let i = 0; i < baseConfigKeys.length; i += 1) { - const key = baseConfigKeys[i]; - if (userConfig[key] != null) { - if (userConfig[key].constructor === Object) { - config[key] = { - ...baseConfig[key], - ...userConfig[key] - }; - } else if (key === 'routes') { - config[key] = [ - ...baseConfig[key], - ...userConfig[key] - ]; - } else { - config[key] = userConfig[key]; - } - } else { - config[key] = baseConfig[key]; - } - } - return config as T; -} - -export function notDeepClearNull(object:T):T { - for (const key in object) { - if (object[key] == null) { - delete object[key]; - } - } - return object; -} - -export function getRoutePath(route: RoutesRule, router:Router): { - finallyPath: string | string[]; - aliasPath: string; - path: string; - alias: string | string[] | undefined; -} { - let finallyPath = route.aliasPath || route.alias || route.path; - if (router.options.platform !== 'h5') { - finallyPath = route.path - } - return { - finallyPath, - aliasPath: route.aliasPath || route.path, - path: route.path, - alias: route.alias - } -} - -export function assertNewOptions( - options: T -): T | never { - const {platform, routes} = options; - if (platform == null) { - throw new Error(`你在实例化路由时必须传递 'platform'`); - } - if (routes == null || routes.length === 0) { - throw new Error(`你在实例化路由时必须传递 routes 为空,这是无意义的。`); - } - if (options.platform === 'h5') { - if (options.h5?.vueRouterDev) { - baseConfig.routes = []; - } - } - const mergeOptions = mergeConfig(baseConfig as T, options); - return mergeOptions; -} - -export function getWildcardRule( - router:Router, - msg?:navErrorRule -):RoutesRule|never { - const routesMap = (router.routesMap as routesMapRule); - const route = routesMap.finallyPathMap['*']; - if (route) { // 有写通配符 - return route - } - if (msg) { - ERRORHOOK[0](msg, router); - } - throw new Error(`当前路由表匹配规则已全部匹配完成,未找到满足的匹配规则。你可以使用 '*' 通配符捕捉最后的异常`); -} - -export function notRouteTo404( - router:Router, - toRoute:RoutesRule|{ - redirect:any; - path:string - }, - parseToRule:totalNextRoute, - navType:NAVTYPE -):RoutesRule|totalNextRoute|never { - if (toRoute.path !== '*') { // 不是通配符 正常匹配成功 - return (toRoute as RoutesRule); - } - - const redirect = toRoute.redirect; - - if (typeof redirect === 'undefined') { - throw new Error(` * 通配符必须配合 redirect 使用。redirect: string | Location | Function`); - } - - let newRoute = redirect; - if (typeof newRoute === 'function') { - newRoute = newRoute(parseToRule) as totalNextRoute; - } - const redirectRule = navjump(newRoute as totalNextRoute, router, navType, undefined, undefined, undefined, false); - return (redirectRule as totalNextRoute); -} - -export function routesForMapRoute( - router: Router, - path: string, - mapArrayKey:Array, - deepFind:boolean|undefined = false -):RoutesRule|never { - if (router.options.h5?.vueRouterDev) { - return {path} - } - // 【Fixe】 https://github.com/SilurianYang/uni-simple-router/issues/252 - const startPath = path.split('?')[0]; - let wildcard = ''; - const routesMap = (router.routesMap as routesMapRule); - for (let i = 0; i < mapArrayKey.length; i++) { - const mapKey = mapArrayKey[i]; - const mapList = routesMap[mapKey]; - for (const [key, value] of Object.entries(mapList)) { - if (key === '*') { - if (wildcard === '') { - wildcard = '*' - } - continue; - } - const route:string|RoutesRule = value; - let rule:string = key; - if (getDataType|objectAny>(mapList) === '[object Array]') { - rule = (route as string); - } - const pathRule:RegExp = Regexp(rule); - const result = pathRule.exec(startPath); - if (result != null) { - if (getDataType(route) === '[object String]') { - return routesMap.finallyPathMap[(route as string)]; - } - return (route as RoutesRule); - } - } - } - // 【Fixe】 https://github.com/SilurianYang/uni-simple-router/issues/302 2021-8-4 16:38:44 - if (deepFind) { - return ({} as RoutesRule); - } - if (routesMap['aliasPathMap']) { - const results = routesForMapRoute(router, path, ['aliasPathMap'], true); - if (Object.keys(results).length > 0) { - return results; - } - } - if (wildcard !== '') { - return getWildcardRule(router); - } - throw new Error(`${path} 路径无法在路由表中找到!检查跳转路径及路由表`); -} - -export function getDataType(data:T):string { - return Object.prototype.toString.call(data) -} - -export function copyData(object:T): T { - return JSON.parse(JSON.stringify(object)) -} - -export function getUniCachePage(pageIndex?:number):T|[] { - const pages:T = getCurrentPages(); - if (pageIndex == null) { - return pages - } - if (pages.length === 0) { - return pages; - } - const page = pages.reverse()[pageIndex]; - if (page == null) { - return [] - } - return page; -} - -export function urlToJson(url :string):{ - path:string; - query:objectAny -} { - const query:objectAny = {}; - const [path, params] = url.split('?'); - if (params != null) { - const parr = params.split('&'); - for (const i of parr) { - const arr = i.split('='); - query[arr[0]] = arr[1]; - } - } - return { - path, - query - } -} - -export function forMatNextToFrom( - router:Router, - to:T, - from:T -):{ - matTo:T; - matFrom: T; -} { - let [matTo, matFrom] = [to, from]; - if (router.options.platform === 'h5') { - const {vueNext, vueRouterDev} = (router.options.h5 as H5Config); - if (!vueNext && !vueRouterDev) { - matTo = createRoute(router, undefined, matTo) as T; - matFrom = createRoute(router, undefined, matFrom) as T; - } - } else { - matTo = createRoute(router, undefined, deepClone(matTo)) as T; - matFrom = createRoute(router, undefined, deepClone(matFrom)) as T; - } - return { - matTo: matTo, - matFrom: matFrom - } -} - -export function paramsToQuery( - router:Router, - toRule:totalNextRoute|string -):totalNextRoute|string { - if (router.options.platform === 'h5' && !router.options.h5?.paramsToQuery) { - return toRule; - } - if (getDataType(toRule) === '[object Object]') { - const {name, params, ...moreToRule} = (toRule as totalNextRoute); - let paramsQuery = params; - if (router.options.platform !== 'h5' && paramsQuery == null) { - paramsQuery = {}; - } - if (name != null && paramsQuery != null) { - let route = (router.routesMap as routesMapRule).nameMap[name]; - if (route == null) { - route = getWildcardRule(router, { type: 2, msg: `命名路由为:${name} 的路由,无法在路由表中找到!`, toRule}); - } - const {finallyPath} = getRoutePath(route, router); - if (finallyPath.includes(':')) { // 动态路由无法使用 paramsToQuery - ERRORHOOK[0]({ type: 2, msg: `动态路由:${finallyPath} 无法使用 paramsToQuery!`, toRule}, router); - } else { - return { - ...moreToRule, - path: finallyPath as string, - query: paramsQuery - } - } - } - } - return toRule -} - -export function assertDeepObject(object:objectAny):boolean { - let arrMark = null; - try { - arrMark = JSON.stringify(object).match(/\{|\[|\}|\]/g); - } catch (error) { - warnLock(`传递的参数解析对象失败。` + error) - } - if (arrMark == null) { - return false - } - if (arrMark.length > 3) { - return true; - } - return false -} - -export function baseClone< -T extends { - [key:string]:any -}, K extends keyof T ->( - source:T, - target:Array|objectAny -):Array|objectAny|null { - // 【Fixe】 https://github.com/SilurianYang/uni-simple-router/issues/292 - // 小程序会将null解析为字符串 undefined 建议不要在参数中传递 null - if (source == null) { - target = source; - } else { - for (const key of Object.keys(source)) { - const dyKey = key as T[K]; - if (source[key] === source) continue - if (typeof source[key] === 'object') { - target[dyKey] = getDataType(source[key]) === '[object Array]' ? ([] as Array) : ({} as objectAny) - target[dyKey] = baseClone(source[key], target[dyKey]) - } else { - target[dyKey] = source[key] - } - } - } - return target; -} - -export function deepClone(source:T):T { - const __ob__ = getDataType(source) === '[object Array]' ? ([] as Array) : ({} as objectAny); - baseClone(source, __ob__) - return __ob__ as T -} - -export function lockDetectWarn( - router:Router, - to:string|number|totalNextRoute|navRoute, - navType:NAVTYPE, - next:Function, - uniActualData:uniBackApiRule|uniBackRule|undefined = {}, - passiveType?:'beforeHooks'| 'afterHooks' -):void{ - if (passiveType === 'afterHooks') { - next(); - } else { - const {detectBeforeLock} = router.options; - detectBeforeLock && detectBeforeLock(router, to, navType); - if (router.$lockStatus) { - (router.options.routerErrorEach as (error: navErrorRule, router:Router) => void)({ - type: 2, - msg: '当前页面正在处于跳转状态,请稍后再进行跳转....', - NAVTYPE: navType, - uniActualData - }, router); - } else { - next(); - } - } -} - -export function assertParentChild( - parentPath:string, - vueVim:any, -):boolean { - while (vueVim.$parent != null) { - const mpPage = vueVim.$parent.$mp; - if (mpPage.page && mpPage.page.is === parentPath) { - return true; - } - vueVim = vueVim.$parent; - } - try { - if (vueVim.$mp.page.is === parentPath || vueVim.$mp.page.route === parentPath) { - return true - } - } catch (error) { - return false - } - return false -} - -export function resolveAbsolutePath( - path:string, - router:Router -):string|never { - const reg = /^\/?([^\?\s]+)(\?.+)?$/; - const trimPath = path.trim(); - if (!reg.test(trimPath)) { - throw new Error(`【${path}】 路径错误,请提供完整的路径(10001)。`); - } - const paramsArray = trimPath.match(reg); - if (paramsArray == null) { - throw new Error(`【${path}】 路径错误,请提供完整的路径(10002)。`); - } - const query:string = paramsArray[2] || ''; - if (/^\.\/[^\.]+/.test(trimPath)) { // 当前路径下 - const navPath:string = router.currentRoute.path + path; - return navPath.replace(/[^\/]+\.\//, ''); - } - const relative = paramsArray[1].replace(/\//g, `\\/`).replace(/\.\./g, `[^\\/]+`).replace(/\./g, '\\.'); - const relativeReg = new RegExp(`^\\/${relative}$`); - const route = router.options.routes.filter(it => relativeReg.test(it.path)); - if (route.length !== 1) { - throw new Error(`【${path}】 路径错误,尝试转成绝对路径失败,请手动转成绝对路径(10003)。`); - } - return route[0].path + query; -} - -export function deepDecodeQuery( - query:objectAny -):objectAny { - const formatQuery:objectAny = getDataType(query) === '[object Array]' ? [] : {}; - const keys = Object.keys(query); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - const it = query[key]; - if (typeof it === 'string') { - try { - let json = JSON.parse(decodeURIComponent(it)); - if (typeof json !== 'object') { - json = it; - } - formatQuery[key] = json; - } catch (error) { - try { - formatQuery[key] = decodeURIComponent(it) - } catch (error) { - formatQuery[key] = it - } - } - } else if (typeof it === 'object') { - const childQuery = deepDecodeQuery(it); - formatQuery[key] = childQuery - } else { - formatQuery[key] = it - } - } - return formatQuery -} diff --git a/node_modules/uni-simple-router/src/helpers/warn.ts b/node_modules/uni-simple-router/src/helpers/warn.ts deleted file mode 100644 index 817ffb7..0000000 --- a/node_modules/uni-simple-router/src/helpers/warn.ts +++ /dev/null @@ -1,37 +0,0 @@ - -import {debuggerConfig, debuggerArrayConfig} from '../options/config' -import {Router} from '../options/base' - -type callType='error'|'warn'|'log'; - -export function isLog(type:callType, dev:debuggerConfig, errText:any, enforce:boolean = false):boolean { - if (!enforce) { - const isObject = dev.toString() === '[object Object]'; - if (dev === false) { - return false - } else if (isObject) { - if ((dev as debuggerArrayConfig)[type] === false) { - return false; - } - } - } - console[type](errText); - return true; -} -export function err(errText:any, router:Router, enforce?:boolean):void { - const dev = (router.options.debugger as debuggerConfig); - isLog('error', dev, errText, enforce); -} - -export function warn(errText:any, router:Router, enforce?:boolean):void { - const dev = (router.options.debugger as debuggerConfig); - isLog('warn', dev, errText, enforce); -} - -export function log(errText:any, router:Router, enforce?:boolean):void { - const dev = (router.options.debugger as debuggerConfig); - isLog('log', dev, errText, enforce); -} -export function warnLock(errText:any):void { - console.warn(errText); -} diff --git a/node_modules/uni-simple-router/src/index.ts b/node_modules/uni-simple-router/src/index.ts deleted file mode 100644 index 3d5812f..0000000 --- a/node_modules/uni-simple-router/src/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export * from './options/base' -export * from './options/config' - -export { - runtimeQuit -} from './app/appPatch' - -export { - RouterMount, - createRouter -} from './public/router' diff --git a/node_modules/uni-simple-router/src/options/base.ts b/node_modules/uni-simple-router/src/options/base.ts deleted file mode 100644 index 2f23883..0000000 --- a/node_modules/uni-simple-router/src/options/base.ts +++ /dev/null @@ -1,245 +0,0 @@ -import {InstantiateConfig, LifeCycleConfig} from '../options/config'; - -export enum hookToggle{ - 'beforeHooks'='beforeEach', - 'afterHooks'='afterEach', - 'enterHooks'='beforeEnter' -} -export enum navtypeToggle{ - 'push'='navigateTo', - 'replace'='redirectTo', - 'replaceAll'='reLaunch', - 'pushTab'='switchTab', - 'back'='navigateBack' -} -export enum rewriteMethodToggle{ - 'navigateTo'='push', - 'navigate'='push', - 'redirectTo'='replace', - 'reLaunch'='replaceAll', - 'switchTab'='pushTab', - 'navigateBack'='back', -} -export type proxyDepsRule={ - resetIndex:Array; - hooks: { - [key: number]:{ - proxyHook:()=>void; - callHook:(enterPath:string)=>void; - resetHook: ()=>void - } - }; - options: {[key: number]: Array;}; -}; -export type backTypeRule='backbutton'|'navigateBack' -export type pageTypeRule='app'|'page'|'component'; -export type vueHookNameRule='onLaunch'|'onShow'|'onHide'|'onError'|'onInit'|'onLoad'|'onReady'|'onUnload'|'onResize'|'created'|'beforeMount'|'mounted'|'beforeDestroy'|'destroyed' -export type reNavMethodRule='navigateTo'|'redirectTo'|'reLaunch'|'switchTab'; -export type reNotNavMethodRule='navigateBack'; -export type reloadNavRule=totalNextRoute | false | undefined|string; -export type hookListRule=Array<(router:Router, to:totalNextRoute, from: totalNextRoute, toRoute:RoutesRule,next:Function)=>void> -export type guardHookRule=(to: totalNextRoute, from: totalNextRoute, next:(rule?: navtoRule|false)=>void)=>void; -export type navRuleStatus= 0|1|2|3; //0: next(false) 1:next(unknownType) 2:加锁状态,禁止跳转 3:在获取页面栈的时候,页面栈不够level获取 -export type proxyHookName='beforeHooks'|'afterHooks'; -export type navMethodRule = Promise; -export type objectAny={[propName: string]: any;}; -export type NAVTYPE = 'push' | 'replace' | 'replaceAll' | 'pushTab'|'back'; -export type startAnimationType = - | 'slide-in-right' - | 'slide-in-left' - | 'slide-in-top' - | 'slide-in-bottom' - | 'pop-in' - | 'fade-in' - | 'zoom-out' - | 'zoom-fade-out' - | 'none'; -export type endAnimationType = - | 'slide-out-right' - | 'slide-out-left' - | 'slide-out-top' - | 'slide-out-bottom' - | 'pop-out' - | 'fade-out' - | 'zoom-in' - | 'zoom-fade-in' - | 'none'; - -export type vueOptionRule = { - [propName in vueHookNameRule]: Array | undefined; -}; - -// 跳转api时,传递的跳转规则 -export interface navtoRule { - NAVTYPE?: NAVTYPE; // 跳转类型 v1.1.0+ - path?: string; // 跳转路径 绝对路径 - name?: string | undefined; // 跳转路径名称 - query?: objectAny; // 跳转使用path时 query包含需要传递的参数 - params?: objectAny; // 跳转使用name时 params包含需要传递的参数 - animationType?: startAnimationType|endAnimationType; - animationDuration?: number; - events?: objectAny; - success?: Function; - fail?: Function; - complete?: Function; -} -// h5 next管道函数中传递的from及to对象 -export interface h5NextRule { - fullPath?: string | undefined; - hash?: string | undefined; - matched?: Array; - meta?: object; - name?: undefined | string; - type?: undefined | string; -} - -export interface totalNextRoute extends h5NextRule, navtoRule { - path:string; - delta?:number; - [propName: string]: any; -} -export interface navRoute extends h5NextRule, navtoRule { - -} - -// 开始切换窗口动画 app端可用 -export interface startAnimationRule { - animationType?: startAnimationType; // 窗口关闭的动画效果 - animationDuration?: number; // 窗口关闭动画的持续时间 -} -// 关闭窗口时的动画 app端可用 -export interface endAnimationRule { - animationType?: endAnimationType; // 窗口关闭的动画效果 - animationDuration?: number; // 窗口关闭动画的持续时间 -} -export interface hookObjectRule { - options:Array; - hook:Function; -} - -// 执行路由跳转失败或者 next(false) 时走的规则 -export interface navErrorRule { - type: navRuleStatus; - msg: string; - to?:totalNextRoute; - from?:totalNextRoute; - nextTo?:any; - [propName:string]:any; -} -// uni原生api跳转时的规则 -export interface uniNavApiRule { - url: string; - openType?:'appLaunch', - query?:objectAny; - path?:string; - delta?:number; - detail?:{[propName:string]:any}; - animationType?:startAnimationType; - animationDuration?:number; - events?:{[propName:string]:any}; - success?:Function; - fail?:Function; - complete?:Function; - animation?:{ - animationType?:startAnimationType; - animationDuration?:number; - } -} - -export interface originMixins extends uniNavApiRule{ - BACKTYPE:''|backTypeRule -} - -// uni-app 原始返回api 回调参数 -export interface uniBackRule{ - from:backTypeRule; -} - -export interface uniBackApiRule{ - delta?: number; - animationDuration?: number; - animationType?:endAnimationType; -} - -export type routesMapKeysRule= - 'finallyPathList'| - 'finallyPathMap'| - 'aliasPathMap'| - 'pathMap'| - 'nameMap'| - 'vueRouteMap'; - -export interface routesMapRule{ - [key:string]:any; - finallyPathList: Array; - finallyPathMap:RoutesRule; - aliasPathMap: RoutesRule; - pathMap: RoutesRule; - nameMap:RoutesRule, - vueRouteMap:objectAny -} - -export interface routeRule{ - name:string|undefined; - meta:objectAny; - path:string; - query:objectAny; - params:objectAny; - fullPath:string; - NAVTYPE:NAVTYPE|''; - BACKTYPE?:backTypeRule|''; // v2.0.5 + - [propName: string]: any; -} - - -export interface RoutesRule { - path: string; // pages.json中的path 必须加上 '/' 开头 - component?: object; // H5端可用 - name?: string; // 命名路由 - components?: object; // 命名视图组件,H5端可用 - redirect?: string | Function; // H5端可用 - props?: boolean | object | Function; // H5端可用 - aliasPath?: string; // h5端 设置一个别名路径来替换 uni-app的默认路径 - alias?: string | Array; // H5端可用 - children?: Array; // 嵌套路由,H5端可用 - beforeEnter?:guardHookRule; // 路由元守卫 - meta?: any; // 其他格外参数 - [propName: string]: any; -} - -export interface Router { - [key:string]:any; - readonly lifeCycle: LifeCycleConfig; - readonly options: InstantiateConfig; - $lockStatus:boolean; - $route: object | null; - enterPath:string; - Vue:any; - appMain:{ - NAVTYPE:reNavMethodRule|reNotNavMethodRule, - path:string - }|{}; - proxyHookDeps: proxyDepsRule; - routesMap: routesMapRule|{}; - mount: Array<{app: any; el: string}>; - install(Vue: any): void; - push(to: totalNextRoute|navRoute | string,from?:totalNextRoute): void; // 动态的导航到一个新 URL 保留浏览历史 - replace(to: totalNextRoute|navRoute | string,from?:totalNextRoute): void; // 动态的导航到一个新 URL 关闭当前页面,跳转到的某个页面。 - replaceAll(to: totalNextRoute|navRoute | string,from?:totalNextRoute): void; // 动态的导航到一个新 URL 关闭所有页面,打开到应用内的某个页面 - pushTab(to: totalNextRoute|navRoute | string,from?:totalNextRoute): void; // 动态的导航到一个新 url 关闭所有页面,打开到应用内的某个tab - back(level:number|undefined,origin?:uniBackRule|uniBackApiRule):void; - forceGuardEach(navType:NAVTYPE|undefined,forceNav:boolean):void; //强制触发当前守卫 - beforeEach(userGuard:guardHookRule): void; // 添加全局前置路由守卫 - afterEach(userGuard:(to: totalNextRoute, from: totalNextRoute)=>void): void; // 添加全局后置路由守卫 -} - - -export type PromiseResolve=(value?: void | PromiseLike | undefined) => void; - -// @ts-ignore -declare module 'vue/types/vue' { - interface Vue { - $Router: Router; - $Route: routeRule; - } -} \ No newline at end of file diff --git a/node_modules/uni-simple-router/src/options/config.ts b/node_modules/uni-simple-router/src/options/config.ts deleted file mode 100644 index fc7efdc..0000000 --- a/node_modules/uni-simple-router/src/options/config.ts +++ /dev/null @@ -1,57 +0,0 @@ -import {startAnimationRule, hookListRule, RoutesRule, navtoRule, navErrorRule, Router, objectAny, NAVTYPE, totalNextRoute, navRoute} from './base'; - -export type debuggerConfig=boolean|debuggerArrayConfig; -export type platformRule='h5'|'app-plus'|'app-lets'|'mp-weixin'|'mp-baidu'|'mp-alipay'|'mp-toutiao'|'mp-qq'|'mp-360'; - -export interface H5Config { - paramsToQuery?: boolean; // h5端上通过params传参时规则是vue-router 刷新会丢失 开启此开关将变成?连接的方式 - vueRouterDev?: boolean; // 完全使用采用vue-router的开发模式 - vueNext?: boolean; // 在next管道函数中是否获取vueRouter next的原本参数 - mode?: string; - base?: string; - linkActiveClass?: string; - linkExactActiveClass?: string; - scrollBehavior?: Function; - fallback?: boolean; -} -export interface AppConfig { - registerLoadingPage?:boolean; // 是否注册过渡加载页 +v2.0.6 - loadingPageStyle?: () => object; // 当前等待页面的样式 必须返回一个json - loadingPageHook?: (view:any)=>void; // 刚刚打开页面处于等待状态,会触发此函数 - launchedHook?:()=>void; // 首次启动app完成 - animation?: startAnimationRule; // 页面切换动画 -} -export interface appletConfig { - animationDuration?:number; // 页面切换时间,有助于路由锁精准解锁 -} - -export interface debuggerArrayConfig{ - error?:boolean; - warn?:boolean; - log?:boolean; -} - -export interface InstantiateConfig { - [key:string]:any; - keepUniOriginNav?:boolean; // 重写uni-app的跳转方法;关闭后使用uni-app的原始方法跳转和插件api跳转等同 - platform:platformRule; // 当前运行平台 - h5?: H5Config; - APP?: AppConfig; - applet?:appletConfig; - debugger?: debuggerConfig; // 是否处于开发阶段 设置为true则打印日志 - routerBeforeEach?: (to:navtoRule, from:navtoRule, next:(rule?: navtoRule|false)=>void) => void; // router 前置路由函数 每次触发跳转前先会触发此函数 - routerAfterEach?: (to:navtoRule, from:navtoRule, next?: Function) => void; // router 后置路由函数 每次触发跳转后会触发此函数 - routerErrorEach?: (error: navErrorRule, router:Router) => void; - resolveQuery?:(jsonQuery:objectAny)=>objectAny; // 跳转之前把参数传递给此函数、返回最终的数据!有此函数不走默认方法 - parseQuery?:(jsonQuery:objectAny)=>objectAny; // 读取值之前把参数传递给此函数,返回最终的数据!有此函数不走默认方法 - detectBeforeLock?:(router:Router, to:string|number|totalNextRoute|navRoute, navType:NAVTYPE)=>void; // 在检测路由锁之前触发的函数 - routes: RoutesRule[]; -} -export interface LifeCycleConfig{ - beforeHooks: hookListRule; - afterHooks: hookListRule; - routerBeforeHooks: hookListRule; - routerAfterHooks: hookListRule; - routerErrorHooks: Array<(error:navErrorRule, router:Router)=>void>; -} - diff --git a/node_modules/uni-simple-router/src/public/hooks.ts b/node_modules/uni-simple-router/src/public/hooks.ts deleted file mode 100644 index e784b42..0000000 --- a/node_modules/uni-simple-router/src/public/hooks.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { - Router, - hookListRule, - navtoRule, - reloadNavRule, - totalNextRoute, - hookToggle, - NAVTYPE, - navErrorRule, - objectAny -} from '../options/base'; -import { - routesForMapRoute, - getDataType, - forMatNextToFrom, - getUniCachePage, - voidFun -} from '../helpers/utils' -import { navjump } from './methods'; -import { proxyH5Mount } from '../H5/proxyHook'; -import { tabIndexSelect } from '../app/appPatch'; - -export const ERRORHOOK:Array<(error:navErrorRule, router:Router)=>void> = [ - (error, router) => router.lifeCycle.routerErrorHooks[0](error, router) -] -export const HOOKLIST: hookListRule = [ - (router, to, from, toRoute, next) => callHook(router.lifeCycle.routerBeforeHooks[0], to, from, router, next), - (router, to, from, toRoute, next) => callBeforeRouteLeave(router, to, from, next), - (router, to, from, toRoute, next) => callHook(router.lifeCycle.beforeHooks[0], to, from, router, next), - (router, to, from, toRoute, next) => callHook(toRoute.beforeEnter, to, from, router, next), - (router, to, from, toRoute, next) => callHook(router.lifeCycle.afterHooks[0], to, from, router, next, false), - (router, to, from, toRoute, next) => { - router.$lockStatus = false; - if (router.options.platform === 'h5') { - proxyH5Mount(router); - } - return callHook(router.lifeCycle.routerAfterHooks[0], to, from, router, next, false) - } -]; - -export function callBeforeRouteLeave( - router:Router, - to:totalNextRoute, - from:totalNextRoute, - resolve:Function -):void { - const page = getUniCachePage(0); - let beforeRouteLeave; - if (Object.keys(page).length > 0) { - let leaveHooks:Array|undefined|Function; - if (router.options.platform === 'h5') { - leaveHooks = (page as objectAny).$options.beforeRouteLeave; - } else { - if ((page as objectAny).$vm != null) { - leaveHooks = (page as objectAny).$vm.$options.beforeRouteLeave; - } - } - switch (getDataType>((leaveHooks as Array))) { - case '[object Array]': // h5端表现 - beforeRouteLeave = (leaveHooks as Array)[0]; - beforeRouteLeave = beforeRouteLeave.bind(page) - break; - case '[object Function]': // 目前app端表现 - beforeRouteLeave = (leaveHooks as Function).bind((page as objectAny).$vm); - break - } - } - return callHook(beforeRouteLeave, to, from, router, resolve); -} - -export function callHook( - hook:Function|undefined, - to:totalNextRoute, - from: totalNextRoute, - router:Router, - resolve:Function, - hookAwait:boolean|undefined = true -):void { - if (hook != null && hook instanceof Function) { - if (hookAwait === true) { - hook(to, from, resolve, router, false); - } else { - hook(to, from, () => {}, router, false); - resolve(); - } - } else { - resolve(); - } -} - -export function onTriggerEachHook( - to:totalNextRoute, - from: totalNextRoute, - router:Router, - hookType:hookToggle, - next:(rule?: navtoRule|false)=>void, -):void { - let callHookList:hookListRule = []; - switch (hookType) { - case 'beforeEach': - callHookList = HOOKLIST.slice(0, 3); - break; - case 'afterEach': - callHookList = HOOKLIST.slice(4); - break - case 'beforeEnter': - callHookList = HOOKLIST.slice(3, 4); - break; - } - transitionTo(router, to, from, 'push', callHookList, next); -} - -export function transitionTo( - router:Router, - to:totalNextRoute, - from: totalNextRoute, - navType:NAVTYPE, - callHookList:hookListRule, - hookCB:Function -) :void{ - const {matTo, matFrom} = forMatNextToFrom(router, to, from); - if (router.options.platform === 'h5') { - loopCallHook(callHookList, 0, hookCB, router, matTo, matFrom, navType); - } else { - loopCallHook(callHookList.slice(0, 4), 0, () => { - hookCB(() => { // 非H5端等他跳转完才触发最后两个生命周期 - loopCallHook(callHookList.slice(4), 0, voidFun, router, matTo, matFrom, navType); - }); - }, router, matTo, matFrom, navType); - } -} - -export function loopCallHook( - hooks:hookListRule, - index:number, - next:Function, - router:Router, - matTo:totalNextRoute, - matFrom: totalNextRoute, - navType:NAVTYPE, -): void|Function { - const toRoute = routesForMapRoute(router, matTo.path, ['finallyPathMap', 'pathMap']); - if (hooks.length - 1 < index) { - return next(); - } - const hook = hooks[index]; - const errHook = ERRORHOOK[0]; - hook(router, matTo, matFrom, toRoute, (nextTo:reloadNavRule) => { - if (router.options.platform === 'app-plus') { - if (nextTo === false || (typeof nextTo === 'string' || typeof nextTo === 'object')) { - tabIndexSelect(matTo, matFrom); - } - } - if (nextTo === false) { - if (router.options.platform === 'h5') { - next(false); - } - errHook({ type: 0, msg: '管道函数传递 false 导航被终止!', matTo, matFrom, nextTo }, router) - } else if (typeof nextTo === 'string' || typeof nextTo === 'object') { - let newNavType = navType; - let newNextTo = nextTo; - if (typeof nextTo === 'object') { - const {NAVTYPE: type, ...moreTo} = nextTo; - newNextTo = moreTo; - if (type != null) { - newNavType = type; - } - } - navjump(newNextTo, router, newNavType, {from: matFrom, next}) - } else if (nextTo == null) { - index++; - loopCallHook(hooks, index, next, router, matTo, matFrom, navType) - } else { - errHook({ type: 1, msg: '管道函数传递未知类型,无法被识别。导航被终止!', matTo, matFrom, nextTo }, router) - } - }); -} diff --git a/node_modules/uni-simple-router/src/public/methods.ts b/node_modules/uni-simple-router/src/public/methods.ts deleted file mode 100644 index 39cbc98..0000000 --- a/node_modules/uni-simple-router/src/public/methods.ts +++ /dev/null @@ -1,258 +0,0 @@ -import { - NAVTYPE, - Router, - totalNextRoute, - objectAny, - routeRule, - reNavMethodRule, - rewriteMethodToggle, - navtypeToggle, - navErrorRule, - uniBackApiRule, - uniBackRule, - navRoute -} from '../options/base' -import { - queryPageToMap, - resolveQuery, - parseQuery -} from './query' -import { - voidFun, - paramsToQuery, - getUniCachePage, - routesForMapRoute, - copyData, - lockDetectWarn, - getDataType, - notRouteTo404, - deepDecodeQuery -} from '../helpers/utils' -import { transitionTo } from './hooks'; -import {createFullPath, createToFrom} from '../public/page' -import {HOOKLIST} from './hooks' - -export function lockNavjump( - to:string|totalNextRoute|navRoute, - router:Router, - navType:NAVTYPE, - forceNav?:boolean, - animation?:uniBackApiRule|uniBackRule -):void{ - lockDetectWarn(router, to, navType, () => { - if (router.options.platform !== 'h5') { - router.$lockStatus = true; - } - navjump(to as totalNextRoute, router, navType, undefined, forceNav, animation); - }, animation); -} -export function navjump( - to:string|totalNextRoute, - router:Router, - navType:NAVTYPE, - nextCall?:{ - from:totalNextRoute; - next:Function; - }, - forceNav?:boolean, - animation?:uniBackApiRule|uniBackRule, - callHook:boolean|undefined = true -) :void|never|totalNextRoute { - if (navType === 'back') { - let level:number = 1; - if (typeof to === 'string') { - level = +to; - } else { - level = to.delta || 1; - } - if (router.options.platform === 'h5') { - (router.$route as any).go(-level); - - // Fixe https://github.com/SilurianYang/uni-simple-router/issues/266 2021年6月3日11:14:38 - // @ts-ignore - const success = (animation || {success: voidFun}).success || voidFun; - // @ts-ignore - const complete = (animation || {complete: voidFun}).complete || voidFun; - success({errMsg: 'navigateBack:ok'}); - complete({errMsg: 'navigateBack:ok'}); - return; - } else { - to = backOptionsBuild(router, level, animation); - } - } - const {rule} = queryPageToMap(to, router); - rule.type = navtypeToggle[navType]; - const toRule = paramsToQuery(router, rule); - let parseToRule = resolveQuery(toRule as totalNextRoute, router); - if (router.options.platform === 'h5') { - if (navType !== 'push') { - navType = 'replace'; - } - if (nextCall != null) { // next 管道函数拦截时 直接next即可 - nextCall.next({ - replace: navType !== 'push', - ...parseToRule - }) - } else { - // Fixe https://github.com/SilurianYang/uni-simple-router/issues/240 2021年3月7日14:45:36 - if (navType === 'push' && Reflect.has(parseToRule, 'events')) { - if (Reflect.has(parseToRule, 'name')) { - throw new Error(`在h5端上使用 'push'、'navigateTo' 跳转时,如果包含 events 不允许使用 name 跳转,因为 name 实现了动态路由。请更换为 path 或者 url 跳转!`); - } else { - uni['navigateTo'](parseToRule, true, voidFun, forceNav); - } - } else { - (router.$route as any)[navType](parseToRule, (parseToRule as totalNextRoute).success || voidFun, (parseToRule as totalNextRoute).fail || voidFun) - } - } - } else { - let from:totalNextRoute = {path: ''}; - if (nextCall == null) { - let toRoute = routesForMapRoute(router, parseToRule.path, ['finallyPathMap', 'pathMap']); - toRoute = notRouteTo404(router, toRoute, parseToRule, navType); - parseToRule = { ...toRoute, ...{params: {}}, ...parseToRule, ...{path: toRoute.path} } - from = createToFrom(parseToRule, router); - } else { - from = nextCall.from; - } - createFullPath(parseToRule, from); - if (callHook === false) { - return parseToRule; - } - transitionTo(router, parseToRule, from, navType, HOOKLIST, function( - callOkCb:Function - ):void { - uni[navtypeToggle[navType]](parseToRule, true, callOkCb, forceNav); - }) - } -} - -export function backOptionsBuild( - router:Router, - level:number, - animation:uniBackApiRule|uniBackRule|undefined = {}, -):totalNextRoute { - const toRule = createRoute(router, level, undefined, {NAVTYPE: 'back', ...animation}); - const navjumpRule:totalNextRoute = { - ...animation, - path: toRule.path, - query: toRule.query, - delta: level - } - if (getDataType(animation) === '[object Object]') { - const {animationDuration, animationType} = (animation as uniBackApiRule) - if (animationDuration != null) { - navjumpRule.animationDuration = animationDuration; - } - if (animationType != null) { - navjumpRule.animationType = animationType; - } - - const {from} = (animation as uniBackRule) - if (from != null) { - navjumpRule.BACKTYPE = from; - } - } - return navjumpRule; -} - -export function forceGuardEach( - router:Router, - navType:NAVTYPE|undefined = 'replaceAll', - forceNav:undefined|boolean = false -):void|never { - if (router.options.platform === 'h5') { - throw new Error(`在h5端上使用:forceGuardEach 是无意义的,目前 forceGuardEach 仅支持在非h5端上使用`); - } - const currentPage = getUniCachePage(0); - if (Object.keys(currentPage).length === 0) { - (router.options.routerErrorEach as (error: navErrorRule, router:Router) => void)({ - type: 3, - NAVTYPE: navType, - uniActualData: {}, - level: 0, - msg: `不存在的页面栈,请确保有足够的页面可用,当前 level:0` - }, router); - } - const {route, options} = currentPage as objectAny; - lockNavjump({ - path: `/${route}`, - query: deepDecodeQuery(options || {}) - }, router, navType, forceNav); -} - -export function createRoute( - router:Router, - level:number|undefined = 0, - orignRule?:totalNextRoute, - uniActualData:objectAny|undefined = {}, -):routeRule|never { - const route:routeRule = { - name: '', - meta: {}, - path: '', - fullPath: '', - NAVTYPE: '', - query: {}, - params: {}, - BACKTYPE: (orignRule || {BACKTYPE: ''}).BACKTYPE || '' // v2.0.5 + - }; - - if (level === 19970806) { // 首次构建响应式 页面不存在 直接返回 - return route - } - if (router.options.platform === 'h5') { - let vueRoute:totalNextRoute = {path: ''}; - if (orignRule != null) { - vueRoute = orignRule; - } else { - vueRoute = (router.$route as objectAny).currentRoute; - } - const matRouteParams = copyData(vueRoute.params as objectAny); - delete matRouteParams.__id__; - const toQuery = parseQuery({...matRouteParams, ...copyData(vueRoute.query as objectAny)}, router); - vueRoute = {...vueRoute, query: toQuery} - route.path = vueRoute.path; - route.fullPath = vueRoute.fullPath || ''; - route.query = deepDecodeQuery(vueRoute.query || {}); - route.NAVTYPE = rewriteMethodToggle[vueRoute.type as reNavMethodRule || 'reLaunch']; - } else { - let appPage:objectAny = {}; - if (orignRule != null) { - appPage = {...orignRule, openType: orignRule.type}; - } else { - const page = getUniCachePage(level); - if (Object.keys(page).length === 0) { - const {NAVTYPE: _NAVTYPE, ..._args} = uniActualData; - const errorMsg:string = `不存在的页面栈,请确保有足够的页面可用,当前 level:${level}`; - (router.options.routerErrorEach as (error: navErrorRule, router:Router) => void)({ - type: 3, - msg: errorMsg, - NAVTYPE: _NAVTYPE, - level, - uniActualData: _args - }, router); - throw new Error(errorMsg); - } - // Fixes: https://github.com/SilurianYang/uni-simple-router/issues/196 - const pageOptions:objectAny = (page as objectAny).options || {}; - appPage = { - ...(page as objectAny).$page || {}, - query: deepDecodeQuery(pageOptions), - fullPath: decodeURIComponent(((page as objectAny).$page || {}).fullPath || '/' + (page as objectAny).route) - } - if (router.options.platform !== 'app-plus') { - appPage.path = `/${(page as objectAny).route}` - } - } - const openType:reNavMethodRule|'navigateBack' = appPage.openType; - route.query = appPage.query; - route.path = appPage.path; - route.fullPath = appPage.fullPath; - route.NAVTYPE = rewriteMethodToggle[openType || 'reLaunch']; - } - const tableRoute = routesForMapRoute(router, route.path, ['finallyPathMap', 'pathMap']) - const perfectRoute = { ...route, ...tableRoute}; - perfectRoute.query = parseQuery(perfectRoute.query, router); - return perfectRoute; -} diff --git a/node_modules/uni-simple-router/src/public/page.ts b/node_modules/uni-simple-router/src/public/page.ts deleted file mode 100644 index 3a32bf3..0000000 --- a/node_modules/uni-simple-router/src/public/page.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { proxyHookName } from '../helpers/config'; -import { getDataType, getUniCachePage, deepClone} from '../helpers/utils'; -import { objectAny, pageTypeRule, Router, totalNextRoute, vueOptionRule } from '../options/base'; -import {createRoute} from './methods' -import { stringifyQuery } from './query'; - -export function createToFrom( - to:totalNextRoute, - router:Router, -):totalNextRoute { - let fromRoute:totalNextRoute = {path: ''}; - const page = getUniCachePage|objectAny>(0); - if (getDataType|objectAny>(page) === '[object Array]') { - fromRoute = deepClone(to) - } else { - fromRoute = createRoute(router) as totalNextRoute; - } - return fromRoute; -} - -export function createFullPath( - to:totalNextRoute, - from:totalNextRoute -):void{ - if (to.fullPath == null) { - const strQuery = stringifyQuery(to.query as objectAny); - to.fullPath = to.path + strQuery; - } - if (from.fullPath == null) { - const strQuery = stringifyQuery(from.query as objectAny); - from.fullPath = from.path + strQuery; - } -} - -export function proxyPageHook( - vueVim:any, - router:Router, - pageType:pageTypeRule -):void { - const hookDeps = router.proxyHookDeps; - const pageHook:vueOptionRule = vueVim.$options; - for (let i = 0; i < proxyHookName.length; i++) { - const hookName = proxyHookName[i]; - const hookList = pageHook[hookName]; - if (hookList) { - for (let k = 0; k < hookList.length; k++) { - const originHook = hookList[k]; - if (originHook.toString().includes($npm_package_name)) { - continue - } - const resetIndex = Object.keys(hookDeps.hooks).length + 1 - const proxyHook = (...args:Array):void => { - hookDeps.resetIndex.push(resetIndex); - hookDeps.options[resetIndex] = args; - } - const [resetHook] = hookList.splice(k, 1, proxyHook); - hookDeps.hooks[resetIndex] = { - proxyHook, - callHook: (enterPath:string) :void => { - if (router.enterPath.replace(/^\//, '') !== enterPath.replace(/^\//, '') && pageType !== 'app') { - return; - } - const options = hookDeps.options[resetIndex]; - resetHook.apply(vueVim, options); - }, - resetHook: () :void => { - hookList.splice(k, 1, resetHook) - } - }; - } - } - } -} -export function resetAndCallPageHook( - router:Router, - enterPath:string, - reset:boolean|undefined = true -):void{ - // Fixe: https://github.com/SilurianYang/uni-simple-router/issues/206 - const pathInfo = enterPath.trim().match(/^(\/?[^\?\s]+)(\?[\s\S]*$)?$/); - if (pathInfo == null) { - throw new Error(`还原hook失败。请检查 【${enterPath}】 路径是否正确。`); - } - enterPath = pathInfo[1]; - const proxyHookDeps = router.proxyHookDeps; - const resetHooksArray = proxyHookDeps.resetIndex - for (let i = 0; i < resetHooksArray.length; i++) { - const index = resetHooksArray[i]; - const {callHook} = proxyHookDeps.hooks[index]; - callHook(enterPath); - } - if (reset) { - resetPageHook(router); - } -} -export function resetPageHook( - router:Router -) { - const proxyHookDeps = router.proxyHookDeps; - for (const [, {resetHook}] of Object.entries(proxyHookDeps.hooks)) { - resetHook(); - } -} diff --git a/node_modules/uni-simple-router/src/public/query.ts b/node_modules/uni-simple-router/src/public/query.ts deleted file mode 100644 index a0354fa..0000000 --- a/node_modules/uni-simple-router/src/public/query.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { - objectAny, - Router, - routesMapRule, - RoutesRule, - totalNextRoute -} from '../options/base'; -import { - getDataType, - urlToJson, - routesForMapRoute, - getRoutePath, - assertDeepObject, - copyData, - getWildcardRule, - deepDecodeQuery -} from '../helpers/utils' -import {ERRORHOOK} from './hooks' -import {warn} from '../helpers/warn' - -const encodeReserveRE = /[!'()*]/g -const encodeReserveReplacer = (c:string) => '%' + c.charCodeAt(0).toString(16) -const commaRE = /%2C/g - -const encode = (str:string) => - encodeURIComponent(str) - .replace(encodeReserveRE, encodeReserveReplacer) - .replace(commaRE, ',') - -export function queryPageToMap( - toRule:string|totalNextRoute, - router:Router -) :{ - rule:totalNextRoute; - route:RoutesRule, - query:objectAny -} { - let query:objectAny = {}; - let route:RoutesRule|string = ''; - let successCb = (toRule as totalNextRoute).success; - let failCb = (toRule as totalNextRoute).fail; - if (getDataType(toRule) === '[object Object]') { - const objNavRule = (toRule as totalNextRoute); - if (objNavRule.path != null) { - const {path, query: newQuery} = urlToJson(objNavRule.path); - route = routesForMapRoute(router, path, ['finallyPathList', 'pathMap']); - query = {...newQuery, ...((toRule as totalNextRoute).query || {})}; - objNavRule.path = path; - objNavRule.query = query; - delete (toRule as totalNextRoute).params; - } else if (objNavRule.name != null) { - route = (router.routesMap as routesMapRule).nameMap[objNavRule.name]; - if (route == null) { - route = getWildcardRule(router, { type: 2, msg: `命名路由为:${objNavRule.name} 的路由,无法在路由表中找到!`, toRule}); - } else { - query = (toRule as totalNextRoute).params || {}; - delete (toRule as totalNextRoute).query; - } - } else { - route = getWildcardRule(router, { type: 2, msg: `${toRule} 解析失败,请检测当前路由表下是否有包含。`, toRule}); - } - } else { - toRule = urlToJson((toRule as string)) as totalNextRoute; - route = routesForMapRoute(router, toRule.path, ['finallyPathList', 'pathMap']) - query = toRule.query as objectAny; - } - if (router.options.platform === 'h5') { - const {finallyPath} = getRoutePath(route as RoutesRule, router); - if (finallyPath.includes(':') && (toRule as totalNextRoute).name == null) { - ERRORHOOK[0]({ type: 2, msg: `当有设置 alias或者aliasPath 为动态路由时,不允许使用 path 跳转。请使用 name 跳转!`, route}, router) - } - const completeCb = (toRule as totalNextRoute).complete; - const cacheSuccess = (toRule as totalNextRoute).success; - const cacheFail = (toRule as totalNextRoute).fail; - if (getDataType(completeCb) === '[object Function]') { - const publicCb = function(this:any, args:Array, callHook:Function|undefined):void { - if (getDataType(callHook) === '[object Function]') { - (callHook as Function).apply(this, args); - } - (completeCb as Function).apply(this, args); - } - successCb = function(this:any, ...args:any):void{ - publicCb.call(this, args, cacheSuccess); - }; - failCb = function(this:any, ...args:any):void{ - publicCb.call(this, args, cacheFail); - }; - } - } - const rule = (toRule as totalNextRoute); - if (getDataType(rule.success) === '[object Function]') { - rule.success = successCb; - } - if (getDataType(rule.fail) === '[object Function]') { - rule.fail = failCb; - } - return { - rule, - route: (route as RoutesRule), - query - } -} - -export function resolveQuery( - toRule:totalNextRoute, - router:Router -):totalNextRoute { - let queryKey:'params'|'query' = 'query'; - if (toRule.params as objectAny != null) { - queryKey = 'params'; - } - if (toRule.query as objectAny != null) { - queryKey = 'query'; - } - const query = copyData(toRule[queryKey] || {}); - const {resolveQuery: userResolveQuery} = router.options; - if (userResolveQuery) { - const jsonQuery = userResolveQuery(query); - if (getDataType(jsonQuery) !== '[object Object]') { - warn('请按格式返回参数: resolveQuery?:(jsonQuery:{[propName: string]: any;})=>{[propName: string]: any;}', router) - } else { - toRule[queryKey] = jsonQuery; - } - } else { - const deepObj = assertDeepObject(query as objectAny); - if (!deepObj) { - return toRule; - } - const encode = JSON.stringify(query); - toRule[queryKey] = { - query: encode - } - } - return toRule -} - -export function parseQuery( - query:objectAny, - router:Router, -):objectAny { - const {parseQuery: userParseQuery} = router.options; - if (userParseQuery) { - query = userParseQuery(copyData(query)); - if (getDataType(query) !== '[object Object]') { - warn('请按格式返回参数: parseQuery?:(jsonQuery:{[propName: string]: any;})=>{[propName: string]: any;}', router) - } - } else { - if (Reflect.get(query, 'query')) { // 验证一下是不是深度对象 - let deepQuery = Reflect.get(query, 'query'); - if (typeof deepQuery === 'string') { - try { - deepQuery = JSON.parse(deepQuery); - } catch (error) { - warn('尝试解析深度对象失败,按原样输出。' + error, router) - } - } - if (typeof deepQuery === 'object') { - return deepDecodeQuery(deepQuery); - } - } - } - return query -} - -export function stringifyQuery(obj:objectAny): string { - const res = obj - ? Object.keys(obj) - .map(key => { - const val = obj[key] - - if (val === undefined) { - return '' - } - - if (val === null) { - return encode(key) - } - - if (Array.isArray(val)) { - const result:Array = [] - val.forEach(val2 => { - if (val2 === undefined) { - return - } - if (val2 === null) { - result.push(encode(key)) - } else { - result.push(encode(key) + '=' + encode(val2)) - } - }) - return result.join('&') - } - - return encode(key) + '=' + encode(val) - }) - .filter(x => x.length > 0) - .join('&') - : null - return res ? `?${res}` : '' -} diff --git a/node_modules/uni-simple-router/src/public/rewrite.ts b/node_modules/uni-simple-router/src/public/rewrite.ts deleted file mode 100644 index 5ab8bb2..0000000 --- a/node_modules/uni-simple-router/src/public/rewrite.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { - uniNavApiRule, - reNavMethodRule, - reNotNavMethodRule, - Router, - rewriteMethodToggle, - uniBackRule, - uniBackApiRule, - navtoRule, - totalNextRoute, - originMixins, - objectAny -} from '../options/base' - -import { - routesForMapRoute, - getRoutePath, - getDataType, - notDeepClearNull, - resolveAbsolutePath, - getUniCachePage, - timeOut -} from '../helpers/utils' - -import { - warn -} from '../helpers/warn' - -import {uniOriginJump} from './uniOrigin' - -const rewrite: Array = [ - 'navigateTo', - 'redirectTo', - 'reLaunch', - 'switchTab', - 'navigateBack' -]; - -export function rewriteMethod( - router:Router -): void { - if (router.options.keepUniOriginNav === false) { - rewrite.forEach(name => { - const oldMethod: Function = uni[name]; - uni[name] = function( - params:originMixins|{from:string}|navtoRule, - originCall:boolean = false, - callOkCb?:Function, - forceNav?:boolean - ):void { - if (originCall) { - uniOriginJump(router, oldMethod, name, params as originMixins, callOkCb, forceNav) - } else { - if (router.options.platform === 'app-plus') { - if (Object.keys(router.appMain).length === 0) { - router.appMain = { - NAVTYPE: name, - path: (params as uniNavApiRule).url - } - } - } - callRouterMethod(params as uniNavApiRule, name, router); - } - }; - }) - } -} -function callRouterMethod( - option: uniNavApiRule|uniBackRule|uniBackApiRule, - funName:reNavMethodRule|reNotNavMethodRule, - router:Router -): void { - if (router.options.platform === 'app-plus') { - let openType = null; - if (option) { - openType = (option as uniNavApiRule).openType; - } - if (openType != null && openType === 'appLaunch') { - funName = 'reLaunch' - } - } - if (funName === 'reLaunch' && JSON.stringify(option) === '{"url":"/"}') { - warn( - `uni-app 原生方法:reLaunch({url:'/'}) 默认被重写啦!你可以使用 this.$Router.replaceAll() 或者 uni.reLaunch({url:'/?xxx=xxx'})`, - router, - true - ); - funName = 'navigateBack'; - option = { - from: 'backbutton' - } - } - if (funName === 'navigateBack') { - let level:number = 1; - if (option == null) { - option = {delta: 1}; - } - if (getDataType((option as uniBackApiRule).delta) === '[object Number]') { - level = ((option as uniBackApiRule).delta as number); - } - router.back(level, (option as uniBackRule|uniBackApiRule)); - } else { - const routerMethodName = rewriteMethodToggle[(funName as reNavMethodRule)] - let path = (option as uniNavApiRule).url; - if (!path.startsWith('/')) { - const absolutePath = resolveAbsolutePath(path, router); - path = absolutePath; - (option as uniNavApiRule).url = absolutePath; - } - if (funName === 'switchTab') { - const route = routesForMapRoute(router, path, ['pathMap', 'finallyPathList']) - const {finallyPath} = getRoutePath(route, router); - if (getDataType(finallyPath) === '[object Array]') { - warn( - `uni-app 原生方法跳转路径为:${path}。此路为是tab页面时,不允许设置 alias 为数组的情况,并且不能为动态路由!当然你可以通过通配符*解决!`, - router, - true - ); - } - if ((finallyPath as string) === '*') { - warn( - `uni-app 原生方法跳转路径为:${path}。在路由表中找不到相关路由表!当然你可以通过通配符*解决!`, - router, - true - ); - } - // Fixe h5 端无法触发 onTabItemTap hook 2021年6月3日17:26:47 - if (router.options.platform === 'h5') { - const {success: userSuccess} = option as uniNavApiRule; - (option as uniNavApiRule).success = (...args:Array) => { - userSuccess?.apply(null, args); - timeOut(150).then(() => { - const cbArgs = (option as uniNavApiRule).detail || {}; - if (Object.keys(cbArgs).length > 0 && Reflect.has(cbArgs, 'index')) { - const cachePage = getUniCachePage(0); - if (Object.keys(cachePage).length === 0) { - return false - } - const page = cachePage as objectAny; - const hooks = page.$options.onTabItemTap; - if (hooks) { - for (let j = 0; j < hooks.length; j++) { - hooks[j].call(page, cbArgs) - } - } - } - }); - } - } - path = (finallyPath as string); - } - const {events, success, fail, complete, animationType, animationDuration} = option as uniNavApiRule; - const jumpOptions:totalNextRoute = {path, events, success, fail, complete, animationDuration, animationType}; - router[routerMethodName]( - notDeepClearNull(jumpOptions) - ) - } -} diff --git a/node_modules/uni-simple-router/src/public/router.ts b/node_modules/uni-simple-router/src/public/router.ts deleted file mode 100644 index 220d96a..0000000 --- a/node_modules/uni-simple-router/src/public/router.ts +++ /dev/null @@ -1,129 +0,0 @@ -import {PromiseResolve, Router, uniBackApiRule, uniBackRule} from '../options/base'; -import {InstantiateConfig, LifeCycleConfig} from '../options/config'; -import { lifeCycle, proxyHookDeps} from '../helpers/config'; -import {assertNewOptions, def, getDataType} from '../helpers/utils'; -import {registerRouterHooks, registerEachHooks} from '../helpers/lifeCycle'; -import {initMixins} from '../helpers/mixins' -import {lockNavjump, forceGuardEach, createRoute} from '../public/methods' -import {rewriteMethod} from '../public/rewrite' - -let AppReadyResolve:PromiseResolve = () => {}; -const AppReady:Promise = new Promise(resolve => (AppReadyResolve = resolve)); - -function createRouter(params: InstantiateConfig):Router { - const options = assertNewOptions(params); - const router:Router = { - options, - mount: [], - Vue: null, - proxyHookDeps: proxyHookDeps, - appMain: {}, - enterPath: '', - $route: null, - $lockStatus: false, - routesMap: {}, - lifeCycle: registerRouterHooks(lifeCycle, options), - push(to) { - lockNavjump(to, router, 'push'); - }, - replace(to) { - lockNavjump(to, router, 'replace'); - }, - replaceAll(to) { - lockNavjump(to, router, 'replaceAll'); - }, - pushTab(to) { - lockNavjump(to, router, 'pushTab'); - }, - back(level = 1, animation) { - if (getDataType(animation) !== '[object Object]') { - const backRule:uniBackRule = { - from: 'navigateBack' - } - animation = backRule; - } else { - if (!Reflect.has((animation as uniBackRule | uniBackApiRule), 'from')) { - animation = { - ...animation, - from: 'navigateBack' - }; - } - } - lockNavjump(level + '', router, 'back', undefined, animation) - }, - forceGuardEach(navType, forceNav) { - forceGuardEach(router, navType, forceNav) - }, - beforeEach(userGuard):void { - registerEachHooks(router, 'beforeHooks', userGuard); - }, - afterEach(userGuard):void { - registerEachHooks(router, 'afterHooks', userGuard); - }, - install(Vue:any):void{ - router.Vue = Vue; - rewriteMethod(this); - initMixins(Vue, this); - Object.defineProperty(Vue.prototype, '$Router', { - get() { - const actualData = router; - - Object.defineProperty(this, '$Router', { - value: actualData, - writable: false, - configurable: false, - enumerable: false - }); - - return Object.seal(actualData); - } - }); - Object.defineProperty(Vue.prototype, '$Route', { - get() { - return createRoute(router); - } - }); - // 【Fixe】 https://github.com/SilurianYang/uni-simple-router/issues/254 - Object.defineProperty(Vue.prototype, '$AppReady', { - get() { - if (router.options.platform === 'h5') { - return Promise.resolve(); - } - return AppReady; - }, - set(value:boolean) { - if (value === true) { - AppReadyResolve(); - } - } - }); - } - } - def(router, 'currentRoute', () => createRoute(router)); - - router.beforeEach((to, from, next) => next()); - router.afterEach(() => {}); - return router; -} - -function RouterMount(Vim:any, router:Router, el:string | undefined = '#app') :void|never { - if (getDataType>(router.mount) === '[object Array]') { - router.mount.push({ - app: Vim, - el - }) - } else { - throw new Error(`挂载路由失败,router.app 应该为数组类型。当前类型:${typeof router.mount}`); - } - if (router.options.platform === 'h5') { - const vueRouter = (router.$route as any); - vueRouter.replace({ - path: vueRouter.currentRoute.fullPath - }); - } // 其他端目前不需要做啥 -} - -export { - RouterMount, - createRouter -} diff --git a/node_modules/uni-simple-router/src/public/uniOrigin.ts b/node_modules/uni-simple-router/src/public/uniOrigin.ts deleted file mode 100644 index 25c975f..0000000 --- a/node_modules/uni-simple-router/src/public/uniOrigin.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { originMixins, reNavMethodRule, reNotNavMethodRule, Router, startAnimationRule, uniNavApiRule } from '../options/base'; -import { stringifyQuery } from './query'; -import {notDeepClearNull, timeOut} from '../helpers/utils' -import { mpPlatformReg } from '../helpers/config'; -import { resetAndCallPageHook, resetPageHook } from './page'; - -let routerNavCount:number = 0; -let lastNavType:reNavMethodRule|reNotNavMethodRule = 'reLaunch' - -export function uniOriginJump( - router:Router, - originMethod:Function, - funName:reNavMethodRule|reNotNavMethodRule, - options: originMixins, - callOkCb?:Function, - forceNav?:boolean -):void { - const {complete, ...originRule} = formatOriginURLQuery(router, options, funName); - const platform = router.options.platform; - if (forceNav != null && forceNav === false) { - if (routerNavCount === 0) { - routerNavCount++ - if (platform !== 'h5') { - resetAndCallPageHook(router, originRule.url) // 还原及执行app.vue及首页下已经重写后的生命周期 - // 【Fixe】 https://github.com/SilurianYang/uni-simple-router/issues/254 - // 在小程序端 next 直接放行会执行这个 - router.Vue.prototype.$AppReady = true; - } - } - complete && complete.apply(null, {msg: 'forceGuardEach强制触发并且不执行跳转'}); - callOkCb && callOkCb.apply(null, {msg: 'forceGuardEach强制触发并且不执行跳转'}) - } else { - if (routerNavCount === 0) { - if (platform === 'app-plus') { - resetAndCallPageHook(router, originRule.url) // 还原及执行app.vue下已经重写后的生命周期 - } else { - if (new RegExp(mpPlatformReg, 'g').test(platform)) { - // 其他就是在小程序下,首次启动发生跳转会走这里 - // 我们先将app.vue的生命周期执行 - resetAndCallPageHook(router, originRule.url, false) - } - } - } - originMethod({ - ...originRule, - from: options.BACKTYPE, - complete: async function(...args:Array) { - if (routerNavCount === 0) { - routerNavCount++ - - if (platform !== 'h5') { - if (new RegExp(mpPlatformReg, 'g').test(platform)) { // 跳转完成后小程序下还原生命周期 - resetPageHook(router); - } - // 【Fixe】 https://github.com/SilurianYang/uni-simple-router/issues/254 - // 在小程序端 第一次 next 做跳转 会触发这个 、在app端首次必定会触发这个 - router.Vue.prototype.$AppReady = true; - - if (platform === 'app-plus') { - const waitPage = plus.nativeObj.View.getViewById('router-loadding'); - waitPage && waitPage.close(); - const launchedHook = router.options.APP?.launchedHook; - launchedHook && launchedHook(); - } - } - } - let time:number = 0; - if (new RegExp(mpPlatformReg, 'g').test(platform)) { - time = (router.options.applet?.animationDuration) as number - } else if (platform === 'app-plus') { - if (funName === 'navigateBack' && lastNavType === 'navigateTo') { - time = (router.options.APP?.animation?.animationDuration) as number - } - } - if (funName === 'navigateTo' || funName === 'navigateBack') { - if (time !== 0) { - await timeOut(time); - } - } - lastNavType = funName; - complete && complete.apply(null, args); - callOkCb && callOkCb.apply(null, args) - } - }); - } -} -export function formatOriginURLQuery( - router:Router, - options:uniNavApiRule, - funName:reNavMethodRule|reNotNavMethodRule -):uniNavApiRule { - const {url, path, query, animationType, animationDuration, events, success, fail, complete, delta, animation} = options; - const strQuery = stringifyQuery(query || {}); - const queryURL = strQuery === '' ? (path || url) : (path || url) + strQuery; - let animationRule:startAnimationRule = {}; - if (router.options.platform === 'app-plus') { - if (funName !== 'navigateBack') { - animationRule = router.options.APP?.animation || {}; - animationRule = {...animationRule, ...animation || {}}; - } - } - return notDeepClearNull({ - delta, - url: queryURL, - animationType: animationType || animationRule.animationType, - animationDuration: animationDuration || animationRule.animationDuration, - events, - success, - fail, - complete - }) -} diff --git a/node_modules/uni-simple-router/test/path-to-regexp.spec.ts b/node_modules/uni-simple-router/test/path-to-regexp.spec.ts deleted file mode 100644 index c8f7c2f..0000000 --- a/node_modules/uni-simple-router/test/path-to-regexp.spec.ts +++ /dev/null @@ -1,70 +0,0 @@ -import {createRouter, routesMapKeysRule} from '../src/index'; - -import {routesForMapRoute} from '../src/helpers/utils'; - -const routes = [ - {path: '/pages/login/login', name: 'login', aliasPath: '/'}, - {path: '/pages/page2/page2', name: 'page2', aliasPath: '/page2/:id'}, - {path: '/pages/page3/page3', aliasPath: '/:name/page3/:id'}, - {path: '/pages/animation/animation', aliasPath: '/an-(\\d+)-on'}, - {path: '/static/1/1', aliasPath: '/static/(.*)'}, - {path: '/dynamic/1/1', aliasPath: '/dynamic-*'}, - {path: '/dynamic/3/3', aliasPath: '/dynamic3'}, - {path: '*'} -]; - -const router = createRouter({ - platform: 'app-plus', - keepUniOriginNav: true, - routes, -}); - -const Vue = function () {}; -Vue.mixin = () => {}; - -router.install(Vue); - -const rules: routesMapKeysRule[] = ['finallyPathMap', 'pathMap']; - -it('别名路径匹配',()=>{ - const toRoute1 = routesForMapRoute(router, '/dynamic3', rules); - expect(toRoute1).toEqual(routes[6]); - - const toRoute2 = routesForMapRoute(router, '/dynamic/3/3', rules); - expect(toRoute2).toEqual(routes[6]); -}) - -it('全局匹配', () => { - const toRoute1 = routesForMapRoute(router, '/pages/login/login', rules); - expect(toRoute1).toEqual(routes[0]); - - const toRoute2 = routesForMapRoute(router,'/pages/login/login?id=666',rules); - expect(toRoute2).toEqual(routes[0]); - - const toRoute3 = routesForMapRoute(router, '/page2/6666', rules); - expect(toRoute3).toEqual(routes[1]); - - const toRoute4 = routesForMapRoute(router, '/page2/6666?id=555', rules); - expect(toRoute4).toEqual(routes[1]); - - const toRoute5 = routesForMapRoute(router, '/pages/page3/page3', rules); - expect(toRoute5).toEqual(routes[2]); - - const toRoute6 = routesForMapRoute(router, '/test/page3/123', rules); - expect(toRoute6).toEqual(routes[2]); - - const toRoute7 = routesForMapRoute(router, '/an-123-on', rules); - expect(toRoute7).toEqual(routes[3]); - - const toRoute8 = routesForMapRoute(router, '/static/aaa/bbb?id=1444&name=999', rules); - expect(toRoute8).toEqual(routes[4]); - - const toRoute9 = routesForMapRoute(router, '/dynamic-6666-5555', rules); - expect(toRoute9).toEqual(routes[5]); - - const toRoute10 = routesForMapRoute(router, '/aaaaaa', rules); - expect(toRoute10).toEqual(routes[7]); - - const toRoute11 = routesForMapRoute(router, '---48848--14545', rules); - expect(toRoute11).toEqual(routes[7]); -}); diff --git a/node_modules/uni-simple-router/test/query-toggle.spec.ts b/node_modules/uni-simple-router/test/query-toggle.spec.ts deleted file mode 100644 index 91b09d8..0000000 --- a/node_modules/uni-simple-router/test/query-toggle.spec.ts +++ /dev/null @@ -1,83 +0,0 @@ -import {deepDecodeQuery} from '../src/helpers/utils'; - - -it('编码回转',()=>{ - const query={ - str:'%E7%9A%84%E6%8C%A5%E6%B4%92U%E7%9B%BE%E5%A5%BD%E6%92%92%E7%AC%AC%E4%B8%89%E5%A4%A7%E5%8E%A6%E5%8F%91%E7%9A%84%E6%92%92321312%2a%EF%BC%88%EF%BF%A5%23%254' - } - const result = deepDecodeQuery(query); - expect(JSON.stringify(result)).toEqual(JSON.stringify({ - str:'的挥洒U盾好撒第三大厦发的撒321312*(¥#%4' - })) -}) - -it('一些乱码字符',()=>{ - const query={ - str:`~!@#$%^&*()_+-,./|][]` - } - const result = deepDecodeQuery(query); - expect(JSON.stringify(result)).toEqual(JSON.stringify({ - str:`~!@#$%^&*()_+-,./|][]` - })) -}) - -it('单个加密参数',()=>{ - const query={ - name:'%7B%22status%22%3Atrue%2C%22list%22%3A%5B%7B%22id%22%3A1%7D%5D%7D' - } - const result = deepDecodeQuery(query); - expect(JSON.stringify(result)).toEqual(JSON.stringify({ - name:{ - status:true, - list:[ - { - id:1 - }, - ] - } - })); -}) - -it('单个普通参数',()=>{ - const query={ - name:'hhyang', - ages:22, - open:true - } - const result = deepDecodeQuery(query); - - expect(JSON.stringify(result)).toEqual(JSON.stringify(query)); -}) - -it('深度参数加混乱',()=>{ - const query={ - list:[ - 1,'2',true,encodeURIComponent(JSON.stringify({name:111})),{ - name:'hhyang', - strObj:encodeURIComponent(JSON.stringify({name:222})) - } - ], - obj:{ - strObj2:encodeURIComponent(JSON.stringify({name:333})), - number:1, - boolean:false, - }, - str4:encodeURIComponent(JSON.stringify({name:444})) - } - const result = deepDecodeQuery(query); - - expect(JSON.stringify(result)).toEqual(JSON.stringify({ - list:[ - 1,'2',true,{name:111},{ - name:'hhyang', - strObj:{name:222} - } - ], - obj:{ - strObj2:{name:333}, - number:1, - boolean:false, - }, - str4:{name:444} - })); -}) \ No newline at end of file diff --git a/node_modules/uni-simple-router/tsconfig.json b/node_modules/uni-simple-router/tsconfig.json deleted file mode 100644 index 0a076f1..0000000 --- a/node_modules/uni-simple-router/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "CommonJS", - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "lib": ["ES2015", "DOM"], - "outDir": "dist/src", - "declaration": true, - "declarationMap": false, - "rootDir": "./src", - "baseUrl": ".", - "paths": {} - }, - "include": ["./src/global.d.ts", "./src/*"], - "exclude": ["node_modules", "**/*.spec.ts"] -} diff --git a/node_modules/uni-simple-router/webpack/webpack.common.js b/node_modules/uni-simple-router/webpack/webpack.common.js deleted file mode 100644 index 344fc05..0000000 --- a/node_modules/uni-simple-router/webpack/webpack.common.js +++ /dev/null @@ -1,41 +0,0 @@ -const {resolve} = require('path'); -const CopyPlugin = require('copy-webpack-plugin'); -const webpack =require('webpack'); - -module.exports = { - entry: './src/index.ts', - output: { - library: 'Router', - libraryTarget: 'umd', - }, - resolve: { - extensions: ['.tsx', '.ts', 'd.ts', '.js', '.json'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: [ - { - loader: 'ts-loader', - }, - ], - exclude: /node_modules/, - }, - ], - }, - plugins: [ - new CopyPlugin([ - { - force: true, - from: resolve(__dirname, '../src/component'), - to: resolve(__dirname, '../dist'), - }, - ]), - new webpack.DefinePlugin({ - $npm_package_name: webpack.DefinePlugin.runtimeValue(() => { - return JSON.stringify(process.env.npm_package_name.toLocaleUpperCase()) - }, true ) - }) - ], -}; diff --git a/node_modules/uni-simple-router/webpack/webpack.dev.js b/node_modules/uni-simple-router/webpack/webpack.dev.js deleted file mode 100644 index 79b1374..0000000 --- a/node_modules/uni-simple-router/webpack/webpack.dev.js +++ /dev/null @@ -1,22 +0,0 @@ -const {merge} = require("webpack-merge"); -const {resolve} = require('path'); -const common = require("./webpack.common.js"); -const CopyPlugin = require('copy-webpack-plugin'); - -const output=resolve(__dirname, '../examples/uni-simple-router2.0/dist'); - -module.exports = merge(common, { - mode: 'development', - devtool: 'source-map', - output: { - path:output , - filename: 'uni-simple-router.js', - }, - plugins: [ - new CopyPlugin([{ - force: true, - from: resolve(__dirname, '../src/component'), - to: output, - }]), - ] -}); \ No newline at end of file diff --git a/node_modules/uni-simple-router/webpack/webpack.prod.js b/node_modules/uni-simple-router/webpack/webpack.prod.js deleted file mode 100644 index 4d65e8f..0000000 --- a/node_modules/uni-simple-router/webpack/webpack.prod.js +++ /dev/null @@ -1,19 +0,0 @@ -const {resolve} = require('path'); -const {merge} = require("webpack-merge"); -const common = require("./webpack.common.js"); -const rimraf = require('rimraf'); - - -function resolvePath(dir) { - return resolve(__dirname, '../', dir) -} - -rimraf('dist', () => {}); - -module.exports = merge(common, { - mode: "production", - output: { - path: resolvePath('dist'), - filename: 'uni-simple-router.js', - }, -}) \ No newline at end of file diff --git a/node_modules/uview-ui/LICENSE b/node_modules/uview-ui/LICENSE deleted file mode 100644 index 7456959..0000000 --- a/node_modules/uview-ui/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 www.uviewui.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/uview-ui/README.md b/node_modules/uview-ui/README.md deleted file mode 100644 index f8761b0..0000000 --- a/node_modules/uview-ui/README.md +++ /dev/null @@ -1,110 +0,0 @@ -

- logo -

-

uView

-

多平台快速开发的UI框架

- -## 一起推动uView发展 - -uView正在参与开源中国的“年度最佳项目”评选,目前投票进入了最后一个阶段(之前投过票的现在也可以投票), -我们不分昼夜的努力,恳请同学们能为我们投一票,uView来源于社区,也希望社区能一起推动它的发展,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583) - - -## 说明 - -uView UI,是[uni-app](https://uniapp.dcloud.io/)生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水 - -## 特性 - -- 兼容安卓,iOS,微信小程序,H5,QQ小程序,百度小程序,支付宝小程序,头条小程序 -- 60+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用 -- 众多贴心的JS利器,让您飞镖在手,召之即来,百步穿杨 -- 众多的常用页面和布局,让您专注逻辑,事半功倍 -- 详尽的文档支持,现代化的演示效果 -- 按需引入,精简打包体积 - - -## 安装 - -```bash -# npm方式安装 -npm i uview-ui -``` - -## 快速上手 - -1. `main.js`引入uView库 -```js -// main.js -import uView from 'uview-ui'; -Vue.use(uView); -``` - -2. `App.vue`引入基础样式(注意style标签需声明scss属性支持) -```css -/* App.vue */ - -``` - -3. `uni.scss`引入全局scss变量文件 -```css -/* uni.scss */ -@import "uview-ui/theme.scss"; -``` - -4. `pages.json`配置easycom规则(按需引入) - -```js -// pages.json -{ - "easycom": { - // npm安装的方式不需要前面的"@/",下载安装的方式需要"@/" - // npm安装方式 - "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" - // 下载安装方式 - // "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" - }, - // 此为本身已有的内容 - "pages": [ - // ...... - ] -} -``` - -请通过[快速上手](https://www.uviewui.com/components/quickstart.html)了解更详细的内容 - -## 使用方法 -配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。 - -```html - -``` - -请通过[快速上手](https://www.uviewui.com/components/quickstart.html)了解更详细的内容 - -## 链接 - -- [官方文档](https://www.uviewui.com/) -- [更新日志](https://www.www.uviewui.com/components/changelog.html) -- [升级指南](https://www.uviewui.com/components/changelog.html) -- [关于我们](https://www.uviewui.com/cooperation/about.html) - -## 预览 - -您可以通过**微信**扫码,查看最佳的演示效果。 -
-
- - -## 捐赠uView的研发 - -uView文档和源码全部开源免费,如果您认为uView帮到了您的开发工作,您可以捐赠uView的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。 - - - -## 版权信息 -uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。 diff --git a/node_modules/uview-ui/changelog.md b/node_modules/uview-ui/changelog.md deleted file mode 100644 index 6dd72f6..0000000 --- a/node_modules/uview-ui/changelog.md +++ /dev/null @@ -1,192 +0,0 @@ -## 2.0.19(2021-12-29) -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 优化微信小程序包体积可在微信中预览,请升级HbuilderX3.3.4,同时在“运行->运行到小程序模拟器”中勾选“运行时是否压缩代码” -2. 优化微信小程序setData性能,处理某些方法如$u.route()无法在模板中使用的问题 -3. navbar添加autoBack参数 -4. 允许avatar组件的事件冒泡 -5. 修复cell组件报错问题 -6. 其他修复 -## 2.0.18(2021-12-28) -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 修复app端编译报错问题 -2. 重新处理微信小程序端setData过大的性能问题 -3. 修复边框问题 -4. 修复最大最小月份不大于0则没有数据出现的问题 -5. 修复SwipeAction微信小程序端无法上下滑动问题 -6. 修复input的placeholder在小程序端默认显示为true问题 -7. 修复divider组件click事件无效问题 -8. 修复u-code-input maxlength 属性值为 String 类型时显示异常 -9. 修复当 grid只有 1到2时 在小程序端algin设置无效的问题 -10. 处理form-item的label为top时,取消错误提示的左边距 -11. 其他修复 -## 2.0.17(2021-12-26) -## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 解决HBuilderX3.3.3.20211225版本导致的样式问题 -2. calendar日历添加monthNum参数 -3. navbar添加center slot -## 2.0.16(2021-12-25) -## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 解决微信小程序setData性能问题 -2. 修复count-down组件change事件不触发问题 -## 2.0.15(2021-12-21) -## uView正在参与开源中国的“年度最佳项目”评选,之前投过票的现在也可以投票,恳请同学们投一票,[点此帮助uView](https://www.oschina.net/project/top_cn_2021/?id=583) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 修复Cell单元格titleWidth无效 -2. 修复cheakbox组件ischecked不更新 -3. 修复keyboard是否显示"."按键默认值问题 -4. 修复number-keyboard是否显示键盘的"."符号问题 -5. 修复Input输入框 readonly无效 -6. 修复u-avatar 导致打包app、H5时候报错问题 -7. 修复Upload上传deletable无效 -8. 修复upload当设置maxSize时无效的问题 -9. 修复tabs lineWidth传入带单位的字符串的时候偏移量计算错误问题 -10. 修复rate组件在有padding的view内,显示的星星位置和可触摸区域不匹配,无法正常选中星星 -## 2.0.13(2021-12-14) -## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 修复配置默认单位为rpx可能会导致自定义导航栏高度异常的问题 -## 2.0.12(2021-12-14) -## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 修复tabs组件在vue环境下划线消失的问题 -2. 修复upload组件在安卓小程序无法选择视频的问题 -3. 添加uni.$u.config.unit配置,用于配置参数默认单位,详见:[默认单位配置](https://www.uviewui.com/components/setting.html#%E9%BB%98%E8%AE%A4%E5%8D%95%E4%BD%8D%E9%85%8D%E7%BD%AE) -4. 修复textarea组件在没绑定v-model时,字符统计不生效问题 -5. 修复nvue下控制是否出现滚动条失效问题 -## 2.0.11(2021-12-13) -## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. text组件align参数无效的问题 -2. subsection组件添加keyName参数 -3. upload组件无法判断[Object file]类型的问题 -4. 处理notify层级过低问题 -5. codeInput组件添加disabledDot参数 -6. 处理actionSheet组件round参数无效的问题 -7. calendar组件添加round参数用于控制圆角值 -8. 处理swipeAction组件在vue环境下默认被打开的问题 -9. button组件的throttleTime节流参数无效的问题 -10. 解决u-notify手动关闭方法close()无效的问题 -11. input组件readonly不生效问题 -12. tag组件type参数为info不生效问题 -## 2.0.10(2021-12-08) -## [点击加群交流反馈:364463526](https://jq.qq.com/?_chanwv=1027&k=mCxS3TGY) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 修复button sendMessagePath属性不生效 -2. 修复DatetimePicker选择器title无效 -3. 修复u-toast设置loading=true不生效 -4. 修复u-text金额模式传0报错 -5. 修复u-toast组件的icon属性配置不生效 -6. button的icon在特殊场景下的颜色优化 -7. IndexList优化,增加# -## 2.0.9(2021-12-01) -## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 优化swiper的height支持100%值(仅vue有效),修复嵌入视频时click事件无法触发的问题 -2. 优化tabs组件对list值为空的判断,或者动态变化list时重新计算相关尺寸的问题 -3. 优化datetime-picker组件逻辑,让其后续打开的默认值为上一次的选中值,需要通过v-model绑定值才有效 -4. 修复upload内嵌在其他组件中,选择图片可能不会换行的问题 -## 2.0.8(2021-12-01) -## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 修复toast的position参数无效问题 -2. 处理input在ios nvue上无法获得焦点的问题 -3. avatar-group组件添加extraValue参数,让剩余展示数量可手动控制 -4. tabs组件添加keyName参数用于配置从对象中读取的键名 -5. 处理text组件名字脱敏默认配置无效的问题 -6. 处理picker组件item文本太长换行问题 -## 2.0.7(2021-11-30) -## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 修复radio和checkbox动态改变v-model无效的问题。 -2. 优化form规则validator在微信小程序用法 -3. 修复backtop组件mode参数在微信小程序无效的问题 -4. 处理Album的previewFullImage属性无效的问题 -5. 处理u-datetime-picker组件mode='time'在选择改变时间时,控制台报错的问题 -## 2.0.6(2021-11-27) -## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. 处理tag组件在vue下边框无效的问题。 -2. 处理popup组件圆角参数可能无效的问题。 -3. 处理tabs组件lineColor参数可能无效的问题。 -4. propgress组件在值很小时,显示异常的问题。 -## 2.0.5(2021-11-25) -## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. calendar在vue下显示异常问题。 -2. form组件labelPosition和errorType参数无效的问题 -3. input组件inputAlign无效的问题 -4. 其他一些修复 -## 2.0.4(2021-11-23) -## [点击加群交流反馈:232041042](https://jq.qq.com/?_wv=1027&k=KnbeceDU) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -0. input组件缺失@confirm事件,以及subfix和prefix无效问题 -1. component.scss文件样式在vue下干扰全局布局问题 -2. 修复subsection在vue环境下表现异常的问题 -3. tag组件的bgColor等参数无效的问题 -4. upload组件不换行的问题 -5. 其他的一些修复处理 -## 2.0.3(2021-11-16) -## [点击加群交流反馈:1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. uView2.0已实现全面兼容nvue -2. uView2.0对1.x进行了架构重构,细节和性能都有极大提升 -3. 目前uView2.0为公测阶段,相关细节可能会有变动 -4. 我们写了一份与1.x的对比指南,详见[对比1.x](https://www.uviewui.com/components/diff1.x.html) -5. 处理modal的confirm回调事件拼写错误问题 -6. 处理input组件@input事件参数错误问题 -7. 其他一些修复 -## 2.0.2(2021-11-16) -## [点击加群交流反馈:1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. uView2.0已实现全面兼容nvue -2. uView2.0对1.x进行了架构重构,细节和性能都有极大提升 -3. 目前uView2.0为公测阶段,相关细节可能会有变动 -4. 我们写了一份与1.x的对比指南,详见[对比1.x](https://www.uviewui.com/components/diff1.x.html) -5. 修复input组件formatter参数缺失问题 -6. 优化loading-icon组件的scss写法问题,防止不兼容新版本scss -## 2.0.0(2020-11-15) -## [点击加群交流反馈:1129077272](https://jq.qq.com/?_wv=1027&k=KnbeceDU) - -# uView2.0重磅发布,利剑出鞘,一统江湖 - -1. uView2.0已实现全面兼容nvue -2. uView2.0对1.x进行了架构重构,细节和性能都有极大提升 -3. 目前uView2.0为公测阶段,相关细节可能会有变动 -4. 我们写了一份与1.x的对比指南,详见[对比1.x](https://www.uviewui.com/components/diff1.x.html) -5. 修复input组件formatter参数缺失问题 - - diff --git a/node_modules/uview-ui/components/u--form/u--form.vue b/node_modules/uview-ui/components/u--form/u--form.vue deleted file mode 100644 index e554925..0000000 --- a/node_modules/uview-ui/components/u--form/u--form.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - diff --git a/node_modules/uview-ui/components/u--image/u--image.vue b/node_modules/uview-ui/components/u--image/u--image.vue deleted file mode 100644 index 80e56bc..0000000 --- a/node_modules/uview-ui/components/u--image/u--image.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - \ No newline at end of file diff --git a/node_modules/uview-ui/components/u--input/u--input.vue b/node_modules/uview-ui/components/u--input/u--input.vue deleted file mode 100644 index b4e7443..0000000 --- a/node_modules/uview-ui/components/u--input/u--input.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - \ No newline at end of file diff --git a/node_modules/uview-ui/components/u--text/u--text.vue b/node_modules/uview-ui/components/u--text/u--text.vue deleted file mode 100644 index ad15a5f..0000000 --- a/node_modules/uview-ui/components/u--text/u--text.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - diff --git a/node_modules/uview-ui/components/u--textarea/u--textarea.vue b/node_modules/uview-ui/components/u--textarea/u--textarea.vue deleted file mode 100644 index 2215f4c..0000000 --- a/node_modules/uview-ui/components/u--textarea/u--textarea.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - diff --git a/node_modules/uview-ui/components/u-action-sheet/props.js b/node_modules/uview-ui/components/u-action-sheet/props.js deleted file mode 100644 index e96e04f..0000000 --- a/node_modules/uview-ui/components/u-action-sheet/props.js +++ /dev/null @@ -1,54 +0,0 @@ -export default { - props: { - // 操作菜单是否展示 (默认false) - show: { - type: Boolean, - default: uni.$u.props.actionSheet.show - }, - // 标题 - title: { - type: String, - default: uni.$u.props.actionSheet.title - }, - // 选项上方的描述信息 - description: { - type: String, - default: uni.$u.props.actionSheet.description - }, - // 数据 - actions: { - type: Array, - default: uni.$u.props.actionSheet.actions - }, - // 取消按钮的文字,不为空时显示按钮 - cancelText: { - type: String, - default: uni.$u.props.actionSheet.cancelText - }, - // 点击某个菜单项时是否关闭弹窗 - closeOnClickAction: { - type: Boolean, - default: uni.$u.props.actionSheet.closeOnClickAction - }, - // 处理底部安全区(默认true) - safeAreaInsetBottom: { - type: Boolean, - default: uni.$u.props.actionSheet.safeAreaInsetBottom - }, - // 小程序的打开方式 - openType: { - type: String, - default: uni.$u.props.actionSheet.openType - }, - // 点击遮罩是否允许关闭 (默认true) - closeOnClickOverlay: { - type: Boolean, - default: uni.$u.props.actionSheet.closeOnClickOverlay - }, - // 圆角值 - round: { - type: [Boolean, String, Number], - default: uni.$u.props.actionSheet.round - } - } -} diff --git a/node_modules/uview-ui/components/u-action-sheet/u-action-sheet.vue b/node_modules/uview-ui/components/u-action-sheet/u-action-sheet.vue deleted file mode 100644 index e9edf06..0000000 --- a/node_modules/uview-ui/components/u-action-sheet/u-action-sheet.vue +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - diff --git a/node_modules/uview-ui/components/u-album/props.js b/node_modules/uview-ui/components/u-album/props.js deleted file mode 100644 index 75cdb37..0000000 --- a/node_modules/uview-ui/components/u-album/props.js +++ /dev/null @@ -1,59 +0,0 @@ -export default { - props: { - // 图片地址,Array|Array形式 - urls: { - type: Array, - default: uni.$u.props.album.urls - }, - // 指定从数组的对象元素中读取哪个属性作为图片地址 - keyName: { - type: String, - default: uni.$u.props.album.keyName - }, - // 单图时,图片长边的长度 - singleSize: { - type: [String, Number], - default: uni.$u.props.album.singleSize - }, - // 多图时,图片边长 - multipleSize: { - type: [String, Number], - default: uni.$u.props.album.multipleSize - }, - // 多图时,图片水平和垂直之间的间隔 - space: { - type: [String, Number], - default: uni.$u.props.album.space - }, - // 单图时,图片缩放裁剪的模式 - singleMode: { - type: String, - default: uni.$u.props.album.singleMode - }, - // 多图时,图片缩放裁剪的模式 - multipleMode: { - type: String, - default: uni.$u.props.album.multipleMode - }, - // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量 - maxCount: { - type: [String, Number], - default: uni.$u.props.album.maxCount - }, - // 是否可以预览图片 - previewFullImage: { - type: Boolean, - default: uni.$u.props.album.previewFullImage - }, - // 每行展示图片数量,如设置,singleSize和multipleSize将会无效 - rowCount: { - type: [String, Number], - default: uni.$u.props.album.rowCount - }, - // 超出maxCount时是否显示查看更多的提示 - showMore: { - type: Boolean, - default: uni.$u.props.album.showMore - } - } -} diff --git a/node_modules/uview-ui/components/u-album/u-album.vue b/node_modules/uview-ui/components/u-album/u-album.vue deleted file mode 100644 index 687e2d5..0000000 --- a/node_modules/uview-ui/components/u-album/u-album.vue +++ /dev/null @@ -1,259 +0,0 @@ - - - - - \ No newline at end of file diff --git a/node_modules/uview-ui/components/u-alert/props.js b/node_modules/uview-ui/components/u-alert/props.js deleted file mode 100644 index d542c98..0000000 --- a/node_modules/uview-ui/components/u-alert/props.js +++ /dev/null @@ -1,44 +0,0 @@ -export default { - props: { - // 显示文字 - title: { - type: String, - default: uni.$u.props.alert.title - }, - // 主题,success/warning/info/error - type: { - type: String, - default: uni.$u.props.alert.type - }, - // 辅助性文字 - description: { - type: String, - default: uni.$u.props.alert.description - }, - // 是否可关闭 - closable: { - type: Boolean, - default: uni.$u.props.alert.closable - }, - // 是否显示图标 - showIcon: { - type: Boolean, - default: uni.$u.props.alert.showIcon - }, - // 浅或深色调,light-浅色,dark-深色 - effect: { - type: String, - default: uni.$u.props.alert.effect - }, - // 文字是否居中 - center: { - type: Boolean, - default: uni.$u.props.alert.center - }, - // 字体大小 - fontSize: { - type: [String, Number], - default: uni.$u.props.alert.fontSize - } - } -} diff --git a/node_modules/uview-ui/components/u-alert/u-alert.vue b/node_modules/uview-ui/components/u-alert/u-alert.vue deleted file mode 100644 index 81f7d43..0000000 --- a/node_modules/uview-ui/components/u-alert/u-alert.vue +++ /dev/null @@ -1,243 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-avatar-group/props.js b/node_modules/uview-ui/components/u-avatar-group/props.js deleted file mode 100644 index 58b42ac..0000000 --- a/node_modules/uview-ui/components/u-avatar-group/props.js +++ /dev/null @@ -1,52 +0,0 @@ -export default { - props: { - // 头像图片组 - urls: { - type: Array, - default: uni.$u.props.avatarGroup.urls - }, - // 最多展示的头像数量 - maxCount: { - type: [String, Number], - default: uni.$u.props.avatarGroup.maxCount - }, - // 头像形状 - shape: { - type: String, - default: uni.$u.props.avatarGroup.shape - }, - // 图片裁剪模式 - mode: { - type: String, - default: uni.$u.props.avatarGroup.mode - }, - // 超出maxCount时是否显示查看更多的提示 - showMore: { - type: Boolean, - default: uni.$u.props.avatarGroup.showMore - }, - // 头像大小 - size: { - type: [String, Number], - default: uni.$u.props.avatarGroup.size - }, - // 指定从数组的对象元素中读取哪个属性作为图片地址 - keyName: { - type: String, - default: uni.$u.props.avatarGroup.keyName - }, - // 头像之间的遮挡比例 - gap: { - type: [String, Number], - validator(value) { - return value >= 0 && value <= 1 - }, - default: uni.$u.props.avatarGroup.gap - }, - // 需额外显示的值 - extraValue: { - type: [Number, String], - default: uni.$u.props.avatarGroup.extraValue - } - } -} diff --git a/node_modules/uview-ui/components/u-avatar-group/u-avatar-group.vue b/node_modules/uview-ui/components/u-avatar-group/u-avatar-group.vue deleted file mode 100644 index 7e996d7..0000000 --- a/node_modules/uview-ui/components/u-avatar-group/u-avatar-group.vue +++ /dev/null @@ -1,103 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-avatar/props.js b/node_modules/uview-ui/components/u-avatar/props.js deleted file mode 100644 index 34ca0f2..0000000 --- a/node_modules/uview-ui/components/u-avatar/props.js +++ /dev/null @@ -1,78 +0,0 @@ -export default { - props: { - // 头像图片路径(不能为相对路径) - src: { - type: String, - default: uni.$u.props.avatar.src - }, - // 头像形状,circle-圆形,square-方形 - shape: { - type: String, - default: uni.$u.props.avatar.shape - }, - // 头像尺寸 - size: { - type: [String, Number], - default: uni.$u.props.avatar.size - }, - // 裁剪模式 - mode: { - type: String, - default: uni.$u.props.avatar.mode - }, - // 显示的文字 - text: { - type: String, - default: uni.$u.props.avatar.text - }, - // 背景色 - bgColor: { - type: String, - default: uni.$u.props.avatar.bgColor - }, - // 文字颜色 - color: { - type: String, - default: uni.$u.props.avatar.color - }, - // 文字大小 - fontSize: { - type: [String, Number], - default: uni.$u.props.avatar.fontSize - }, - // 显示的图标 - icon: { - type: String, - default: uni.$u.props.avatar.icon - }, - // 显示小程序头像,只对百度,微信,QQ小程序有效 - mpAvatar: { - type: Boolean, - default: uni.$u.props.avatar.mpAvatar - }, - // 是否使用随机背景色 - randomBgColor: { - type: Boolean, - default: uni.$u.props.avatar.randomBgColor - }, - // 加载失败的默认头像(组件有内置默认图片) - defaultUrl: { - type: String, - default: uni.$u.props.avatar.defaultUrl - }, - // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间 - colorIndex: { - type: [String, Number], - // 校验参数规则,索引在0-19之间 - validator(n) { - return uni.$u.test.range(n, [0, 19]) || n === '' - }, - default: uni.$u.props.avatar.colorIndex - }, - // 组件标识符 - name: { - type: String, - default: uni.$u.props.avatar.name - } - } -} diff --git a/node_modules/uview-ui/components/u-avatar/u-avatar.vue b/node_modules/uview-ui/components/u-avatar/u-avatar.vue deleted file mode 100644 index dd93a89..0000000 --- a/node_modules/uview-ui/components/u-avatar/u-avatar.vue +++ /dev/null @@ -1,168 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-back-top/props.js b/node_modules/uview-ui/components/u-back-top/props.js deleted file mode 100644 index 6c702c2..0000000 --- a/node_modules/uview-ui/components/u-back-top/props.js +++ /dev/null @@ -1,54 +0,0 @@ -export default { - props: { - // 返回顶部的形状,circle-圆形,square-方形 - mode: { - type: String, - default: uni.$u.props.backtop.mode - }, - // 自定义图标 - icon: { - type: String, - default: uni.$u.props.backtop.icon - }, - // 提示文字 - text: { - type: String, - default: uni.$u.props.backtop.text - }, - // 返回顶部滚动时间 - duration: { - type: [String, Number], - default: uni.$u.props.backtop.duration - }, - // 滚动距离 - scrollTop: { - type: [String, Number], - default: uni.$u.props.backtop.scrollTop - }, - // 距离顶部多少距离显示,单位px - top: { - type: [String, Number], - default: uni.$u.props.backtop.top - }, - // 返回顶部按钮到底部的距离,单位px - bottom: { - type: [String, Number], - default: uni.$u.props.backtop.bottom - }, - // 返回顶部按钮到右边的距离,单位px - right: { - type: [String, Number], - default: uni.$u.props.backtop.right - }, - // 层级 - zIndex: { - type: [String, Number], - default: uni.$u.props.backtop.zIndex - }, - // 图标的样式,对象形式 - iconStyle: { - type: Object, - default: uni.$u.props.backtop.iconStyle - } - } -} diff --git a/node_modules/uview-ui/components/u-back-top/u-back-top.vue b/node_modules/uview-ui/components/u-back-top/u-back-top.vue deleted file mode 100644 index 3188ba2..0000000 --- a/node_modules/uview-ui/components/u-back-top/u-back-top.vue +++ /dev/null @@ -1,137 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-badge/props.js b/node_modules/uview-ui/components/u-badge/props.js deleted file mode 100644 index 74c032c..0000000 --- a/node_modules/uview-ui/components/u-badge/props.js +++ /dev/null @@ -1,72 +0,0 @@ -export default { - props: { - // 是否显示圆点 - isDot: { - type: Boolean, - default: uni.$u.props.badge.isDot - }, - // 显示的内容 - value: { - type: [Number, String], - default: uni.$u.props.badge.value - }, - // 是否显示 - show: { - type: Boolean, - default: uni.$u.props.badge.show - }, - // 最大值,超过最大值会显示 '{max}+' - max: { - type: [Number, String], - default: uni.$u.props.badge.max - }, - // 主题类型,error|warning|success|primary - type: { - type: String, - default: uni.$u.props.badge.type - }, - // 当数值为 0 时,是否展示 Badge - showZero: { - type: Boolean, - default: uni.$u.props.badge.showZero - }, - // 背景颜色,优先级比type高,如设置,type参数会失效 - bgColor: { - type: [String, null], - default: uni.$u.props.badge.bgColor - }, - // 字体颜色 - color: { - type: [String, null], - default: uni.$u.props.badge.color - }, - // 徽标形状,circle-四角均为圆角,horn-左下角为直角 - shape: { - type: String, - default: uni.$u.props.badge.shape - }, - // 设置数字的显示方式,overflow|ellipsis|limit - // overflow会根据max字段判断,超出显示`${max}+` - // ellipsis会根据max判断,超出显示`${max}...` - // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数 - numberType: { - type: String, - default: uni.$u.props.badge.numberType - }, - // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效 - offset: { - type: Array, - default: uni.$u.props.badge.offset - }, - // 是否反转背景和字体颜色 - inverted: { - type: Boolean, - default: uni.$u.props.badge.inverted - }, - // 是否绝对定位 - absolute: { - type: Boolean, - default: uni.$u.props.badge.absolute - } - } -} diff --git a/node_modules/uview-ui/components/u-badge/u-badge.vue b/node_modules/uview-ui/components/u-badge/u-badge.vue deleted file mode 100644 index 53cfc81..0000000 --- a/node_modules/uview-ui/components/u-badge/u-badge.vue +++ /dev/null @@ -1,171 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-button/nvue.scss b/node_modules/uview-ui/components/u-button/nvue.scss deleted file mode 100644 index ebdba7d..0000000 --- a/node_modules/uview-ui/components/u-button/nvue.scss +++ /dev/null @@ -1,46 +0,0 @@ -$u-button-active-opacity:0.75 !default; -$u-button-loading-text-margin-left:4px !default; -$u-button-text-color: #FFFFFF !default; -$u-button-text-plain-error-color:$u-error !default; -$u-button-text-plain-warning-color:$u-warning !default; -$u-button-text-plain-success-color:$u-success !default; -$u-button-text-plain-info-color:$u-info !default; -$u-button-text-plain-primary-color:$u-primary !default; -.u-button { - &--active { - opacity: $u-button-active-opacity; - } - - &--active--plain { - background-color: rgb(217, 217, 217); - } - - &__loading-text { - margin-left:$u-button-loading-text-margin-left; - } - - &__text, - &__loading-text { - color:$u-button-text-color; - } - - &__text--plain--error { - color:$u-button-text-plain-error-color; - } - - &__text--plain--warning { - color:$u-button-text-plain-warning-color; - } - - &__text--plain--success{ - color:$u-button-text-plain-success-color; - } - - &__text--plain--info { - color:$u-button-text-plain-info-color; - } - - &__text--plain--primary { - color:$u-button-text-plain-primary-color; - } -} \ No newline at end of file diff --git a/node_modules/uview-ui/components/u-button/props.js b/node_modules/uview-ui/components/u-button/props.js deleted file mode 100644 index 07fd844..0000000 --- a/node_modules/uview-ui/components/u-button/props.js +++ /dev/null @@ -1,161 +0,0 @@ -/* - * @Author : LQ - * @Description : - * @version : 1.0 - * @Date : 2021-08-16 10:04:04 - * @LastAuthor : LQ - * @lastTime : 2021-08-16 10:04:24 - * @FilePath : /u-view2.0/uview-ui/components/u-button/props.js - */ -export default { - props: { - // 是否细边框 - hairline: { - type: Boolean, - default: uni.$u.props.button.hairline - }, - // 按钮的预置样式,info,primary,error,warning,success - type: { - type: String, - default: uni.$u.props.button.type - }, - // 按钮尺寸,large,normal,small,mini - size: { - type: String, - default: uni.$u.props.button.size - }, - // 按钮形状,circle(两边为半圆),square(带圆角) - shape: { - type: String, - default: uni.$u.props.button.shape - }, - // 按钮是否镂空 - plain: { - type: Boolean, - default: uni.$u.props.button.plain - }, - // 是否禁止状态 - disabled: { - type: Boolean, - default: uni.$u.props.button.disabled - }, - // 是否加载中 - loading: { - type: Boolean, - default: uni.$u.props.button.loading - }, - // 加载中提示文字 - loadingText: { - type: [String, Number], - default: uni.$u.props.button.loadingText - }, - // 加载状态图标类型 - loadingMode: { - type: String, - default: uni.$u.props.button.loadingMode - }, - // 加载图标大小 - loadingSize: { - type: [String, Number], - default: uni.$u.props.button.loadingSize - }, - // 开放能力,具体请看uniapp稳定关于button组件部分说明 - // https://uniapp.dcloud.io/component/button - openType: { - type: String, - default: uni.$u.props.button.openType - }, - // 用于
组件,点击分别会触发 组件的 submit/reset 事件 - // 取值为submit(提交表单),reset(重置表单) - formType: { - type: String, - default: uni.$u.props.button.formType - }, - // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 - // 只微信小程序、QQ小程序有效 - appParameter: { - type: String, - default: uni.$u.props.button.appParameter - }, - // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效 - hoverStopPropagation: { - type: Boolean, - default: uni.$u.props.button.hoverStopPropagation - }, - // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效 - lang: { - type: String, - default: uni.$u.props.button.lang - }, - // 会话来源,open-type="contact"时有效。只微信小程序有效 - sessionFrom: { - type: String, - default: uni.$u.props.button.sessionFrom - }, - // 会话内消息卡片标题,open-type="contact"时有效 - // 默认当前标题,只微信小程序有效 - sendMessageTitle: { - type: String, - default: uni.$u.props.button.sendMessageTitle - }, - // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 - // 默认当前分享路径,只微信小程序有效 - sendMessagePath: { - type: String, - default: uni.$u.props.button.sendMessagePath - }, - // 会话内消息卡片图片,open-type="contact"时有效 - // 默认当前页面截图,只微信小程序有效 - sendMessageImg: { - type: String, - default: uni.$u.props.button.sendMessageImg - }, - // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示, - // 用户点击后可以快速发送小程序消息,open-type="contact"时有效 - showMessageCard: { - type: Boolean, - default: uni.$u.props.button.showMessageCard - }, - // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取 - dataName: { - type: String, - default: uni.$u.props.button.dataName - }, - // 节流,一定时间内只能触发一次 - throttleTime: { - type: [String, Number], - default: uni.$u.props.button.throttleTime - }, - // 按住后多久出现点击态,单位毫秒 - hoverStartTime: { - type: [String, Number], - default: uni.$u.props.button.hoverStartTime - }, - // 手指松开后点击态保留时间,单位毫秒 - hoverStayTime: { - type: [String, Number], - default: uni.$u.props.button.hoverStayTime - }, - // 按钮文字,之所以通过props传入,是因为slot传入的话 - // nvue中无法控制文字的样式 - text: { - type: [String, Number], - default: uni.$u.props.button.text - }, - // 按钮图标 - icon: { - type: String, - default: uni.$u.props.button.icon - }, - // 按钮图标 - iconColor: { - type: String, - default: uni.$u.props.button.icon - }, - // 按钮颜色,支持传入linear-gradient渐变色 - color: { - type: String, - default: uni.$u.props.button.color - } - } -} diff --git a/node_modules/uview-ui/components/u-button/u-button.vue b/node_modules/uview-ui/components/u-button/u-button.vue deleted file mode 100644 index 29001b0..0000000 --- a/node_modules/uview-ui/components/u-button/u-button.vue +++ /dev/null @@ -1,490 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-button/vue.scss b/node_modules/uview-ui/components/u-button/vue.scss deleted file mode 100644 index d23404b..0000000 --- a/node_modules/uview-ui/components/u-button/vue.scss +++ /dev/null @@ -1,80 +0,0 @@ -// nvue下hover-class无效 -$u-button-before-top:50% !default; -$u-button-before-left:50% !default; -$u-button-before-width:100% !default; -$u-button-before-height:100% !default; -$u-button-before-transform:translate(-50%, -50%) !default; -$u-button-before-opacity:0 !default; -$u-button-before-background-color:#000 !default; -$u-button-before-border-color:#000 !default; -$u-button-active-before-opacity:.15 !default; -$u-button-icon-margin-left:4px !default; -$u-button-plain-u-button-info-color:$u-info; -$u-button-plain-u-button-success-color:$u-success; -$u-button-plain-u-button-error-color:$u-error; -$u-button-plain-u-button-warning-color:$u-error; - -.u-button { - width: 100%; - - &__text { - white-space: nowrap; - line-height: 1; - } - - &:before { - position: absolute; - top:$u-button-before-top; - left:$u-button-before-left; - width:$u-button-before-width; - height:$u-button-before-height; - border: inherit; - border-radius: inherit; - transform:$u-button-before-transform; - opacity:$u-button-before-opacity; - content: " "; - background-color:$u-button-before-background-color; - border-color:$u-button-before-border-color; - } - - &--active { - &:before { - opacity: .15 - } - } - - &__icon+&__text:not(:empty), - &__loading-text { - margin-left:$u-button-icon-margin-left; - } - - &--plain { - &.u-button--primary { - color: $u-primary; - } - } - - &--plain { - &.u-button--info { - color:$u-button-plain-u-button-info-color; - } - } - - &--plain { - &.u-button--success { - color:$u-button-plain-u-button-success-color; - } - } - - &--plain { - &.u-button--error { - color:$u-button-plain-u-button-error-color; - } - } - - &--plain { - &.u-button--warning { - color:$u-button-plain-u-button-warning-color; - } - } -} diff --git a/node_modules/uview-ui/components/u-calendar/header.vue b/node_modules/uview-ui/components/u-calendar/header.vue deleted file mode 100644 index 31cf35a..0000000 --- a/node_modules/uview-ui/components/u-calendar/header.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-calendar/month.vue b/node_modules/uview-ui/components/u-calendar/month.vue deleted file mode 100644 index 61d4d0f..0000000 --- a/node_modules/uview-ui/components/u-calendar/month.vue +++ /dev/null @@ -1,577 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-calendar/props.js b/node_modules/uview-ui/components/u-calendar/props.js deleted file mode 100644 index 2ad7bc7..0000000 --- a/node_modules/uview-ui/components/u-calendar/props.js +++ /dev/null @@ -1,144 +0,0 @@ -export default { - props: { - // 日历顶部标题 - title: { - type: String, - default: uni.$u.props.calendar.title - }, - // 是否显示标题 - showTitle: { - type: Boolean, - default: uni.$u.props.calendar.showTitle - }, - // 是否显示副标题 - showSubtitle: { - type: Boolean, - default: uni.$u.props.calendar.showSubtitle - }, - // 日期类型选择,single-选择单个日期,multiple-可以选择多个日期,range-选择日期范围 - mode: { - type: String, - default: uni.$u.props.calendar.mode - }, - // mode=range时,第一个日期底部的提示文字 - startText: { - type: String, - default: uni.$u.props.calendar.startText - }, - // mode=range时,最后一个日期底部的提示文字 - endText: { - type: String, - default: uni.$u.props.calendar.endText - }, - // 自定义列表 - customList: { - type: Array, - default: uni.$u.props.calendar.customList - }, - // 主题色,对底部按钮和选中日期有效 - color: { - type: String, - default: uni.$u.props.calendar.color - }, - // 最小的可选日期 - minDate: { - type: [String, Number], - default: uni.$u.props.calendar.minDate - }, - // 最大可选日期 - maxDate: { - type: [String, Number], - default: uni.$u.props.calendar.maxDate - }, - // 默认选中的日期,mode为multiple或range是必须为数组格式 - defaultDate: { - type: [Array, String, Date, null], - default: uni.$u.props.calendar.defaultDate - }, - // mode=multiple时,最多可选多少个日期 - maxCount: { - type: [String, Number], - default: uni.$u.props.calendar.maxCount - }, - // 日期行高 - rowHeight: { - type: [String, Number], - default: uni.$u.props.calendar.rowHeight - }, - // 日期格式化函数 - formatter: { - type: [Function, null], - default: uni.$u.props.calendar.formatter - }, - // 是否显示农历 - showLunar: { - type: Boolean, - default: uni.$u.props.calendar.showLunar - }, - // 是否显示月份背景色 - showMark: { - type: Boolean, - default: uni.$u.props.calendar.showMark - }, - // 确定按钮的文字 - confirmText: { - type: String, - default: uni.$u.props.calendar.confirmText - }, - // 确认按钮处于禁用状态时的文字 - confirmDisabledText: { - type: String, - default: uni.$u.props.calendar.confirmDisabledText - }, - // 是否显示日历弹窗 - show: { - type: Boolean, - default: uni.$u.props.calendar.show - }, - // 是否允许点击遮罩关闭日历 - closeOnClickOverlay: { - type: Boolean, - default: uni.$u.props.calendar.closeOnClickOverlay - }, - // 是否为只读状态,只读状态下禁止选择日期 - readonly: { - type: Boolean, - default: uni.$u.props.calendar.readonly - }, - // 是否展示确认按钮 - showConfirm: { - type: Boolean, - default: uni.$u.props.calendar.showConfirm - }, - // 日期区间最多可选天数,默认无限制,mode = range时有效 - maxRange: { - type: [Number, String], - default: uni.$u.props.calendar.maxRange - }, - // 范围选择超过最多可选天数时的提示文案,mode = range时有效 - rangePrompt: { - type: String, - default: uni.$u.props.calendar.rangePrompt - }, - // 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效 - showRangePrompt: { - type: Boolean, - default: uni.$u.props.calendar.showRangePrompt - }, - // 是否允许日期范围的起止时间为同一天,mode = range时有效 - allowSameDay: { - type: Boolean, - default: uni.$u.props.calendar.allowSameDay - }, - // 圆角值 - round: { - type: [Boolean, String, Number], - default: uni.$u.props.calendar.round - }, - // 最多展示月份数量 - monthNum: { - type: [Number, String], - default: 3 - } - } -} diff --git a/node_modules/uview-ui/components/u-calendar/u-calendar.vue b/node_modules/uview-ui/components/u-calendar/u-calendar.vue deleted file mode 100644 index 05500d4..0000000 --- a/node_modules/uview-ui/components/u-calendar/u-calendar.vue +++ /dev/null @@ -1,343 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-calendar/util.js b/node_modules/uview-ui/components/u-calendar/util.js deleted file mode 100644 index f71ad62..0000000 --- a/node_modules/uview-ui/components/u-calendar/util.js +++ /dev/null @@ -1,85 +0,0 @@ -export default { - methods: { - // 设置月份数据 - setMonth() { - // 月初是周几 - const day = dayjs(this.date).date(1).day() - const start = day == 0 ? 6 : day - 1 - - // 本月天数 - const days = dayjs(this.date).endOf('month').format('D') - - // 上个月天数 - const prevDays = dayjs(this.date).endOf('month').subtract(1, 'month').format('D') - - // 日期数据 - const arr = [] - // 清空表格 - this.month = [] - - // 添加上月数据 - arr.push( - ...new Array(start).fill(1).map((e, i) => { - const day = prevDays - start + i + 1 - - return { - value: day, - disabled: true, - date: dayjs(this.date).subtract(1, 'month').date(day).format('YYYY-MM-DD') - } - }) - ) - - // 添加本月数据 - arr.push( - ...new Array(days - 0).fill(1).map((e, i) => { - const day = i + 1 - - return { - value: day, - date: dayjs(this.date).date(day).format('YYYY-MM-DD') - } - }) - ) - - // 添加下个月 - arr.push( - ...new Array(42 - days - start).fill(1).map((e, i) => { - const day = i + 1 - - return { - value: day, - disabled: true, - date: dayjs(this.date).add(1, 'month').date(day).format('YYYY-MM-DD') - } - }) - ) - - // 分割数组 - for (let n = 0; n < arr.length; n += 7) { - this.month.push( - arr.slice(n, n + 7).map((e, i) => { - e.index = i + n - - // 自定义信息 - const custom = this.customList.find((c) => c.date == e.date) - - // 农历 - if (this.lunar) { - const { - IDayCn, - IMonthCn - } = this.getLunar(e.date) - e.lunar = IDayCn == '初一' ? IMonthCn : IDayCn - } - - return { - ...e, - ...custom - } - }) - ) - } - } - } -} diff --git a/node_modules/uview-ui/components/u-car-keyboard/props.js b/node_modules/uview-ui/components/u-car-keyboard/props.js deleted file mode 100644 index 3553647..0000000 --- a/node_modules/uview-ui/components/u-car-keyboard/props.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - props: { - // 是否打乱键盘按键的顺序 - random: { - type: Boolean, - default: false - }, - // 输入一个中文后,是否自动切换到英文 - autoChange: { - type: Boolean, - default: false - } - } -} diff --git a/node_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue b/node_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue deleted file mode 100644 index c5c729c..0000000 --- a/node_modules/uview-ui/components/u-car-keyboard/u-car-keyboard.vue +++ /dev/null @@ -1,311 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-cell-group/props.js b/node_modules/uview-ui/components/u-cell-group/props.js deleted file mode 100644 index 350ef40..0000000 --- a/node_modules/uview-ui/components/u-cell-group/props.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - props: { - // 分组标题 - title: { - type: String, - default: uni.$u.props.cellGroup.title - }, - // 是否显示外边框 - border: { - type: Boolean, - default: uni.$u.props.cellGroup.border - } - } -} diff --git a/node_modules/uview-ui/components/u-cell-group/u-cell-group.vue b/node_modules/uview-ui/components/u-cell-group/u-cell-group.vue deleted file mode 100644 index a9508c0..0000000 --- a/node_modules/uview-ui/components/u-cell-group/u-cell-group.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - diff --git a/node_modules/uview-ui/components/u-cell/props.js b/node_modules/uview-ui/components/u-cell/props.js deleted file mode 100644 index 8e1363c..0000000 --- a/node_modules/uview-ui/components/u-cell/props.js +++ /dev/null @@ -1,115 +0,0 @@ -export default { - props: { - // 标题 - title: { - type: [String, Number], - default: uni.$u.props.cell.title - }, - // 标题下方的描述信息 - label: { - type: [String, Number], - default: uni.$u.props.cell.label - }, - // 右侧的内容 - value: { - type: [String, Number], - default: uni.$u.props.cell.value - }, - // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址) - icon: { - type: String, - default: uni.$u.props.cell.icon - }, - // 标题的宽度,单位任意,数值默认为px单位 - titleWidth: { - type: [String, Number], - default: uni.$u.props.cell.titleWidth - }, - // 是否禁用cell - disabled: { - type: Boolean, - default: uni.$u.props.cell.disabled - }, - // 是否显示下边框 - border: { - type: Boolean, - default: uni.$u.props.cell.border - }, - // 内容是否垂直居中(主要是针对右侧的value部分) - center: { - type: Boolean, - default: uni.$u.props.cell.center - }, - // 点击后跳转的URL地址 - url: { - type: String, - default: uni.$u.props.cell.url - }, - // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作 - linkType: { - type: String, - default: uni.$u.props.cell.linkType - }, - // 是否开启点击反馈(表现为点击时加上灰色背景) - clickable: { - type: Boolean, - default: uni.$u.props.cell.clickable - }, - // 是否展示右侧箭头并开启点击反馈 - isLink: { - type: Boolean, - default: uni.$u.props.cell.isLink - }, - // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件) - required: { - type: Boolean, - default: uni.$u.props.cell.required - }, - // 右侧的图标箭头 - rightIcon: { - type: String, - default: uni.$u.props.cell.rightIcon - }, - // 右侧箭头的方向,可选值为:left,up,down - arrowDirection: { - type: String, - default: uni.$u.props.cell.arrowDirection - }, - // 左侧图标样式 - iconStyle: { - type: [Object, String], - default: () => { - return uni.$u.props.cell.iconStyle - } - }, - // 右侧箭头图标的样式 - rightIconStyle: { - type: [Object, String], - default: () => { - return uni.$u.props.cell.rightIconStyle - } - }, - // 标题的样式 - titleStyle: { - type: [Object, String], - default: () => { - return uni.$u.props.cell.titleStyle - } - }, - // 单位元的大小,可选值为large - size: { - type: String, - default: uni.$u.props.cell.size - }, - // 点击cell是否阻止事件传播 - stop: { - type: Boolean, - default: uni.$u.props.cell.stop - }, - // 标识符,cell被点击时返回 - name: { - type: [Number, String], - default: uni.$u.props.cell.name - } - } -} diff --git a/node_modules/uview-ui/components/u-cell/u-cell.vue b/node_modules/uview-ui/components/u-cell/u-cell.vue deleted file mode 100644 index 03b2462..0000000 --- a/node_modules/uview-ui/components/u-cell/u-cell.vue +++ /dev/null @@ -1,230 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-checkbox-group/props.js b/node_modules/uview-ui/components/u-checkbox-group/props.js deleted file mode 100644 index 2f818a1..0000000 --- a/node_modules/uview-ui/components/u-checkbox-group/props.js +++ /dev/null @@ -1,82 +0,0 @@ -export default { - props: { - // 标识符 - name: { - type: String, - default: uni.$u.props.checkboxGroup.name - }, - // 绑定的值 - value: { - type: Array, - default: uni.$u.props.checkboxGroup.value - }, - // 形状,circle-圆形,square-方形 - shape: { - type: String, - default: uni.$u.props.checkboxGroup.shape - }, - // 是否禁用全部checkbox - disabled: { - type: Boolean, - default: uni.$u.props.checkboxGroup.disabled - }, - - // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 - activeColor: { - type: String, - default: uni.$u.props.checkboxGroup.activeColor - }, - // 未选中的颜色 - inactiveColor: { - type: String, - default: uni.$u.props.checkboxGroup.inactiveColor - }, - - // 整个组件的尺寸,默认px - size: { - type: [String, Number], - default: uni.$u.props.checkboxGroup.size - }, - // 布局方式,row-横向,column-纵向 - placement: { - type: String, - default: uni.$u.props.checkboxGroup.placement - }, - // label的字体大小,px单位 - labelSize: { - type: [String, Number], - default: uni.$u.props.checkboxGroup.labelSize - }, - // label的字体颜色 - labelColor: { - type: [String], - default: uni.$u.props.checkboxGroup.labelColor - }, - // 是否禁止点击文本操作 - labelDisabled: { - type: Boolean, - default: uni.$u.props.checkboxGroup.labelDisabled - }, - // 图标颜色 - iconColor: { - type: String, - default: uni.$u.props.checkboxGroup.iconColor - }, - // 图标的大小,单位px - iconSize: { - type: [String, Number], - default: uni.$u.props.checkboxGroup.iconSize - }, - // 勾选图标的对齐方式,left-左边,right-右边 - iconPlacement: { - type: String, - default: uni.$u.props.checkboxGroup.iconPlacement - }, - // 竖向配列时,是否显示下划线 - borderBottom: { - type: Boolean, - default: uni.$u.props.checkboxGroup.borderBottom - } - - } -} diff --git a/node_modules/uview-ui/components/u-checkbox-group/u-checkbox-group.vue b/node_modules/uview-ui/components/u-checkbox-group/u-checkbox-group.vue deleted file mode 100644 index 7a6b4fa..0000000 --- a/node_modules/uview-ui/components/u-checkbox-group/u-checkbox-group.vue +++ /dev/null @@ -1,103 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-checkbox/props.js b/node_modules/uview-ui/components/u-checkbox/props.js deleted file mode 100644 index 93f4fd9..0000000 --- a/node_modules/uview-ui/components/u-checkbox/props.js +++ /dev/null @@ -1,69 +0,0 @@ -export default { - props: { - // checkbox的名称 - name: { - type: [String, Number, Boolean], - default: uni.$u.props.checkbox.name - }, - // 形状,square为方形,circle为圆型 - shape: { - type: String, - default: uni.$u.props.checkbox.shape - }, - // 整体的大小 - size: { - type: [String, Number], - default: uni.$u.props.checkbox.size - }, - // 是否默认选中 - checked: { - type: Boolean, - default: uni.$u.props.checkbox.checked - }, - // 是否禁用 - disabled: { - type: [String, Boolean], - default: uni.$u.props.checkbox.disabled - }, - // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 - activeColor: { - type: String, - default: uni.$u.props.checkbox.activeColor - }, - // 未选中的颜色 - inactiveColor: { - type: String, - default: uni.$u.props.checkbox.inactiveColor - }, - // 图标的大小,单位px - iconSize: { - type: [String, Number], - default: uni.$u.props.checkbox.iconSize - }, - // 图标颜色 - iconColor: { - type: String, - default: uni.$u.props.checkbox.iconColor - }, - // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式 - label: { - type: [String, Number], - default: uni.$u.props.checkbox.label - }, - // label的字体大小,px单位 - labelSize: { - type: [String, Number], - default: uni.$u.props.checkbox.labelSize - }, - // label的颜色 - labelColor: { - type: String, - default: uni.$u.props.checkbox.labelColor - }, - // 是否禁止点击提示语选中复选框 - labelDisabled: { - type: [String, Boolean], - default: uni.$u.props.checkbox.labelDisabled - } - } -} diff --git a/node_modules/uview-ui/components/u-checkbox/u-checkbox.vue b/node_modules/uview-ui/components/u-checkbox/u-checkbox.vue deleted file mode 100644 index 6429cca..0000000 --- a/node_modules/uview-ui/components/u-checkbox/u-checkbox.vue +++ /dev/null @@ -1,344 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-circle-progress/props.js b/node_modules/uview-ui/components/u-circle-progress/props.js deleted file mode 100644 index d776cfb..0000000 --- a/node_modules/uview-ui/components/u-circle-progress/props.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - props: { - percentage: { - type: [String, Number], - default: uni.$u.props.circleProgress.percentage - } - } -} diff --git a/node_modules/uview-ui/components/u-circle-progress/u-circle-progress.vue b/node_modules/uview-ui/components/u-circle-progress/u-circle-progress.vue deleted file mode 100644 index d1ee286..0000000 --- a/node_modules/uview-ui/components/u-circle-progress/u-circle-progress.vue +++ /dev/null @@ -1,198 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-code-input/props.js b/node_modules/uview-ui/components/u-code-input/props.js deleted file mode 100644 index eeb58a0..0000000 --- a/node_modules/uview-ui/components/u-code-input/props.js +++ /dev/null @@ -1,74 +0,0 @@ -export default { - props: { - // 最大输入长度 - maxlength: { - type: [String, Number], - default: uni.$u.props.codeInput.maxlength - }, - // 是否用圆点填充 - dot: { - type: Boolean, - default: uni.$u.props.codeInput.dot - }, - // 显示模式,box-盒子模式,line-底部横线模式 - mode: { - type: String, - default: uni.$u.props.codeInput.mode - }, - // 是否细边框 - hairline: { - type: Boolean, - default: uni.$u.props.codeInput.hairline - }, - // 字符间的距离 - space: { - type: [String, Number], - default: uni.$u.props.codeInput.space - }, - // 预置值 - value: { - type: [String, Number], - default: uni.$u.props.codeInput.value - }, - // 是否自动获取焦点 - focus: { - type: Boolean, - default: uni.$u.props.codeInput.focus - }, - // 字体是否加粗 - bold: { - type: Boolean, - default: uni.$u.props.codeInput.bold - }, - // 字体颜色 - color: { - type: String, - default: uni.$u.props.codeInput.color - }, - // 字体大小 - fontSize: { - type: [String, Number], - default: uni.$u.props.codeInput.fontSize - }, - // 输入框的大小,宽等于高 - size: { - type: [String, Number], - default: uni.$u.props.codeInput.size - }, - // 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true - disabledKeyboard: { - type: Boolean, - default: uni.$u.props.codeInput.disabledKeyboard - }, - // 边框和线条颜色 - borderColor: { - type: String, - default: uni.$u.props.codeInput.borderColor - }, - // 是否禁止输入"."符号 - disabledDot: { - type: Boolean, - default: uni.$u.props.codeInput.disabledDot - } - } -} diff --git a/node_modules/uview-ui/components/u-code-input/u-code-input.vue b/node_modules/uview-ui/components/u-code-input/u-code-input.vue deleted file mode 100644 index 4754ba0..0000000 --- a/node_modules/uview-ui/components/u-code-input/u-code-input.vue +++ /dev/null @@ -1,213 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-code/props.js b/node_modules/uview-ui/components/u-code/props.js deleted file mode 100644 index eaf80d0..0000000 --- a/node_modules/uview-ui/components/u-code/props.js +++ /dev/null @@ -1,34 +0,0 @@ -export default { - props: { - // 倒计时总秒数 - seconds: { - type: [String, Number], - default: uni.$u.props.code.seconds - }, - // 尚未开始时提示 - startText: { - type: String, - default: uni.$u.props.code.startText - }, - // 正在倒计时中的提示 - changeText: { - type: String, - default: uni.$u.props.code.changeText - }, - // 倒计时结束时的提示 - endText: { - type: String, - default: uni.$u.props.code.endText - }, - // 是否在H5刷新或各端返回再进入时继续倒计时 - keepRunning: { - type: Boolean, - default: uni.$u.props.code.keepRunning - }, - // 为了区分多个页面,或者一个页面多个倒计时组件本地存储的继续倒计时变了 - uniqueKey: { - type: String, - default: uni.$u.props.code.uniqueKey - } - } -} diff --git a/node_modules/uview-ui/components/u-code/u-code.vue b/node_modules/uview-ui/components/u-code/u-code.vue deleted file mode 100644 index cdf9f82..0000000 --- a/node_modules/uview-ui/components/u-code/u-code.vue +++ /dev/null @@ -1,129 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-col/props.js b/node_modules/uview-ui/components/u-col/props.js deleted file mode 100644 index 0622251..0000000 --- a/node_modules/uview-ui/components/u-col/props.js +++ /dev/null @@ -1,29 +0,0 @@ -export default { - props: { - // 占父容器宽度的多少等分,总分为12份 - span: { - type: [String, Number], - default: uni.$u.props.col.span - }, - // 指定栅格左侧的间隔数(总12栏) - offset: { - type: [String, Number], - default: uni.$u.props.col.offset - }, - // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`) - justify: { - type: String, - default: uni.$u.props.col.justify - }, - // 垂直对齐方式,可选值为top、center、bottom、stretch - align: { - type: String, - default: uni.$u.props.col.align - }, - // 文字对齐方式 - textAlign: { - type: String, - default: uni.$u.props.col.textAlign - } - } -} diff --git a/node_modules/uview-ui/components/u-col/u-col.vue b/node_modules/uview-ui/components/u-col/u-col.vue deleted file mode 100644 index 329eff3..0000000 --- a/node_modules/uview-ui/components/u-col/u-col.vue +++ /dev/null @@ -1,159 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-collapse-item/props.js b/node_modules/uview-ui/components/u-collapse-item/props.js deleted file mode 100644 index bd5749b..0000000 --- a/node_modules/uview-ui/components/u-collapse-item/props.js +++ /dev/null @@ -1,59 +0,0 @@ -export default { - props: { - // 标题 - title: { - type: String, - default: uni.$u.props.collapseItem.title - }, - // 标题右侧内容 - value: { - type: String, - default: uni.$u.props.collapseItem.value - }, - // 标题下方的描述信息 - label: { - type: String, - default: uni.$u.props.collapseItem.label - }, - // 是否禁用折叠面板 - disabled: { - type: Boolean, - default: uni.$u.props.collapseItem.disabled - }, - // 是否展示右侧箭头并开启点击反馈 - isLink: { - type: Boolean, - default: uni.$u.props.collapseItem.isLink - }, - // 是否开启点击反馈 - clickable: { - type: Boolean, - default: uni.$u.props.collapseItem.clickable - }, - // 是否显示内边框 - border: { - type: Boolean, - default: uni.$u.props.collapseItem.border - }, - // 标题的对齐方式 - align: { - type: String, - default: uni.$u.props.collapseItem.align - }, - // 唯一标识符 - name: { - type: [String, Number], - default: uni.$u.props.collapseItem.name - }, - // 标题左侧图片,可为绝对路径的图片或内置图标 - icon: { - type: String, - default: uni.$u.props.collapseItem.icon - }, - // 面板展开收起的过渡时间,单位ms - duration: { - type: Number, - default: uni.$u.props.collapseItem.duration - } - } -} diff --git a/node_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue b/node_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue deleted file mode 100644 index 4abb659..0000000 --- a/node_modules/uview-ui/components/u-collapse-item/u-collapse-item.vue +++ /dev/null @@ -1,229 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-collapse/props.js b/node_modules/uview-ui/components/u-collapse/props.js deleted file mode 100644 index 7ee6d31..0000000 --- a/node_modules/uview-ui/components/u-collapse/props.js +++ /dev/null @@ -1,19 +0,0 @@ -export default { - props: { - // 当前展开面板的name,非手风琴模式:[],手风琴模式:string | number - value: { - type: [String, Number, Array, null], - default: uni.$u.props.collapse.value - }, - // 是否手风琴模式 - accordion: { - type: Boolean, - default: uni.$u.props.collapse.accordion - }, - // 是否显示外边框 - border: { - type: Boolean, - default: uni.$u.props.collapse.border - } - } -} diff --git a/node_modules/uview-ui/components/u-collapse/u-collapse.vue b/node_modules/uview-ui/components/u-collapse/u-collapse.vue deleted file mode 100644 index fc188a2..0000000 --- a/node_modules/uview-ui/components/u-collapse/u-collapse.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-column-notice/props.js b/node_modules/uview-ui/components/u-column-notice/props.js deleted file mode 100644 index 4809154..0000000 --- a/node_modules/uview-ui/components/u-column-notice/props.js +++ /dev/null @@ -1,55 +0,0 @@ -export default { - props: { - // 显示的内容,字符串 - text: { - type: [Array], - default: uni.$u.props.columnNotice.text - }, - // 是否显示左侧的音量图标 - icon: { - type: String, - default: uni.$u.props.columnNotice.icon - }, - // 通告模式,link-显示右箭头,closable-显示右侧关闭图标 - mode: { - type: String, - default: uni.$u.props.columnNotice.mode - }, - // 文字颜色,各图标也会使用文字颜色 - color: { - type: String, - default: uni.$u.props.columnNotice.color - }, - // 背景颜色 - bgColor: { - type: String, - default: uni.$u.props.columnNotice.bgColor - }, - // 字体大小,单位px - fontSize: { - type: [String, Number], - default: uni.$u.props.columnNotice.fontSize - }, - // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度 - speed: { - type: [String, Number], - default: uni.$u.props.columnNotice.speed - }, - // direction = row时,是否使用步进形式滚动 - step: { - type: Boolean, - default: uni.$u.props.columnNotice.step - }, - // 滚动一个周期的时间长,单位ms - duration: { - type: [String, Number], - default: uni.$u.props.columnNotice.duration - }, - // 是否禁止用手滑动切换 - // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序 - disableTouch: { - type: Boolean, - default: uni.$u.props.columnNotice.disableTouch - } - } -} diff --git a/node_modules/uview-ui/components/u-column-notice/u-column-notice.vue b/node_modules/uview-ui/components/u-column-notice/u-column-notice.vue deleted file mode 100644 index 2640dc4..0000000 --- a/node_modules/uview-ui/components/u-column-notice/u-column-notice.vue +++ /dev/null @@ -1,156 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-count-down/props.js b/node_modules/uview-ui/components/u-count-down/props.js deleted file mode 100644 index d62f025..0000000 --- a/node_modules/uview-ui/components/u-count-down/props.js +++ /dev/null @@ -1,24 +0,0 @@ -export default { - props: { - // 倒计时时长,单位ms - time: { - type: [String, Number], - default: uni.$u.props.countDown.time - }, - // 时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒 - format: { - type: String, - default: uni.$u.props.countDown.format - }, - // 是否自动开始倒计时 - autoStart: { - type: Boolean, - default: uni.$u.props.countDown.autoStart - }, - // 是否展示毫秒倒计时 - millisecond: { - type: Boolean, - default: uni.$u.props.countDown.millisecond - } - } -} diff --git a/node_modules/uview-ui/components/u-count-down/u-count-down.vue b/node_modules/uview-ui/components/u-count-down/u-count-down.vue deleted file mode 100644 index ef0e079..0000000 --- a/node_modules/uview-ui/components/u-count-down/u-count-down.vue +++ /dev/null @@ -1,163 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-count-down/utils.js b/node_modules/uview-ui/components/u-count-down/utils.js deleted file mode 100644 index 4cde64d..0000000 --- a/node_modules/uview-ui/components/u-count-down/utils.js +++ /dev/null @@ -1,62 +0,0 @@ -// 补0,如1 -> 01 -function padZero(num, targetLength = 2) { - let str = `${num}` - while (str.length < targetLength) { - str = `0${str}` - } - return str -} -const SECOND = 1000 -const MINUTE = 60 * SECOND -const HOUR = 60 * MINUTE -const DAY = 24 * HOUR -export function parseTimeData(time) { - const days = Math.floor(time / DAY) - const hours = Math.floor((time % DAY) / HOUR) - const minutes = Math.floor((time % HOUR) / MINUTE) - const seconds = Math.floor((time % MINUTE) / SECOND) - const milliseconds = Math.floor(time % SECOND) - return { - days, - hours, - minutes, - seconds, - milliseconds - } -} -export function parseFormat(format, timeData) { - let { - days, - hours, - minutes, - seconds, - milliseconds - } = timeData - // 如果格式化字符串中不存在DD(天),则将天的时间转为小时中去 - if (format.indexOf('DD') === -1) { - hours += days * 24 - } else { - // 对天补0 - format = format.replace('DD', padZero(days)) - } - // 其他同理于DD的格式化处理方式 - if (format.indexOf('HH') === -1) { - minutes += hours * 60 - } else { - format = format.replace('HH', padZero(hours)) - } - if (format.indexOf('mm') === -1) { - seconds += minutes * 60 - } else { - format = format.replace('mm', padZero(minutes)) - } - if (format.indexOf('ss') === -1) { - milliseconds += seconds * 1000 - } else { - format = format.replace('ss', padZero(seconds)) - } - return format.replace('SSS', padZero(milliseconds, 3)) -} -export function isSameSecond(time1, time2) { - return Math.floor(time1 / 1000) === Math.floor(time2 / 1000) -} diff --git a/node_modules/uview-ui/components/u-count-to/props.js b/node_modules/uview-ui/components/u-count-to/props.js deleted file mode 100644 index 86873c1..0000000 --- a/node_modules/uview-ui/components/u-count-to/props.js +++ /dev/null @@ -1,59 +0,0 @@ -export default { - props: { - // 开始的数值,默认从0增长到某一个数 - startVal: { - type: [String, Number], - default: uni.$u.props.countTo.startVal - }, - // 要滚动的目标数值,必须 - endVal: { - type: [String, Number], - default: uni.$u.props.countTo.endVal - }, - // 滚动到目标数值的动画持续时间,单位为毫秒(ms) - duration: { - type: [String, Number], - default: uni.$u.props.countTo.duration - }, - // 设置数值后是否自动开始滚动 - autoplay: { - type: Boolean, - default: uni.$u.props.countTo.autoplay - }, - // 要显示的小数位数 - decimals: { - type: [String, Number], - default: uni.$u.props.countTo.decimals - }, - // 是否在即将到达目标数值的时候,使用缓慢滚动的效果 - useEasing: { - type: Boolean, - default: uni.$u.props.countTo.useEasing - }, - // 十进制分割 - decimal: { - type: [String, Number], - default: uni.$u.props.countTo.decimal - }, - // 字体颜色 - color: { - type: String, - default: uni.$u.props.countTo.color - }, - // 字体大小 - fontSize: { - type: [String, Number], - default: uni.$u.props.countTo.fontSize - }, - // 是否加粗字体 - bold: { - type: Boolean, - default: uni.$u.props.countTo.bold - }, - // 千位分隔符,类似金额的分割(¥23,321.05中的",") - separator: { - type: String, - default: uni.$u.props.countTo.separator - } - } -} diff --git a/node_modules/uview-ui/components/u-count-to/u-count-to.vue b/node_modules/uview-ui/components/u-count-to/u-count-to.vue deleted file mode 100644 index 417b732..0000000 --- a/node_modules/uview-ui/components/u-count-to/u-count-to.vue +++ /dev/null @@ -1,184 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-datetime-picker/props.js b/node_modules/uview-ui/components/u-datetime-picker/props.js deleted file mode 100644 index f44c0f9..0000000 --- a/node_modules/uview-ui/components/u-datetime-picker/props.js +++ /dev/null @@ -1,116 +0,0 @@ -export default { - props: { - // 是否打开组件 - show: { - type: Boolean, - default: uni.$u.props.datetimePicker.show - }, - // 是否展示顶部的操作栏 - showToolbar: { - type: Boolean, - default: uni.$u.props.datetimePicker.showToolbar - }, - // 绑定值 - value: { - type: [String, Number], - default: uni.$u.props.datetimePicker.value - }, - // 顶部标题 - title: { - type: String, - default: uni.$u.props.datetimePicker.title - }, - // 展示格式,mode=date为日期选择,mode=time为时间选择,mode=year-month为年月选择,mode=datetime为日期时间选择 - mode: { - type: String, - default: uni.$u.props.datetimePicker.mode - }, - // 可选的最大时间 - maxDate: { - type: Number, - // 最大默认值为后10年 - default: uni.$u.props.datetimePicker.maxDate - }, - // 可选的最小时间 - minDate: { - type: Number, - // 最小默认值为前10年 - default: uni.$u.props.datetimePicker.minDate - }, - // 可选的最小小时,仅mode=time有效 - minHour: { - type: Number, - default: uni.$u.props.datetimePicker.minHour - }, - // 可选的最大小时,仅mode=time有效 - maxHour: { - type: Number, - default: uni.$u.props.datetimePicker.maxHour - }, - // 可选的最小分钟,仅mode=time有效 - minMinute: { - type: Number, - default: uni.$u.props.datetimePicker.minMinute - }, - // 可选的最大分钟,仅mode=time有效 - maxMinute: { - type: Number, - default: uni.$u.props.datetimePicker.maxMinute - }, - // 选项过滤函数 - filter: { - type: [Function, null], - default: uni.$u.props.datetimePicker.filter - }, - // 选项格式化函数 - formatter: { - type: [Function, null], - default: uni.$u.props.datetimePicker.formatter - }, - // 是否显示加载中状态 - loading: { - type: Boolean, - default: uni.$u.props.datetimePicker.loading - }, - // 各列中,单个选项的高度 - itemHeight: { - type: [String, Number], - default: uni.$u.props.datetimePicker.itemHeight - }, - // 取消按钮的文字 - cancelText: { - type: String, - default: uni.$u.props.datetimePicker.cancelText - }, - // 确认按钮的文字 - confirmText: { - type: String, - default: uni.$u.props.datetimePicker.confirmText - }, - // 取消按钮的颜色 - cancelColor: { - type: String, - default: uni.$u.props.datetimePicker.cancelColor - }, - // 确认按钮的颜色 - confirmColor: { - type: String, - default: uni.$u.props.datetimePicker.confirmColor - }, - // 每列中可见选项的数量 - visibleItemCount: { - type: [String, Number], - default: uni.$u.props.datetimePicker.visibleItemCount - }, - // 是否允许点击遮罩关闭选择器 - closeOnClickOverlay: { - type: Boolean, - default: uni.$u.props.datetimePicker.closeOnClickOverlay - }, - // 各列的默认索引 - defaultIndex: { - type: Array, - default: uni.$u.props.datetimePicker.defaultIndex - } - } -} diff --git a/node_modules/uview-ui/components/u-datetime-picker/u-datetime-picker.vue b/node_modules/uview-ui/components/u-datetime-picker/u-datetime-picker.vue deleted file mode 100644 index 0db507a..0000000 --- a/node_modules/uview-ui/components/u-datetime-picker/u-datetime-picker.vue +++ /dev/null @@ -1,341 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-divider/props.js b/node_modules/uview-ui/components/u-divider/props.js deleted file mode 100644 index 1fa8359..0000000 --- a/node_modules/uview-ui/components/u-divider/props.js +++ /dev/null @@ -1,44 +0,0 @@ -export default { - props: { - // 是否虚线 - dashed: { - type: Boolean, - default: uni.$u.props.divider.dashed - }, - // 是否细线 - hairline: { - type: Boolean, - default: uni.$u.props.divider.hairline - }, - // 是否以点替代文字,优先于text字段起作用 - dot: { - type: Boolean, - default: uni.$u.props.divider.dot - }, - // 内容文本的位置,left-左边,center-中间,right-右边 - textPosition: { - type: String, - default: uni.$u.props.divider.textPosition - }, - // 文本内容 - text: { - type: [String, Number], - default: uni.$u.props.divider.text - }, - // 文本大小 - textSize: { - type: [String, Number], - default: uni.$u.props.divider.textSize - }, - // 文本颜色 - textColor: { - type: String, - default: uni.$u.props.divider.textColor - }, - // 线条颜色 - lineColor: { - type: String, - default: uni.$u.props.divider.lineColor - } - } -} diff --git a/node_modules/uview-ui/components/u-divider/u-divider.vue b/node_modules/uview-ui/components/u-divider/u-divider.vue deleted file mode 100644 index b629da6..0000000 --- a/node_modules/uview-ui/components/u-divider/u-divider.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-dropdown-item/props.js b/node_modules/uview-ui/components/u-dropdown-item/props.js deleted file mode 100644 index c73fb3b..0000000 --- a/node_modules/uview-ui/components/u-dropdown-item/props.js +++ /dev/null @@ -1,36 +0,0 @@ -export default { - props: { - // 当前选中项的value值 - value: { - type: [Number, String, Array], - default: '' - }, - // 菜单项标题 - title: { - type: [String, Number], - default: '' - }, - // 选项数据,如果传入了默认slot,此参数无效 - options: { - type: Array, - default() { - return [] - } - }, - // 是否禁用此菜单项 - disabled: { - type: Boolean, - default: false - }, - // 下拉弹窗的高度 - height: { - type: [Number, String], - default: 'auto' - }, - // 点击遮罩是否可以收起弹窗 - closeOnClickOverlay: { - type: Boolean, - default: true - } - } -} diff --git a/node_modules/uview-ui/components/u-dropdown-item/u-dropdown-item.vue b/node_modules/uview-ui/components/u-dropdown-item/u-dropdown-item.vue deleted file mode 100644 index 7a87229..0000000 --- a/node_modules/uview-ui/components/u-dropdown-item/u-dropdown-item.vue +++ /dev/null @@ -1,146 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-dropdown/props.js b/node_modules/uview-ui/components/u-dropdown/props.js deleted file mode 100644 index 5032888..0000000 --- a/node_modules/uview-ui/components/u-dropdown/props.js +++ /dev/null @@ -1,65 +0,0 @@ -export default { - props: { - // 标题选中时的样式 - activeStyle: { - type: [String, Object], - default: () => ({ - color: '#2979ff', - fontSize: '14px' - }) - }, - // 标题未选中时的样式 - inactiveStyle: { - type: [String, Object], - default: () => ({ - color: '#606266', - fontSize: '14px' - }) - }, - // 点击遮罩是否关闭菜单 - closeOnClickMask: { - type: Boolean, - default: true - }, - // 点击当前激活项标题是否关闭菜单 - closeOnClickSelf: { - type: Boolean, - default: true - }, - // 过渡时间 - duration: { - type: [Number, String], - default: 300 - }, - // 标题菜单的高度 - height: { - type: [Number, String], - default: 40 - }, - // 是否显示下边框 - borderBottom: { - type: Boolean, - default: false - }, - // 标题的字体大小 - titleSize: { - type: [Number, String], - default: 14 - }, - // 下拉出来的内容部分的圆角值 - borderRadius: { - type: [Number, String], - default: 0 - }, - // 菜单右侧的icon图标 - menuIcon: { - type: String, - default: 'arrow-down' - }, - // 菜单右侧图标的大小 - menuIconSize: { - type: [Number, String], - default: 14 - } - } -} diff --git a/node_modules/uview-ui/components/u-dropdown/u-dropdown.vue b/node_modules/uview-ui/components/u-dropdown/u-dropdown.vue deleted file mode 100644 index c02ef22..0000000 --- a/node_modules/uview-ui/components/u-dropdown/u-dropdown.vue +++ /dev/null @@ -1,127 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-empty/props.js b/node_modules/uview-ui/components/u-empty/props.js deleted file mode 100644 index 78662f8..0000000 --- a/node_modules/uview-ui/components/u-empty/props.js +++ /dev/null @@ -1,59 +0,0 @@ -export default { - props: { - // 内置图标名称,或图片路径,建议绝对路径 - icon: { - type: String, - default: uni.$u.props.empty.icon - }, - // 提示文字 - text: { - type: String, - default: uni.$u.props.empty.text - }, - // 文字颜色 - textColor: { - type: String, - default: uni.$u.props.empty.textColor - }, - // 文字大小 - textSize: { - type: [String, Number], - default: uni.$u.props.empty.textSize - }, - // 图标的颜色 - iconColor: { - type: String, - default: uni.$u.props.empty.iconColor - }, - // 图标的大小 - iconSize: { - type: [String, Number], - default: uni.$u.props.empty.iconSize - }, - // 选择预置的图标类型 - mode: { - type: String, - default: uni.$u.props.empty.mode - }, - // 图标宽度,单位px - width: { - type: [String, Number], - default: uni.$u.props.empty.width - }, - // 图标高度,单位px - height: { - type: [String, Number], - default: uni.$u.props.empty.height - }, - // 是否显示组件 - show: { - type: Boolean, - default: uni.$u.props.empty.show - }, - // 组件距离上一个元素之间的距离,默认px单位 - marginTop: { - type: [String, Number], - default: uni.$u.props.empty.marginTop - } - } -} diff --git a/node_modules/uview-ui/components/u-empty/u-empty.vue b/node_modules/uview-ui/components/u-empty/u-empty.vue deleted file mode 100644 index 03d6a27..0000000 --- a/node_modules/uview-ui/components/u-empty/u-empty.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-form-item/props.js b/node_modules/uview-ui/components/u-form-item/props.js deleted file mode 100644 index affaa1a..0000000 --- a/node_modules/uview-ui/components/u-form-item/props.js +++ /dev/null @@ -1,39 +0,0 @@ -export default { - props: { - // input的label提示语 - label: { - type: String, - default: uni.$u.props.formItem.label - }, - // 绑定的值 - prop: { - type: String, - default: uni.$u.props.formItem.prop - }, - // 是否显示表单域的下划线边框 - borderBottom: { - type: [String, Boolean], - default: uni.$u.props.formItem.borderBottom - }, - // label的宽度,单位px - labelWidth: { - type: [String, Number], - default: uni.$u.props.formItem.labelWidth - }, - // 右侧图标 - rightIcon: { - type: String, - default: uni.$u.props.formItem.rightIcon - }, - // 左侧图标 - leftIcon: { - type: String, - default: uni.$u.props.formItem.leftIcon - }, - // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置 - required: { - type: Boolean, - default: uni.$u.props.formItem.required - } - } -} diff --git a/node_modules/uview-ui/components/u-form-item/u-form-item.vue b/node_modules/uview-ui/components/u-form-item/u-form-item.vue deleted file mode 100644 index 1663cf8..0000000 --- a/node_modules/uview-ui/components/u-form-item/u-form-item.vue +++ /dev/null @@ -1,234 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-form/props.js b/node_modules/uview-ui/components/u-form/props.js deleted file mode 100644 index f2a629c..0000000 --- a/node_modules/uview-ui/components/u-form/props.js +++ /dev/null @@ -1,45 +0,0 @@ -export default { - props: { - // 当前form的需要验证字段的集合 - model: { - type: Object, - default: uni.$u.props.form.model - }, - // 验证规则 - rules: { - type: [Object, Function, Array], - default: uni.$u.props.form.rules - }, - // 有错误时的提示方式,message-提示信息,toast-进行toast提示 - // border-bottom-下边框呈现红色,none-无提示 - errorType: { - type: String, - default: uni.$u.props.form.errorType - }, - // 是否显示表单域的下划线边框 - borderBottom: { - type: Boolean, - default: uni.$u.props.form.borderBottom - }, - // label的位置,left-左边,top-上边 - labelPosition: { - type: String, - default: uni.$u.props.form.labelPosition - }, - // label的宽度,单位px - labelWidth: { - type: [String, Number], - default: uni.$u.props.form.labelWidth - }, - // lable字体的对齐方式 - labelAlign: { - type: String, - default: uni.$u.props.form.labelAlign - }, - // lable的样式,对象形式 - labelStyle: { - type: Object, - default: uni.$u.props.form.labelStyle - } - } -} diff --git a/node_modules/uview-ui/components/u-form/u-form.vue b/node_modules/uview-ui/components/u-form/u-form.vue deleted file mode 100644 index 9dd9494..0000000 --- a/node_modules/uview-ui/components/u-form/u-form.vue +++ /dev/null @@ -1,205 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-gap/props.js b/node_modules/uview-ui/components/u-gap/props.js deleted file mode 100644 index 89953e3..0000000 --- a/node_modules/uview-ui/components/u-gap/props.js +++ /dev/null @@ -1,24 +0,0 @@ -export default { - props: { - // 背景颜色(默认transparent) - bgColor: { - type: String, - default: uni.$u.props.gap.bgColor - }, - // 分割槽高度,单位px(默认30) - height: { - type: [String, Number], - default: uni.$u.props.gap.height - }, - // 与上一个组件的距离 - marginTop: { - type: [String, Number], - default: uni.$u.props.gap.marginTop - }, - // 与下一个组件的距离 - marginBottom: { - type: [String, Number], - default: uni.$u.props.gap.marginBottom - } - } -} diff --git a/node_modules/uview-ui/components/u-gap/u-gap.vue b/node_modules/uview-ui/components/u-gap/u-gap.vue deleted file mode 100644 index e4429f0..0000000 --- a/node_modules/uview-ui/components/u-gap/u-gap.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-grid-item/props.js b/node_modules/uview-ui/components/u-grid-item/props.js deleted file mode 100644 index 06c3c66..0000000 --- a/node_modules/uview-ui/components/u-grid-item/props.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - props: { - // 宫格的name - name: { - type: [String, Number, null], - default: uni.$u.props.gridItem.name - }, - // 背景颜色 - bgColor: { - type: String, - default: uni.$u.props.gridItem.bgColor - } - } -} diff --git a/node_modules/uview-ui/components/u-grid-item/u-grid-item.vue b/node_modules/uview-ui/components/u-grid-item/u-grid-item.vue deleted file mode 100644 index 14e8053..0000000 --- a/node_modules/uview-ui/components/u-grid-item/u-grid-item.vue +++ /dev/null @@ -1,196 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-grid/props.js b/node_modules/uview-ui/components/u-grid/props.js deleted file mode 100644 index 87b0f6a..0000000 --- a/node_modules/uview-ui/components/u-grid/props.js +++ /dev/null @@ -1,19 +0,0 @@ -export default { - props: { - // 分成几列 - col: { - type: [String, Number], - default: uni.$u.props.grid.col - }, - // 是否显示边框 - border: { - type: Boolean, - default: uni.$u.props.grid.border - }, - // 宫格对齐方式,表现为数量少的时候,靠左,居中,还是靠右 - align: { - type: String, - default: uni.$u.props.grid.align - } - } -} diff --git a/node_modules/uview-ui/components/u-grid/u-grid.vue b/node_modules/uview-ui/components/u-grid/u-grid.vue deleted file mode 100644 index b43cc27..0000000 --- a/node_modules/uview-ui/components/u-grid/u-grid.vue +++ /dev/null @@ -1,97 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-icon/icons.js b/node_modules/uview-ui/components/u-icon/icons.js deleted file mode 100644 index c8214b5..0000000 --- a/node_modules/uview-ui/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/node_modules/uview-ui/components/u-icon/props.js b/node_modules/uview-ui/components/u-icon/props.js deleted file mode 100644 index 71845b7..0000000 --- a/node_modules/uview-ui/components/u-icon/props.js +++ /dev/null @@ -1,89 +0,0 @@ -export default { - props: { - // 图标类名 - name: { - type: String, - default: uni.$u.props.icon.name - }, - // 图标颜色,可接受主题色 - color: { - type: String, - default: uni.$u.props.icon.color - }, - // 字体大小,单位px - size: { - type: [String, Number], - default: uni.$u.props.icon.size - }, - // 是否显示粗体 - bold: { - type: Boolean, - default: uni.$u.props.icon.bold - }, - // 点击图标的时候传递事件出去的index(用于区分点击了哪一个) - index: { - type: [String, Number], - default: uni.$u.props.icon.index - }, - // 触摸图标时的类名 - hoverClass: { - type: String, - default: uni.$u.props.icon.hoverClass - }, - // 自定义扩展前缀,方便用户扩展自己的图标库 - customPrefix: { - type: String, - default: uni.$u.props.icon.customPrefix - }, - // 图标右边或者下面的文字 - label: { - type: [String, Number], - default: uni.$u.props.icon.label - }, - // label的位置,只能右边或者下边 - labelPos: { - type: String, - default: uni.$u.props.icon.labelPos - }, - // label的大小 - labelSize: { - type: [String, Number], - default: uni.$u.props.icon.labelSize - }, - // label的颜色 - labelColor: { - type: String, - default: uni.$u.props.icon.labelColor - }, - // label与图标的距离 - space: { - type: [String, Number], - default: uni.$u.props.icon.space - }, - // 图片的mode - imgMode: { - type: String, - default: uni.$u.props.icon.imgMode - }, - // 用于显示图片小图标时,图片的宽度 - width: { - type: [String, Number], - default: uni.$u.props.icon.width - }, - // 用于显示图片小图标时,图片的高度 - height: { - type: [String, Number], - default: uni.$u.props.icon.height - }, - // 用于解决某些情况下,让图标垂直居中的用途 - top: { - type: [String, Number], - default: uni.$u.props.icon.top - }, - // 是否阻止事件传播 - stop: { - type: Boolean, - default: uni.$u.props.icon.stop - } - } -} diff --git a/node_modules/uview-ui/components/u-icon/u-icon.vue b/node_modules/uview-ui/components/u-icon/u-icon.vue deleted file mode 100644 index ffc9515..0000000 --- a/node_modules/uview-ui/components/u-icon/u-icon.vue +++ /dev/null @@ -1,234 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-image/props.js b/node_modules/uview-ui/components/u-image/props.js deleted file mode 100644 index 334fdf5..0000000 --- a/node_modules/uview-ui/components/u-image/props.js +++ /dev/null @@ -1,84 +0,0 @@ -export default { - props: { - // 图片地址 - src: { - type: String, - default: uni.$u.props.image.src - }, - // 裁剪模式 - mode: { - type: String, - default: uni.$u.props.image.mode - }, - // 宽度,单位任意 - width: { - type: [String, Number], - default: uni.$u.props.image.width - }, - // 高度,单位任意 - height: { - type: [String, Number], - default: uni.$u.props.image.height - }, - // 图片形状,circle-圆形,square-方形 - shape: { - type: String, - default: uni.$u.props.image.shape - }, - // 圆角,单位任意 - radius: { - type: [String, Number], - default: uni.$u.props.image.radius - }, - // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序 - lazyLoad: { - type: Boolean, - default: uni.$u.props.image.lazyLoad - }, - // 开启长按图片显示识别微信小程序码菜单 - showMenuByLongpress: { - type: Boolean, - default: uni.$u.props.image.showMenuByLongpress - }, - // 加载中的图标,或者小图片 - loadingIcon: { - type: String, - default: uni.$u.props.image.loadingIcon - }, - // 加载失败的图标,或者小图片 - errorIcon: { - type: String, - default: uni.$u.props.image.errorIcon - }, - // 是否显示加载中的图标或者自定义的slot - showLoading: { - type: Boolean, - default: uni.$u.props.image.showLoading - }, - // 是否显示加载错误的图标或者自定义的slot - showError: { - type: Boolean, - default: uni.$u.props.image.showError - }, - // 是否需要淡入效果 - fade: { - type: Boolean, - default: uni.$u.props.image.fade - }, - // 只支持网络资源,只对微信小程序有效 - webp: { - type: Boolean, - default: uni.$u.props.image.webp - }, - // 过渡时间,单位ms - duration: { - type: [String, Number], - default: uni.$u.props.image.duration - }, - // 背景颜色,用于深色页面加载图片时,为了和背景色融合 - bgColor: { - type: String, - default: uni.$u.props.image.bgColor - } - } -} diff --git a/node_modules/uview-ui/components/u-image/u-image.vue b/node_modules/uview-ui/components/u-image/u-image.vue deleted file mode 100644 index 5bc7cc7..0000000 --- a/node_modules/uview-ui/components/u-image/u-image.vue +++ /dev/null @@ -1,224 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-index-anchor/props.js b/node_modules/uview-ui/components/u-index-anchor/props.js deleted file mode 100644 index 6d8b59a..0000000 --- a/node_modules/uview-ui/components/u-index-anchor/props.js +++ /dev/null @@ -1,29 +0,0 @@ -export default { - props: { - // 列表锚点文本内容 - text: { - type: [String, Number], - default: uni.$u.props.indexAnchor.text - }, - // 列表锚点文字颜色 - color: { - type: String, - default: uni.$u.props.indexAnchor.color - }, - // 列表锚点文字大小,单位默认px - size: { - type: [String, Number], - default: uni.$u.props.indexAnchor.size - }, - // 列表锚点背景颜色 - bgColor: { - type: String, - default: uni.$u.props.indexAnchor.bgColor - }, - // 列表锚点高度,单位默认px - height: { - type: [String, Number], - default: uni.$u.props.indexAnchor.height - } - } -} diff --git a/node_modules/uview-ui/components/u-index-anchor/u-index-anchor.vue b/node_modules/uview-ui/components/u-index-anchor/u-index-anchor.vue deleted file mode 100644 index b95ddef..0000000 --- a/node_modules/uview-ui/components/u-index-anchor/u-index-anchor.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-index-item/props.js b/node_modules/uview-ui/components/u-index-item/props.js deleted file mode 100644 index 7c11331..0000000 --- a/node_modules/uview-ui/components/u-index-item/props.js +++ /dev/null @@ -1,5 +0,0 @@ -export default { - props: { - - } -} diff --git a/node_modules/uview-ui/components/u-index-item/u-index-item.vue b/node_modules/uview-ui/components/u-index-item/u-index-item.vue deleted file mode 100644 index 0bc7fb3..0000000 --- a/node_modules/uview-ui/components/u-index-item/u-index-item.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-index-list/props.js b/node_modules/uview-ui/components/u-index-list/props.js deleted file mode 100644 index 354d459..0000000 --- a/node_modules/uview-ui/components/u-index-list/props.js +++ /dev/null @@ -1,29 +0,0 @@ -export default { - props: { - // 右边锚点非激活的颜色 - inactiveColor: { - type: String, - default: uni.$u.props.indexList.inactiveColor - }, - // 右边锚点激活的颜色 - activeColor: { - type: String, - default: uni.$u.props.indexList.activeColor - }, - // 索引字符列表,数组形式 - indexList: { - type: Array, - default: uni.$u.props.indexList.indexList - }, - // 是否开启锚点自动吸顶 - sticky: { - type: Boolean, - default: uni.$u.props.indexList.sticky - }, - // 自定义导航栏的高度 - customNavHeight: { - type: [String, Number], - default: uni.$u.props.indexList.customNavHeight - } - } -} diff --git a/node_modules/uview-ui/components/u-index-list/u-index-list.vue b/node_modules/uview-ui/components/u-index-list/u-index-list.vue deleted file mode 100644 index 49676d8..0000000 --- a/node_modules/uview-ui/components/u-index-list/u-index-list.vue +++ /dev/null @@ -1,438 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-input/props.js b/node_modules/uview-ui/components/u-input/props.js deleted file mode 100644 index 88917c3..0000000 --- a/node_modules/uview-ui/components/u-input/props.js +++ /dev/null @@ -1,182 +0,0 @@ -export default { - props: { - // 输入的值 - value: { - type: [String, Number], - default: uni.$u.props.input.value - }, - // 输入框类型 - // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数 - // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序 - // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序 - // text-文本输入键盘 - type: { - type: String, - default: uni.$u.props.input.type - }, - // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true, - // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序 - fixed: { - type: Boolean, - default: uni.$u.props.input.fixed - }, - // 是否禁用输入框 - disabled: { - type: Boolean, - default: uni.$u.props.input.disabled - }, - // 禁用状态时的背景色 - disabledColor: { - type: String, - default: uni.$u.props.input.disabledColor - }, - // 是否显示清除控件 - clearable: { - type: Boolean, - default: uni.$u.props.input.clearable - }, - // 是否密码类型 - password: { - type: Boolean, - default: uni.$u.props.input.password - }, - // 最大输入长度,设置为 -1 的时候不限制最大长度 - maxlength: { - type: [String, Number], - default: uni.$u.props.input.maxlength - }, - // 输入框为空时的占位符 - placeholder: { - type: String, - default: uni.$u.props.input.placeholder - }, - // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ - placeholderClass: { - type: String, - default: uni.$u.props.input.placeholderClass - }, - // 指定placeholder的样式 - placeholderStyle: { - type: [String, Object], - default: uni.$u.props.input.placeholderStyle - }, - // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效 - showWordLimit: { - type: Boolean, - default: uni.$u.props.input.showWordLimit - }, - // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档 - // https://uniapp.dcloud.io/component/input - // https://uniapp.dcloud.io/component/textarea - confirmType: { - type: String, - default: uni.$u.props.input.confirmType - }, - // 点击键盘右下角按钮时是否保持键盘不收起,H5无效 - confirmHold: { - type: Boolean, - default: uni.$u.props.input.confirmHold - }, - // focus时,点击页面的时候不收起键盘,微信小程序有效 - holdKeyboard: { - type: Boolean, - default: uni.$u.props.input.holdKeyboard - }, - // 自动获取焦点 - // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点 - focus: { - type: Boolean, - default: uni.$u.props.input.focus - }, - // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效 - autoBlur: { - type: Boolean, - default: uni.$u.props.input.autoBlur - }, - // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效 - disableDefaultPadding: { - type: Boolean, - default: uni.$u.props.input.disableDefaultPadding - }, - // 指定focus时光标的位置 - cursor: { - type: [String, Number], - default: uni.$u.props.input.cursor - }, - // 输入框聚焦时底部与键盘的距离 - cursorSpacing: { - type: [String, Number], - default: uni.$u.props.input.cursorSpacing - }, - // 光标起始位置,自动聚集时有效,需与selection-end搭配使用 - selectionStart: { - type: [String, Number], - default: uni.$u.props.input.selectionStart - }, - // 光标结束位置,自动聚集时有效,需与selection-start搭配使用 - selectionEnd: { - type: [String, Number], - default: uni.$u.props.input.selectionEnd - }, - // 键盘弹起时,是否自动上推页面 - adjustPosition: { - type: Boolean, - default: uni.$u.props.input.adjustPosition - }, - // 输入框内容对齐方式,可选值为:left|center|right - inputAlign: { - type: String, - default: uni.$u.props.input.inputAlign - }, - // 输入框字体的大小 - fontSize: { - type: [String, Number], - default: uni.$u.props.input.fontSize - }, - // 输入框字体颜色 - color: { - type: String, - default: uni.$u.props.input.color - }, - // 输入框前置图标 - prefixIcon: { - type: String, - default: uni.$u.props.input.prefixIcon - }, - // 前置图标样式,对象或字符串 - prefixIconStyle: { - type: [String, Object], - default: uni.$u.props.input.prefixIconStyle - }, - // 输入框后置图标 - suffixIcon: { - type: String, - default: uni.$u.props.input.suffixIcon - }, - // 后置图标样式,对象或字符串 - suffixIconStyle: { - type: [String, Object], - default: uni.$u.props.input.suffixIconStyle - }, - // 边框类型,surround-四周边框,bottom-底部边框,none-无边框 - border: { - type: String, - default: uni.$u.props.input.border - }, - // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会 - readonly: { - type: Boolean, - default: uni.$u.props.input.readonly - }, - // 输入框形状,circle-圆形,square-方形 - shape: { - type: String, - default: uni.$u.props.input.shape - }, - // 用于处理或者过滤输入框内容的方法 - formatter: { - type: [Function, null], - default: uni.$u.props.input.formatter - } - } -} diff --git a/node_modules/uview-ui/components/u-input/u-input.vue b/node_modules/uview-ui/components/u-input/u-input.vue deleted file mode 100644 index 0cda49e..0000000 --- a/node_modules/uview-ui/components/u-input/u-input.vue +++ /dev/null @@ -1,350 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-keyboard/props.js b/node_modules/uview-ui/components/u-keyboard/props.js deleted file mode 100644 index cfdb00a..0000000 --- a/node_modules/uview-ui/components/u-keyboard/props.js +++ /dev/null @@ -1,84 +0,0 @@ -export default { - props: { - // 键盘的类型,number-数字键盘,card-身份证键盘,car-车牌号键盘 - mode: { - type: String, - default: uni.$u.props.keyboard.mode - }, - // 是否显示键盘的"."符号 - dotDisabled: { - type: Boolean, - default: uni.$u.props.keyboard.dotDisabled - }, - // 是否显示顶部工具条 - tooltip: { - type: Boolean, - default: uni.$u.props.keyboard.tooltip - }, - // 是否显示工具条中间的提示 - showTips: { - type: Boolean, - default: uni.$u.props.keyboard.showTips - }, - // 工具条中间的提示文字 - tips: { - type: String, - default: uni.$u.props.keyboard.tips - }, - // 是否显示工具条左边的"取消"按钮 - showCancel: { - type: Boolean, - default: uni.$u.props.keyboard.showCancel - }, - // 是否显示工具条右边的"完成"按钮 - showConfirm: { - type: Boolean, - default: uni.$u.props.keyboard.showConfirm - }, - // 是否打乱键盘按键的顺序 - random: { - type: Boolean, - default: uni.$u.props.keyboard.random - }, - // 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距 - safeAreaInsetBottom: { - type: Boolean, - default: uni.$u.props.keyboard.safeAreaInsetBottom - }, - // 是否允许通过点击遮罩关闭键盘 - closeOnClickOverlay: { - type: Boolean, - default: uni.$u.props.keyboard.closeOnClickOverlay - }, - // 控制键盘的弹出与收起 - show: { - type: Boolean, - default: uni.$u.props.keyboard.show - }, - // 是否显示遮罩,某些时候数字键盘时,用户希望看到自己的数值,所以可能不想要遮罩 - overlay: { - type: Boolean, - default: uni.$u.props.keyboard.overlay - }, - // z-index值 - zIndex: { - type: [String, Number], - default: uni.$u.props.keyboard.zIndex - }, - // 取消按钮的文字 - cancelText: { - type: String, - default: uni.$u.props.keyboard.cancelText - }, - // 确认按钮的文字 - confirmText: { - type: String, - default: uni.$u.props.keyboard.confirmText - }, - // 输入一个中文后,是否自动切换到英文 - autoChange: { - type: Boolean, - default: uni.$u.props.keyboard.autoChange - } - } -} diff --git a/node_modules/uview-ui/components/u-keyboard/u-keyboard.vue b/node_modules/uview-ui/components/u-keyboard/u-keyboard.vue deleted file mode 100644 index 14228cb..0000000 --- a/node_modules/uview-ui/components/u-keyboard/u-keyboard.vue +++ /dev/null @@ -1,164 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-line-progress/props.js b/node_modules/uview-ui/components/u-line-progress/props.js deleted file mode 100644 index a4210bd..0000000 --- a/node_modules/uview-ui/components/u-line-progress/props.js +++ /dev/null @@ -1,28 +0,0 @@ -export default { - props: { - // 激活部分的颜色 - activeColor: { - type: String, - default: uni.$u.props.lineProgress.activeColor - }, - inactiveColor: { - type: String, - default: uni.$u.props.lineProgress.color - }, - // 进度百分比,数值 - percentage: { - type: [String, Number], - default: uni.$u.props.lineProgress.inactiveColor - }, - // 是否在进度条内部显示百分比的值 - showText: { - type: Boolean, - default: uni.$u.props.lineProgress.showText - }, - // 进度条的高度,单位px - height: { - type: [String, Number], - default: uni.$u.props.lineProgress.height - } - } -} diff --git a/node_modules/uview-ui/components/u-line-progress/u-line-progress.vue b/node_modules/uview-ui/components/u-line-progress/u-line-progress.vue deleted file mode 100644 index 4e27931..0000000 --- a/node_modules/uview-ui/components/u-line-progress/u-line-progress.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-line/props.js b/node_modules/uview-ui/components/u-line/props.js deleted file mode 100644 index 866bade..0000000 --- a/node_modules/uview-ui/components/u-line/props.js +++ /dev/null @@ -1,33 +0,0 @@ -export default { - props: { - color: { - type: String, - default: uni.$u.props.line.color - }, - // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 - length: { - type: [String, Number], - default: uni.$u.props.line.length - }, - // 线条方向,col-竖向,row-横向 - direction: { - type: String, - default: uni.$u.props.line.direction - }, - // 是否显示细边框 - hairline: { - type: Boolean, - default: uni.$u.props.line.hairline - }, - // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px" - margin: { - type: [String, Number], - default: uni.$u.props.line.margin - }, - // 是否虚线,true-实线,false-虚线 - dashed: { - type: Boolean, - default: uni.$u.props.line.dashed - } - } -} diff --git a/node_modules/uview-ui/components/u-line/u-line.vue b/node_modules/uview-ui/components/u-line/u-line.vue deleted file mode 100644 index e0a6d92..0000000 --- a/node_modules/uview-ui/components/u-line/u-line.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-link/props.js b/node_modules/uview-ui/components/u-link/props.js deleted file mode 100644 index d39353f..0000000 --- a/node_modules/uview-ui/components/u-link/props.js +++ /dev/null @@ -1,39 +0,0 @@ -export default { - props: { - // 文字颜色 - color: { - type: String, - default: uni.$u.props.link.color - }, - // 字体大小,单位px - fontSize: { - type: [String, Number], - default: uni.$u.props.link.fontSize - }, - // 是否显示下划线 - underLine: { - type: Boolean, - default: uni.$u.props.link.underLine - }, - // 要跳转的链接 - href: { - type: String, - default: uni.$u.props.link.href - }, - // 小程序中复制到粘贴板的提示语 - mpTips: { - type: String, - default: uni.$u.props.link.mpTips - }, - // 下划线颜色 - lineColor: { - type: String, - default: uni.$u.props.link.lineColor - }, - // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色 - text: { - type: String, - default: uni.$u.props.link.text - } - } -} diff --git a/node_modules/uview-ui/components/u-link/u-link.vue b/node_modules/uview-ui/components/u-link/u-link.vue deleted file mode 100644 index c6802a5..0000000 --- a/node_modules/uview-ui/components/u-link/u-link.vue +++ /dev/null @@ -1,83 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-list-item/props.js b/node_modules/uview-ui/components/u-list-item/props.js deleted file mode 100644 index 58ddc49..0000000 --- a/node_modules/uview-ui/components/u-list-item/props.js +++ /dev/null @@ -1,9 +0,0 @@ -export default { - props: { - // 用于滚动到指定item - anchor: { - type: [String, Number], - default: uni.$u.props.listItem.anchor - } - } -} diff --git a/node_modules/uview-ui/components/u-list-item/u-list-item.vue b/node_modules/uview-ui/components/u-list-item/u-list-item.vue deleted file mode 100644 index 1a25db6..0000000 --- a/node_modules/uview-ui/components/u-list-item/u-list-item.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-list/props.js b/node_modules/uview-ui/components/u-list/props.js deleted file mode 100644 index 25406f4..0000000 --- a/node_modules/uview-ui/components/u-list/props.js +++ /dev/null @@ -1,76 +0,0 @@ -export default { - props: { - // 控制是否出现滚动条,仅nvue有效 - showScrollbar: { - type: Boolean, - default: uni.$u.props.list.showScrollbar - }, - // 距底部多少时触发scrolltolower事件 - lowerThreshold: { - type: [String, Number], - default: uni.$u.props.list.lowerThreshold - }, - // 距顶部多少时触发scrolltoupper事件,非nvue有效 - upperThreshold: { - type: [String, Number], - default: uni.$u.props.list.upperThreshold - }, - // 设置竖向滚动条位置 - scrollTop: { - type: [String, Number], - default: uni.$u.props.list.scrollTop - }, - // 控制 onscroll 事件触发的频率,仅nvue有效 - offsetAccuracy: { - type: [String, Number], - default: uni.$u.props.list.offsetAccuracy - }, - // 启用 flexbox 布局。开启后,当前节点声明了display: flex就会成为flex container,并作用于其孩子节点,仅微信小程序有效 - enableFlex: { - type: Boolean, - default: uni.$u.props.list.enableFlex - }, - // 是否按分页模式显示List,默认值false - pagingEnabled: { - type: Boolean, - default: uni.$u.props.list.pagingEnabled - }, - // 是否允许List滚动 - scrollable: { - type: Boolean, - default: uni.$u.props.list.scrollable - }, - // 值应为某子元素id(id不能以数字开头) - scrollIntoView: { - type: String, - default: uni.$u.props.list.scrollIntoView - }, - // 在设置滚动条位置时使用动画过渡 - scrollWithAnimation: { - type: Boolean, - default: uni.$u.props.list.scrollWithAnimation - }, - // iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只对微信小程序有效 - enableBackToTop: { - type: Boolean, - default: uni.$u.props.list.enableBackToTop - }, - // 列表的高度 - height: { - type: [String, Number], - default: uni.$u.props.list.height - }, - // 列表宽度 - width: { - type: [String, Number], - default: uni.$u.props.list.width - }, - // 列表前后预渲染的屏数,1代表一个屏幕的高度,1.5代表1个半屏幕高度 - preLoadScreen: { - type: [String, Number], - default: uni.$u.props.list.preLoadScreen - } - // vue下,是否开启虚拟列表 - - } -} diff --git a/node_modules/uview-ui/components/u-list/u-list.vue b/node_modules/uview-ui/components/u-list/u-list.vue deleted file mode 100644 index b31b352..0000000 --- a/node_modules/uview-ui/components/u-list/u-list.vue +++ /dev/null @@ -1,159 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-loading-icon/props.js b/node_modules/uview-ui/components/u-loading-icon/props.js deleted file mode 100644 index 3b8004d..0000000 --- a/node_modules/uview-ui/components/u-loading-icon/props.js +++ /dev/null @@ -1,59 +0,0 @@ -export default { - props: { - // 是否显示组件 - show: { - type: Boolean, - default: uni.$u.props.loadingIcon.show - }, - // 颜色 - color: { - type: String, - default: uni.$u.props.loadingIcon.color - }, - // 提示文字颜色 - textColor: { - type: String, - default: uni.$u.props.loadingIcon.textColor - }, - // 文字和图标是否垂直排列 - vertical: { - type: Boolean, - default: uni.$u.props.loadingIcon.vertical - }, - // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形 - mode: { - type: String, - default: uni.$u.props.loadingIcon.mode - }, - // 图标大小,单位默认px - size: { - type: [String, Number], - default: uni.$u.props.loadingIcon.size - }, - // 文字大小 - textSize: { - type: [String, Number], - default: uni.$u.props.loadingIcon.textSize - }, - // 文字内容 - text: { - type: [String, Number], - default: uni.$u.props.loadingIcon.text - }, - // 动画模式 - timingFunction: { - type: String, - default: uni.$u.props.loadingIcon.timingFunction - }, - // 动画执行周期时间 - duration: { - type: [String, Number], - default: uni.$u.props.loadingIcon.duration - }, - // mode=circle时的暗边颜色 - inactiveColor: { - type: String, - default: uni.$u.props.loadingIcon.inactiveColor - } - } -} diff --git a/node_modules/uview-ui/components/u-loading-icon/u-loading-icon.vue b/node_modules/uview-ui/components/u-loading-icon/u-loading-icon.vue deleted file mode 100644 index 9f247ab..0000000 --- a/node_modules/uview-ui/components/u-loading-icon/u-loading-icon.vue +++ /dev/null @@ -1,343 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-loading-page/props.js b/node_modules/uview-ui/components/u-loading-page/props.js deleted file mode 100644 index 438ab64..0000000 --- a/node_modules/uview-ui/components/u-loading-page/props.js +++ /dev/null @@ -1,44 +0,0 @@ -export default { - props: { - // 提示内容 - loadingText: { - type: [String, Number], - default: uni.$u.props.loadingPage.loadingText - }, - // 文字上方用于替换loading动画的图片 - image: { - type: String, - default: uni.$u.props.loadingPage.image - }, - // 加载动画的模式,circle-圆形,spinner-花朵形,semicircle-半圆形 - loadingMode: { - type: String, - default: uni.$u.props.loadingPage.loadingMode - }, - // 是否加载中 - loading: { - type: Boolean, - default: uni.$u.props.loadingPage.loading - }, - // 背景色 - bgColor: { - type: String, - default: uni.$u.props.loadingPage.bgColor - }, - // 文字颜色 - color: { - type: String, - default: uni.$u.props.loadingPage.color - }, - // 文字大小 - fontSize: { - type: [String, Number], - default: uni.$u.props.loadingPage.fontSize - }, - // 加载中图标的颜色,只能rgb或者十六进制颜色值 - loadingColor: { - type: String, - default: uni.$u.props.loadingPage.loadingColor - } - } -} diff --git a/node_modules/uview-ui/components/u-loading-page/u-loading-page.vue b/node_modules/uview-ui/components/u-loading-page/u-loading-page.vue deleted file mode 100644 index c6b51b9..0000000 --- a/node_modules/uview-ui/components/u-loading-page/u-loading-page.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-loadmore/props.js b/node_modules/uview-ui/components/u-loadmore/props.js deleted file mode 100644 index 125ad3e..0000000 --- a/node_modules/uview-ui/components/u-loadmore/props.js +++ /dev/null @@ -1,80 +0,0 @@ -export default { - props: { - // 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态 - status: { - type: String, - default: uni.$u.props.loadmore.status - }, - // 组件背景色 - bgColor: { - type: String, - default: uni.$u.props.loadmore.bgColor - }, - // 是否显示加载中的图标 - icon: { - type: Boolean, - default: uni.$u.props.loadmore.icon - }, - // 字体大小 - fontSize: { - type: [String, Number], - default: uni.$u.props.loadmore.fontSize - }, - // 字体颜色 - color: { - type: String, - default: uni.$u.props.loadmore.color - }, - - // 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆 - loadingIcon: { - type: String, - default: uni.$u.props.loadmore.loadingIcon - }, - // 加载前的提示语 - loadmoreText: { - type: String, - default: uni.$u.props.loadmore.loadmoreText - }, - // 加载中提示语 - loadingText: { - type: String, - default: uni.$u.props.loadmore.loadingText - }, - // 没有更多的提示语 - nomoreText: { - type: String, - default: uni.$u.props.loadmore.nomoreText - }, - // 在“没有更多”状态下,是否显示粗点 - isDot: { - type: Boolean, - default: uni.$u.props.loadmore.isDot - }, - // 加载中图标的颜色 - iconColor: { - type: String, - default: uni.$u.props.loadmore.iconColor - }, - // 上边距 - marginTop: { - type: [String, Number], - default: uni.$u.props.loadmore.marginTop - }, - // 下边距 - marginBottom: { - type: [String, Number], - default: uni.$u.props.loadmore.marginBottom - }, - // 高度,单位px - height: { - type: [String, Number], - default: uni.$u.props.loadmore.height - }, - // 是否显示左边分割线 - line: { - type: Boolean, - default: uni.$u.props.loadmore.line - } - } -} diff --git a/node_modules/uview-ui/components/u-loadmore/u-loadmore.vue b/node_modules/uview-ui/components/u-loadmore/u-loadmore.vue deleted file mode 100644 index 740ca16..0000000 --- a/node_modules/uview-ui/components/u-loadmore/u-loadmore.vue +++ /dev/null @@ -1,145 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-modal/props.js b/node_modules/uview-ui/components/u-modal/props.js deleted file mode 100644 index f76672c..0000000 --- a/node_modules/uview-ui/components/u-modal/props.js +++ /dev/null @@ -1,84 +0,0 @@ -export default { - props: { - // 是否展示modal - show: { - type: Boolean, - default: uni.$u.props.modal.show - }, - // 标题 - title: { - type: [String], - default: uni.$u.props.modal.title - }, - // 弹窗内容 - content: { - type: String, - default: uni.$u.props.modal.content - }, - // 确认文案 - confirmText: { - type: String, - default: uni.$u.props.modal.confirmText - }, - // 取消文案 - cancelText: { - type: String, - default: uni.$u.props.modal.cancelText - }, - // 是否显示确认按钮 - showConfirmButton: { - type: Boolean, - default: uni.$u.props.modal.showConfirmButton - }, - // 是否显示取消按钮 - showCancelButton: { - type: Boolean, - default: uni.$u.props.modal.showCancelButton - }, - // 确认按钮颜色 - confirmColor: { - type: String, - default: uni.$u.props.modal.confirmColor - }, - // 取消文字颜色 - cancelColor: { - type: String, - default: uni.$u.props.modal.cancelColor - }, - // 对调确认和取消的位置 - buttonReverse: { - type: Boolean, - default: uni.$u.props.modal.buttonReverse - }, - // 是否开启缩放效果 - zoom: { - type: Boolean, - default: uni.$u.props.modal.zoom - }, - // 是否异步关闭,只对确定按钮有效 - asyncClose: { - type: Boolean, - default: uni.$u.props.modal.asyncClose - }, - // 是否允许点击遮罩关闭modal - closeOnClickOverlay: { - type: Boolean, - default: uni.$u.props.modal.closeOnClickOverlay - }, - // 给一个负的margin-top,往上偏移,避免和键盘重合的情况 - negativeTop: { - type: [String, Number], - default: uni.$u.props.modal.negativeTop - }, - // modal宽度,不支持百分比,可以数值,px,rpx单位 - width: { - type: [String, Number], - default: uni.$u.props.modal.width - }, - // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮 - confirmButtonShape: { - type: String, - default: uni.$u.props.modal.confirmButtonShape - } - } -} diff --git a/node_modules/uview-ui/components/u-modal/u-modal.vue b/node_modules/uview-ui/components/u-modal/u-modal.vue deleted file mode 100644 index 0978b12..0000000 --- a/node_modules/uview-ui/components/u-modal/u-modal.vue +++ /dev/null @@ -1,227 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-navbar/props.js b/node_modules/uview-ui/components/u-navbar/props.js deleted file mode 100644 index 723d20a..0000000 --- a/node_modules/uview-ui/components/u-navbar/props.js +++ /dev/null @@ -1,79 +0,0 @@ -export default { - props: { - // 是否开启顶部安全区适配 - safeAreaInsetTop: { - type: Boolean, - default: uni.$u.props.navbar.safeAreaInsetTop - }, - // 固定在顶部时,是否生成一个等高元素,以防止塌陷 - placeholder: { - type: Boolean, - default: uni.$u.props.navbar.placeholder - }, - // 是否固定在顶部 - fixed: { - type: Boolean, - default: uni.$u.props.navbar.fixed - }, - // 是否显示下边框 - border: { - type: Boolean, - default: uni.$u.props.navbar.border - }, - // 左边的图标 - leftIcon: { - type: String, - default: uni.$u.props.navbar.leftIcon - }, - // 左边的提示文字 - leftText: { - type: String, - default: uni.$u.props.navbar.leftText - }, - // 左右的提示文字 - rightText: { - type: String, - default: uni.$u.props.navbar.rightText - }, - // 右边的图标 - rightIcon: { - type: String, - default: uni.$u.props.navbar.rightIcon - }, - // 标题 - title: { - type: [String, Number], - default: uni.$u.props.navbar.title - }, - // 背景颜色 - bgColor: { - type: String, - default: uni.$u.props.navbar.bgColor - }, - // 标题的宽度 - titleWidth: { - type: [String, Number], - default: uni.$u.props.navbar.titleWidth - }, - // 导航栏高度 - height: { - type: [String, Number], - default: uni.$u.props.navbar.height - }, - // 左侧返回图标的大小 - leftIconSize: { - type: [String, Number], - default: uni.$u.props.navbar.leftIconSize - }, - // 左侧返回图标的颜色 - leftIconColor: { - type: String, - default: uni.$u.props.navbar.leftIconColor - }, - // 点击左侧区域(返回图标),是否自动返回上一页 - autoBack: { - type: Boolean, - default: uni.$u.props.navbar.autoBack - } - } -} diff --git a/node_modules/uview-ui/components/u-navbar/u-navbar.vue b/node_modules/uview-ui/components/u-navbar/u-navbar.vue deleted file mode 100644 index 54435aa..0000000 --- a/node_modules/uview-ui/components/u-navbar/u-navbar.vue +++ /dev/null @@ -1,185 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-no-network/props.js b/node_modules/uview-ui/components/u-no-network/props.js deleted file mode 100644 index 9f3af62..0000000 --- a/node_modules/uview-ui/components/u-no-network/props.js +++ /dev/null @@ -1,19 +0,0 @@ -export default { - props: { - // 页面文字提示 - tips: { - type: String, - default: uni.$u.props.noNetwork.tips - }, - // 一个z-index值,用于设置没有网络这个组件的层次,因为页面可能会有其他定位的元素层级过高,导致此组件被覆盖 - zIndex: { - type: [String, Number], - default: uni.$u.props.noNetwork.zIndex - }, - // image 没有网络的图片提示 - image: { - type: String, - default: uni.$u.props.noNetwork.image - } - } -} diff --git a/node_modules/uview-ui/components/u-no-network/u-no-network.vue b/node_modules/uview-ui/components/u-no-network/u-no-network.vue deleted file mode 100644 index 53db905..0000000 --- a/node_modules/uview-ui/components/u-no-network/u-no-network.vue +++ /dev/null @@ -1,219 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-notice-bar/props.js b/node_modules/uview-ui/components/u-notice-bar/props.js deleted file mode 100644 index 7040c29..0000000 --- a/node_modules/uview-ui/components/u-notice-bar/props.js +++ /dev/null @@ -1,70 +0,0 @@ -export default { - props: { - // 显示的内容,数组 - text: { - type: [Array, String], - default: uni.$u.props.noticeBar.text - }, - // 通告滚动模式,row-横向滚动,column-竖向滚动 - direction: { - type: String, - default: uni.$u.props.noticeBar.direction - }, - // direction = row时,是否使用步进形式滚动 - step: { - type: Boolean, - default: uni.$u.props.noticeBar.step - }, - // 是否显示左侧的音量图标 - icon: { - type: String, - default: uni.$u.props.noticeBar.icon - }, - // 通告模式,link-显示右箭头,closable-显示右侧关闭图标 - mode: { - type: String, - default: uni.$u.props.noticeBar.mode - }, - // 文字颜色,各图标也会使用文字颜色 - color: { - type: String, - default: uni.$u.props.noticeBar.color - }, - // 背景颜色 - bgColor: { - type: String, - default: uni.$u.props.noticeBar.bgColor - }, - // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度 - speed: { - type: [String, Number], - default: uni.$u.props.noticeBar.speed - }, - // 字体大小 - fontSize: { - type: [String, Number], - default: uni.$u.props.noticeBar.fontSize - }, - // 滚动一个周期的时间长,单位ms - duration: { - type: [String, Number], - default: uni.$u.props.noticeBar.duration - }, - // 是否禁止用手滑动切换 - // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序 - disableTouch: { - type: Boolean, - default: uni.$u.props.noticeBar.disableTouch - }, - // 跳转的页面路径 - url: { - type: String, - default: uni.$u.props.noticeBar.url - }, - // 页面跳转的类型 - linkType: { - type: String, - default: uni.$u.props.noticeBar.linkType - } - } -} diff --git a/node_modules/uview-ui/components/u-notice-bar/u-notice-bar.vue b/node_modules/uview-ui/components/u-notice-bar/u-notice-bar.vue deleted file mode 100644 index a06eb39..0000000 --- a/node_modules/uview-ui/components/u-notice-bar/u-notice-bar.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - - diff --git a/node_modules/uview-ui/components/u-notify/props.js b/node_modules/uview-ui/components/u-notify/props.js deleted file mode 100644 index 57a9d71..0000000 --- a/node_modules/uview-ui/components/u-notify/props.js +++ /dev/null @@ -1,49 +0,0 @@ -export default { - props: { - // 到顶部的距离 - top: { - type: [String, Number], - default: uni.$u.props.notify.top - }, - // 是否展示组件 - // show: { - // type: Boolean, - // default: uni.$u.props.notify.show - // }, - // type主题,primary,success,warning,error - type: { - type: String, - default: uni.$u.props.notify.type - }, - // 字体颜色 - color: { - type: String, - default: uni.$u.props.notify.color - }, - // 背景颜色 - bgColor: { - type: String, - default: uni.$u.props.notify.bgColor - }, - // 展示的文字内容 - message: { - type: String, - default: uni.$u.props.notify.message - }, - // 展示时长,为0时不消失,单位ms - duration: { - type: [String, Number], - default: uni.$u.props.notify.duration - }, - // 字体大小 - fontSize: { - type: [String, Number], - default: uni.$u.props.notify.fontSize - }, - // 是否留出顶部安全距离(状态栏高度) - safeAreaInsetTop: { - type: Boolean, - default: uni.$u.props.notify.safeAreaInsetTop - } - } -} diff --git a/node_modules/uview-ui/components/u-notify/u-notify.vue b/node_modules/uview-ui/components/u-notify/u-notify.vue deleted file mode 100644 index 30adb72..0000000 --- a/node_modules/uview-ui/components/u-notify/u-notify.vue +++ /dev/null @@ -1,211 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-number-box/props.js b/node_modules/uview-ui/components/u-number-box/props.js deleted file mode 100644 index fb0fa94..0000000 --- a/node_modules/uview-ui/components/u-number-box/props.js +++ /dev/null @@ -1,109 +0,0 @@ -export default { - props: { - // 步进器标识符,在change回调返回 - name: { - type: [String, Number], - default: uni.$u.props.numberBox.name - }, - // 用于双向绑定的值,初始化时设置设为默认min值(最小值) - value: { - type: [String, Number], - default: uni.$u.props.numberBox.value - }, - // 最小值 - min: { - type: [String, Number], - default: uni.$u.props.numberBox.min - }, - // 最大值 - max: { - type: [String, Number], - default: uni.$u.props.numberBox.max - }, - // 加减的步长,可为小数 - step: { - type: [String, Number], - default: uni.$u.props.numberBox.step - }, - // 是否只允许输入整数 - integer: { - type: Boolean, - default: uni.$u.props.numberBox.integer - }, - // 是否禁用,包括输入框,加减按钮 - disabled: { - type: Boolean, - default: uni.$u.props.numberBox.disabled - }, - // 是否禁用输入框 - disabledInput: { - type: Boolean, - default: uni.$u.props.numberBox.disabledInput - }, - // 是否开启异步变更,开启后需要手动控制输入值 - asyncChange: { - type: Boolean, - default: uni.$u.props.numberBox.asyncChange - }, - // 输入框宽度,单位为px - inputWidth: { - type: [String, Number], - default: uni.$u.props.numberBox.inputWidth - }, - // 是否显示减少按钮 - showMinus: { - type: Boolean, - default: uni.$u.props.numberBox.showMinus - }, - // 是否显示增加按钮 - showPlus: { - type: Boolean, - default: uni.$u.props.numberBox.showPlus - }, - // 显示的小数位数 - decimalLength: { - type: [String, Number, null], - default: uni.$u.props.numberBox.decimalLength - }, - // 是否开启长按加减手势 - longPress: { - type: Boolean, - default: uni.$u.props.numberBox.longPress - }, - // 输入框文字和加减按钮图标的颜色 - color: { - type: String, - default: uni.$u.props.numberBox.color - }, - // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致 - buttonSize: { - type: [String, Number], - default: uni.$u.props.numberBox.buttonSize - }, - // 输入框和按钮的背景颜色 - bgColor: { - type: String, - default: uni.$u.props.numberBox.bgColor - }, - // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px - cursorSpacing: { - type: [String, Number], - default: uni.$u.props.numberBox.cursorSpacing - }, - // 是否禁用增加按钮 - disablePlus: { - type: Boolean, - default: uni.$u.props.numberBox.disablePlus - }, - // 是否禁用减少按钮 - disableMinus: { - type: Boolean, - default: uni.$u.props.numberBox.disableMinus - }, - // 加减按钮图标的样式 - iconStyle: { - type: [Object, String], - default: uni.$u.props.numberBox.iconStyle - } - } -} diff --git a/node_modules/uview-ui/components/u-number-box/u-number-box.vue b/node_modules/uview-ui/components/u-number-box/u-number-box.vue deleted file mode 100644 index b3b0fd4..0000000 --- a/node_modules/uview-ui/components/u-number-box/u-number-box.vue +++ /dev/null @@ -1,417 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-number-keyboard/props.js b/node_modules/uview-ui/components/u-number-keyboard/props.js deleted file mode 100644 index 5e3bf55..0000000 --- a/node_modules/uview-ui/components/u-number-keyboard/props.js +++ /dev/null @@ -1,19 +0,0 @@ -export default { - props: { - // 键盘的类型,number-数字键盘,card-身份证键盘 - mode: { - type: String, - default: uni.$u.props.numberKeyboard.value - }, - // 是否显示键盘的"."符号 - dotDisabled: { - type: Boolean, - default: uni.$u.props.numberKeyboard.dotDisabled - }, - // 是否打乱键盘按键的顺序 - random: { - type: Boolean, - default: uni.$u.props.numberKeyboard.random - } - } -} diff --git a/node_modules/uview-ui/components/u-number-keyboard/u-number-keyboard.vue b/node_modules/uview-ui/components/u-number-keyboard/u-number-keyboard.vue deleted file mode 100644 index 4f505c6..0000000 --- a/node_modules/uview-ui/components/u-number-keyboard/u-number-keyboard.vue +++ /dev/null @@ -1,196 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-overlay/props.js b/node_modules/uview-ui/components/u-overlay/props.js deleted file mode 100644 index e6974df..0000000 --- a/node_modules/uview-ui/components/u-overlay/props.js +++ /dev/null @@ -1,24 +0,0 @@ -export default { - props: { - // 是否显示遮罩 - show: { - type: Boolean, - default: uni.$u.props.overlay.show - }, - // 层级z-index - zIndex: { - type: [String, Number], - default: uni.$u.props.overlay.zIndex - }, - // 遮罩的过渡时间,单位为ms - duration: { - type: [String, Number], - default: uni.$u.props.overlay.duration - }, - // 不透明度值,当做rgba的第四个参数 - opacity: { - type: [String, Number], - default: uni.$u.props.overlay.opacity - } - } -} diff --git a/node_modules/uview-ui/components/u-overlay/u-overlay.vue b/node_modules/uview-ui/components/u-overlay/u-overlay.vue deleted file mode 100644 index 92de4e9..0000000 --- a/node_modules/uview-ui/components/u-overlay/u-overlay.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - - - diff --git a/node_modules/uview-ui/components/u-parse/node/node.vue b/node_modules/uview-ui/components/u-parse/node/node.vue deleted file mode 100644 index 6c4b5a0..0000000 --- a/node_modules/uview-ui/components/u-parse/node/node.vue +++ /dev/null @@ -1,499 +0,0 @@ -