Compare commits

...

15 Commits

Author SHA1 Message Date
landluck
3049271aa5
Merge pull request #5075 from youzan/dependabot/npm_and_yarn/moment-timezone-0.5.38
build(deps): bump moment-timezone from 0.5.34 to 0.5.38
2022-10-26 15:33:22 +08:00
landluck
917e60195f
Merge pull request #5050 from youzan/dependabot/npm_and_yarn/typescript-4.8.4
build(deps-dev): bump typescript from 4.7.4 to 4.8.4
2022-10-26 15:33:07 +08:00
dependabot[bot]
c380b8ac32
build(deps-dev): bump typescript from 4.7.4 to 4.8.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.4 to 4.8.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.4...v4.8.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 07:31:10 +00:00
landluck
e33a07730a
Merge pull request #5039 from youzan/dependabot/npm_and_yarn/miniprogram-api-typings-3.6.0
build(deps-dev): bump miniprogram-api-typings from 3.4.5 to 3.6.0
2022-10-26 15:28:30 +08:00
landluck
72bd8b88fb
Merge pull request #5020 from youzan/dependabot/npm_and_yarn/async-2.6.4
build(deps): bump async from 2.6.3 to 2.6.4
2022-10-26 15:28:11 +08:00
dependabot[bot]
4aacb6184c
build(deps): bump moment-timezone from 0.5.34 to 0.5.38
Bumps [moment-timezone](https://github.com/moment/moment-timezone) from 0.5.34 to 0.5.38.
- [Release notes](https://github.com/moment/moment-timezone/releases)
- [Changelog](https://github.com/moment/moment-timezone/blob/develop/changelog.md)
- [Commits](https://github.com/moment/moment-timezone/compare/0.5.34...0.5.38)

---
updated-dependencies:
- dependency-name: moment-timezone
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 07:27:26 +00:00
landluck
bbf2d0de31
Merge pull request #4985 from youzan/dependabot/npm_and_yarn/babel/preset-typescript-7.18.6
build(deps-dev): bump @babel/preset-typescript from 7.16.7 to 7.18.6
2022-10-26 15:27:23 +08:00
landluck
aea30546dc
Merge pull request #5040 from youzan/dependabot/npm_and_yarn/vant/cli-4.0.4
build(deps-dev): bump @vant/cli from 4.0.3 to 4.0.4
2022-10-26 15:27:06 +08:00
landluck
b66b85eb97
Merge pull request #5051 from youzan/dependabot/npm_and_yarn/vue-3.2.40
build(deps-dev): bump vue from 3.2.31 to 3.2.40
2022-10-26 15:26:46 +08:00
cikenerd
186b0156df
fix: 修复插件内使用 van-tabs 切换 tab 报错的问题 (#5073)
* 修复插件内使用van-tabs切换tab报错的问题

* fix(van-tabs): 修复小程序插件内使用van-tabs切换tab没有反应的问题
feat(van-tabs): incorrect style
docs(van-tabs): 去除utils,version里面require循环依赖,修复插件内调用wx.canIUse抛异常问题

* fix(van-tabs): 修复小程序插件内使用van-tabs切换tab没有反应的问题
feat(van-tabs): incorrect style
docs(van-tabs): 去除utils,version里面require循环依赖,修复插件内调用wx.canIUse抛异常问题

* fix(van-tabs): incorrect style
feat(van-tabs): incorrect style
docs(van-tabs): incorrect style
2022-10-26 14:29:38 +08:00
dependabot[bot]
bbce66886c
build(deps-dev): bump vue from 3.2.31 to 3.2.40
Bumps [vue](https://github.com/vuejs/core) from 3.2.31 to 3.2.40.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.2.31...v3.2.40)

---
updated-dependencies:
- dependency-name: vue
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-01 23:18:17 +00:00
dependabot[bot]
b1b2a9135c
build(deps-dev): bump @vant/cli from 4.0.3 to 4.0.4
Bumps [@vant/cli](https://github.com/youzan/vant/tree/HEAD/packages/vant-cli) from 4.0.3 to 4.0.4.
- [Release notes](https://github.com/youzan/vant/releases)
- [Changelog](https://github.com/youzan/vant/blob/main/packages/vant-cli/changelog.md)
- [Commits](https://github.com/youzan/vant/commits/HEAD/packages/vant-cli)

---
updated-dependencies:
- dependency-name: "@vant/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-17 05:41:33 +00:00
dependabot[bot]
f70512cbf8
build(deps-dev): bump miniprogram-api-typings from 3.4.5 to 3.6.0
Bumps [miniprogram-api-typings](https://github.com/wechat-miniprogram/api-typings) from 3.4.5 to 3.6.0.
- [Release notes](https://github.com/wechat-miniprogram/api-typings/releases)
- [Changelog](https://github.com/wechat-miniprogram/api-typings/blob/master/CHANGELOG.md)
- [Commits](https://github.com/wechat-miniprogram/api-typings/compare/3.4.5...3.6.0)

---
updated-dependencies:
- dependency-name: miniprogram-api-typings
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-17 05:39:26 +00:00
dependabot[bot]
fe69d2d6cb
build(deps-dev): bump @babel/preset-typescript from 7.16.7 to 7.18.6
Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.16.7 to 7.18.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.6/packages/babel-preset-typescript)

---
updated-dependencies:
- dependency-name: "@babel/preset-typescript"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-20 02:28:58 +00:00
dependabot[bot]
ecbde11a51
build(deps): bump async from 2.6.3 to 2.6.4
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-20 02:26:52 +00:00
3 changed files with 1194 additions and 914 deletions

View File

@ -1,7 +1,8 @@
import { isDef, isNumber, isPlainObject, isPromise } from './validator';
import { canIUseGroupSetData, canIUseNextTick } from './version';
import { canIUseGroupSetData, canIUseNextTick, getSystemInfoSync } from './version';
export { isDef } from './validator';
export { getSystemInfoSync } from './version';
export function range(num: number, min: number, max: number) {
return Math.min(Math.max(num, min), max);
@ -17,15 +18,6 @@ export function nextTick(cb: (...args: any[]) => void) {
}
}
let systemInfo: WechatMiniprogram.SystemInfo;
export function getSystemInfoSync() {
if (systemInfo == null) {
systemInfo = wx.getSystemInfoSync();
}
return systemInfo;
}
export function addUnit(value?: string | number): string | undefined {
if (!isDef(value)) {
return undefined;

View File

@ -1,4 +1,11 @@
import { getSystemInfoSync } from './utils';
let systemInfo: WechatMiniprogram.SystemInfo;
export function getSystemInfoSync() {
if (systemInfo == null) {
systemInfo = wx.getSystemInfoSync();
}
return systemInfo;
}
function compareVersion(v1, v2) {
v1 = v1.split('.');
@ -50,7 +57,11 @@ export function canIUseGroupSetData() {
}
export function canIUseNextTick() {
return wx.canIUse('nextTick');
try {
return wx.canIUse('nextTick');
} catch (e) {
return gte('2.7.1');
}
}
export function canIUseCanvas2d() {

2081
yarn.lock

File diff suppressed because it is too large Load Diff