Skip to content

Commit baac047

Browse files
committed
feat: eliminate omit.js NPM package
1 parent 6e77c1f commit baac047

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"immutability-helper": "^3.1.1",
3232
"loadsh": "^0.0.4",
3333
"monaco-editor": "^0.21.2",
34-
"omit.js": "^2.0.2",
3534
"rc-collapse": "^2.0.1",
3635
"rc-textarea": "^0.3.1",
3736
"rc-tree": "^3.10.0",

src/components/input/TextArea.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import RcTextArea, { TextAreaProps as RcTextAreaProps } from 'rc-textarea';
33
import { useEffect, useRef } from 'react';
4-
import omit from 'omit.js';
4+
import { omit } from 'loadsh'
55

66
import { classNames, getBEMElement, getBEMModifier } from 'mo/common/className';
77
import useMergedState from 'rc-util/lib/hooks/useMergedState';

src/components/input/style.scss

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ $Input: 'input';
1616
padding: 6px 11px;
1717
}
1818

19+
&--disabled {
20+
cursor: not-allowed;
21+
}
22+
1923
&__textarea {
2024
&--show-count::after {
2125
color: rgba(0, 0, 0, 0.45);

src/style/theme.scss

+6
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,10 @@
219219
color: rgba(0, 0, 0, 0.45);
220220
}
221221
}
222+
223+
&--disabled {
224+
background-color: #f5f5f5;
225+
color: rgba(0, 0, 0, 0.25);
226+
opacity: 1;
227+
}
222228
}

yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -9889,7 +9889,7 @@ obuf@^1.0.0, obuf@^1.1.2:
98899889
resolved "http://registry.npm.dtstack.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e"
98909890
integrity sha1-Cb6jND1BhZ69RGKS0RydTbYZCE4=
98919891

9892-
omit.js@^2.0.0, omit.js@^2.0.2:
9892+
omit.js@^2.0.0:
98939893
version "2.0.2"
98949894
resolved "https://registry.npm.taobao.org/omit.js/download/omit.js-2.0.2.tgz#dd9b8436fab947a5f3ff214cb2538631e313ec2f"
98959895
integrity sha1-3ZuENvq5R6Xz/yFMslOGMeMT7C8=

0 commit comments

Comments
 (0)