@para-ui/core 3.0.103 → 3.0.105

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.
@@ -135,8 +135,8 @@ var DragVerify = function DragVerify(props) {
135
135
  imgBg.style.display = 'inline-block';
136
136
  if (!refDom.current) return;
137
137
  var sliderImgEle = refDom.current.querySelector('.slider-img');
138
- var sliderImgEleRect = sliderImgEle === null || sliderImgEle === void 0 ? void 0 : sliderImgEle.getBoundingClientRect();
139
- var b = sliderImgEleRect.width;
138
+ //const sliderImgEleRect = sliderImgEle?.getBoundingClientRect();
139
+ var b = sliderImgEle === null || sliderImgEle === void 0 ? void 0 : sliderImgEle.clientWidth;
140
140
  constData.current.imgScale = a / b;
141
141
  sliderImgEle === null || sliderImgEle === void 0 ? void 0 : sliderImgEle.append(imgMove);
142
142
  imgMove.onload = function () {
@@ -163,50 +163,75 @@ var DragVerify = function DragVerify(props) {
163
163
  var moveDomRect = moveDom.getBoundingClientRect();
164
164
  var moveDomWidth = moveDomRect.width; // 移动箭头的框
165
165
  var moveSliderWidth = moveSliderRect.width; // 进度条的宽
166
+ // 移动
167
+ var moveFunc = function moveFunc(event, e) {
168
+ var moveW = event.pageX - e.pageX; // 鼠标移动的距离
169
+ if (moveW < 0) moveW = 0;
170
+ if (moveW + moveDomWidth > imgBg.width) moveW = imgBg.width - moveDomWidth;
171
+ moveDom.style.left = "".concat(moveW - 1, "px");
172
+ // 加一防止滑块与进度条之间有间隙
173
+ moveProgress.style.width = "".concat(moveW < 2 ? 2 : moveW, "px");
174
+ // 进度条走过的比例
175
+ var ratio = moveW / (moveSliderWidth - moveDomWidth);
176
+ var imgMoveWidth = (imgBg.width - imgMove.width) * ratio;
177
+ imgMove.style.left = "".concat(imgMoveWidth, "px");
178
+ sliderText.innerHTML = '';
179
+ };
180
+ // 抬起
181
+ var endFunc = function endFunc() {
182
+ sliderBox.classList.remove("".concat(prefixCls, "-move"));
183
+ constData.current.padding = true;
184
+ var X = parseFloat(imgMove.style.left);
185
+ var handX = X * constData.current.imgScale;
186
+ sliderPosiCheck(handX, function (result) {
187
+ if (!result) {
188
+ // 错误
189
+ sliderBox.classList.add("".concat(prefixCls, "-error"));
190
+ constData.current.timerError = setTimeout(function () {
191
+ constData.current.padding = false;
192
+ reset();
193
+ sliderText.innerHTML = intl({
194
+ id: 'tryAgain'
195
+ }); // 再试一次
196
+ getImgInfoReq();
197
+ }, 1000);
198
+ return;
199
+ }
200
+ sliderBox.classList.add("".concat(prefixCls, "-success"));
201
+ /*constData.current.timerSuccess = setTimeout(() => {
202
+ //constData.current.padding = false;
203
+ //sliderBox.classList.remove(prefixCls + '-success');
204
+ }, 1000);*/
205
+ });
206
+ };
207
+
166
208
  moveDom.onmousedown = function (e) {
167
209
  if (constData.current.padding) return;
168
- sliderBox.classList.add(prefixCls + '-move');
210
+ sliderBox.classList.add("".concat(prefixCls, "-move"));
169
211
  document.onmousemove = function (event) {
170
- var moveW = event.pageX - e.pageX; // 鼠标移动的距离
171
- if (moveW < 0) moveW = 0;
172
- if (moveW + moveDomWidth > imgBg.width) moveW = imgBg.width - moveDomWidth;
173
- moveDom.style.left = moveW - 1 + 'px';
174
- // 加一防止滑块与进度条之间有间隙
175
- moveProgress.style.width = (moveW < 2 ? 2 : moveW) + 'px';
176
- // 进度条走过的比例
177
- var ratio = moveW / (moveSliderWidth - moveDomWidth);
178
- var imgMoveWidth = (imgBg.width - imgMove.width) * ratio;
179
- imgMove.style.left = imgMoveWidth + 'px';
180
- sliderText.innerHTML = '';
212
+ moveFunc(event, e);
181
213
  };
182
214
  // 鼠标抬起
183
215
  document.onmouseup = function () {
184
216
  document.onmousemove = null;
185
217
  document.onmouseup = null;
186
- sliderBox.classList.remove(prefixCls + '-move');
187
- constData.current.padding = true;
188
- var X = parseFloat(imgMove.style.left);
189
- var handX = X * constData.current.imgScale;
190
- sliderPosiCheck(handX, function (result) {
191
- if (!result) {
192
- // 错误
193
- sliderBox.classList.add(prefixCls + '-error');
194
- constData.current.timerError = setTimeout(function () {
195
- constData.current.padding = false;
196
- reset();
197
- sliderText.innerHTML = intl({
198
- id: 'tryAgain'
199
- }); // 再试一次
200
- getImgInfoReq();
201
- }, 1000);
202
- return;
203
- }
204
- sliderBox.classList.add(prefixCls + '-success');
205
- /*constData.current.timerSuccess = setTimeout(() => {
206
- //constData.current.padding = false;
207
- //sliderBox.classList.remove(prefixCls + '-success');
208
- }, 1000);*/
209
- });
218
+ endFunc();
219
+ };
220
+ };
221
+ moveDom.ontouchstart = function (touchE) {
222
+ if (constData.current.padding) return;
223
+ var e = touchE.touches[0];
224
+ sliderBox.classList.add("".concat(prefixCls, "-move"));
225
+ // 鼠标移动
226
+ document.ontouchmove = function (touchEvent) {
227
+ var event = touchEvent.touches[0];
228
+ moveFunc(event, e);
229
+ };
230
+ // 鼠标抬起
231
+ document.ontouchend = function () {
232
+ document.ontouchmove = null;
233
+ document.ontouchend = null;
234
+ endFunc();
210
235
  };
211
236
  };
212
237
  };
package/Form/index.js CHANGED
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-76060636.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { DeepClone } from '@paraview/lib';
5
5
  import React__default from 'react';
6
- import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-b7e9c13a.js';
6
+ import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-effca97a.js';
7
7
  import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
8
8
  import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
9
9
  import '../_verture/unsupportedIterableToArray-cb478f24.js';
package/FormItem/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'react';
3
- export { F as default } from '../_verture/index-b7e9c13a.js';
3
+ export { F as default } from '../_verture/index-effca97a.js';
4
4
  import 'clsx';
5
5
  import '../Label/index.js';
6
6
  import '../_verture/constant-66aa48a1.js';
package/README.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 版本: 3.0.105
2
+
3
+ para-ui/core@3.0.105 发布
4
+ 【表格-Table】修复表格拖拽,过滤不显示列宽度叠加
5
+
6
+ ## 版本: 3.0.104
7
+
8
+ para-ui/core@3.0.104 发布
9
+ 【滑块验证码-DragVerify】适配移动端
10
+
1
11
  ## 版本: 3.0.103
2
12
 
3
13
  para-ui/core@3.0.103 发布
package/Table/index.js CHANGED
@@ -2943,7 +2943,7 @@ var Table = function Table(propsInit) {
2943
2943
  width: result.width
2944
2944
  };
2945
2945
  setHeadDataConfig(Object.assign({}, constData.current.headDataConfig)); // 设置表格列配置,被拖动的width
2946
- handHeadDataCom(_toConsumableArray(headData)); // 重新计算表格的最小宽度
2946
+ handHeadDataCom(_toConsumableArray(headDataCom)); // 重新计算表格的最小宽度
2947
2947
  // 本地记住拖动列宽度
2948
2948
  setLocalStorageHeadCom({
2949
2949
  headDataConfig: constData.current.headDataConfig,
package/index.js CHANGED
@@ -22,7 +22,7 @@ export { D as Dropdown } from './_verture/index-77f9e0fb.js';
22
22
  export { default as DynamicMultiBox } from './DynamicMultiBox/index.js';
23
23
  export { default as Empty } from './Empty/index.js';
24
24
  export { default as Form } from './Form/index.js';
25
- export { F as FormItem } from './_verture/index-b7e9c13a.js';
25
+ export { F as FormItem } from './_verture/index-effca97a.js';
26
26
  export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-c04790c8.js';
27
27
  export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
28
28
  export { default as Help } from './Help/index.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@para-ui/core",
3
3
  "private": false,
4
- "version": "3.0.103",
4
+ "version": "3.0.105",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
7
7
  "description": "Powered by Para FED",