doway-coms 2.0.6 → 2.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doway-coms",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -3,10 +3,74 @@ export function successMsg(msg, desc){
3
3
  notification['success']({ message: msg, description: desc, top: '100px' })
4
4
  }
5
5
  export function warningMsg(msg, desc){
6
- notification['warning']({ message: msg, description: desc, top: '100px' })
6
+ notification['warning'](
7
+ {
8
+ message: h => {
9
+ return h("div", null, [
10
+ h("div", {
11
+ domProps: { innerHTML: msg },
12
+ style: {
13
+ 'white-space': 'pre-wrap', /* 保持空白符格式,允许正常的换行 */
14
+ 'overflow-wrap': 'break-word', /* 允许单词在边界内断开 */
15
+ 'word-wrap': 'break-word', /* 旧版浏览器的兼容性写法 */
16
+ 'max-width': '260px', /* 你想要的任何最大宽度 */
17
+ 'max-height': '500px',
18
+ }
19
+ }, null),
20
+ ])
21
+ },
22
+ description: h => {
23
+ return h("div", null, [
24
+ h("div", {
25
+ domProps: { innerHTML: desc },
26
+ style: {
27
+ 'white-space': 'pre-wrap',
28
+ 'overflow-wrap': 'break-word',
29
+ 'word-wrap': 'break-word',
30
+ 'max-width': '260px',
31
+ 'max-height': '500px',
32
+ }
33
+ }, null),
34
+ ])
35
+ },
36
+ top: '100px'
37
+ }
38
+ )
7
39
  }
8
40
  export function errorMsg(msg, desc){
9
- notification['error']({ message: msg, description: desc, top: '100px' })
41
+ notification['error'](
42
+ {
43
+ message: h => {
44
+ return h("div", null, [
45
+ h("div", {
46
+ domProps: { innerHTML: msg },
47
+ style: {
48
+ 'white-space': 'pre-wrap', /* 保持空白符格式,允许正常的换行 */
49
+ 'overflow-wrap': 'break-word', /* 允许单词在边界内断开 */
50
+ 'word-wrap': 'break-word', /* 旧版浏览器的兼容性写法 */
51
+ 'max-width': '260px', /* 你想要的任何最大宽度 */
52
+ 'max-height': '500px',
53
+ }
54
+ }, null),
55
+ ])
56
+ },
57
+ description: h => {
58
+ return h("div", null, [
59
+ h("div", {
60
+ domProps: { innerHTML: desc },
61
+ style: {
62
+ 'white-space': 'pre-wrap',
63
+ 'overflow-wrap': 'break-word',
64
+ 'word-wrap': 'break-word',
65
+ 'max-width': '260px',
66
+ 'max-height': '500px',
67
+ }
68
+ }, null),
69
+ ])
70
+ },
71
+ top: '100px'
72
+ }
73
+ )
10
74
  }
11
75
  export function infoMsg(dataInfo){
12
76
  notification['info'](dataInfo)