@lingxiteam/assets 4.2.1-alpha.2 → 4.3.2-alpha.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.
Files changed (175) hide show
  1. package/es/IconSvg/index.js +8 -7
  2. package/es/error/errorCatch/index.js +1 -1
  3. package/es/error/errorDisplay/Mobile/Drawer/Drawer.js +99 -77
  4. package/es/error/errorDisplay/Mobile/Drawer/index.js +26 -26
  5. package/es/error/errorDisplay/Mobile/ErrorMsg/index.js +127 -129
  6. package/es/error/errorDisplay/Mobile/Modal/Modal.js +46 -31
  7. package/es/error/errorDisplay/Mobile/Modal/index.js +24 -24
  8. package/es/error/errorDisplay/Mobile/defaultGlobalConfig.js +2 -2
  9. package/es/error/errorDisplay/Web/Drawer/Drawer.js +183 -145
  10. package/es/error/errorDisplay/Web/Drawer/DrawerConnect.js +43 -46
  11. package/es/error/errorDisplay/Web/Drawer/index.js +15 -15
  12. package/es/error/errorDisplay/Web/ErrorMsg/index.js +341 -327
  13. package/es/error/errorDisplay/Web/Notification/Notice.js +78 -65
  14. package/es/error/errorDisplay/Web/Notification/Notification.js +15 -15
  15. package/es/error/errorDisplay/Web/Notification/index.js +36 -38
  16. package/es/error/errorDisplay/Web/defaultGlobalConfig.js +2 -2
  17. package/es/error/errorDisplay/compUtils.js +6 -6
  18. package/es/error/errorDisplay/http.js +7 -7
  19. package/es/error/index.js +6 -6
  20. package/es/index.js +5 -5
  21. package/es/rootConfig/index.d.ts +1 -1
  22. package/es/rootConfig/index.js +5 -5
  23. package/es/rootConfig/locales/enus/config-locales-es.d.ts +2 -0
  24. package/es/rootConfig/locales/enus/config-locales-es.js +13 -0
  25. package/es/rootConfig/locales/enus/config-locales-es.mobile.d.ts +2 -0
  26. package/es/rootConfig/locales/enus/config-locales-es.mobile.js +106 -0
  27. package/es/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
  28. package/es/rootConfig/locales/enus/config-locales-es.pc.js +42 -0
  29. package/es/rootConfig/locales/enus/config-locales-es.todo-actionList.d.ts +2 -0
  30. package/es/rootConfig/locales/enus/config-locales-es.todo-actionList.js +865 -0
  31. package/es/rootConfig/locales/enus/config-locales-es.todo-callback.d.ts +2 -0
  32. package/es/rootConfig/locales/enus/config-locales-es.todo-callback.js +20 -0
  33. package/es/rootConfig/locales/enus/config-locales-es.todo-optionList.d.ts +2 -0
  34. package/es/rootConfig/locales/enus/config-locales-es.todo-optionList.js +266 -0
  35. package/es/rootConfig/locales/zhcn/config-locales-cn.d.ts +2 -0
  36. package/es/rootConfig/locales/zhcn/config-locales-cn.js +13 -0
  37. package/es/rootConfig/locales/zhcn/config-locales-cn.mobile.d.ts +2 -0
  38. package/es/rootConfig/locales/zhcn/config-locales-cn.mobile.js +57 -0
  39. package/es/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
  40. package/es/rootConfig/locales/zhcn/config-locales-cn.pc.js +97 -0
  41. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.d.ts +2 -0
  42. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.js +583 -0
  43. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-callback.d.ts +2 -0
  44. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-callback.js +13 -0
  45. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.d.ts +2 -0
  46. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.js +127 -0
  47. package/es/rootConfig/locales/zhhk/config-locales-hk.d.ts +2 -0
  48. package/es/rootConfig/locales/zhhk/config-locales-hk.js +13 -0
  49. package/es/rootConfig/locales/zhhk/config-locales-hk.mobile.d.ts +2 -0
  50. package/es/rootConfig/locales/zhhk/config-locales-hk.mobile.js +106 -0
  51. package/es/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
  52. package/es/rootConfig/locales/zhhk/config-locales-hk.pc.js +174 -0
  53. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.d.ts +2 -0
  54. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.js +869 -0
  55. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-callback.d.ts +2 -0
  56. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-callback.js +20 -0
  57. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.d.ts +2 -0
  58. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.js +266 -0
  59. package/es/rootConfig/mobile/BusiComp.d.ts +0 -1
  60. package/es/rootConfig/mobile/BusiComp.js +13 -10
  61. package/es/rootConfig/mobile/MobileModal.js +32 -27
  62. package/es/rootConfig/mobile/MobilePopover.d.ts +0 -2
  63. package/es/rootConfig/mobile/MobilePopover.js +16 -13
  64. package/es/rootConfig/mobile/index.js +4 -4
  65. package/es/rootConfig/mobile/page.d.ts +17 -2
  66. package/es/rootConfig/mobile/page.js +45 -38
  67. package/es/rootConfig/pc/BusiComp.js +82 -12
  68. package/es/rootConfig/pc/Drawer.d.ts +8 -9
  69. package/es/rootConfig/pc/Drawer.js +116 -46
  70. package/es/rootConfig/pc/Modal.d.ts +0 -1
  71. package/es/rootConfig/pc/Modal.js +90 -20
  72. package/es/rootConfig/pc/Popover.d.ts +0 -1
  73. package/es/rootConfig/pc/Popover.js +85 -15
  74. package/es/rootConfig/pc/index.js +5 -5
  75. package/es/rootConfig/pc/page.d.ts +0 -2
  76. package/es/rootConfig/pc/page.js +91 -22
  77. package/es/rootConfig/todoActionList.d.ts +1 -0
  78. package/es/rootConfig/todoActionList.js +1845 -719
  79. package/es/rootConfig/todoCallback.d.ts +12 -1
  80. package/es/rootConfig/todoCallback.js +175 -103
  81. package/es/rootConfig/todoOptionList.d.ts +0 -66
  82. package/es/rootConfig/todoOptionList.js +197 -198
  83. package/es/theme/index.js +18 -20
  84. package/es/theme/src/default/index.js +7 -7
  85. package/es/theme/utils/renderColors.js +1 -1
  86. package/es/utils/url.js +8 -7
  87. package/lib/IconSvg/index.js +10 -9
  88. package/lib/error/errorCatch/index.js +2 -3
  89. package/lib/error/errorDisplay/Mobile/Drawer/Drawer.js +99 -79
  90. package/lib/error/errorDisplay/Mobile/Drawer/index.js +25 -26
  91. package/lib/error/errorDisplay/Mobile/ErrorMsg/index.js +123 -126
  92. package/lib/error/errorDisplay/Mobile/Modal/Modal.js +45 -33
  93. package/lib/error/errorDisplay/Mobile/Modal/index.js +23 -24
  94. package/lib/error/errorDisplay/Mobile/defaultGlobalConfig.js +3 -5
  95. package/lib/error/errorDisplay/SVGstring.js +6 -12
  96. package/lib/error/errorDisplay/Web/Drawer/Drawer.js +181 -146
  97. package/lib/error/errorDisplay/Web/Drawer/DrawerConnect.js +44 -48
  98. package/lib/error/errorDisplay/Web/Drawer/index.js +18 -20
  99. package/lib/error/errorDisplay/Web/ErrorMsg/index.js +336 -324
  100. package/lib/error/errorDisplay/Web/Notification/Notice.js +79 -68
  101. package/lib/error/errorDisplay/Web/Notification/Notification.js +15 -16
  102. package/lib/error/errorDisplay/Web/Notification/index.js +37 -41
  103. package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +3 -5
  104. package/lib/error/errorDisplay/compUtils.js +9 -12
  105. package/lib/error/errorDisplay/const.js +7 -13
  106. package/lib/error/errorDisplay/http.js +8 -9
  107. package/lib/index.js +3 -6
  108. package/lib/rootConfig/index.d.ts +1 -1
  109. package/lib/rootConfig/index.js +9 -3
  110. package/lib/rootConfig/locales/enus/config-locales-es.d.ts +2 -0
  111. package/lib/rootConfig/locales/enus/config-locales-es.js +19 -0
  112. package/lib/rootConfig/locales/enus/config-locales-es.mobile.d.ts +2 -0
  113. package/lib/rootConfig/locales/enus/config-locales-es.mobile.js +112 -0
  114. package/lib/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
  115. package/lib/rootConfig/locales/enus/config-locales-es.pc.js +48 -0
  116. package/lib/rootConfig/locales/enus/config-locales-es.todo-actionList.d.ts +2 -0
  117. package/lib/rootConfig/locales/enus/config-locales-es.todo-actionList.js +871 -0
  118. package/lib/rootConfig/locales/enus/config-locales-es.todo-callback.d.ts +2 -0
  119. package/lib/rootConfig/locales/enus/config-locales-es.todo-callback.js +26 -0
  120. package/lib/rootConfig/locales/enus/config-locales-es.todo-optionList.d.ts +2 -0
  121. package/lib/rootConfig/locales/enus/config-locales-es.todo-optionList.js +272 -0
  122. package/lib/rootConfig/locales/zhcn/config-locales-cn.d.ts +2 -0
  123. package/lib/rootConfig/locales/zhcn/config-locales-cn.js +19 -0
  124. package/lib/rootConfig/locales/zhcn/config-locales-cn.mobile.d.ts +2 -0
  125. package/lib/rootConfig/locales/zhcn/config-locales-cn.mobile.js +63 -0
  126. package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
  127. package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.js +103 -0
  128. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.d.ts +2 -0
  129. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.js +589 -0
  130. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-callback.d.ts +2 -0
  131. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-callback.js +19 -0
  132. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.d.ts +2 -0
  133. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.js +133 -0
  134. package/lib/rootConfig/locales/zhhk/config-locales-hk.d.ts +2 -0
  135. package/lib/rootConfig/locales/zhhk/config-locales-hk.js +19 -0
  136. package/lib/rootConfig/locales/zhhk/config-locales-hk.mobile.d.ts +2 -0
  137. package/lib/rootConfig/locales/zhhk/config-locales-hk.mobile.js +112 -0
  138. package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
  139. package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.js +180 -0
  140. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.d.ts +2 -0
  141. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.js +875 -0
  142. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-callback.d.ts +2 -0
  143. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-callback.js +26 -0
  144. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.d.ts +2 -0
  145. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.js +272 -0
  146. package/lib/rootConfig/mobile/BusiComp.d.ts +0 -1
  147. package/lib/rootConfig/mobile/BusiComp.js +14 -12
  148. package/lib/rootConfig/mobile/MobileModal.js +33 -29
  149. package/lib/rootConfig/mobile/MobilePopover.d.ts +0 -2
  150. package/lib/rootConfig/mobile/MobilePopover.js +17 -15
  151. package/lib/rootConfig/mobile/page.d.ts +17 -2
  152. package/lib/rootConfig/mobile/page.js +46 -40
  153. package/lib/rootConfig/pc/BusiComp.js +83 -14
  154. package/lib/rootConfig/pc/Drawer.d.ts +8 -9
  155. package/lib/rootConfig/pc/Drawer.js +117 -48
  156. package/lib/rootConfig/pc/Modal.d.ts +0 -1
  157. package/lib/rootConfig/pc/Modal.js +91 -22
  158. package/lib/rootConfig/pc/Popover.d.ts +0 -1
  159. package/lib/rootConfig/pc/Popover.js +86 -17
  160. package/lib/rootConfig/pc/page.d.ts +0 -2
  161. package/lib/rootConfig/pc/page.js +92 -24
  162. package/lib/rootConfig/todoActionList.d.ts +1 -0
  163. package/lib/rootConfig/todoActionList.js +1815 -695
  164. package/lib/rootConfig/todoCallback.d.ts +12 -1
  165. package/lib/rootConfig/todoCallback.js +182 -116
  166. package/lib/rootConfig/todoOptionList.d.ts +0 -66
  167. package/lib/rootConfig/todoOptionList.js +198 -200
  168. package/lib/theme/bin/default/modalWidth.js +1 -2
  169. package/lib/theme/index.js +19 -22
  170. package/lib/theme/src/default/index.js +7 -7
  171. package/lib/theme/utils/renderColors.js +1 -1
  172. package/lib/utils/cookieUtil.js +1 -2
  173. package/lib/utils/img.js +2 -3
  174. package/lib/utils/url.js +13 -16
  175. package/package.json +3 -4
