@nutui/nutui-react-taro 1.5.7 → 1.5.8-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # v1.5.8
2
+ `2023-06-07`
3
+
4
+ * :bug: fix(watermark): 修复小程序下画布尺寸问题 (#1073) @Eiinu
5
+ * :bug: fix: calendar 日历组件上下滑动回弹 (#1078) @xiaoyatong
6
+
7
+
1
8
  # v1.5.7
2
9
  `2023-05-31`
3
10
 
@@ -1,4 +1,4 @@
1
- import { C as Calendar } from './calendar.taro-670842ea.js';
1
+ import { C as Calendar } from './calendar.taro-2a19ee22.js';
2
2
  import 'react';
3
3
  import './popup.taro-01676bff.js';
4
4
  import 'react-dom';
@@ -10,11 +10,11 @@ import '@bem-react/classname';
10
10
  import '@tarojs/components';
11
11
  import './icon.taro-296a1bec.js';
12
12
  import './typings-b9828dba.js';
13
- import './calendaritem.taro-2a603571.js';
13
+ import './calendaritem.taro-e3f13a3b.js';
14
+ import '@tarojs/taro';
14
15
  import './configprovider.taro-8d71eb49.js';
15
16
  import 'lodash.kebabcase';
16
17
  import './zh-CN-c779e6c1.js';
17
- import '@tarojs/taro';
18
18
 
19
19
 
20
20
 
@@ -1,13 +1,13 @@
1
- import { C as CalendarItem } from './calendaritem.taro-2a603571.js';
1
+ import { C as CalendarItem } from './calendaritem.taro-e3f13a3b.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import '@tarojs/components';
5
+ import '@tarojs/taro';
5
6
  import './bem-350c1702.js';
6
7
  import '@bem-react/classname';
7
8
  import './configprovider.taro-8d71eb49.js';
8
9
  import 'lodash.kebabcase';
9
10
  import './zh-CN-c779e6c1.js';
10
- import '@tarojs/taro';
11
11
 
12
12
 
13
13
 
@@ -1,4 +1,4 @@
1
- import { W as WaterMark } from './watermark.taro-9ce2ae37.js';
1
+ import { W as WaterMark } from './watermark.taro-fb932c31.js';
2
2
  import 'react';
3
3
  import '@tarojs/taro';
4
4
  import 'classnames';
@@ -1,6 +1,6 @@
1
1
  import React__default, { useRef } from 'react';
2
2
  import { P as Popup } from './popup.taro-01676bff.js';
3
- import { U as Utils, C as CalendarItem } from './calendaritem.taro-2a603571.js';
3
+ import { U as Utils, C as CalendarItem } from './calendaritem.taro-e3f13a3b.js';
4
4
  import { u as useConfig } from './configprovider.taro-8d71eb49.js';
5
5
 
6
6
  const defaultProps = {
@@ -1,9 +1,9 @@
1
1
  import React__default, { useState, useRef, useEffect } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import { ScrollView } from '@tarojs/components';
4
+ import { nextTick } from '@tarojs/taro';
4
5
  import { c as cn } from './bem-350c1702.js';
5
6
  import { u as useConfig } from './configprovider.taro-8d71eb49.js';
6
- import { nextTick } from '@tarojs/taro';
7
7
 
8
8
  const Utils = {
9
9
  /**
@@ -519,12 +519,6 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
519
519
  }
520
520
  else {
521
521
  const viewPosition = Math.round(currentScrollTop + viewHeight);
522
- if (viewPosition <
523
- state.monthsData[current].cssScrollHeight +
524
- state.monthsData[current].cssHeight &&
525
- currentScrollTop > state.monthsData[current - 1].cssScrollHeight) {
526
- current -= 1;
527
- }
528
522
  if (current + 1 <= state.monthsNum &&
529
523
  viewPosition >=
530
524
  state.monthsData[current + 1].cssScrollHeight +
@@ -27,8 +27,8 @@ export { T as Tabbar } from './tabbar.taro-9acfc2fa.js';
27
27
  export { T as TabbarItem } from './tabbaritem.taro-bf517487.js';
28
28
  export { T as TabPane } from './tabpane.taro-4ca340ef.js';
29
29
  export { T as Tabs } from './tabs.taro-6a7524a4.js';
30
- export { C as Calendar } from './calendar.taro-670842ea.js';
31
- export { C as CalendarItem } from './calendaritem.taro-2a603571.js';
30
+ export { C as Calendar } from './calendar.taro-2a19ee22.js';
31
+ export { C as CalendarItem } from './calendaritem.taro-e3f13a3b.js';
32
32
  export { C as Cascader } from './cascader.taro-a5553aa5.js';
33
33
  export { C as Checkbox, a as CheckboxGroup } from './checkbox.taro-6120e3e3.js';
34
34
  export { D as DatePicker } from './datepicker.taro-94aca24a.js';
@@ -82,7 +82,7 @@ export { T as Tag } from './tag.taro-23ba0834.js';
82
82
  export { T as TrendArrow } from './trendarrow.taro-b8c5ccd9.js';
83
83
  export { V as Video } from './video-f1be8a91.js';
84
84
  export { V as VirtualList } from './virtuallist.taro-c420257c.js';
85
- export { W as WaterMark } from './watermark.taro-9ce2ae37.js';
85
+ export { W as WaterMark } from './watermark.taro-fb932c31.js';
86
86
  export { A as Address } from './address.taro-d74c7760.js';
87
87
  export { B as Barrage } from './barrage.taro-0495a1b2.js';
88
88
  export { C as Card } from './card.taro-e4c76dad.js';
@@ -42,8 +42,8 @@ const WaterMark = (props) => {
42
42
  let ratio = 1;
43
43
  getSystemInfo().then((res) => {
44
44
  ratio = res.pixelRatio;
45
- const canvasWidth = `${(gapX + width) * ratio}px`;
46
- const canvasHeight = `${(gapY + height) * ratio}px`;
45
+ const canvasWidth = `${(gapX + width) * ratio}`;
46
+ const canvasHeight = `${(gapY + height) * ratio}`;
47
47
  const markWidth = width * ratio;
48
48
  const markHeight = height * ratio;
49
49
  let ctx;
@@ -51,8 +51,8 @@ const WaterMark = (props) => {
51
51
  if (process.env.TARO_ENV === 'h5') {
52
52
  canvas = document.createElement('canvas');
53
53
  ctx = canvas.getContext('2d');
54
- canvas.setAttribute('width', canvasWidth);
55
- canvas.setAttribute('height', canvasHeight);
54
+ canvas.setAttribute('width', `${canvasWidth}px`);
55
+ canvas.setAttribute('height', `${canvasHeight}px`);
56
56
  }
57
57
  else {
58
58
  canvas = createOffscreenCanvas({
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.7 Wed May 31 2023 14:34:16 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.8-beta.0 Wed Jun 07 2023 10:04:24 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.7 Wed May 31 2023 14:34:16 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.8-beta.0 Wed Jun 07 2023 10:04:24 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.7 Wed May 31 2023 14:34:16 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.8-beta.0 Wed Jun 07 2023 10:04:24 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.7 Wed May 31 2023 14:34:16 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.8-beta.0 Wed Jun 07 2023 10:04:24 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.7 Wed May 31 2023 14:34:16 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.8-beta.0 Wed Jun 07 2023 10:04:24 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.7 Wed May 31 2023 14:34:16 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.8-beta.0 Wed Jun 07 2023 10:04:24 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  /*!
8
- * @nutui/nutui-react-taro v1.5.7 Wed May 31 2023 14:33:56 GMT+0800 (中国标准时间)
8
+ * @nutui/nutui-react-taro v1.5.8-beta.0 Wed Jun 07 2023 10:04:01 GMT+0800 (中国标准时间)
9
9
  * (c) 2023 @jdf2e.
10
10
  * Released under the MIT License.
11
11
  */
@@ -5495,9 +5495,6 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
5495
5495
  }
5496
5496
  } else {
5497
5497
  const viewPosition = Math.round(currentScrollTop + viewHeight);
5498
- if (viewPosition < state.monthsData[current].cssScrollHeight + state.monthsData[current].cssHeight && currentScrollTop > state.monthsData[current - 1].cssScrollHeight) {
5499
- current -= 1;
5500
- }
5501
5498
  if (current + 1 <= state.monthsNum && viewPosition >= state.monthsData[current + 1].cssScrollHeight + state.monthsData[current + 1].cssHeight) {
5502
5499
  current += 1;
5503
5500
  }
@@ -20226,8 +20223,8 @@ const WaterMark = (props) => {
20226
20223
  let ratio = 1;
20227
20224
  getSystemInfo().then((res) => {
20228
20225
  ratio = res.pixelRatio;
20229
- const canvasWidth = `${(gapX + width) * ratio}px`;
20230
- const canvasHeight = `${(gapY + height) * ratio}px`;
20226
+ const canvasWidth = `${(gapX + width) * ratio}`;
20227
+ const canvasHeight = `${(gapY + height) * ratio}`;
20231
20228
  const markWidth = width * ratio;
20232
20229
  const markHeight = height * ratio;
20233
20230
  let ctx2;
@@ -20235,8 +20232,8 @@ const WaterMark = (props) => {
20235
20232
  if (process.env.TARO_ENV === "h5") {
20236
20233
  canvas = document.createElement("canvas");
20237
20234
  ctx2 = canvas.getContext("2d");
20238
- canvas.setAttribute("width", canvasWidth);
20239
- canvas.setAttribute("height", canvasHeight);
20235
+ canvas.setAttribute("width", `${canvasWidth}px`);
20236
+ canvas.setAttribute("height", `${canvasHeight}px`);
20240
20237
  } else {
20241
20238
  canvas = createOffscreenCanvas({
20242
20239
  type: "2d",
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
8
8
  return value;
9
9
  };
10
10
  /*!
11
- * @nutui/nutui-react-taro v1.5.7 Wed May 31 2023 14:33:56 GMT+0800 (中国标准时间)
11
+ * @nutui/nutui-react-taro v1.5.8-beta.0 Wed Jun 07 2023 10:04:01 GMT+0800 (中国标准时间)
12
12
  * (c) 2023 @jdf2e.
13
13
  * Released under the MIT License.
14
14
  */
@@ -5511,9 +5511,6 @@ var __publicField = (obj, key, value) => {
5511
5511
  }
5512
5512
  } else {
5513
5513
  const viewPosition = Math.round(currentScrollTop + viewHeight);
5514
- if (viewPosition < state.monthsData[current].cssScrollHeight + state.monthsData[current].cssHeight && currentScrollTop > state.monthsData[current - 1].cssScrollHeight) {
5515
- current -= 1;
5516
- }
5517
5514
  if (current + 1 <= state.monthsNum && viewPosition >= state.monthsData[current + 1].cssScrollHeight + state.monthsData[current + 1].cssHeight) {
5518
5515
  current += 1;
5519
5516
  }
@@ -20242,8 +20239,8 @@ This message will only show in development mode. It won't appear in production.
20242
20239
  let ratio = 1;
20243
20240
  Taro.getSystemInfo().then((res) => {
20244
20241
  ratio = res.pixelRatio;
20245
- const canvasWidth = `${(gapX + width) * ratio}px`;
20246
- const canvasHeight = `${(gapY + height) * ratio}px`;
20242
+ const canvasWidth = `${(gapX + width) * ratio}`;
20243
+ const canvasHeight = `${(gapY + height) * ratio}`;
20247
20244
  const markWidth = width * ratio;
20248
20245
  const markHeight = height * ratio;
20249
20246
  let ctx2;
@@ -20251,8 +20248,8 @@ This message will only show in development mode. It won't appear in production.
20251
20248
  if (process.env.TARO_ENV === "h5") {
20252
20249
  canvas = document.createElement("canvas");
20253
20250
  ctx2 = canvas.getContext("2d");
20254
- canvas.setAttribute("width", canvasWidth);
20255
- canvas.setAttribute("height", canvasHeight);
20251
+ canvas.setAttribute("width", `${canvasWidth}px`);
20252
+ canvas.setAttribute("height", `${canvasHeight}px`);
20256
20253
  } else {
20257
20254
  canvas = Taro.createOffscreenCanvas({
20258
20255
  type: "2d",
package/dist/style.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v1.5.7 Wed May 31 2023 14:34:07 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui-react-taro v1.5.8-beta.0 Wed Jun 07 2023 10:04:13 GMT+0800 (中国标准时间)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui-react-taro",
3
- "version": "1.5.7",
3
+ "version": "1.5.8-beta.0",
4
4
  "description": "京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序",
5
5
  "title": "NutUI-React",
6
6
  "keywords": [