This commit is contained in:
yehuozhili
2021-07-18 16:38:48 +08:00
parent f1a3d98bcb
commit af5c20552f
4 changed files with 12 additions and 4 deletions

View File

@@ -3,6 +3,9 @@ title: CHANGELOG
order: 1 order: 1
--- ---
## 0.5.1
修复右侧选中不能取消选中问题。
## 0.5.0 ## 0.5.0
修复control组件宽度不够问题。 修复control组件宽度不够问题。

View File

@@ -2,13 +2,18 @@
* @Author: yehuozhili * @Author: yehuozhili
* @Date: 2021-01-31 20:44:16 * @Date: 2021-01-31 20:44:16
* @LastEditors: yehuozhili * @LastEditors: yehuozhili
* @LastEditTime: 2021-07-16 20:28:26 * @LastEditTime: 2021-07-18 16:38:07
* @FilePath: \dooringx\packages\dooringx-lib\README.md * @FilePath: \dooringx\packages\dooringx-lib\README.md
--> -->
## Dooringx-lib ## Dooringx-lib
## changelog ## changelog
## 0.5.1
修复右侧选中不能取消选中问题。
## 0.5.0 ## 0.5.0
修复control组件宽度不够问题。 修复control组件宽度不够问题。

View File

@@ -1,5 +1,5 @@
{ {
"version": "0.6.0", "version": "0.5.1",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/dooringx-lib.esm.js", "module": "dist/dooringx-lib.esm.js",

View File

@@ -19,7 +19,7 @@ export const innerDrag = function (
const store = config.getStore(); const store = config.getStore();
return { return {
onMouseDown: (e: React.MouseEvent) => { onMouseDown: (e: React.MouseEvent) => {
e.preventDefault(); //e.preventDefault();
e.stopPropagation(); e.stopPropagation();
if (!item.canDrag) { if (!item.canDrag) {
containerFocusRemove(config).onMouseDown(e); containerFocusRemove(config).onMouseDown(e);
@@ -106,7 +106,7 @@ export const innerContainerDrag = function (config: UserConfig) {
export const innerContainerDragUp = function (config: UserConfig, mode = 'normal') { export const innerContainerDragUp = function (config: UserConfig, mode = 'normal') {
const store = config.getStore(); const store = config.getStore();
const onMouseUp = (e: React.MouseEvent) => { const onMouseUp = (e: React.MouseEvent) => {
e.preventDefault(); // e.preventDefault(); 这个会导致无法取消选中
iframeWrapperMove(config); iframeWrapperMove(config);
wrapperMoveMouseUp(config); wrapperMoveMouseUp(config);
selectRangeMouseUp(e, config); selectRangeMouseUp(e, config);