@@ -3,11 +3,16 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
3
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
4
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
5
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7
- import { getSystemTodoActionList } from '../todoActionList';
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ import { getSystemTodoActionList } from "../todoActionList";
8
+ var PC_DRAWER_LOCALE_PREFIX = 'pc.drawer';
9
+ var localeKey = function localeKey(suffix) {
10
+ return "".concat(PC_DRAWER_LOCALE_PREFIX, ".").concat(suffix);
11
+ };
8
12
  export default {
9
13
  compLib: 'root',
10
14
  compType: -1,
15
+ // 根节点
11
16
  isBusiObjContainer: false,
12
17
  isContainer: false,
13
18
  label: '抽屉',
@@ -16,7 +21,6 @@ export default {
16
21
  height: 300,
17
22
  placement: 'right',
18
23
  footer: 1,
19
- layout: 'BlankLayout',
20
24
  closeOnClickOverlay: false,
21
25
  compState: [{
22
26
  name: '业务主键',
@@ -36,14 +40,80 @@ export default {
36
40
  description: '',
37
41
  image: '',
38
42
  groupsName: 'root',
39
- todoActionList: [].concat(_toConsumableArray(getSystemTodoActionList('pc', 'Drawer')), [{
43
+ todoActionList: [{
44
+ key: 'showMessage',
45
+ label: '消息提示',
46
+ todoOptions: [{
47
+ key: 'type',
48
+ label: '类型',
49
+ type: 'Select',
50
+ defaultValue: 'success',
51
+ props: {
52
+ options: [{
53
+ title: '成功',
54
+ value: 'success'
55
+ }, {
56
+ title: '提示',
57
+ value: 'info'
58
+ }, {
59
+ title: '警告',
60
+ value: 'warn'
61
+ }, {
62
+ title: '错误',
63
+ value: 'error'
64
+ }, {
65
+ title: '加载动画',
66
+ value: 'loading'
67
+ }]
68
+ }
69
+ }, {
70
+ key: 'icon',
71
+ label: '自定义图标',
72
+ type: 'ChooseIcon',
73
+ props: {
74
+ placeholder: '请选择图标'
75
+ }
76
+ }, {
77
+ key: 'value',
78
+ label: '内容',
79
+ type: 'SetExpression'
80
+ }, {
81
+ key: 'duration',
82
+ label: '加载时长',
83
+ type: 'InputNumber',
84
+ props: {
85
+ addonAfter: '秒',
86
+ step: '0.01',
87
+ formatter: function formatter(val) {
88
+ return val ? val.match(/^\d+(?:\.\d{0,2})?/) : undefined;
89
+ }
90
+ }
91
+ }, {
92
+ key: 'okText',
93
+ label: localeKey('todoActionList.showMessage.todoOptions.okText.label'),
94
+ type: 'Input'
95
+ }, {
96
+ key: 'cancelText',
97
+ label: localeKey('todoActionList.showMessage.todoOptions.cancelText.label'),
98
+ type: 'Input'
99
+ }],
100
+ todoCallbacks: ['callback1', 'callback2'],
101
+ classification: [{
102
+ label: localeKey('todoActionList.showMessage.classification.modal.label'),
103
+ value: 'modal'
104
+ }],
105
+ remarks: [{
106
+ label: '注意事项',
107
+ content: localeKey('todoActionList.showMessage.remarks.0.content')
108
+ }]
109
+ }].concat(_toConsumableArray(getSystemTodoActionList('pc', 'Drawer')), [{
40
110
  key: 'previewFile',
41
111
  label: '文件预览',
42
112
  todoOptions: [{
43
113
  key: 'fileId',
44
- label: '文件ID/URL',
114
+ label: localeKey('todoActionList.previewFile.todoOptions.fileId.label'),
45
115
  type: 'SetExpression',
46
- labelTip: '文件预览格式支持:pdf、jpg、jpeg、png、svg、mp4、mov、txt、html、js、doc、xlsx、docx、wps、ppt等 注意:如果是外部URL,有可能存在跨域现象!'
116
+ labelTip: localeKey('todoActionList.previewFile.todoOptions.fileId.labelTip')
47
117
  }, {
48
118
  key: 'viewMode',
49
119
  label: '预览方式',
@@ -67,7 +137,7 @@ export default {
67
137
  type: 'SetExpression',
68
138
  defaultValue: '960',
69
139
  visibleFlag: 'viewMode',
70
- labelTip: '不同浏览器有不同的最小限制,请避免设置过小尺寸,当不设置宽高时,默认为全屏',
140
+ labelTip: localeKey('todoActionList.previewFile.todoOptions.modalWidth.labelTip'),
71
141
  visibleFlagValue: ['window']
72
142
  }, {
73
143
  key: 'modalHeight',
@@ -75,7 +145,7 @@ export default {
75
145
  type: 'SetExpression',
76
146
  defaultValue: '648',
77
147
  visibleFlag: 'viewMode',
78
- labelTip: '不同浏览器有不同的最小限制,请避免设置过小尺寸,当不设置宽高时,默认为全屏',
148
+ labelTip: localeKey('todoActionList.previewFile.todoOptions.modalHeight.labelTip'),
79
149
  visibleFlagValue: ['window']
80
150
  }],
81
151
  classification: [{
@@ -85,7 +155,7 @@ export default {
85
155
  }]),
86
156
  todoEvents: [{
87
157
  value: 'useEffect',
88
- label: '推拉门打开后'
158
+ label: localeKey('todoEvents.useEffect.label')
89
159
  }, {
90
160
  value: 'onOk',
91
161
  label: '点击确认'
@@ -94,19 +164,19 @@ export default {
94
164
  label: '点击取消'
95
165
  }, {
96
166
  value: 'stateChange',
97
- label: '组件状态变化后'
167
+ label: localeKey('todoEvents.stateChange.label')
98
168
  }, {
99
169
  value: 'willUnmount',
100
- label: '推拉门关闭前'
170
+ label: localeKey('todoEvents.willUnmount.label')
101
171
  }, {
102
172
  value: 'usePageEndRequest',
103
- label: '页面加载请求结束',
173
+ label: localeKey('todoEvents.usePageEndRequest.label'),
104
174
  remarks: [{
105
175
  label: '场景描述',
106
- content: '在页面加载完成事件中,所有的事件执行结束后进行回掉(包含页面加载完成事件中的异步请求(注意:定时器相关动作不计算回掉时间))'
176
+ content: localeKey('todoEvents.usePageEndRequest.remarks.0.content')
107
177
  }, {
108
178
  label: '适用场景',
109
- content: '在复杂的表单页面中,你可以在页面加载完成事件中进行页面loading的动作设置,在页面加载完成请求结束事件中取消loading,保障在复杂请求中,因异步导致数据未能及时回填,用户提交错误数据问题。'
179
+ content: localeKey('todoEvents.usePageEndRequest.remarks.1.content')
110
180
  }]
111
181
  }],
112
182
  todoProps: {
@@ -124,11 +194,11 @@ export default {
124
194
  groupsName: '基础',
125
195
  props: {
126
196
  required: true,
127
- placeholder: '如:/user/list',
197
+ placeholder: localeKey('todoProps.pagePath.props.placeholder'),
128
198
  regex: {
129
199
  // eslint-disable-next-line
130
200
  pattern: /^(\/[0-9A-Za-z]([_-]+[0-9A-Za-z]|[0-9A-Za-z])*)+$/i,
131
- message: '必须为/xx/yy/..格式'
201
+ message: localeKey('todoProps.pagePath.props.regex.message')
132
202
  }
133
203
  }
134
204
  },
@@ -152,6 +222,26 @@ export default {
152
222
  props: {},
153
223
  enableI18n: true
154
224
  },
225
+ placement: {
226
+ label: '抽屉方向',
227
+ type: 'Select',
228
+ groupsName: '基础',
229
+ props: {
230
+ options: [{
231
+ value: 'top',
232
+ title: '上'
233
+ }, {
234
+ value: 'right',
235
+ title: '右'
236
+ }, {
237
+ value: 'bottom',
238
+ title: '下'
239
+ }, {
240
+ value: 'left',
241
+ title: '左'
242
+ }]
243
+ }
244
+ },
155
245
  width: {
156
246
  label: '推拉门宽度',
157
247
  type: 'Select',
@@ -162,16 +252,16 @@ export default {
162
252
  },
163
253
  options: [{
164
254
  value: 560,
165
- title: 's'
255
+ title: localeKey('todoProps.width.props.options.0.title')
166
256
  }, {
167
257
  value: 624,
168
- title: 'm'
258
+ title: localeKey('todoProps.width.props.options.1.title')
169
259
  }, {
170
260
  value: 1008,
171
- title: 'l'
261
+ title: localeKey('todoProps.width.props.options.2.title')
172
262
  }, {
173
263
  value: 1200,
174
- title: 'xl'
264
+ title: localeKey('todoProps.width.props.options.3.title')
175
265
  }]
176
266
  }
177
267
  },
@@ -185,36 +275,16 @@ export default {
185
275
  },
186
276
  options: [{
187
277
  value: 200,
188
- title: 's'
278
+ title: localeKey('todoProps.height.props.options.0.title')
189
279
  }, {
190
280
  value: 300,
191
- title: 'm'
281
+ title: localeKey('todoProps.height.props.options.1.title')
192
282
  }, {
193
283
  value: 400,
194
- title: 'l'
284
+ title: localeKey('todoProps.height.props.options.2.title')
195
285
  }, {
196
286
  value: 500,
197
- title: 'xl'
198
- }]
199
- }
200
- },
201
- placement: {
202
- label: '抽屉方向',
203
- type: 'Select',
204
- groupsName: '基础',
205
- props: {
206
- options: [{
207
- value: 'top',
208
- title: '上'
209
- }, {
210
- value: 'right',
211
- title: '右'
212
- }, {
213
- value: 'bottom',
214
- title: '下'
215
- }, {
216
- value: 'left',
217
- title: '左'
287
+ title: localeKey('todoProps.height.props.options.3.title')
218
288
  }]
219
289
  }
220
290
  },
@@ -259,10 +329,10 @@ export default {
259
329
  props: {
260
330
  inhibitBtn: true,
261
331
  options: [{
262
- title: '点击蒙罩关闭窗口',
332
+ title: localeKey('todoProps.closeOnClickOverlay.props.options.0.title'),
263
333
  value: true
264
334
  }, {
265
- title: '点击蒙罩不关闭窗口',
335
+ title: localeKey('todoProps.closeOnClickOverlay.props.options.1.title'),
266
336
  value: false
267
337
  }]
268
338
  }
@@ -11,7 +11,6 @@ declare const _default: {
11
11
  customHeight: number;
12
12
  closeOnClickOverlay: boolean;
13
13
  footer: number;
14
- layout: string;
15
14
  compState: {
16
15
  name: string;
17
16
  code: string;
@@ -3,11 +3,16 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
3
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
4
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
5
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7
- import { getSystemTodoActionList } from '../todoActionList';
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ import { getSystemTodoActionList } from "../todoActionList";
8
+ var PC_MODAL_LOCALE_PREFIX = 'pc.modal';
9
+ var localeKey = function localeKey(suffix) {
10
+ return "".concat(PC_MODAL_LOCALE_PREFIX, ".").concat(suffix);
11
+ };
8
12
  export default {
9
13
  compLib: 'root',
10
14
  compType: -1,
15
+ // 根节点
11
16
  isBusiObjContainer: false,
12
17
  isContainer: false,
13
18
  label: '弹窗',
@@ -18,7 +23,6 @@ export default {
18
23
  customHeight: 500,
19
24
  closeOnClickOverlay: false,
20
25
  footer: 1,
21
- layout: 'BlankLayout',
22
26
  compState: [{
23
27
  name: '业务主键',
24
28
  code: 'bizId'
@@ -37,14 +41,80 @@ export default {
37
41
  description: '',
38
42
  image: '',
39
43
  groupsName: 'root',
40
- todoActionList: [].concat(_toConsumableArray(getSystemTodoActionList('pc', 'Modal')), [{
44
+ todoActionList: [{
45
+ key: 'showMessage',
46
+ label: '消息提示',
47
+ todoOptions: [{
48
+ key: 'type',
49
+ label: '类型',
50
+ type: 'Select',
51
+ defaultValue: 'success',
52
+ props: {
53
+ options: [{
54
+ title: '成功',
55
+ value: 'success'
56
+ }, {
57
+ title: '提示',
58
+ value: 'info'
59
+ }, {
60
+ title: '警告',
61
+ value: 'warn'
62
+ }, {
63
+ title: '错误',
64
+ value: 'error'
65
+ }, {
66
+ title: '加载动画',
67
+ value: 'loading'
68
+ }]
69
+ }
70
+ }, {
71
+ key: 'icon',
72
+ label: '自定义图标',
73
+ type: 'ChooseIcon',
74
+ props: {
75
+ placeholder: '请选择图标'
76
+ }
77
+ }, {
78
+ key: 'value',
79
+ label: '内容',
80
+ type: 'SetExpression'
81
+ }, {
82
+ key: 'duration',
83
+ label: '加载时长',
84
+ type: 'InputNumber',
85
+ props: {
86
+ addonAfter: '秒',
87
+ step: '0.01',
88
+ formatter: function formatter(val) {
89
+ return val ? val.match(/^\d+(?:\.\d{0,2})?/) : undefined;
90
+ }
91
+ }
92
+ }, {
93
+ key: 'okText',
94
+ label: localeKey('todoActionList.showMessage.todoOptions.okText.label'),
95
+ type: 'Input'
96
+ }, {
97
+ key: 'cancelText',
98
+ label: localeKey('todoActionList.showMessage.todoOptions.cancelText.label'),
99
+ type: 'Input'
100
+ }],
101
+ todoCallbacks: ['callback1', 'callback2'],
102
+ classification: [{
103
+ label: localeKey('todoActionList.showMessage.classification.modal.label'),
104
+ value: 'modal'
105
+ }],
106
+ remarks: [{
107
+ label: '注意事项',
108
+ content: localeKey('todoActionList.showMessage.remarks.0.content')
109
+ }]
110
+ }].concat(_toConsumableArray(getSystemTodoActionList('pc', 'Modal')), [{
41
111
  key: 'previewFile',
42
112
  label: '文件预览',
43
113
  todoOptions: [{
44
114
  key: 'fileId',
45
- label: '文件ID/URL',
115
+ label: localeKey('todoActionList.previewFile.todoOptions.fileId.label'),
46
116
  type: 'SetExpression',
47
- labelTip: '文件预览格式支持:pdf、jpg、jpeg、png、svg、mp4、mov、txt、html、js、doc、xlsx、docx、wps、ppt等 注意:如果是外部URL,有可能存在跨域现象!'
117
+ labelTip: localeKey('todoActionList.previewFile.todoOptions.fileId.labelTip')
48
118
  }, {
49
119
  key: 'viewMode',
50
120
  label: '预览方式',
@@ -68,7 +138,7 @@ export default {
68
138
  type: 'SetExpression',
69
139
  defaultValue: '960',
70
140
  visibleFlag: 'viewMode',
71
- labelTip: '不同浏览器有不同的最小限制,请避免设置过小尺寸,当不设置宽高时,默认为全屏',
141
+ labelTip: localeKey('todoActionList.previewFile.todoOptions.modalWidth.labelTip'),
72
142
  visibleFlagValue: ['window']
73
143
  }, {
74
144
  key: 'modalHeight',
@@ -76,7 +146,7 @@ export default {
76
146
  type: 'SetExpression',
77
147
  defaultValue: '648',
78
148
  visibleFlag: 'viewMode',
79
- labelTip: '不同浏览器有不同的最小限制,请避免设置过小尺寸,当不设置宽高时,默认为全屏',
149
+ labelTip: localeKey('todoActionList.previewFile.todoOptions.modalHeight.labelTip'),
80
150
  visibleFlagValue: ['window']
81
151
  }],
82
152
  classification: [{
@@ -98,16 +168,16 @@ export default {
98
168
  label: '点击取消'
99
169
  }, {
100
170
  value: 'stateChange',
101
- label: '组件状态变化后'
171
+ label: localeKey('todoEvents.stateChange.label')
102
172
  }, {
103
173
  value: 'usePageEndRequest',
104
- label: '页面加载请求结束',
174
+ label: localeKey('todoEvents.usePageEndRequest.label'),
105
175
  remarks: [{
106
176
  label: '场景描述',
107
- content: '在页面加载完成事件中,所有的事件执行结束后进行回掉(包含页面加载完成事件中的异步请求(注意:定时器相关动作不计算回掉时间))'
177
+ content: localeKey('todoEvents.usePageEndRequest.remarks.0.content')
108
178
  }, {
109
179
  label: '适用场景',
110
- content: '在复杂的表单页面中,你可以在页面加载完成事件中进行页面loading的动作设置,在页面加载完成请求结束事件中取消loading,保障在复杂请求中,因异步导致数据未能及时回填,用户提交错误数据问题。'
180
+ content: localeKey('todoEvents.usePageEndRequest.remarks.1.content')
111
181
  }]
112
182
  }],
113
183
  todoProps: {
@@ -125,11 +195,11 @@ export default {
125
195
  groupsName: '基础',
126
196
  props: {
127
197
  required: true,
128
- placeholder: '如:/user/list',
198
+ placeholder: localeKey('todoProps.pagePath.props.placeholder'),
129
199
  regex: {
130
200
  // eslint-disable-next-line
131
201
  pattern: /^(\/[0-9A-Za-z]([_-]+[0-9A-Za-z]|[0-9A-Za-z])*)+$/i,
132
- message: '必须为/xx/yy/..格式'
202
+ message: localeKey('todoProps.pagePath.props.regex.message')
133
203
  }
134
204
  }
135
205
  },
@@ -160,16 +230,16 @@ export default {
160
230
  props: {
161
231
  options: [{
162
232
  value: 560,
163
- title: 's(560*auto)'
233
+ title: localeKey('todoProps.width.props.options.0.title')
164
234
  }, {
165
235
  value: 624,
166
- title: 'm(624*auto)'
236
+ title: localeKey('todoProps.width.props.options.1.title')
167
237
  }, {
168
238
  value: 1008,
169
- title: 'l(1008*auto)'
239
+ title: localeKey('todoProps.width.props.options.2.title')
170
240
  }, {
171
241
  value: 1200,
172
- title: 'xl(1200*auto)'
242
+ title: localeKey('todoProps.width.props.options.3.title')
173
243
  }, {
174
244
  value: 'custom',
175
245
  title: '自定义'
@@ -239,10 +309,10 @@ export default {
239
309
  props: {
240
310
  inhibitBtn: true,
241
311
  options: [{
242
- title: '点击蒙罩关闭窗口',
312
+ title: localeKey('todoProps.closeOnClickOverlay.props.options.0.title'),
243
313
  value: true
244
314
  }, {
245
- title: '点击蒙罩不关闭窗口',
315
+ title: localeKey('todoProps.closeOnClickOverlay.props.options.1.title'),
246
316
  value: false
247
317
  }]
248
318
  }
@@ -11,7 +11,6 @@ declare const _default: {
11
11
  customHeight: number;
12
12
  closeOnClickOverlay: boolean;
13
13
  footer: number;
14
- layout: string;
15
14
  compState: {
16
15
  name: string;
17
16
  code: string;
@@ -3,11 +3,16 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
3
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
4
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
5
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7
- import { getSystemTodoActionList } from '../todoActionList';
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ import { getSystemTodoActionList } from "../todoActionList";
8
+ var PC_POPOVER_LOCALE_PREFIX = 'pc.popover';
9
+ var localeKey = function localeKey(suffix) {
10
+ return "".concat(PC_POPOVER_LOCALE_PREFIX, ".").concat(suffix);
11
+ };
8
12
  export default {
9
13
  compLib: 'root',
10
14
  compType: -1,
15
+ // 根节点
11
16
  isBusiObjContainer: false,
12
17
  isContainer: false,
13
18
  label: '气泡卡片',
@@ -18,7 +23,6 @@ export default {
18
23
  customHeight: 500,
19
24
  closeOnClickOverlay: true,
20
25
  footer: 1,
21
- layout: 'BlankLayout',
22
26
  compState: [{
23
27
  name: '业务主键',
24
28
  code: 'bizId'
@@ -31,14 +35,80 @@ export default {
31
35
  description: '',
32
36
  image: '',
33
37
  groupsName: 'root',
34
- todoActionList: [].concat(_toConsumableArray(getSystemTodoActionList('pc')), [{
38
+ todoActionList: [{
39
+ key: 'showMessage',
40
+ label: '消息提示',
41
+ todoOptions: [{
42
+ key: 'type',
43
+ label: '类型',
44
+ type: 'Select',
45
+ defaultValue: 'success',
46
+ props: {
47
+ options: [{
48
+ title: '成功',
49
+ value: 'success'
50
+ }, {
51
+ title: '提示',
52
+ value: 'info'
53
+ }, {
54
+ title: '警告',
55
+ value: 'warn'
56
+ }, {
57
+ title: '错误',
58
+ value: 'error'
59
+ }, {
60
+ title: '加载动画',
61
+ value: 'loading'
62
+ }]
63
+ }
64
+ }, {
65
+ key: 'icon',
66
+ label: '自定义图标',
67
+ type: 'ChooseIcon',
68
+ props: {
69
+ placeholder: '请选择图标'
70
+ }
71
+ }, {
72
+ key: 'value',
73
+ label: '内容',
74
+ type: 'SetExpression'
75
+ }, {
76
+ key: 'duration',
77
+ label: '加载时长',
78
+ type: 'InputNumber',
79
+ props: {
80
+ addonAfter: '秒',
81
+ step: '0.01',
82
+ formatter: function formatter(val) {
83
+ return val ? val.match(/^\d+(?:\.\d{0,2})?/) : undefined;
84
+ }
85
+ }
86
+ }, {
87
+ key: 'okText',
88
+ label: localeKey('todoActionList.showMessage.todoOptions.okText.label'),
89
+ type: 'Input'
90
+ }, {
91
+ key: 'cancelText',
92
+ label: localeKey('todoActionList.showMessage.todoOptions.cancelText.label'),
93
+ type: 'Input'
94
+ }],
95
+ todoCallbacks: ['callback1', 'callback2'],
96
+ classification: [{
97
+ label: localeKey('todoActionList.showMessage.classification.modal.label'),
98
+ value: 'modal'
99
+ }],
100
+ remarks: [{
101
+ label: '注意事项',
102
+ content: localeKey('todoActionList.showMessage.remarks.0.content')
103
+ }]
104
+ }].concat(_toConsumableArray(getSystemTodoActionList('pc')), [{
35
105
  key: 'previewFile',
36
106
  label: '文件预览',
37
107
  todoOptions: [{
38
108
  key: 'fileId',
39
- label: '文件ID/URL',
109
+ label: localeKey('todoActionList.previewFile.todoOptions.fileId.label'),
40
110
  type: 'SetExpression',
41
- labelTip: '文件预览格式支持:pdf、jpg、jpeg、png、svg、mp4、mov、txt、html、js、doc、xlsx、docx、wps、ppt等 注意:如果是外部URL,有可能存在跨域现象!'
111
+ labelTip: localeKey('todoActionList.previewFile.todoOptions.fileId.labelTip')
42
112
  }, {
43
113
  key: 'viewMode',
44
114
  label: '预览方式',
@@ -62,7 +132,7 @@ export default {
62
132
  type: 'SetExpression',
63
133
  defaultValue: '960',
64
134
  visibleFlag: 'viewMode',
65
- labelTip: '不同浏览器有不同的最小限制,请避免设置过小尺寸,当不设置宽高时,默认为全屏',
135
+ labelTip: localeKey('todoActionList.previewFile.todoOptions.modalWidth.labelTip'),
66
136
  visibleFlagValue: ['window']
67
137
  }, {
68
138
  key: 'modalHeight',
@@ -70,7 +140,7 @@ export default {
70
140
  type: 'SetExpression',
71
141
  defaultValue: '648',
72
142
  visibleFlag: 'viewMode',
73
- labelTip: '不同浏览器有不同的最小限制,请避免设置过小尺寸,当不设置宽高时,默认为全屏',
143
+ labelTip: localeKey('todoActionList.previewFile.todoOptions.modalHeight.labelTip'),
74
144
  visibleFlagValue: ['window']
75
145
  }],
76
146
  classification: [{
@@ -80,22 +150,22 @@ export default {
80
150
  }]),
81
151
  todoEvents: [{
82
152
  value: 'useEffect',
83
- label: '浮窗加载完成'
153
+ label: localeKey('todoEvents.useEffect.label')
84
154
  }, {
85
155
  value: 'stateChange',
86
- label: '组件状态变化后'
156
+ label: localeKey('todoEvents.stateChange.label')
87
157
  }, {
88
158
  value: 'willUnmount',
89
159
  label: '浮窗关闭'
90
160
  }, {
91
161
  value: 'usePageEndRequest',
92
- label: '页面加载请求结束',
162
+ label: localeKey('todoEvents.usePageEndRequest.label'),
93
163
  remarks: [{
94
164
  label: '场景描述',
95
- content: '在页面加载完成事件中,所有的事件执行结束后进行回掉(包含页面加载完成事件中的异步请求(注意:定时器相关动作不计算回掉时间))'
165
+ content: localeKey('todoEvents.usePageEndRequest.remarks.0.content')
96
166
  }, {
97
167
  label: '适用场景',
98
- content: '在复杂的表单页面中,你可以在页面加载完成事件中进行页面loading的动作设置,在页面加载完成请求结束事件中取消loading,保障在复杂请求中,因异步导致数据未能及时回填,用户提交错误数据问题。'
168
+ content: localeKey('todoEvents.usePageEndRequest.remarks.1.content')
99
169
  }]
100
170
  }],
101
171
  todoProps: {
@@ -118,11 +188,11 @@ export default {
118
188
  groupsName: '基础',
119
189
  props: {
120
190
  required: true,
121
- placeholder: '如:/user/list',
191
+ placeholder: localeKey('todoProps.pagePath.props.placeholder'),
122
192
  regex: {
123
193
  // eslint-disable-next-line
124
194
  pattern: /^(\/[0-9A-Za-z]([_-]+[0-9A-Za-z]|[0-9A-Za-z])*)+$/i,
125
- message: '必须为/xx/yy/..格式'
195
+ message: localeKey('todoProps.pagePath.props.regex.message')
126
196
  }
127
197
  }
128
198
  },
@@ -1,5 +1,5 @@
1
- export { default as BusiComp } from './BusiComp';
2
- export { default as Drawer } from './Drawer';
3
- export { default as Popover } from './Popover';
4
- export { default as Page } from './page';
5
- export { default as Modal } from './Modal';
1
+ export { default as BusiComp } from "./BusiComp";
2
+ export { default as Drawer } from "./Drawer";
3
+ export { default as Popover } from "./Popover";
4
+ export { default as Page } from "./page";
5
+ export { default as Modal } from "./Modal";