Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

chore(workspace): 1. zindex 2. drag component 3.import plugin

Dushusir17a5f20e63cf
diff --git a/cli/src/templates/common-plugin/index.html b/cli/src/templates/common-plugin/index.html
index 87007e935e..7326249c9f 100644
--- a/cli/src/templates/common-plugin/index.html
+++ b/cli/src/templates/common-plugin/index.html
@@ -16,7 +16,7 @@
</head>
<body>
- <div id="app" style="position:absolute;z-index: 99999;"></div>
+ <div id="app" style="position:absolute;z-index: 1;"></div>
<div id="universheet" style="height: 30vh;"></div>
<div id="univerdoc" style="height: 30vh;"></div>
<div id="universlide" style="height: 30vh;"></div>
diff --git a/cli/src/templates/docs-plugin/index.html b/cli/src/templates/docs-plugin/index.html
index 61edd42cbc..e7892b74ee 100644
--- a/cli/src/templates/docs-plugin/index.html
+++ b/cli/src/templates/docs-plugin/index.html
@@ -16,7 +16,7 @@
</head>
<body>
- <div id="app" style="position:absolute;z-index: 99999;"></div>
+ <div id="app" style="position:absolute;z-index: 1;"></div>
<div id="univerdoc" style="height: 100%;"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
diff --git a/cli/src/templates/sheets-plugin/index.html b/cli/src/templates/sheets-plugin/index.html
index 1fa3bb8e2e..03e558f493 100644
--- a/cli/src/templates/sheets-plugin/index.html
+++ b/cli/src/templates/sheets-plugin/index.html
@@ -16,7 +16,7 @@
</head>
<body>
- <div id="app" style="position:absolute;z-index: 99999;"></div>
+ <div id="app" style="position:absolute;z-index: 1;"></div>
<div id="universheet" style="height: 100%;"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
diff --git a/cli/src/templates/slides-plugin/index.html b/cli/src/templates/slides-plugin/index.html
index 82f655ecb1..c8e4a685fc 100644
--- a/cli/src/templates/slides-plugin/index.html
+++ b/cli/src/templates/slides-plugin/index.html
@@ -16,7 +16,7 @@
</head>
<body>
- <div id="app" style="position:absolute;z-index: 99999;"></div>
+ <div id="app" style="position:absolute;z-index: 1;"></div>
<div id="universlide" style="height: 100%;"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
diff --git a/examples/univer-sheet-ts/src/main.tsx b/examples/univer-sheet-ts/src/main.tsx
index ee46b4fd9e..2b75bbb1dc 100644
--- a/examples/univer-sheet-ts/src/main.tsx
+++ b/examples/univer-sheet-ts/src/main.tsx
@@ -79,6 +79,7 @@ univer.install(
// FormulaPlugin.create(DEFAULT_FORMULA_DATA_DEMO).installTo(universheet);
FindPlugin.create().installTo(universheet);
universheet.installPlugin(new ClipboardPlugin());
+universheet.installPlugin(new ImportXlsxPlugin());
// sheets-plugin-ui univer.install(new SheetsUI)
// sheets-plugin-ui univer.install(new SheetsUI
// const univerSheetDemo = UniverSheet.newInstance(DEFAULT_WORKBOOK_DATA_DEMO);
diff --git a/package.json b/package.json
index 6f587ad003..78cec76875 100644
--- a/package.json
+++ b/package.json
@@ -49,7 +49,7 @@
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.6.0",
"eslint-import-resolver-typescript": "^3.5.3",
- "eslint-plugin-import-newlines": "^1.3.1",
+ "eslint-plugin-import-newlines": "^1.3.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-unused-imports": "^2.0.0",
"execa": "^4.1.0",
diff --git a/packages/base-docs/index.html b/packages/base-docs/index.html
index 61edd42cbc..e7892b74ee 100644
--- a/packages/base-docs/index.html
+++ b/packages/base-docs/index.html
@@ -16,7 +16,7 @@
</head>
<body>
- <div id="app" style="position:absolute;z-index: 99999;"></div>
+ <div id="app" style="position:absolute;z-index: 1;"></div>
<div id="univerdoc" style="height: 100%;"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
diff --git a/packages/base-ui/src/Components/ColorPicker/index.module.less b/packages/base-ui/src/Components/ColorPicker/index.module.less
index b5fe5f5efb..51c8e7e8e1 100644
--- a/packages/base-ui/src/Components/ColorPicker/index.module.less
+++ b/packages/base-ui/src/Components/ColorPicker/index.module.less
@@ -7,7 +7,7 @@
border-radius: 10px;
// left: 0; // set outside
box-shadow: var(--box-shadow-base);
- z-index: 500;
+ z-index: 4;
height: fit-content;
}
diff --git a/packages/base-ui/src/Components/Drag/Drag-back.tsx b/packages/base-ui/src/Components/Drag/Drag-back.tsx
new file mode 100644
index 0000000000..16f67ede32
--- /dev/null
+++ b/packages/base-ui/src/Components/Drag/Drag-back.tsx
@@ -0,0 +1,134 @@
+import { Component, createRef } from '../../Framework';
+import { JSXComponent } from '../../BaseComponent';
+import { BaseDragProps, DragComponent } from '../../Interfaces';
+import styles from './index.module.less';
+
+// interface IProps {
+// isDrag: boolean;
+// }
+interface IState {
+ left: string;
+ top: string;
+ width: number;
+ height: number;
+ rootW: number;
+ rootH: number;
+ rootL: number;
+ rootT: number;
+ offsetX: number;
+ offsetY: number;
+}
+
+class Drag extends Component<BaseDragProps, IState> {
+ root = createRef();
+
+ initialize() {
+ this.state = {
+ left: '',
+ top: '',
+ width: 0,
+ height: 0,
+ rootW: 0,
+ rootH: 0,
+ rootL: 0,
+ rootT: 0,
+ offsetX: 0,
+ offsetY: 0,
+ };
+ }
+
+ onMouseUp(e: MouseEvent) {
+ // e.stopPropagation();
+ // this.root.current.removeEventListener('mousemove', this.onMouseMove);
+ }
+
+ onMouseDown(e: MouseEvent) {
+ // e.stopPropagation();
+ // if (!((e.target as Element).className === styles.drag)) return;
+ let offsetX = e.offsetX;
+ let offsetY = e.offsetY;
+ this.setState(
+ {
+ offsetX,
+ offsetY,
+ },
+ () => {
+ // this.root.current.addEventListener('mousemove', this.onMouseMove);
+ }
+ );
+ }
+
+ onMouseMove = (e: MouseEvent) => {
+ // e.stopPropagation();
+ let offsetX = this.state.offsetX;
+ let offsetY = this.state.offsetY;
+
+ // if (e.x === offsetX && e.y === offsetY) return;
+
+ let x = e.x;
+ let y = e.y;
+
+ let left = `${x - offsetX}px`;
+ let top = `${y - offsetY}px`;
+ this.setState({
+ top,
+ left,
+ });
+ };
+
+ getWindowRect() {
+ const w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
+ const h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
+ const rootW = this.root.current.offsetWidth;
+ const rootH = this.root.current.offsetHeight;
+ const rootL = this.root.current.offsetLeft;
+ const rootT = this.root.current.offsetTop;
+ const top = `${(h - rootH) / 2}px`;
+ const left = `${(w - rootW) / 2}px`;
+ this.setState({
+ width: w,
+ height: h,
+ rootW,
+ rootH,
+ rootL,
+ rootT,
+ top,
+ left,
+ });
+ }
+
+ componentDidMount() {
+ if (this.props.isDrag) {
+ this.getWindowRect();
+ }
+ }
+
+ render() {
+ const { isDrag, className = '' } = this.props;
+ return (
+ <>
+ {isDrag ? (
+ <div
+ ref={this.root}
+ className={`${styles.drag} ${className}`}
+ style={{ top: this.state.top, left: this.state.left }}
+ onMouseUp={this.onMouseUp.bind(this)}
+ onMouseDown={this.onMouseDown.bind(this)}
+ >
+ {this.props.children}
+ </div>
+ ) : (
+ this.props.children
+ )}
+ </>
+ );
+ }
+}
+
+export class UniverDrag implements DragComponent {
+ render(): JSXComponent<BaseDragProps> {
+ return Drag;
+ }
+}
+
+export default Drag;
diff --git a/packages/base-ui/src/Components/Drag/Drag.tsx b/packages/base-ui/src/Components/Drag/Drag.tsx
index 23375c40dc..3b108afdbb 100644
--- a/packages/base-ui/src/Components/Drag/Drag.tsx
+++ b/packages/base-ui/src/Components/Drag/Drag.tsx
@@ -2,103 +2,114 @@ import { Component, createRef } from '../../Framework';
import { JSXComponent } from '../../BaseComponent';
import { BaseDragProps, DragComponent } from '../../Interfaces';
import styles from './index.module.less';
+import { $$ } from '../../Utils';
-// interface IProps {
-// isDrag: boolean;
-// }
-interface IState {
- left: string;
- top: string;
- width: number;
- height: number;
- rootW: number;
- rootH: number;
- rootL: number;
- rootT: number;
- offsetX: number;
- offsetY: number;
-}
+interface IState{}
class Drag extends Component<BaseDragProps, IState> {
root = createRef();
initialize() {
- this.state = {
- left: '',
- top: '',
- width: 0,
- height: 0,
- rootW: 0,
- rootH: 0,
- rootL: 0,
- rootT: 0,
- offsetX: 0,
- offsetY: 0,
- };
- }
-
- onMouseUp(e: MouseEvent) {
- window.removeEventListener('mousemove', this.onMouseMove);
+
}
+ initDragDialog() {
- onMouseDown(e: MouseEvent) {
- // e.stopPropagation();
- // if (!((e.target as Element).className === styles.drag)) return;
- let offsetX = e.offsetX;
- let offsetY = e.offsetY;
- this.setState(
- {
- offsetX,
- offsetY,
- },
- () => {
- window.addEventListener('mousemove', this.onMouseMove);
+ // Drag and drop function (mainly to trigger three events: onpointerdown\onpointermove\onpointerup)
+ const drag = this.root.current;
+ const divMask = drag.querySelector(`.${styles.dragMask}`);
+
+ const dragBarTop = drag.querySelector(`.${styles.dragBarTop}`)
+ const dragBarBottom = drag.querySelector(`.${styles.dragBarBottom}`)
+ const dragBarLeft = drag.querySelector(`.${styles.dragBarLeft}`)
+ const dragBarRight = drag.querySelector(`.${styles.dragBarRight}`)
+
+ dragBarTop.addEventListener('pointerdown',pointerDownListener)
+ dragBarBottom.addEventListener('pointerdown',pointerDownListener)
+ dragBarLeft.addEventListener('pointerdown',pointerDownListener)
+ dragBarRight.addEventListener('pointerdown',pointerDownListener)
+
+ // When you click on an object, you can use the drag object. Move and up are the global area, that is, the entire document is common. The document object should be used instead of the drag object (otherwise, when the drag object is used, the object can only move to the right or down )
+
+ function pointerDownListener (e:PointerEvent) {
+ e = e || window.event // Compatible with IE browser
+ const diffX = e.clientX-drag.offsetLeft // The distance from the moment the mouse clicks on the object relative to the left border of the object = the distance of the position when clicked relative to the leftmost left of the browser - the distance of the left border of the object relative to the leftmost left of the browser
+ const diffY = e.clientY-drag.offsetTop
+
+ /* Low version IE bug: When an object is dragged out of the browser’s visual window, a scroll bar will appear,
+ The solution is to use two unique methods setCapture()\releaseCapture() in IE browser, these two methods,
+ You can let the mouse slide outside the browser to capture the event, and our bug is when the mouse moves out of the browser,
+ The function that the limit is exceeded becomes invalid. In this way, this problem can be solved. Note: These two methods are used in onpointerdown and onpointerup */
+ if (typeof drag.setCapture !=='undefined') {
+ drag.setCapture()
}
- );
- }
+
+ // Cover the pop-up window
+ divMask.style.width = '100%';
+ divMask.style.height = '100%';
+
+ // Prevent the selected event from being triggered when the dragging speed is too fast
+ document.body.style.userSelect ='none'
+
+ document.addEventListener('pointermove',pointerMoveListener)
+ document.addEventListener('pointerup',pointerUpListener)
- onMouseMove = (e: MouseEvent) => {
- // e.stopPropagation();
- let offsetX = this.state.offsetX;
- let offsetY = this.state.offsetY;
- // if (e.x === offsetX && e.y === offsetY) return;
-
- let x = e.x;
- let y = e.y;
-
- let left = `${x - offsetX}px`;
- let top = `${y - offsetY}px`;
- this.setState({
- top,
- left,
- });
- };
+ function pointerMoveListener(e:PointerEvent) {
+ e = e || window.event // Compatible with IE browser
+ let left = e.clientX-diffX
+ let top = e.clientY-diffY
+
+ // Control the range of dragged objects can only be in the browser window, and scroll bars are not allowed
+ // if (left <0) {
+ // left = 0
+ // } else if (left> window.innerWidth-drag.offsetWidth) {
+ // left = window.innerWidth-drag.offsetWidth
+ // }
+ // if (top <0) {
+ // top = 0
+ // } else if (top> window.innerHeight-drag.offsetHeight) {
+ // top = window.innerHeight-drag.offsetHeight
+ // }
+
+ if (left < -drag.offsetWidth + 100) {
+ left = -drag.offsetWidth + 100
+ } else if (left > window.innerWidth - 100) {
+ left = window.innerWidth - 100
+ }
+ if (top < -drag.offsetHeight + 100) {
+ top = -drag.offsetHeight + 100
+ } else if (top > window.innerHeight - 100) {
+ top = window.innerHeight - 100
+ }
+
+ // Regain the distance of the object when moving, and solve the phenomenon of shaking when dragging
+ drag.style.left = left +'px'
+ drag.style.top = top +'px'
+ drag.style.transform =''
+ }
+
+ function pointerUpListener(e:PointerEvent) {
+ document.removeEventListener('pointermove',pointerMoveListener)
+ document.removeEventListener('pointerup',pointerUpListener)
+ // Prevent the mouse from looping after it pops up (that is, prevent the mouse from moving when it is put on)
+
+ // Fix low version ie bug
+ if (typeof drag.releaseCapture !=='undefined') {
+ drag.releaseCapture()
+ }
+
+ // Restore the hidden mask layer
+ divMask.style.width = '0';
+ divMask.style.height = '0';
+ document.body.style.userSelect =''
+ }
+ }
- getWindowRect() {
- const w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
- const h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
- const rootW = this.root.current.offsetWidth;
- const rootH = this.root.current.offsetHeight;
- const rootL = this.root.current.offsetLeft;
- const rootT = this.root.current.offsetTop;
- const top = `${(h - rootH) / 2}px`;
- const left = `${(w - rootW) / 2}px`;
- this.setState({
- width: w,
- height: h,
- rootW,
- rootH,
- rootL,
- rootT,
- top,
- left,
- });
}
componentDidMount() {
if (this.props.isDrag) {
- this.getWindowRect();
+ this.initDragDialog()
}
}
@@ -107,14 +118,17 @@ class Drag extends Component<BaseDragProps, IState> {
return (
<>
{isDrag ? (
- <div
- ref={this.root}
- className={`${styles.drag} ${className}`}
- style={{ top: this.state.top, left: this.state.left }}
- onMouseUp={this.onMouseUp.bind(this)}
- onMouseDown={this.onMouseDown.bind(this)}
- >
+ <div ref={this.root} className={styles.dragContainer} >
+ <div className={`${styles.dragDialog} ${className}`}>
{this.props.children}
+
+ <div className={styles.dragBarLeft}></div>
+ <div className={styles.dragBarRight}></div>
+ <div className={styles.dragBarTop}></div>
+ <div className={styles.dragBarBottom}></div>
+
+ <div className={styles.dragMask}></div>
+ </div>
</div>
) : (
this.props.children
diff --git a/packages/base-ui/src/Components/Drag/index.module.css b/packages/base-ui/src/Components/Drag/index.module.css
deleted file mode 100644
index f415deb807..0000000000
--- a/packages/base-ui/src/Components/Drag/index.module.css
+++ /dev/null
@@ -1,38 +0,0 @@
-.drag {
- position: fixed;
- padding: 10px;
- background-color: #fff;
- cursor: move;
- z-index: 999;
- cursor: auto;
-}
-.drag-top {
- width: 100%;
- height: 10px;
- position: absolute;
- top: 0;
- background-color: #222;
-}
-.drag-bottom {
- width: 100%;
- height: 10px;
- position: absolute;
- bottom: 0;
- background-color: #555;
-}
-.drag-left {
- width: 10px;
- height: 100%;
- position: absolute;
- left: 0;
- top: 0;
- background-color: #888;
-}
-.drag-right {
- width: 10px;
- height: 100%;
- position: absolute;
- top: 0;
- right: 0;
- background-color: #222;
-}
diff --git a/packages/base-ui/src/Components/Drag/index.module.less b/packages/base-ui/src/Components/Drag/index.module.less
index 21d2e4bc6f..4187caaa1a 100644
--- a/packages/base-ui/src/Components/Drag/index.module.less
+++ b/packages/base-ui/src/Components/Drag/index.module.less
@@ -1,46 +1,111 @@
-.drag {
- // width: fit-content;
- // height: max-content;
- position: fixed;
- padding: 10px;
- background-color: #fff;
- cursor: move;
- z-index: 999;
- // & * {
- cursor: auto;
- // }
+// .drag {
+// // width: fit-content;
+// // height: max-content;
+// position: fixed;
+// padding: 10px;
+// background-color: #fff;
+// cursor: move;
+// z-index: 1;
+// // & * {
+// cursor: auto;
+// // }
+// }
+
+// .drag-top {
+// width: 100%;
+// height: 10px;
+// position: absolute;
+// top: 0;
+// background-color: #222;
+// }
+
+// .drag-bottom {
+// width: 100%;
+// height: 10px;
+// position: absolute;
+// bottom: 0;
+// background-color: #555;
+// }
+
+// .drag-left {
+// width: 10px;
+// height: 100%;
+// position: absolute;
+// left: 0;
+// top: 0;
+// background-color: #888;
+// }
+
+// .drag-right {
+// width: 10px;
+// height: 100%;
+// position: absolute;
+// top: 0;
+// right: 0;
+// background-color: #222;
+// }
+
+
+.drag-container{
+ width:100%;
+ height:100%;
+ position:relative;
+}
+.drag-dialog{
+ width:150px;
+ height:150px;
+ position:absolute;
+ left:50px;
+ top:50px;
+ background:gray;
}
-.drag-top {
- width: 100%;
- height: 10px;
+.drag-bar-left{
+ background:transparent;
position: absolute;
- top: 0;
- background-color: #222;
+ left:0;
+ top:0;
+ bottom:0;
+ width:10px;
+ cursor: move;
+ display: block;
}
-
-.drag-bottom {
- width: 100%;
- height: 10px;
+.drag-bar-right{
+ background:transparent;
position: absolute;
- bottom: 0;
- background-color: #555;
+ right:0;
+ top:0;
+ bottom:0;
+ width:10px;
+ cursor: move;
+ display: block;
}
-
-.drag-left {
- width: 10px;
- height: 100%;
+.drag-bar-top{
+ background:transparent;
+ position: absolute;
+ left:0;
+ top:0;
+ right:0;
+ height:10px;
+ cursor: move;
+ display: block;
+}
+.drag-bar-bottom{
+ background:transparent;
position: absolute;
- left: 0;
- top: 0;
- background-color: #888;
+ left:0;
+ right:0;
+ bottom:0;
+ height:10px;
+ cursor: move;
+ display: block;
}
-.drag-right {
- width: 10px;
- height: 100%;
+/* 拖动时遮住整个弹框放置鼠标触发了里面的按钮 */
+.drag-mask{
position: absolute;
- top: 0;
- right: 0;
- background-color: #222;
+ cursor: move;
+ user-select: none;
+ left:0;
+ top:0;
}
\ No newline at end of file
diff --git a/packages/base-ui/src/Components/Menu/index.module.less b/packages/base-ui/src/Components/Menu/index.module.less
index 3c6b5c2aed..63968c719a 100644
--- a/packages/base-ui/src/Components/Menu/index.module.less
+++ b/packages/base-ui/src/Components/Menu/index.module.less
@@ -54,7 +54,7 @@
cursor: default;
margin: 0;
outline: 0;
- z-index: 100;
+ z-index: 2;
box-sizing: border-box;
user-select: none;
}
\ No newline at end of file
diff --git a/packages/base-ui/src/Components/Modal/index.module.less b/packages/base-ui/src/Components/Modal/index.module.less
index 0d2e2aea23..2ce45b93e1 100644
--- a/packages/base-ui/src/Components/Modal/index.module.less
+++ b/packages/base-ui/src/Components/Modal/index.module.less
@@ -7,14 +7,14 @@
left: 0;
top: 0;
background-color: rgba(0, 0, 0, 0.3);
- z-index: 500;
+ z-index: 4;
}
.modal-wrapper {
width: 50%;
overflow: auto;
position: fixed;
- z-index: 500;
+ z-index: 4;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
diff --git a/packages/base-ui/src/Components/ResizeDialog/index.module.less b/packages/base-ui/src/Components/ResizeDialog/index.module.less
index 0f87137ed9..b8da4e9ed1 100644
--- a/packages/base-ui/src/Components/ResizeDialog/index.module.less
+++ b/packages/base-ui/src/Components/ResizeDialog/index.module.less
@@ -2,7 +2,7 @@
.resize-dialog {
position: absolute;
- z-index: 999;
+ z-index: 5;
.dialog-move {
position: absolute;
diff --git a/packages/base-ui/src/Components/Tooltip/index.module.less b/packages/base-ui/src/Components/Tooltip/index.module.less
index c2ac89aeed..cbc89903b6 100644
--- a/packages/base-ui/src/Components/Tooltip/index.module.less
+++ b/packages/base-ui/src/Components/Tooltip/index.module.less
@@ -31,7 +31,7 @@
&:hover~.tooltip-title {
position: absolute;
display: inline-block;
- z-index: 500;
+ z-index: 4;
}
}
}
diff --git a/packages/base-ui/src/Components/Ul/index.module.less b/packages/base-ui/src/Components/Ul/index.module.less
index 536db71283..2d8500189e 100644
--- a/packages/base-ui/src/Components/Ul/index.module.less
+++ b/packages/base-ui/src/Components/Ul/index.module.less
@@ -4,7 +4,7 @@
.cols-menu-jsx {
border: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
- z-index: 100;
+ z-index: 2;
border-radius: 10px;
}
@@ -97,7 +97,7 @@
margin: 0;
outline: 0;
position: absolute;
- z-index: 100;
+ z-index: 2;
box-sizing: border-box;
user-select: none;
}
diff --git a/packages/common-plugin-collaboration/index.html b/packages/common-plugin-collaboration/index.html
index 87007e935e..7326249c9f 100644
--- a/packages/common-plugin-collaboration/index.html
+++ b/packages/common-plugin-collaboration/index.html
@@ -16,7 +16,7 @@
</head>
<body>
- <div id="app" style="position:absolute;z-index: 99999;"></div>
+ <div id="app" style="position:absolute;z-index: 1;"></div>
<div id="universheet" style="height: 30vh;"></div>
<div id="univerdoc" style="height: 30vh;"></div>
<div id="universlide" style="height: 30vh;"></div>
diff --git a/packages/sheets-plugin-formula/src/View/UI/FormulaPrompt/index.module.less b/packages/sheets-plugin-formula/src/View/UI/FormulaPrompt/index.module.less
index 45309e9d14..74352bd675 100644
--- a/packages/sheets-plugin-formula/src/View/UI/FormulaPrompt/index.module.less
+++ b/packages/sheets-plugin-formula/src/View/UI/FormulaPrompt/index.module.less
@@ -3,7 +3,7 @@
border: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
font-size: 14px;
- z-index: 1003;
+ z-index: 6;
width: 300px;
list-style: none;
margin: 0;
@@ -28,7 +28,7 @@
border: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
font-size: 14px;
- z-index: 1003;
+ z-index: 6;
width: 300px;
.help-function-title {
diff --git a/packages/sheets-plugin-import-xlsx/index.html b/packages/sheets-plugin-import-xlsx/index.html
index 1fa3bb8e2e..03e558f493 100644
--- a/packages/sheets-plugin-import-xlsx/index.html
+++ b/packages/sheets-plugin-import-xlsx/index.html
@@ -16,7 +16,7 @@
</head>
<body>
- <div id="app" style="position:absolute;z-index: 99999;"></div>
+ <div id="app" style="position:absolute;z-index: 1;"></div>
<div id="universheet" style="height: 100%;"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
diff --git a/packages/sheets-plugin-print/src/UI/PrintMode/index.module.less b/packages/sheets-plugin-print/src/UI/PrintMode/index.module.less
index 7cccd3ca65..70493843d5 100644
--- a/packages/sheets-plugin-print/src/UI/PrintMode/index.module.less
+++ b/packages/sheets-plugin-print/src/UI/PrintMode/index.module.less
@@ -6,7 +6,7 @@
position: fixed;
left: 0;
top: 0;
- z-index: 200;
+ z-index: 3;
.print-header {
height: 10vh;
@@ -182,7 +182,7 @@
// position: absolute;
// background: #fff;
// box-shadow: var(--box-shadow-base);
-// z-index: 999;
+// z-index: 5;
// .print-menu-item {
// padding: 10px;
// &:hover {
diff --git a/packages/ui-plugin-docs/src/View/Toolbar/index.less b/packages/ui-plugin-docs/src/View/Toolbar/index.less
index ce9e6d429b..04f1f4201e 100644
--- a/packages/ui-plugin-docs/src/View/Toolbar/index.less
+++ b/packages/ui-plugin-docs/src/View/Toolbar/index.less
@@ -205,7 +205,7 @@
.universheet-next-menu {
position: absolute;
- z-index: 100;
+ z-index: 2;
background-color: #fff;
box-shadow: var(--box-shadow-base);
font-size: 12px;
@@ -304,7 +304,7 @@
outline: 0;
padding: 6px 0;
position: absolute;
- z-index: 100;
+ z-index: 2;
box-sizing: border-box;
user-select: none;
}
diff --git a/packages/ui-plugin-docs/src/View/Toolbar/index.module.less b/packages/ui-plugin-docs/src/View/Toolbar/index.module.less
index 64875de941..e99f17bd85 100644
--- a/packages/ui-plugin-docs/src/View/Toolbar/index.module.less
+++ b/packages/ui-plugin-docs/src/View/Toolbar/index.module.less
@@ -151,7 +151,7 @@
position: absolute;
right: 2em;
top: 40px;
- z-index: 100;
+ z-index: 2;
&.more-show {
display: flex;
diff --git a/packages/ui-plugin-sheets/src/View/RightMenu/index.module.less b/packages/ui-plugin-sheets/src/View/RightMenu/index.module.less
index 148b7a60d6..b3ec63c15c 100644
--- a/packages/ui-plugin-sheets/src/View/RightMenu/index.module.less
+++ b/packages/ui-plugin-sheets/src/View/RightMenu/index.module.less
@@ -5,7 +5,7 @@
top: 26px;
background-color: var(--bg);
box-shadow: var(--box-shadow-base);
- z-index: 100;
+ z-index: 2;
.cols-menu {
.cols-menuitem {
diff --git a/packages/ui-plugin-sheets/src/View/SheetBar/index.module.less b/packages/ui-plugin-sheets/src/View/SheetBar/index.module.less
index 849d29b704..e4c3d287ea 100644
--- a/packages/ui-plugin-sheets/src/View/SheetBar/index.module.less
+++ b/packages/ui-plugin-sheets/src/View/SheetBar/index.module.less
@@ -184,7 +184,7 @@
background: var(--bg);
margin: 0;
outline: 0;
- z-index: 100;
+ z-index: 2;
box-sizing: border-box;
user-select: none;
box-shadow: rgb(0 0 0 / 20%) 0px 2px 4px;
diff --git a/packages/ui-plugin-sheets/src/View/Toolbar/index.less b/packages/ui-plugin-sheets/src/View/Toolbar/index.less
index ce9e6d429b..04f1f4201e 100644
--- a/packages/ui-plugin-sheets/src/View/Toolbar/index.less
+++ b/packages/ui-plugin-sheets/src/View/Toolbar/index.less
@@ -205,7 +205,7 @@
.universheet-next-menu {
position: absolute;
- z-index: 100;
+ z-index: 2;
background-color: #fff;
box-shadow: var(--box-shadow-base);
font-size: 12px;
@@ -304,7 +304,7 @@
outline: 0;
padding: 6px 0;
position: absolute;
- z-index: 100;
+ z-index: 2;
box-sizing: border-box;
user-select: none;
}
diff --git a/packages/ui-plugin-sheets/src/View/Toolbar/index.module.less b/packages/ui-plugin-sheets/src/View/Toolbar/index.module.less
index 64875de941..e99f17bd85 100644
--- a/packages/ui-plugin-sheets/src/View/Toolbar/index.module.less
+++ b/packages/ui-plugin-sheets/src/View/Toolbar/index.module.less
@@ -151,7 +151,7 @@
position: absolute;
right: 2em;
top: 40px;
- z-index: 100;
+ z-index: 2;
&.more-show {
display: flex;
diff --git a/packages/ui-plugin-slides/src/View/Toolbar/index.less b/packages/ui-plugin-slides/src/View/Toolbar/index.less
index ce9e6d429b..04f1f4201e 100644
--- a/packages/ui-plugin-slides/src/View/Toolbar/index.less
+++ b/packages/ui-plugin-slides/src/View/Toolbar/index.less
@@ -205,7 +205,7 @@
.universheet-next-menu {
position: absolute;
- z-index: 100;
+ z-index: 2;
background-color: #fff;
box-shadow: var(--box-shadow-base);
font-size: 12px;
@@ -304,7 +304,7 @@
outline: 0;
padding: 6px 0;
position: absolute;
- z-index: 100;
+ z-index: 2;
box-sizing: border-box;
user-select: none;
}
diff --git a/packages/ui-plugin-slides/src/View/Toolbar/index.module.less b/packages/ui-plugin-slides/src/View/Toolbar/index.module.less
index 64875de941..e99f17bd85 100644
--- a/packages/ui-plugin-slides/src/View/Toolbar/index.module.less
+++ b/packages/ui-plugin-slides/src/View/Toolbar/index.module.less
@@ -151,7 +151,7 @@
position: absolute;
right: 2em;
top: 40px;
- z-index: 100;
+ z-index: 2;
&.more-show {
display: flex;
diff --git a/scripts/dev.js b/scripts/dev.js
index a0f82fc4ce..d974116e83 100644
--- a/scripts/dev.js
+++ b/scripts/dev.js
@@ -4,7 +4,7 @@ const exec = childProcess.exec;
const devTarget = '@univerjs/base-sheets';
const { execFile } = require('child_process');
run();
-
+// esbuild
async function run() {
await devAll(devTarget);
}