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.

fix(build): fix vite build less can not found

Dushusir5f03626b1afe
diff --git a/.github/contributing-zh.md b/.github/contributing-zh.md
index b1aeeb5668..9f769fd362 100644
--- a/.github/contributing-zh.md
+++ b/.github/contributing-zh.md
@@ -4,25 +4,25 @@
## 工具
-- vite
-- pnpm
-- Typescript
-- preact
+- vite
+- pnpm
+- Typescript
+- preact
## 工程介绍
pnpm 管理的多包项目,
-- cli 脚手架
-- examples 案例
-- packages 插件和核心
-- patches 补丁
-- scripts 脚本
+- cli 脚手架
+- examples 案例
+- packages 插件和核心
+- patches 补丁
+- scripts 脚本
## 注意事项
-- PR 贡献请提交到 dev 分支,提到其它分支的会被驳回
-- commit 信息必须使用全英文,代码中注释和issues尽量使用英文,便于全球的开发者沟通交流
+- PR 贡献请提交到 dev 分支,提到其它分支的会被驳回
+- commit 信息必须使用全英文,代码中注释和 issues 尽量使用英文,便于全球的开发者沟通交流
## 基本命令
@@ -557,14 +557,13 @@ context.getWorkBook().setPluginMeta < IKeyType < IBandedRange >> (ALTERNATING_CO
比如`alternating colors`插件,就会加一个`alternating-colors`前缀
```css
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
.alternating-colors-panel-setting {
height: 100%;
.section {
- padding-top: @padding-base;
+ padding-top: var(--padding-base);
h3 {
- margin-bottom: @margin-base;
+ margin-bottom: var(--margin-base);
}
}
}
@@ -1181,7 +1180,7 @@ import { SheetPlugin } from '@univer/base-sheets';
// 初始化universheet
const univerSheet = UniverSheet.newInstance({
- id: 'workbook-01',
+ id: 'workbook-01',
});
// 渲染引擎
@@ -1192,10 +1191,10 @@ univerSheetUp.installPlugin(new UniverComponentSheet());
// 基础 sheets 插件
univerSheetUp.installPlugin(
- new SheetPlugin({
- container: 'universheet-demo-up',
- layout: 'auto',
- })
+ new SheetPlugin({
+ container: 'universheet-demo-up',
+ layout: 'auto',
+ })
);
// 加载筛选插件
univerSheet.installPlugin(new FilterPlugin());
@@ -1221,7 +1220,7 @@ import { SheetPlugin } from '@univer/base-sheets';
// 初始化universheet
const univerSheet = UniverSheet.newInstance({
- id: 'workbook-01',
+ id: 'workbook-01',
});
// 渲染引擎
@@ -1232,15 +1231,15 @@ univerSheetUp.installPlugin(new UniverComponentSheet());
// 基础 sheets 插件
univerSheetUp.installPlugin(
- new SheetPlugin({
- container: 'universheet-demo-up',
- layout: 'auto',
- })
+ new SheetPlugin({
+ container: 'universheet-demo-up',
+ layout: 'auto',
+ })
);
// 动态加载筛选插件
import('@univer/sheets-plugin-filter').then(({ FilterPlugin }) => {
- univerSheetUp.installPlugin(new FilterPlugin());
+ univerSheetUp.installPlugin(new FilterPlugin());
});
```
@@ -1302,4 +1301,4 @@ const universheet = univerSheetCustom({
npm run build:customd
```
-将每个插件单独打包出模块,内部自动使用`import()`动态载入插件,提升首屏加载速度,用法上和上面几乎一致,区别是需要将打包后所有文件复制到工程目录即可,其他配置一样。
\ No newline at end of file
+将每个插件单独打包出模块,内部自动使用`import()`动态载入插件,提升首屏加载速度,用法上和上面几乎一致,区别是需要将打包后所有文件复制到工程目录即可,其他配置一样。
diff --git a/packages/base-docs/src/View/UI/Common/Item/index.module.less b/packages/base-docs/src/View/UI/Common/Item/index.module.less
index 4af2d58556..0541ceaed5 100644
--- a/packages/base-docs/src/View/UI/Common/Item/index.module.less
+++ b/packages/base-docs/src/View/UI/Common/Item/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.select-item {
padding: 5px 14px 5px 25px;
display: flex;
@@ -23,7 +21,7 @@
.select-item-suffix {
margin-left: 10px;
- span[role="img"] {
+ span[role='img'] {
font-size: 24px;
}
}
@@ -31,5 +29,5 @@
.select-disabled-item {
pointer-events: none;
- color: @gray-15;
-}
\ No newline at end of file
+ color: var(--gray-15);
+}
diff --git a/packages/base-docs/src/View/UI/Common/Select/index.module.less b/packages/base-docs/src/View/UI/Common/Select/index.module.less
index 6be9bc3c43..6e0db19960 100644
--- a/packages/base-docs/src/View/UI/Common/Select/index.module.less
+++ b/packages/base-docs/src/View/UI/Common/Select/index.module.less
@@ -1,18 +1,16 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.select-component {
position: relative;
margin: 0 3px;
height: 26px;
&:hover {
- background-color: @gray-14;
+ background-color: var(--gray-14);
}
.select-button {
padding: 0px 5px;
- span[role="img"] {
+ span[role='img'] {
font-size: 24px;
}
}
@@ -23,7 +21,6 @@
}
.select-input {
-
input {
width: 38px;
height: 20px;
@@ -35,7 +32,7 @@
-webkit-appearance: none;
}
- &[type="number"] {
+ &[type='number'] {
-moz-appearance: textfield;
}
@@ -51,7 +48,6 @@
}
.select-color {
-
.cols-menu {
padding: 0;
border: none;
@@ -64,7 +60,6 @@
padding: 0;
}
}
-
}
.select-double {
@@ -93,14 +88,13 @@
&:hover {
.drop-icon {
- border-left: 1px solid @gray-6;
+ border-left: 1px solid var(--gray-6);
}
}
-
}
.select-label {
- span[role="img"] {
+ span[role='img'] {
font-size: 24px;
}
}
@@ -110,10 +104,9 @@
border-color: transparent;
height: auto;
}
-
}
.button() {
padding: 0px;
box-sizing: border-box;
-}
\ No newline at end of file
+}
diff --git a/packages/base-docs/src/View/UI/DocContainer/index.module.less b/packages/base-docs/src/View/UI/DocContainer/index.module.less
index a165caeff7..7f106a557e 100644
--- a/packages/base-docs/src/View/UI/DocContainer/index.module.less
+++ b/packages/base-docs/src/View/UI/DocContainer/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.layout-container {
// theme
background-color: var(--bg);
diff --git a/packages/base-docs/src/View/UI/InfoBar/index.less b/packages/base-docs/src/View/UI/InfoBar/index.less
index 59113a5d75..4c52e0c4c5 100644
--- a/packages/base-docs/src/View/UI/InfoBar/index.less
+++ b/packages/base-docs/src/View/UI/InfoBar/index.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.universheet-info-detail {
position: relative;
left: 0;
@@ -10,7 +8,7 @@
display: flex;
align-items: center;
background: var(--bg);
- box-shadow: 0 -1px 0 0 @gray-16;
+ box-shadow: 0 -1px 0 0 var(--gray-16);
border-bottom: 1px solid var(--border-color-base);
.universheet-info-return {
@@ -33,13 +31,13 @@
}
.universheet-info-detail-update {
- color: @gray-17;
+ color: var(--gray-17);
font-size: 12px;
margin-left: 15px;
}
.universheet-info-detail-save {
- color: @gray-7;
+ color: var(--gray-7);
font-size: 12px;
margin: 0 5px;
}
diff --git a/packages/base-docs/src/View/UI/ToolBar/index.less b/packages/base-docs/src/View/UI/ToolBar/index.less
index 3302e5aa4f..ce9e6d429b 100644
--- a/packages/base-docs/src/View/UI/ToolBar/index.less
+++ b/packages/base-docs/src/View/UI/ToolBar/index.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.universheet-wa-editor.toolbar {
height: 32px;
background: var(--bg);
@@ -207,7 +205,7 @@
.universheet-next-menu {
position: absolute;
- z-index: `getZindex('toolbar') `;
+ z-index: 100;
background-color: #fff;
box-shadow: var(--box-shadow-base);
font-size: 12px;
@@ -306,7 +304,7 @@
outline: 0;
padding: 6px 0;
position: absolute;
- z-index: ~`getZindex('toolbar') `;
+ z-index: 100;
box-sizing: border-box;
user-select: none;
}
diff --git a/packages/base-docs/src/View/UI/ToolBar/index.module.less b/packages/base-docs/src/View/UI/ToolBar/index.module.less
index 4847d87beb..502a142276 100644
--- a/packages/base-docs/src/View/UI/ToolBar/index.module.less
+++ b/packages/base-docs/src/View/UI/ToolBar/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.toolbar-warp {
height: 40px;
max-height: fit-content;
@@ -31,7 +29,7 @@
height: 40px;
position: relative;
- >div {
+ > div {
// margin-top: 7px;
height: 26px;
display: inline-block;
@@ -49,7 +47,7 @@
.select-label-string {
.drop-content {
- >div {
+ > div {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -165,7 +163,7 @@
position: absolute;
right: 2em;
top: 40px;
- z-index: `getZindex('toolbar') `;
+ z-index: 100;
&.more-show {
display: flex;
@@ -184,4 +182,4 @@
span[role='img'].univericon-nextIcon {
font-size: 12px;
-}
\ No newline at end of file
+}
diff --git a/packages/base-sheets/src/View/UI/Common/Item/index.module.less b/packages/base-sheets/src/View/UI/Common/Item/index.module.less
index 2496208844..829565629b 100644
--- a/packages/base-sheets/src/View/UI/Common/Item/index.module.less
+++ b/packages/base-sheets/src/View/UI/Common/Item/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.select-item {
padding: 0 14px 0 25px;
display: flex;
@@ -23,7 +21,7 @@
.select-item-suffix {
margin-left: 10px;
- span[role="img"] {
+ span[role='img'] {
font-size: 24px;
}
}
@@ -31,5 +29,5 @@
.select-disabled-item {
pointer-events: none;
- color: @gray-15;
-}
\ No newline at end of file
+ color: var(--gray-15);
+}
diff --git a/packages/base-sheets/src/View/UI/Common/Select/index.module.less b/packages/base-sheets/src/View/UI/Common/Select/index.module.less
index 6be9bc3c43..6e0db19960 100644
--- a/packages/base-sheets/src/View/UI/Common/Select/index.module.less
+++ b/packages/base-sheets/src/View/UI/Common/Select/index.module.less
@@ -1,18 +1,16 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.select-component {
position: relative;
margin: 0 3px;
height: 26px;
&:hover {
- background-color: @gray-14;
+ background-color: var(--gray-14);
}
.select-button {
padding: 0px 5px;
- span[role="img"] {
+ span[role='img'] {
font-size: 24px;
}
}
@@ -23,7 +21,6 @@
}
.select-input {
-
input {
width: 38px;
height: 20px;
@@ -35,7 +32,7 @@
-webkit-appearance: none;
}
- &[type="number"] {
+ &[type='number'] {
-moz-appearance: textfield;
}
@@ -51,7 +48,6 @@
}
.select-color {
-
.cols-menu {
padding: 0;
border: none;
@@ -64,7 +60,6 @@
padding: 0;
}
}
-
}
.select-double {
@@ -93,14 +88,13 @@
&:hover {
.drop-icon {
- border-left: 1px solid @gray-6;
+ border-left: 1px solid var(--gray-6);
}
}
-
}
.select-label {
- span[role="img"] {
+ span[role='img'] {
font-size: 24px;
}
}
@@ -110,10 +104,9 @@
border-color: transparent;
height: auto;
}
-
}
.button() {
padding: 0px;
box-sizing: border-box;
-}
\ No newline at end of file
+}
diff --git a/packages/base-sheets/src/View/UI/CountBar/index.module.less b/packages/base-sheets/src/View/UI/CountBar/index.module.less
index 52261afe93..27d3e523f3 100644
--- a/packages/base-sheets/src/View/UI/CountBar/index.module.less
+++ b/packages/base-sheets/src/View/UI/CountBar/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.count-bar {
display: flex;
flex-direction: row-reverse;
diff --git a/packages/base-sheets/src/View/UI/FormulaBar/index.module.less b/packages/base-sheets/src/View/UI/FormulaBar/index.module.less
index 36bea5f26f..b258b6fd97 100644
--- a/packages/base-sheets/src/View/UI/FormulaBar/index.module.less
+++ b/packages/base-sheets/src/View/UI/FormulaBar/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.formula-box {
display: flex;
background: var(--bg);
@@ -26,7 +24,7 @@
.formula-icon {
display: flex;
- border: 1px solid @gray-15;
+ border: 1px solid var(--gray-15);
border-top: none;
border-bottom: none;
@@ -35,7 +33,7 @@
}
.formula-grey {
- color: @gray-5;
+ color: var(--gray-5);
}
.formula-black {
diff --git a/packages/base-sheets/src/View/UI/InfoBar/index.module.less b/packages/base-sheets/src/View/UI/InfoBar/index.module.less
index f22fac8971..bb3e266e29 100644
--- a/packages/base-sheets/src/View/UI/InfoBar/index.module.less
+++ b/packages/base-sheets/src/View/UI/InfoBar/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.info-detail {
position: relative;
left: 0;
@@ -10,7 +8,7 @@
display: flex;
align-items: center;
background: var(--bg);
- box-shadow: 0 -1px 0 0 @gray-16;
+ box-shadow: 0 -1px 0 0 var(--gray-16);
border-bottom: 1px solid var(--border-color-base);
.info-return {
@@ -33,13 +31,13 @@
}
.info-detail-update {
- color: @gray-17;
+ color: var(--gray-17);
font-size: 12px;
margin-left: 15px;
}
.info-detail-save {
- color: @gray-7;
+ color: var(--gray-7);
font-size: 12px;
margin: 0 5px;
}
diff --git a/packages/base-sheets/src/View/UI/RightMenu/index.module.less b/packages/base-sheets/src/View/UI/RightMenu/index.module.less
index 3c2c558495..148b7a60d6 100644
--- a/packages/base-sheets/src/View/UI/RightMenu/index.module.less
+++ b/packages/base-sheets/src/View/UI/RightMenu/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.context-menu {
position: fixed;
@@ -7,8 +5,7 @@
top: 26px;
background-color: var(--bg);
box-shadow: var(--box-shadow-base);
- z-index: `getZindex('rightMenu') `;
-
+ z-index: 100;
.cols-menu {
.cols-menuitem {
@@ -50,4 +47,4 @@
transform: translateY(-50%);
}
}
-}
\ No newline at end of file
+}
diff --git a/packages/base-sheets/src/View/UI/SheetBar/index.module.less b/packages/base-sheets/src/View/UI/SheetBar/index.module.less
index 15d289c5c6..b4c9d9b8e9 100644
--- a/packages/base-sheets/src/View/UI/SheetBar/index.module.less
+++ b/packages/base-sheets/src/View/UI/SheetBar/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.sheet-bar {
position: relative;
height: 31px;
@@ -31,156 +29,6 @@
padding-left: 5px;
}
-// .sheet-bar {
-// background-color: var(--bg);
-// color: var(--text-color);
-// height: 31px;
-// padding-left: 44px;
-// display: flex;
-// // width: 100%;
-// position: relative;
-
-// button {
-// &:hover {
-// background-color: @gray-16;
-// }
-// }
-
-// .sheet-icon {
-// display: flex;
-// align-items: center;
-
-// .btn {
-// font-size: 21px;
-// margin-right: 3px;
-// display: flex;
-// align-items: center;
-// padding: 0 2px;
-// }
-
-// .sheet-menu {
-// position: relative;
-
-// ul {
-// font-size: 13px;
-// overflow: auto;
-// max-height: 20em;
-// }
-// }
-// }
-
-// .sheet-bar-content {
-// display: flex;
-// width: 700px;
-// position: relative;
-
-// .sheet-container {
-// max-width: 50%;
-// position: relative;
-// overflow: hidden;
-
-// .sheet-fade {
-// position: absolute;
-// display: flex;
-// top: 0;
-// width: 6px;
-// height: 100%;
-// z-index: ~`getZindex('bottom') `;
-
-// div {
-// background-color: @gray-5;
-// width: 2px;
-// height: 100%;
-// }
-
-// .sheet-fade1 {
-// opacity: 0.82;
-// }
-
-// .sheet-fade2 {
-// opacity: 0.62;
-// }
-
-// .sheet-fade3 {
-// opacity: 0.4;
-// }
-// }
-
-// .sheet-left-bar {
-// left: 0;
-// }
-
-// .sheet-right-bar {
-// right: 0;
-// }
-
-// .sheet-content {
-// position: relative;
-// max-width: 500px;
-// display: flex;
-
-// .sheet-content-item {
-// display: flex;
-// align-items: center;
-// border-right: 1px solid @gray-15;
-// border-left: 1px solid @gray-15;
-// margin-right: -1px;
-// cursor: pointer;
-// padding: 0 5px;
-// height: 29px;
-// line-height: 29px;
-// flex-shrink: 0;
-// font-size: 13px;
-
-// span {
-// flex-shrink: 0;
-// }
-
-// &:hover {
-// background-color: @gray-16;
-// }
-
-// &-selected {
-// background-color: @gray-16;
-// }
-// }
-
-// button {
-// padding-left: 5px;
-// }
-
-// span[role='img'] {
-// margin-left: 5px;
-// color: #a1a1a1;
-
-// &:hover {
-// color: #2a2a2a;
-// }
-// }
-// }
-// }
-
-// .cols-menu {
-// .cols-menuitem-content {
-// padding: 6px 14px 6px 20px;
-// }
-// }
-// }
-
-// .sheet-scroll {
-// button {
-// margin-left: 3px;
-// height: 80%;
-// padding: 0 3px;
-// }
-
-// display: flex;
-// align-items: center;
-// text-align: center;
-// background-color: transparent;
-// }
-// }
-
.slide-tab-bar {
user-select: none;
max-width: 100%;
diff --git a/packages/base-sheets/src/View/UI/SheetContainer/index.module.less b/packages/base-sheets/src/View/UI/SheetContainer/index.module.less
index a165caeff7..7f106a557e 100644
--- a/packages/base-sheets/src/View/UI/SheetContainer/index.module.less
+++ b/packages/base-sheets/src/View/UI/SheetContainer/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.layout-container {
// theme
background-color: var(--bg);
diff --git a/packages/base-sheets/src/View/UI/ToolBar/index.less b/packages/base-sheets/src/View/UI/ToolBar/index.less
index 3302e5aa4f..ce9e6d429b 100644
--- a/packages/base-sheets/src/View/UI/ToolBar/index.less
+++ b/packages/base-sheets/src/View/UI/ToolBar/index.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.universheet-wa-editor.toolbar {
height: 32px;
background: var(--bg);
@@ -207,7 +205,7 @@
.universheet-next-menu {
position: absolute;
- z-index: `getZindex('toolbar') `;
+ z-index: 100;
background-color: #fff;
box-shadow: var(--box-shadow-base);
font-size: 12px;
@@ -306,7 +304,7 @@
outline: 0;
padding: 6px 0;
position: absolute;
- z-index: ~`getZindex('toolbar') `;
+ z-index: 100;
box-sizing: border-box;
user-select: none;
}
diff --git a/packages/base-sheets/src/View/UI/ToolBar/index.module.less b/packages/base-sheets/src/View/UI/ToolBar/index.module.less
index d79a2907af..4d40cd3f93 100644
--- a/packages/base-sheets/src/View/UI/ToolBar/index.module.less
+++ b/packages/base-sheets/src/View/UI/ToolBar/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.toolbar-warp {
max-height: fit-content;
width: 100%;
@@ -32,7 +30,7 @@
display: flex;
align-items: center;
- >div {
+ > div {
height: 26px;
display: inline-block;
vertical-align: middle;
@@ -49,7 +47,7 @@
.select-label-string {
.drop-content {
- >div {
+ > div {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -103,7 +101,7 @@
position: absolute;
right: 2em;
top: 40px;
- z-index: `getZindex('toolbar') `;
+ z-index: 100;
&.more-show {
display: flex;
@@ -122,4 +120,4 @@
span[role='img'].univericon-nextIcon {
font-size: 12px;
-}
\ No newline at end of file
+}
diff --git a/packages/base-sheets/src/main.tsx b/packages/base-sheets/src/main.tsx
index 4a62bd815c..514174777b 100644
--- a/packages/base-sheets/src/main.tsx
+++ b/packages/base-sheets/src/main.tsx
@@ -5,6 +5,7 @@ import { UniverComponentSheet } from '@univer/style-universheet';
import { ClipboardPlugin } from '@univer/sheets-plugin-clipboard';
import { NumfmtPlugin } from '@univer/sheets-plugin-numfmt';
import { DEFAULT_FORMULA_DATA, FormulaPlugin } from '@univer/sheets-plugin-formula';
+import { SheetPlugin } from './SheetPlugin';
const uiDefaultConfigUp = {
container: 'universheet-demo-up',
@@ -27,13 +28,13 @@ univerSheetUp.installPlugin(new UniverComponentSheet());
FormulaPlugin.create(DEFAULT_FORMULA_DATA).installTo(univerSheetUp);
// init spreadsheet plugin first
-import('./SheetPlugin').then(({ SheetPlugin }) => {
- let sheetPlugin = new SheetPlugin(uiDefaultConfigUp);
- let clipboardPlugin = new ClipboardPlugin();
- // let numfmtPlugin = new NumfmtPlugin();
- univerSheetUp.installPlugin(sheetPlugin);
- univerSheetUp.installPlugin(clipboardPlugin);
- // univerSheetUp.installPlugin(new FindPlugin());
- univerSheetUp.installPlugin(new NumfmtPlugin());
- (window as any).sheetPlugin = sheetPlugin;
-});
+// import('./SheetPlugin').then(({ SheetPlugin }) => {
+let sheetPlugin = new SheetPlugin(uiDefaultConfigUp);
+let clipboardPlugin = new ClipboardPlugin();
+// let numfmtPlugin = new NumfmtPlugin();
+univerSheetUp.installPlugin(sheetPlugin);
+univerSheetUp.installPlugin(clipboardPlugin);
+// univerSheetUp.installPlugin(new FindPlugin());
+univerSheetUp.installPlugin(new NumfmtPlugin());
+(window as any).sheetPlugin = sheetPlugin;
+// });
diff --git a/packages/base-sheets/vite.config.ts b/packages/base-sheets/vite.config.ts
index e4fa5e8dca..efacc213a5 100644
--- a/packages/base-sheets/vite.config.ts
+++ b/packages/base-sheets/vite.config.ts
@@ -31,6 +31,14 @@ export default defineConfig({
},
},
},
+ // resolve: {
+ // alias: [
+ // {
+ // find: '@',
+ // replacement: path.resolve(__dirname, './node_modules')
+ // }
+ // ],
+ // },
server: {
port: 3103,
open: true, // Automatically open the app in the browser on server start.
diff --git a/packages/base-slides/src/View/UI/Common/Item/index.module.less b/packages/base-slides/src/View/UI/Common/Item/index.module.less
index 4af2d58556..0541ceaed5 100644
--- a/packages/base-slides/src/View/UI/Common/Item/index.module.less
+++ b/packages/base-slides/src/View/UI/Common/Item/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.select-item {
padding: 5px 14px 5px 25px;
display: flex;
@@ -23,7 +21,7 @@
.select-item-suffix {
margin-left: 10px;
- span[role="img"] {
+ span[role='img'] {
font-size: 24px;
}
}
@@ -31,5 +29,5 @@
.select-disabled-item {
pointer-events: none;
- color: @gray-15;
-}
\ No newline at end of file
+ color: var(--gray-15);
+}
diff --git a/packages/base-slides/src/View/UI/Common/Select/index.module.less b/packages/base-slides/src/View/UI/Common/Select/index.module.less
index 6be9bc3c43..6e0db19960 100644
--- a/packages/base-slides/src/View/UI/Common/Select/index.module.less
+++ b/packages/base-slides/src/View/UI/Common/Select/index.module.less
@@ -1,18 +1,16 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.select-component {
position: relative;
margin: 0 3px;
height: 26px;
&:hover {
- background-color: @gray-14;
+ background-color: var(--gray-14);
}
.select-button {
padding: 0px 5px;
- span[role="img"] {
+ span[role='img'] {
font-size: 24px;
}
}
@@ -23,7 +21,6 @@
}
.select-input {
-
input {
width: 38px;
height: 20px;
@@ -35,7 +32,7 @@
-webkit-appearance: none;
}
- &[type="number"] {
+ &[type='number'] {
-moz-appearance: textfield;
}
@@ -51,7 +48,6 @@
}
.select-color {
-
.cols-menu {
padding: 0;
border: none;
@@ -64,7 +60,6 @@
padding: 0;
}
}
-
}
.select-double {
@@ -93,14 +88,13 @@
&:hover {
.drop-icon {
- border-left: 1px solid @gray-6;
+ border-left: 1px solid var(--gray-6);
}
}
-
}
.select-label {
- span[role="img"] {
+ span[role='img'] {
font-size: 24px;
}
}
@@ -110,10 +104,9 @@
border-color: transparent;
height: auto;
}
-
}
.button() {
padding: 0px;
box-sizing: border-box;
-}
\ No newline at end of file
+}
diff --git a/packages/base-slides/src/View/UI/InfoBar/index.less b/packages/base-slides/src/View/UI/InfoBar/index.less
index 59113a5d75..4c52e0c4c5 100644
--- a/packages/base-slides/src/View/UI/InfoBar/index.less
+++ b/packages/base-slides/src/View/UI/InfoBar/index.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.universheet-info-detail {
position: relative;
left: 0;
@@ -10,7 +8,7 @@
display: flex;
align-items: center;
background: var(--bg);
- box-shadow: 0 -1px 0 0 @gray-16;
+ box-shadow: 0 -1px 0 0 var(--gray-16);
border-bottom: 1px solid var(--border-color-base);
.universheet-info-return {
@@ -33,13 +31,13 @@
}
.universheet-info-detail-update {
- color: @gray-17;
+ color: var(--gray-17);
font-size: 12px;
margin-left: 15px;
}
.universheet-info-detail-save {
- color: @gray-7;
+ color: var(--gray-7);
font-size: 12px;
margin: 0 5px;
}
diff --git a/packages/base-slides/src/View/UI/SlideContainer/index.module.less b/packages/base-slides/src/View/UI/SlideContainer/index.module.less
index a165caeff7..7f106a557e 100644
--- a/packages/base-slides/src/View/UI/SlideContainer/index.module.less
+++ b/packages/base-slides/src/View/UI/SlideContainer/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.layout-container {
// theme
background-color: var(--bg);
diff --git a/packages/base-slides/src/View/UI/ToolBar/index.less b/packages/base-slides/src/View/UI/ToolBar/index.less
index 3302e5aa4f..ce9e6d429b 100644
--- a/packages/base-slides/src/View/UI/ToolBar/index.less
+++ b/packages/base-slides/src/View/UI/ToolBar/index.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.universheet-wa-editor.toolbar {
height: 32px;
background: var(--bg);
@@ -207,7 +205,7 @@
.universheet-next-menu {
position: absolute;
- z-index: `getZindex('toolbar') `;
+ z-index: 100;
background-color: #fff;
box-shadow: var(--box-shadow-base);
font-size: 12px;
@@ -306,7 +304,7 @@
outline: 0;
padding: 6px 0;
position: absolute;
- z-index: ~`getZindex('toolbar') `;
+ z-index: 100;
box-sizing: border-box;
user-select: none;
}
diff --git a/packages/base-slides/src/View/UI/ToolBar/index.module.less b/packages/base-slides/src/View/UI/ToolBar/index.module.less
index 4847d87beb..502a142276 100644
--- a/packages/base-slides/src/View/UI/ToolBar/index.module.less
+++ b/packages/base-slides/src/View/UI/ToolBar/index.module.less
@@ -1,5 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.toolbar-warp {
height: 40px;
max-height: fit-content;
@@ -31,7 +29,7 @@
height: 40px;
position: relative;
- >div {
+ > div {
// margin-top: 7px;
height: 26px;
display: inline-block;
@@ -49,7 +47,7 @@
.select-label-string {
.drop-content {
- >div {
+ > div {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -165,7 +163,7 @@
position: absolute;
right: 2em;
top: 40px;
- z-index: `getZindex('toolbar') `;
+ z-index: 100;
&.more-show {
display: flex;
@@ -184,4 +182,4 @@
span[role='img'].univericon-nextIcon {
font-size: 12px;
-}
\ No newline at end of file
+}
diff --git a/packages/sheets-plugin-alternating-colors/src/UI/AlternatingColorsSide/index.module.less b/packages/sheets-plugin-alternating-colors/src/UI/AlternatingColorsSide/index.module.less
index f0a2e88661..755edead7e 100644
--- a/packages/sheets-plugin-alternating-colors/src/UI/AlternatingColorsSide/index.module.less
+++ b/packages/sheets-plugin-alternating-colors/src/UI/AlternatingColorsSide/index.module.less
@@ -1,14 +1,13 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
.alternating-colors-side {
.section {
- padding-top: @padding-base;
+ padding-top: var(--padding-base);
h3 {
- margin-bottom: @margin-base;
+ margin-bottom: var(--margin-base);
}
}
.panel-body {
- padding: 0 @padding-base;
+ padding: 0 var(--padding-base);
position: relative;
.panel-body-inner {
@@ -18,7 +17,7 @@
.styles-checkbox {
display: flex;
> label {
- margin: 0 @margin-base @margin-base 0;
+ margin: 0 var(--margin-base) var(--margin-base) 0;
}
}
@@ -33,7 +32,7 @@
border: 1px solid var(--border-color-base);
border-radius: var(--border-radius-base);
.custom-style-add {
- padding: @padding-base;
+ padding: var(--padding-base);
display: flex;
justify-content: center;
align-items: center;
@@ -67,7 +66,7 @@
width: 100%;
line-height: 1em;
text-align: center;
- color: @gray-8;
+ color: var(--gray-8);
}
}
}
@@ -94,7 +93,7 @@
.color-select-button {
&:hover {
cursor: pointer;
- background-color: @gray-4;
+ background-color: var(--gray-4);
}
}
}
@@ -114,11 +113,11 @@
display: flex;
justify-content: center;
border-top: 1px solid var(--border-color-base);
- padding: 0.9em @padding-base;
- margin: 0.9em @padding-base;
+ padding: 0.9em var(--padding-base);
+ margin: 0.9em var(--padding-base);
&:hover {
cursor: pointer;
- background-color: @gray-4;
+ background-color: var(--gray-4);
}
.icon-container {
font-size: 1.6em;
diff --git a/packages/sheets-plugin-formula/src/View/UI/SearchFormulaModal/index.module.less b/packages/sheets-plugin-formula/src/View/UI/SearchFormulaModal/index.module.less
index 0ec95bdb6d..22176c98b3 100644
--- a/packages/sheets-plugin-formula/src/View/UI/SearchFormulaModal/index.module.less
+++ b/packages/sheets-plugin-formula/src/View/UI/SearchFormulaModal/index.module.less
@@ -1,4 +1,3 @@
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
.function-modal {
font-size: 14px;
@@ -26,8 +25,8 @@
margin-bottom: 0;
}
.function-selector {
- border: 1px solid @border-color-base;
- border-radius: @border-radius-base;
+ border: 1px solid var(--border-color-base);
+ border-radius: var(--border-radius-base);
.select-button {
margin: 0;
}
diff --git a/packages/sheets-plugin-numfmt/src/View/UI/index.module.less b/packages/sheets-plugin-numfmt/src/View/UI/index.module.less
index 303cc16587..f7cf3917f0 100644
--- a/packages/sheets-plugin-numfmt/src/View/UI/index.module.less
+++ b/packages/sheets-plugin-numfmt/src/View/UI/index.module.less
@@ -42,7 +42,7 @@
.custom-format-more {
.select-item-suffix {
- span[role="img"] {
+ span[role='img'] {
font-size: 16px;
}
}
@@ -53,4 +53,4 @@
}
}
}
-}
\ No newline at end of file
+}
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 cce896302c..7cccd3ca65 100644
--- a/packages/sheets-plugin-print/src/UI/PrintMode/index.module.less
+++ b/packages/sheets-plugin-print/src/UI/PrintMode/index.module.less
@@ -1,15 +1,12 @@
-// @import '../../assets/css/skin/base.module.less';
-@import '@univer/style-universheet/assets/css/skin/base.module.less';
-
.print-mode {
width: 100vw !important;
height: 100vh !important;
- background-color: @gray-14;
+ background-color: var(--gray-14);
// background-color: #fff;
position: fixed;
left: 0;
top: 0;
- z-index: `getZindex('tooltip') `;
+ z-index: 200;
.print-header {
height: 10vh;
diff --git a/packages/style-universheet/src/Components/ColorPicker/index.module.less b/packages/style-universheet/src/Components/ColorPicker/index.module.less
index 5819eb96c1..7481d42c12 100644
--- a/packages/style-universheet/src/Components/ColorPicker/index.module.less
+++ b/packages/style-universheet/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: `getZindex('modal') `;
+ z-index: 500;
height: fit-content;
}
diff --git "a/packages/style-universheet/src/Components/ColorPicker/index.module.less\345\211\257\346\234\254" "b/packages/style-universheet/src/Components/ColorPicker/index.module.less\345\211\257\346\234\254"
deleted file mode 100644
index b6fc7220cb..0000000000
--- "a/packages/style-universheet/src/Components/ColorPicker/index.module.less\345\211\257\346\234\254"
+++ /dev/null
@@ -1,77 +0,0 @@
-.color-picker-outter {
- width: fit-content;
- display: block;
- background-color: var(--bg);
- padding: 10px;
- // padding-bottom: 0;
- border-radius: 10px;
- position: fixed;
- // left: 0; // set outside
- box-shadow: var(--box-shadow-base);
- z-index: `getZindex('modal') `;
- height: fit-content;
-}
-
-.color-picker {
- width: fit-content;
- display: flex;
-
- .picker {
- width: fit-content;
-
- .picker-swatches {
- display: flex;
- flex-wrap: nowrap;
- margin-bottom: 10px;
-
- .picker-swatches-item {
- display: flex;
- flex-direction: column;
-
- .picker-swatch {
- min-width: 20px;
- width: 20px;
- height: 20px;
- margin: 2px;
- border: 1px solid #eee;
- padding: 0;
- border-radius: 50%;
- cursor: pointer;
- outline: none;
- // overflow: hidden;
-
- .picker-swatch-btn {
- width: 100%;
- height: 100%;
- border-radius: 50%;
- border: none;
- }
- }
- }
- }
-
- button {
- display: inline-block;
- font-size: var(--font-size);
- padding: 0 5px;
- }
- }
-
- .colorful-warp {
- margin-left: 10px;
-
- button {
- font-size: var(--font-size);
- margin: 10px 10px 10px 0;
- }
- }
-
- .color-btn {
- border: 1px solid var(--border-color-base);
- }
-}
-
-.color-picker-slot {
- margin: 5px;
- outline: 1px solid;
-}
\ No newline at end of file
diff --git a/packages/style-universheet/src/Components/Menu/index.module.less b/packages/style-universheet/src/Components/Menu/index.module.less
index c3820e7765..b2b52e38b4 100644
--- a/packages/style-universheet/src/Components/Menu/index.module.less
+++ b/packages/style-universheet/src/Components/Menu/index.module.less
@@ -50,7 +50,7 @@
cursor: default;
margin: 0;
outline: 0;
- z-index: ~`getZindex('toolbar') `;
+ z-index: 100;
box-sizing: border-box;
user-select: none;
-}
\ No newline at end of file
+}
diff --git a/packages/style-universheet/src/Components/Modal/index.module.less b/packages/style-universheet/src/Components/Modal/index.module.less
index ab7f151966..aaaf2fc3a2 100644
--- a/packages/style-universheet/src/Components/Modal/index.module.less
+++ b/packages/style-universheet/src/Components/Modal/index.module.less
@@ -7,14 +7,14 @@
left: 0;
top: 0;
background-color: rgba(0, 0, 0, 0.3);
- z-index: `getZindex('modal') `;
+ z-index: 500;
}
.modal-wrapper {
width: 50%;
overflow: auto;
position: fixed;
- z-index: `getZindex('modal') `;
+ z-index: 500;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
diff --git a/packages/style-universheet/src/Components/Tooltip/index.module.less b/packages/style-universheet/src/Components/Tooltip/index.module.less
index bf694f73b2..40b3006c57 100644
--- a/packages/style-universheet/src/Components/Tooltip/index.module.less
+++ b/packages/style-universheet/src/Components/Tooltip/index.module.less
@@ -30,7 +30,7 @@
&:hover~.tooltip-title {
position: absolute;
display: inline-block;
- z-index: `getZindex('tooltip') `;
+ z-index: 500;
}
}
}
@@ -89,68 +89,4 @@
transform: translateY(-50%);
pointer-events: none;
}
-}
-
-// @import '../../assets/css/triangle.less';
-// @import '../../assets/css/skin/base.module.less';
-
-// @Tooltip-bg: #000000bf;
-
-// .tooltip-title {
-// white-space: nowrap;
-// background-color: @Tooltip-bg;
-// color: #fff;
-// padding: 5px 10px;
-// box-shadow: var(--box-shadow-base);
-// border-radius: @border-radius-base;
-// font-size: @font-size-base;
-// line-height: 1.5;
-// z-index: `getZindex('tooltip') `;
-// position: fixed;
-// }
-
-// .top {
-// left: 50%;
-// transform: translateX(-50%);
-// & .tooltipTriangle {
-// .triangleDown(@Tooltip-bg,5px);
-// bottom: -10px;
-// left: 50%;
-// transform: translateX(-50%);
-// }
-// }
-// .right {
-// top: 50%;
-// transform: translatey(-50%);
-// & .tooltipTriangle {
-// .triangleRight(@Tooltip-bg,5px);
-// right: -10px;
-// top: 50%;
-// transform: translateY(-50%);
-// }
-// }
-// .bottom {
-// left: 50%;
-// transform: translateX(-50%);
-// & .tooltipTriangle {
-// .triangleUp(@Tooltip-bg,5px);
-// top: -10px;
-// left: 50%;
-// transform: translateX(-50%);
-// }
-// }
-// .left {
-// top: 50%;
-// transform: translatey(-50%);
-// & .tooltipTriangle {
-// .triangleLeft(@Tooltip-bg,5px);
-// left: -10px;
-// top: 50%;
-// transform: translateY(-50%);
-// }
-// }
-
-// .tool {
-// transition: all 0.3s;
-// opacity: 0;
-// }
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/packages/style-universheet/src/Components/Ul/index.module.less b/packages/style-universheet/src/Components/Ul/index.module.less
index 00a009b7cb..c78328bb60 100644
--- a/packages/style-universheet/src/Components/Ul/index.module.less
+++ b/packages/style-universheet/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: ~`getZindex('toolbar') `;
+ z-index: 100;
border-radius: 10px;
}
@@ -57,7 +57,7 @@
transform: scale(1.5);
}
- >div {
+ > div {
flex: 1;
display: flex;
justify-content: space-between;
@@ -97,7 +97,7 @@
margin: 0;
outline: 0;
position: absolute;
- z-index: ~`getZindex('toolbar') `;
+ z-index: 100;
box-sizing: border-box;
user-select: none;
}
diff --git a/packages/style-universheet/src/StyleUniver.ts b/packages/style-universheet/src/StyleUniver.ts
index 14b892b4f7..71cd29ead0 100644
--- a/packages/style-universheet/src/StyleUniver.ts
+++ b/packages/style-universheet/src/StyleUniver.ts
@@ -9,7 +9,7 @@ import {
FunctionComponent,
PropsFrom,
} from '@univer/base-component';
-import { SheetContext, IOCContainer, Plugin } from '@univer/core';
+import { Plugin } from '@univer/core';
// import { UniverSingleButton } from './Components';
import { UniverButton } from './Components/Button/Button';
import { UniverBorderDashDot } from './Components/CanvasIcon/BorderLine/BorderDashDot';
@@ -135,10 +135,6 @@ export class UniverComponentSheet extends Plugin implements BaseComponentSheet {
super('ComponentSheet');
}
- onMapping(container: IOCContainer): void {}
-
- onMounted(context: SheetContext): void {}
-
getComponentRender(): BaseComponentRender {
return new UniverComponentRender(this.getComponentFactory());
}
diff --git a/packages/style-universheet/src/assets/css/skin/base.module.less b/packages/style-universheet/src/assets/css/skin/base.module.less
index 6e9cf05d6d..f3449d2e53 100644
--- a/packages/style-universheet/src/assets/css/skin/base.module.less
+++ b/packages/style-universheet/src/assets/css/skin/base.module.less
@@ -39,6 +39,7 @@
@gray-16: #ececec;
@gray-17: #cbcbcb;
+
// TODO remove
@primary-color: #0188fb; // 全局主色 //也用作info-color信息色
@primary-color-hover: #5391ff; // 全局主色 hover
@@ -53,17 +54,18 @@
@border-color-base-hover: @gray-6; // 边框 hover高亮色
@box-shadow-base: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05); // 浮层阴影
-// manage z-index
-.generateZIndex() {
- @functions: ~`(function() {
- let indexList=new Map([['toolbar', 100], ['tooltip', 200], ['bottom', 10], ['rightMenu', 100], ['modal', 500]]);
- this.getZindex=function(param) {
- return indexList.get(param);
- }
- }
+// // manage z-index
+// .generateZIndex() {
+// @functions: ~`(function() {
+// let indexList=new Map([['toolbar', 100], ['tooltip', 200], ['bottom', 10], ['rightMenu', 100], ['modal', 500]]);
+
+// this.getZindex=function(param) {
+// return indexList.get(param);
+// }
+// }
- )()`;
-}
+// )()`;
+// }
-.generateZIndex();
\ No newline at end of file
+// .generateZIndex();
\ No newline at end of file
diff --git a/packages/style-universheet/src/assets/css/skin/dark.module.less b/packages/style-universheet/src/assets/css/skin/dark.module.less
index 5f0dd00474..7a83f1a3a1 100644
--- a/packages/style-universheet/src/assets/css/skin/dark.module.less
+++ b/packages/style-universheet/src/assets/css/skin/dark.module.less
@@ -5,7 +5,7 @@
@primary-color-hover: #5391ff; // 全局主色 hover
@link-color: #1890ff; // 链接色
@bg: #0d1117; //Basics background color for most component@ // Reference from github dark mode
-@bg-hover:#161b22;
+@bg-hover: #161b22;
@heading-color: rgba(255, 255, 255, 0.85); // 标题色
@text-color: rgb(139, 148, 158); // main text color // Reference from github dark mode
@text-color-secondary: rgba(255, 255, 255, 0.45); // 次文本色
@@ -16,6 +16,40 @@
@box-shadow-base: 0 3px 6px -4px rgba(255, 255, 255, 0.12), 0 6px 16px 0 rgba(255, 255, 255, 0.08), 0 9px 28px 8px rgba(255, 255, 255, 0.05); // 浮层阴影
:export {
+ --success-color: @success-color;
+ --warning-color: @warning-color;
+ --error-color: @error-color;
+
+ --border-radius-base: @border-radius-base;
+ --border-width-base: @border-width-base;
+ --border-style-base: @border-style-base;
+ --line-height-base: @line-height-base;
+ --font-weight: @font-weight;
+ --font-size-base: @font-size-base;
+ --font-size-lg: @font-size-lg;
+ --font-size-sm: @font-size-sm;
+
+ --padding-base: @padding-base;
+ --margin-base: @margin-base;
+
+ --gray-1: @gray-1;
+ --gray-2: @gray-2;
+ --gray-3: @gray-3;
+ --gray-4: @gray-4;
+ --gray-5: @gray-5;
+ --gray-6: @gray-6;
+ --gray-7: @gray-7;
+ --gray-8: @gray-8;
+ --gray-9: @gray-9;
+ --gray-10: @gray-10;
+ --gray-11: @gray-11;
+ --gray-12: @gray-12;
+ --gray-13: @gray-13;
+ --gray-14: @gray-14;
+ --gray-15: @gray-15;
+ --gray-16: @gray-16;
+ --gray-17: @gray-17;
+
--primary-color: @primary-color;
--primary-color-hover: @primary-color-hover;
--link-color: @link-color;
diff --git a/packages/style-universheet/src/assets/css/skin/default.module.less b/packages/style-universheet/src/assets/css/skin/default.module.less
index 42b28f34e1..d5384c644a 100644
--- a/packages/style-universheet/src/assets/css/skin/default.module.less
+++ b/packages/style-universheet/src/assets/css/skin/default.module.less
@@ -5,7 +5,7 @@
@primary-color-hover: #5391ff; // 全局主色 hover
@link-color: #1890ff; // 链接色
@bg: #fff; //Basics background color for most Components
-@bg-hover:#efefef;
+@bg-hover: #efefef;
@heading-color: @gray-10; // 标题色
@text-color: #333; // 主文本色
@text-color-secondary: @gray-7; // 次文本色
@@ -16,6 +16,40 @@
@box-shadow-base: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05); // 浮层阴影
:export {
+ --success-color: @success-color;
+ --warning-color: @warning-color;
+ --error-color: @error-color;
+
+ --border-radius-base: @border-radius-base;
+ --border-width-base: @border-width-base;
+ --border-style-base: @border-style-base;
+ --line-height-base: @line-height-base;
+ --font-weight: @font-weight;
+ --font-size-base: @font-size-base;
+ --font-size-lg: @font-size-lg;
+ --font-size-sm: @font-size-sm;
+
+ --padding-base: @padding-base;
+ --margin-base: @margin-base;
+
+ --gray-1: @gray-1;
+ --gray-2: @gray-2;
+ --gray-3: @gray-3;
+ --gray-4: @gray-4;
+ --gray-5: @gray-5;
+ --gray-6: @gray-6;
+ --gray-7: @gray-7;
+ --gray-8: @gray-8;
+ --gray-9: @gray-9;
+ --gray-10: @gray-10;
+ --gray-11: @gray-11;
+ --gray-12: @gray-12;
+ --gray-13: @gray-13;
+ --gray-14: @gray-14;
+ --gray-15: @gray-15;
+ --gray-16: @gray-16;
+ --gray-17: @gray-17;
+
--primary-color: @primary-color;
--primary-color-hover: @primary-color-hover;
--link-color: @link-color;
diff --git a/packages/style-universheet/src/assets/css/skin/green.module.less b/packages/style-universheet/src/assets/css/skin/green.module.less
index 3d46f00fc2..ba4dcc3ea8 100644
--- a/packages/style-universheet/src/assets/css/skin/green.module.less
+++ b/packages/style-universheet/src/assets/css/skin/green.module.less
@@ -5,7 +5,7 @@
@primary-color-hover: #0e5c2f; // 全局主色 hover
@link-color: #217346; // 链接色
@bg: #fff; //Basics background color for most Components
-@bg-hover:#efefef;
+@bg-hover: #efefef;
@heading-color: rgba(0, 0, 0, 0.85); // 标题色
@text-color: rgba(0, 0, 0, 0.65); // 主文本色
@text-color-secondary: rgba(0, 0, 0, 0.45); // 次文本色
@@ -18,6 +18,40 @@
// Export all skin variables, call variables in js
:export {
+ --success-color: @success-color;
+ --warning-color: @warning-color;
+ --error-color: @error-color;
+
+ --border-radius-base: @border-radius-base;
+ --border-width-base: @border-width-base;
+ --border-style-base: @border-style-base;
+ --line-height-base: @line-height-base;
+ --font-weight: @font-weight;
+ --font-size-base: @font-size-base;
+ --font-size-lg: @font-size-lg;
+ --font-size-sm: @font-size-sm;
+
+ --padding-base: @padding-base;
+ --margin-base: @margin-base;
+
+ --gray-1: @gray-1;
+ --gray-2: @gray-2;
+ --gray-3: @gray-3;
+ --gray-4: @gray-4;
+ --gray-5: @gray-5;
+ --gray-6: @gray-6;
+ --gray-7: @gray-7;
+ --gray-8: @gray-8;
+ --gray-9: @gray-9;
+ --gray-10: @gray-10;
+ --gray-11: @gray-11;
+ --gray-12: @gray-12;
+ --gray-13: @gray-13;
+ --gray-14: @gray-14;
+ --gray-15: @gray-15;
+ --gray-16: @gray-16;
+ --gray-17: @gray-17;
+
--primary-color: @primary-color;
--primary-color-hover: @primary-color-hover;
--link-color: @link-color;
diff --git a/packages/style-universheet/vite.config.ts b/packages/style-universheet/vite.config.ts
index 3ad20614ec..d907ec1c91 100644
--- a/packages/style-universheet/vite.config.ts
+++ b/packages/style-universheet/vite.config.ts
@@ -32,14 +32,6 @@ export default defineConfig({
},
},
},
- resolve: {
- alias: [
- {
- find: '@',
- replacement: path.resolve(__dirname, './node_modules')
- }
- ],
- },
server: {
port: 3103,
// open: true, // Automatically open the app in the browser on server start.