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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-printer",
3
- "version": "10.33.1",
3
+ "version": "10.33.3",
4
4
  "description": "diy printer",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -7,27 +7,32 @@ import _ from 'lodash'
7
7
 
8
8
  const tips = []
9
9
 
10
- const Tip = (props) => {
10
+ const Tip = props => {
11
11
  const { list } = props
12
12
 
13
- return <React.Fragment>
14
- {_.map(list, (item, index) => {
15
- return (
16
- <div key={index} className='gm-animated gm-animated-fade-in-right-100'>
17
- <Flex alignCenter className='gm-tip'>
18
- <SvgInfoCircle className='gm-svg-info'/>
19
- <div style={{ paddingLeft: '10px' }}>
20
- <div>{item}</div>
21
- </div>
22
- </Flex>
23
- </div>
24
- )
25
- })}
26
- </React.Fragment>
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 (id) {
30
- return window.shadowRoot.getElementById(id)
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 = {