From c08629fb7e9d9de0820585f36d932bf5099bb3e6 Mon Sep 17 00:00:00 2001 From: wangjie Date: Tue, 8 Mar 2022 14:58:14 +0800 Subject: [PATCH 1/6] =?UTF-8?q?fix(tipTool):=E8=8B=B1=E6=96=87=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E8=B6=85=E5=87=BA=E6=8D=A2=E8=A1=8C#624?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-tooltip/src/style/index.less | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-tooltip/src/style/index.less b/packages/react-tooltip/src/style/index.less index 69e3dfeb47..f78f91f208 100644 --- a/packages/react-tooltip/src/style/index.less +++ b/packages/react-tooltip/src/style/index.less @@ -22,6 +22,7 @@ background-color: @tooltip-bg; border-radius: 4px; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2); + word-break: break-all; } &.right &-arrow, From 6eff0de9b52c8ded9fd09d2040351385270d078b Mon Sep 17 00:00:00 2001 From: wj0990 <379925517@qq.com> Date: Thu, 26 May 2022 11:55:14 +0800 Subject: [PATCH 2/6] fix:SearchTree validation style problem --- packages/react-form/src/style/form-item.less | 13 ++++++++++++- packages/react-search-tree/README.md | 6 ++---- website/src/routes/components/search-tree/index.tsx | 4 ++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/react-form/src/style/form-item.less b/packages/react-form/src/style/form-item.less index 1948d1b741..e337eab2c8 100644 --- a/packages/react-form/src/style/form-item.less +++ b/packages/react-form/src/style/form-item.less @@ -1,14 +1,16 @@ -@w-form:~ "w-form"; +@w-form: ~'w-form'; .@{w-form} { &-item { margin-bottom: 10px; } + &-item-error { .@{w-form}-help, .@{w-form}-label { color: #dc3545; } + .w-input-inner, .w-select, .w-select-default, @@ -18,24 +20,33 @@ .w-input-inner:focus.w-input-inner:hover, .w-textarea, .w-textarea:hover, + .w-search-tree-inner, .w-textarea:focus.w-textarea:hover { box-shadow: 0 0 0 1px #dc3545, 0 0 0 3px rgba(220, 53, 69, 0.17), inset 0 1px 1px rgba(16, 22, 26, 0.2); } + + .w-search-tree-inner .w-input .w-input-inner { + box-shadow: none !important; + } } + &-label { line-height: 32px; min-height: 32px; font-weight: 600; font-size: 14px; padding-right: 5px; + label { display: inline-block; } } + &-row { align-items: center; display: flex; } + &-help { color: #c2c2c2; font-size: 12px; diff --git a/packages/react-search-tree/README.md b/packages/react-search-tree/README.md index 15e5cbc1bf..a1e3606e30 100644 --- a/packages/react-search-tree/README.md +++ b/packages/react-search-tree/README.md @@ -191,9 +191,7 @@ ReactDOM.render(, _mount_); ```jsx import React, { useState, useEffect, useRef } from 'react'; import ReactDOM from 'react-dom'; -import { Form, Button, SearchTree, Card, Row, Col } from 'uiw';; - - +import { Notify, Form, Button, SearchTree, Card, Row, Col,Select } from 'uiw'; const Demo = () => { const form=useRef() @@ -258,7 +256,7 @@ const form=useRef() }} onSubmit={({initial, current}) => { const errorObj = {}; - if (!current.searchTree) { + if (!current.searchTree || current.searchTree.length === 0) { errorObj.searchTree = '默认需要选择内容,选择入内容'; } if(Object.keys(errorObj).length > 0) { diff --git a/website/src/routes/components/search-tree/index.tsx b/website/src/routes/components/search-tree/index.tsx index d5823fb2e2..1f400c1f4b 100644 --- a/website/src/routes/components/search-tree/index.tsx +++ b/website/src/routes/components/search-tree/index.tsx @@ -1,11 +1,11 @@ import React, { useState, useRef } from 'react'; -import { Form, Button, TreeChecked, SearchTree, Row, Col, Card, Icon } from 'uiw'; +import { Form, Button, TreeChecked, SearchTree, Row, Col, Card, Icon, Notify } from 'uiw'; import Markdown from '../../../components/Markdown'; export default () => ( { const md = await import('uiw/node_modules/@uiw/react-search-tree/README.md'); return md.default || md; From 61c418ff11d992e3f7f105cc2b4e6f03ad879e76 Mon Sep 17 00:00:00 2001 From: wj0990 <379925517@qq.com> Date: Thu, 26 May 2022 19:00:19 +0800 Subject: [PATCH 3/6] fix:steps component icon display style #836 --- packages/react-steps/README.md | 2 +- packages/react-steps/src/Step.tsx | 4 ++-- packages/react-steps/src/style/index.less | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/react-steps/README.md b/packages/react-steps/README.md index 405d48456f..19a304b337 100644 --- a/packages/react-steps/README.md +++ b/packages/react-steps/README.md @@ -209,7 +209,7 @@ function Demo() { - + } title="步骤四" description="这里是步骤一的说明,可以很长很长哦。" /> diff --git a/packages/react-steps/src/Step.tsx b/packages/react-steps/src/Step.tsx index 9cda70ff20..112b94b361 100644 --- a/packages/react-steps/src/Step.tsx +++ b/packages/react-steps/src/Step.tsx @@ -50,7 +50,7 @@ export default function Step(props: StepProps) { } } let iconNode = null; - if (progressDot) { + if (progressDot && !icon) { iconNode = ; } else if (icon && typeof icon !== 'string') { iconNode = {icon}; @@ -82,7 +82,7 @@ export default function Step(props: StepProps) { {iconNode} -
+
{title}
{description &&
{description}
}
diff --git a/packages/react-steps/src/style/index.less b/packages/react-steps/src/style/index.less index 6a0b46fc6a..8b2b51d351 100644 --- a/packages/react-steps/src/style/index.less +++ b/packages/react-steps/src/style/index.less @@ -223,6 +223,10 @@ .@{w-steps}-item-head { background: transparent; margin-top: -4px; + .is-icon { + margin-left: -10px !important; + background-color: transparent; + } } &.@{w-steps}-vertical { .@{w-steps}-item { @@ -244,6 +248,9 @@ padding-bottom: 24px; margin-top: -21px; } + .is-icon-main { + margin-top: -35px; + } .@{w-steps}-next-error { .w-steps-item-tail i:after { background-color: #f04134; From dc5c408083732b852e6fe404d2429162065c248c Mon Sep 17 00:00:00 2001 From: wj0990 <379925517@qq.com> Date: Tue, 31 May 2022 22:45:37 +0800 Subject: [PATCH 4/6] =?UTF-8?q?fix:SearchTree=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-search-tree/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-search-tree/README.md b/packages/react-search-tree/README.md index a1e3606e30..b034cdae91 100644 --- a/packages/react-search-tree/README.md +++ b/packages/react-search-tree/README.md @@ -295,6 +295,7 @@ const form=useRef() onChange={(selectd, selectedAll, isChecked)=>console.log('SearchTree-> onChange', selectd, selectedAll, isChecked)} options={data} placeholder="请选择选项" + treeProps={{ style:{ 'height':200, overflow:'scroll' }}} /> ) }, From 9acd9a2f62e9766cf9702b36c036883c673f2b2f Mon Sep 17 00:00:00 2001 From: wj0990 <379925517@qq.com> Date: Thu, 9 Jun 2022 00:32:27 +0800 Subject: [PATCH 5/6] =?UTF-8?q?fix(react-tabs):=E4=BC=98=E5=8C=96=E8=A1=8C?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E9=AB=98=E4=BA=AE=E4=B8=8B=E6=BB=91=E7=BA=BF?= =?UTF-8?q?=E4=B8=8D=E5=8F=97prop.active=E5=8F=82=E6=95=B0=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-tabs/src/index.tsx | 15 +++++++-------- website/src/routes/components/tabs/index.tsx | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/react-tabs/src/index.tsx b/packages/react-tabs/src/index.tsx index 6f1a05ce79..2d52e3dfc9 100644 --- a/packages/react-tabs/src/index.tsx +++ b/packages/react-tabs/src/index.tsx @@ -66,14 +66,14 @@ export default function Tabs(props: TabsProps) { } }, []); - const divNavRef = useCallback((node, key: number, itemKey: React.Key | null) => { + const divNavRef = useCallback((node, key: number, itemKey: React.Key | null, activeKey) => { if (node !== null) { - node.addEventListener('click', (e: any) => { - activeItem.current = node; - }); + // node.addEventListener('click', (e: any) => { + // activeItem.current = node; + // }); divNavWidthChange(node.getBoundingClientRect().width, key); - if (itemKey === props.activeKey && type === 'line' && labelWidth === 0) { + if (itemKey === activeKey) { activeItem.current = node; } } @@ -103,9 +103,8 @@ export default function Tabs(props: TabsProps) { } }; - useEffect(() => setActiveKey(props.activeKey), [props.activeKey]); + useEffect(() => setActiveKey(props?.activeKey || ''), [props.activeKey]); useEffect(() => calcSlideStyle(), [activeKey]); - function calcSlideStyle() { if (activeItem.current && type === 'line') { labelWidth = activeItem.current.clientWidth; @@ -176,7 +175,7 @@ export default function Tabs(props: TabsProps) { calcSlideStyle(); }; } - return
divNavRef(ref, key, item.key)} {...divProps} />; + return
divNavRef(ref, key, item.key, activeKey)} {...divProps} />; }); } } diff --git a/website/src/routes/components/tabs/index.tsx b/website/src/routes/components/tabs/index.tsx index eb572559a0..9b9cd92e06 100755 --- a/website/src/routes/components/tabs/index.tsx +++ b/website/src/routes/components/tabs/index.tsx @@ -1,11 +1,11 @@ import React from 'react'; -import { Tabs, Divider } from 'uiw'; +import { Tabs, Divider, Button } from 'uiw'; import Markdown from '../../../components/Markdown'; export default () => ( { const md = await import('uiw/node_modules/@uiw/react-tabs/README.md'); return md.default || md; From e96f99d576860532d0698a5dd4cf363eaf9e4d7f Mon Sep 17 00:00:00 2001 From: wj0990 <379925517@qq.com> Date: Thu, 9 Jun 2022 00:42:09 +0800 Subject: [PATCH 6/6] fix(react-tabs):update README.md --- packages/react-tabs/README.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/packages/react-tabs/README.md b/packages/react-tabs/README.md index c4eb458f34..7b5c1cfb5f 100644 --- a/packages/react-tabs/README.md +++ b/packages/react-tabs/README.md @@ -48,19 +48,34 @@ ReactDOM.render(, _mount_); ```jsx import React from 'react'; import ReactDOM from 'react-dom'; -import { Tabs } from 'uiw'; +import { Tabs,Button } from 'uiw'; class Demo extends React.Component { + constructor(props) { + super(props); + this.state = { + activeKey: '1', + }; + } + onClick() { + const { activeKey } = this.state; + this.setState({activeKey: activeKey < 4 ? (Number(activeKey) + 1).toString() :'1'}) + }; + render() { return ( - { + <> + + { console.log("=>", key, tab); + this.setState({activeKey: key}) }}> 用户管理 配置管理 角色管理
大爷欢乐多22
-
+
+ ); } }