gm-printer 10.33.1 → 10.33.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintcache +1 -0
- package/package.json +1 -1
- package/src/components/tip/index.js +24 -19
- package/build/demo.js +0 -54
- package/build/index.html +0 -1
package/.eslintcache
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"/Users/maoxuanlong/Desktop/guanmai/code/gm-printer1/src/components/tip/index.js":"1"},{"size":1123,"mtime":1761307461352,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1esol1r","/Users/maoxuanlong/Desktop/guanmai/code/gm-printer1/src/components/tip/index.js",[]]
|
package/package.json
CHANGED
|
@@ -7,27 +7,32 @@ import _ from 'lodash'
|
|
|
7
7
|
|
|
8
8
|
const tips = []
|
|
9
9
|
|
|
10
|
-
const Tip =
|
|
10
|
+
const Tip = props => {
|
|
11
11
|
const { list } = props
|
|
12
12
|
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
{_.map(list, (item, index) => {
|
|
16
|
+
return (
|
|
17
|
+
<div
|
|
18
|
+
key={index}
|
|
19
|
+
className='gm-animated gm-animated-fade-in-right-100'
|
|
20
|
+
>
|
|
21
|
+
<Flex alignCenter className='gm-tip'>
|
|
22
|
+
<SvgInfoCircle className='gm-svg-info' />
|
|
23
|
+
<div style={{ paddingLeft: '10px' }}>
|
|
24
|
+
<div>{item}</div>
|
|
25
|
+
</div>
|
|
26
|
+
</Flex>
|
|
27
|
+
</div>
|
|
28
|
+
)
|
|
29
|
+
})}
|
|
30
|
+
</>
|
|
31
|
+
)
|
|
27
32
|
}
|
|
28
33
|
|
|
29
|
-
function getTipDOM
|
|
30
|
-
return window
|
|
34
|
+
function getTipDOM(id) {
|
|
35
|
+
return window?.shadowRoot?.getElementById(id)
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
Tip.warning = (message = '') => {
|
|
@@ -35,10 +40,10 @@ Tip.warning = (message = '') => {
|
|
|
35
40
|
|
|
36
41
|
setTimeout(() => {
|
|
37
42
|
tips.shift()
|
|
38
|
-
ReactDOM.render(<Tip list={tips}/>, getTipDOM('gm-printer-tip'))
|
|
43
|
+
ReactDOM.render(<Tip list={tips} />, getTipDOM('gm-printer-tip'))
|
|
39
44
|
}, 3000)
|
|
40
45
|
|
|
41
|
-
ReactDOM.render(<Tip list={tips}/>, getTipDOM('gm-printer-tip'))
|
|
46
|
+
ReactDOM.render(<Tip list={tips} />, getTipDOM('gm-printer-tip'))
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
Tip.propTypes = {
|