From 82cd43db4038b4369df6478397be6837d0891a77 Mon Sep 17 00:00:00 2001 From: Ice-Hazymoon Date: Fri, 6 Oct 2023 17:38:29 +0900 Subject: [PATCH 01/10] Add resize event to splitter (#4526) * Add resizing event to splitter component * doc * 'resize' instead of 'resizing' * 'resize' instead of 'resizing' --- components/lib/splitter/Splitter.d.ts | 20 ++++++++++++++++++++ components/lib/splitter/Splitter.vue | 4 +++- doc/common/apidoc/index.json | 21 +++++++++++++++++---- 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/components/lib/splitter/Splitter.d.ts b/components/lib/splitter/Splitter.d.ts index b9f1e0ccf..a308cae67 100644 --- a/components/lib/splitter/Splitter.d.ts +++ b/components/lib/splitter/Splitter.d.ts @@ -55,6 +55,21 @@ export interface SplitterResizeStartEvent { sizes: number[]; } +/** + * Custom resize event. + * @see {@link SplitterEmits.resize} + */ +export interface SplitterResizeEvent { + /** + * Browser event + */ + originalEvent: Event; + /** + * Sizes of the panels + */ + sizes: number[]; +} + /** * Custom resize end event. * @see {@link SplitterEmits.resizeend} @@ -185,6 +200,11 @@ export interface SplitterEmits { * @param {SplitterResizeStartEvent} event - Custom resize start event. */ resizestart(event: SplitterResizeStartEvent): void; + /** + * Callback to invoke during the resizing process. + * @param {SplitterResizeEvent} event - Custom resize event. + */ + resize(event: SplitterResizeEvent): void; /** * Callback to invoke when resize ends. * @param {SplitterResizeEndEvent} event - Custom resize end event. diff --git a/components/lib/splitter/Splitter.vue b/components/lib/splitter/Splitter.vue index 4d3a5a9ea..48693d4dc 100644 --- a/components/lib/splitter/Splitter.vue +++ b/components/lib/splitter/Splitter.vue @@ -28,7 +28,7 @@ import BaseSplitter from './BaseSplitter.vue'; export default { name: 'Splitter', extends: BaseSplitter, - emits: ['resizestart', 'resizeend'], + emits: ['resizestart', 'resizeend', 'resize'], dragging: false, mouseMoveListener: null, mouseUpListener: null, @@ -141,6 +141,8 @@ export default { this.panelSizes[this.prevPanelIndex] = newPrevPanelSize; this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize; } + + this.$emit('resize', { originalEvent: event, sizes: this.panelSizes }); }, onResizeEnd(event) { if (this.isStateful()) { diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index e41b00b20..0bd5ae05f 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -45040,9 +45040,9 @@ ], "methods": [] }, - "SplitterResizeEndEvent": { - "description": "Custom resize end event.", - "relatedProp": "SplitterEmits.resizeend", + "SplitterResizeEvent": { + "description": "Custom resize event.", + "relatedProp": "SplitterEmits.resize", "props": [ { "name": "originalEvent", @@ -45058,7 +45058,7 @@ "readonly": false, "type": "number[]", "default": "", - "description": "Sizes of the panels" + "description": "Sizes of the panels during resize" } ], "methods": [] @@ -45247,6 +45247,19 @@ "returnType": "void", "description": "Callback to invoke when resize starts." }, + { + "name": "resize", + "parameters": [ + { + "name": "event", + "optional": false, + "type": "SplitterResizeEvent", + "description": "Custom resize event." + } + ], + "returnType": "void", + "description": "Callback to invoke during the resizing process." + }, { "name": "resizeend", "parameters": [ From 30bbdae2fcff802da19022ddc9dcfcf6291f07ef Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Fri, 6 Oct 2023 08:39:26 +0000 Subject: [PATCH 02/10] Update API doc --- doc/common/apidoc/index.json | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index 0bd5ae05f..b67a47c7c 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -45058,7 +45058,30 @@ "readonly": false, "type": "number[]", "default": "", - "description": "Sizes of the panels during resize" + "description": "Sizes of the panels" + } + ], + "methods": [] + }, + "SplitterResizeEndEvent": { + "description": "Custom resize end event.", + "relatedProp": "SplitterEmits.resizeend", + "props": [ + { + "name": "originalEvent", + "optional": false, + "readonly": false, + "type": "Event", + "default": "", + "description": "Browser event" + }, + { + "name": "sizes", + "optional": false, + "readonly": false, + "type": "number[]", + "default": "", + "description": "Sizes of the panels" } ], "methods": [] @@ -55574,4 +55597,4 @@ } } } -} +} \ No newline at end of file From b67a653952fa858ed6f050592af35322447f81df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Fri, 6 Oct 2023 15:57:46 +0300 Subject: [PATCH 03/10] Apidoc latest updates --- assets/styles/layout/_doc.scss | 21 +++++++++++++++++++-- components/doc/DocApiTable.vue | 24 +++++++++++------------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/assets/styles/layout/_doc.scss b/assets/styles/layout/_doc.scss index 3376218bc..1983f485c 100644 --- a/assets/styles/layout/_doc.scss +++ b/assets/styles/layout/_doc.scss @@ -293,6 +293,13 @@ } } + &.doc-option-parameter { + > .doc-option-parameter-scope { + font-weight: 500; + color: var(--surface-600); + } + } + &:first-child { color: var(--primary-color); font-weight: 700; @@ -322,9 +329,9 @@ } } - .doc-option-props { + .doc-option-default, + .doc-option-returnType { display: flex; - background: var(--bluegray-50); border-width: 1px; border-style: solid; border-radius: 6px; @@ -343,6 +350,16 @@ } } } + + .doc-option-light { + background: var(--bluegray-50); + border-color: var(--bluegray-100); + } + + .doc-option-dark { + background: var(--bluegray-800); + border-color: var(--bluegray-800); + } } } } diff --git a/components/doc/DocApiTable.vue b/components/doc/DocApiTable.vue index 1a4819c33..38deae290 100644 --- a/components/doc/DocApiTable.vue +++ b/components/doc/DocApiTable.vue @@ -22,17 +22,17 @@ -
+
{{ v === '' || v === undefined ? 'null' : v }}
- {{ v }} +
+ {{ v }} +
+ + {{ v }} @@ -165,12 +169,6 @@ export default { } return this.data[0].data ? 1 : 2; - }, - optionLinkClass() { - return this.$appState.darkTheme ? 'text-primary-400' : 'text-primary-600'; - }, - optionPropClass() { - return this.$appState.darkTheme ? 'border-bluegray-800 bg-bluegray-800' : 'border-bluegray-100 bg-bluegray-50'; } } }; From 1d24d51fdb28ee174577a55e4f07f844fde4d187 Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Fri, 6 Oct 2023 13:00:11 +0000 Subject: [PATCH 04/10] Code Format --- doc/common/apidoc/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index b67a47c7c..8217b37a7 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -55597,4 +55597,4 @@ } } } -} \ No newline at end of file +} From 6f7c8c738230fd706f473071634a2a7c155b3c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Fri, 6 Oct 2023 17:00:02 +0300 Subject: [PATCH 05/10] Doc section updates --- assets/styles/layout/_code.scss | 3 +-- components/doc/DocSectionCode.vue | 10 +++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/assets/styles/layout/_code.scss b/assets/styles/layout/_code.scss index c5eaa8286..15278ca49 100644 --- a/assets/styles/layout/_code.scss +++ b/assets/styles/layout/_code.scss @@ -402,8 +402,7 @@ pre[class*="language-"] { margin: 0; color: var(--surface-900); font-size: 14px; - border-bottom-left-radius: 10px; - border-bottom-right-radius: 10px; + border-radius: 10px; } } diff --git a/components/doc/DocSectionCode.vue b/components/doc/DocSectionCode.vue index ef6e78430..0f180b533 100644 --- a/components/doc/DocSectionCode.vue +++ b/components/doc/DocSectionCode.vue @@ -1,6 +1,10 @@