doway-coms 2.11.96 → 2.12.0

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 (94) hide show
  1. package/.browserslistrc +2 -2
  2. package/README.md +28 -28
  3. package/package.json +63 -63
  4. package/packages/AuditsList/index.js +7 -7
  5. package/packages/AuditsList/src/index.vue +314 -314
  6. package/packages/BaseButton/index.js +7 -7
  7. package/packages/BaseButton/src/index.vue +242 -242
  8. package/packages/BaseCheckbox/index.js +7 -7
  9. package/packages/BaseCheckbox/src/index.vue +134 -134
  10. package/packages/BaseDate/index.js +7 -7
  11. package/packages/BaseDate/src/index.vue +233 -233
  12. package/packages/BaseDateMonth/index.js +7 -7
  13. package/packages/BaseDateMonth/src/index.vue +163 -163
  14. package/packages/BaseDateWeek/index.js +7 -7
  15. package/packages/BaseDateWeek/src/index.vue +163 -163
  16. package/packages/BaseDatetime/index.js +7 -7
  17. package/packages/BaseDatetime/src/index.vue +196 -196
  18. package/packages/BaseFileGroup/index.js +7 -7
  19. package/packages/BaseFileGroup/src/index.vue +778 -778
  20. package/packages/BaseForm/index.js +7 -7
  21. package/packages/BaseForm/src/index.vue +913 -913
  22. package/packages/BaseGantt/index.js +9 -9
  23. package/packages/BaseGantt/src/index.vue +617 -617
  24. package/packages/BaseGrid/index.js +9 -9
  25. package/packages/BaseGrid/src/exportCmp.vue +105 -105
  26. package/packages/BaseGrid/src/gridApi.js +32 -32
  27. package/packages/BaseGrid/src/index.vue +4762 -4762
  28. package/packages/BaseGridAdjust/index.js +9 -9
  29. package/packages/BaseGridAdjust/src/index.vue +482 -482
  30. package/packages/BaseInput/index.js +7 -7
  31. package/packages/BaseInput/src/index.vue +207 -207
  32. package/packages/BaseIntervalInput/index.js +7 -7
  33. package/packages/BaseIntervalInput/src/index.vue +316 -316
  34. package/packages/BaseKanbanEmpty/index.js +7 -7
  35. package/packages/BaseKanbanEmpty/src/index.vue +176 -176
  36. package/packages/BaseNumberInput/index.js +7 -7
  37. package/packages/BaseNumberInput/src/index.vue +282 -278
  38. package/packages/BasePagination/index.js +7 -7
  39. package/packages/BasePagination/src/index.vue +90 -90
  40. package/packages/BasePictureCard/index.js +7 -7
  41. package/packages/BasePictureCard/src/index.vue +671 -671
  42. package/packages/BasePrintPreview/index.js +7 -7
  43. package/packages/BasePrintPreview/src/index.vue +214 -214
  44. package/packages/BasePulldown/index.js +7 -7
  45. package/packages/BasePulldown/src/index.vue +1406 -1406
  46. package/packages/BaseSearch/index.js +7 -7
  47. package/packages/BaseSearch/src/index.vue +935 -935
  48. package/packages/BaseSelect/index.js +7 -7
  49. package/packages/BaseSelect/src/index.vue +169 -169
  50. package/packages/BaseSelectMulti/index.js +7 -7
  51. package/packages/BaseSelectMulti/src/index.vue +148 -148
  52. package/packages/BaseTextArea/index.js +7 -7
  53. package/packages/BaseTextArea/src/index.vue +197 -197
  54. package/packages/BaseTime/index.js +7 -7
  55. package/packages/BaseTime/src/index.vue +166 -166
  56. package/packages/BaseTool/index.js +7 -7
  57. package/packages/BaseTool/src/index.vue +353 -353
  58. package/packages/BaseToolStatus/index.js +7 -7
  59. package/packages/BaseToolStatus/src/ApprovalPersonsGroup.vue +41 -41
  60. package/packages/BaseToolStatus/src/index.vue +439 -439
  61. package/packages/BaseTreeSelect/index.js +8 -8
  62. package/packages/BaseTreeSelect/src/index.vue +437 -437
  63. package/packages/HistoryModal/index.js +8 -8
  64. package/packages/HistoryModal/src/index.vue +161 -161
  65. package/packages/LeaveAMessage/index.js +7 -7
  66. package/packages/LeaveAMessage/src/index.vue +601 -601
  67. package/packages/directive/clickoutside.js +44 -44
  68. package/packages/index.js +197 -197
  69. package/packages/styles/default.css +78 -78
  70. package/packages/styles/default.less +91 -91
  71. package/packages/styles/hps/default.less +73 -73
  72. package/packages/utils/api.js +134 -134
  73. package/packages/utils/auth.js +38 -38
  74. package/packages/utils/common.js +728 -728
  75. package/packages/utils/dom.js +181 -181
  76. package/packages/utils/enum.js +87 -87
  77. package/packages/utils/filters.js +542 -542
  78. package/packages/utils/gridFormat.js +66 -66
  79. package/packages/utils/msg.js +105 -105
  80. package/packages/utils/patchFiles.js +44 -44
  81. package/packages/utils/request.js +181 -181
  82. package/packages/utils/store.js +405 -396
  83. package/packages/utils/tscPrinter.js +101 -101
  84. package/sync.bash +6 -6
  85. package/vue.config.js +59 -59
  86. package/dist/css/chunk-vendors.7f83d8f9.css +0 -8
  87. package/dist/css/index.7946d50b.css +0 -1
  88. package/dist/favicon.ico +0 -0
  89. package/dist/js/chunk-vendors.28fda91d.js +0 -340
  90. package/dist/js/index.49bc6add.js +0 -2
  91. package/lib/doway-coms.common.js +0 -120397
  92. package/lib/doway-coms.css +0 -1
  93. package/lib/doway-coms.umd.js +0 -120407
  94. package/lib/doway-coms.umd.min.js +0 -328
@@ -1,67 +1,67 @@
1
- import VXETable from 'vxe-table'
2
- import XEUtils from 'xe-utils'
3
- VXETable.formats.mixin({
4
- // 格式化性别
5
- formatSex({ cellValue }) {
6
- return cellValue ? (cellValue === '1' ? '男' : '女') : ''
7
- },
8
- formatCheckbox({ cellValue }) {
9
- return cellValue === true ? '是' : '否'
10
- },
11
- // 格式化下拉选项
12
- formatSelect(scope) {
13
- let dataSource = scope.column.params.dataSource
14
- if (!dataSource) {
15
- // console.error(scope.cellValue + ' 字典缺失')
16
- return scope.cellValue
17
- }
18
- const item = dataSource.find(item => item.value === scope.cellValue)
19
- return item ? item.caption : scope.cellValue
20
- },
21
- // 格式化日期,默认 yyyy-MM-dd HH:mm:ss
22
- formatDateTime({ cellValue }, format) {
23
- if (cellValue && cellValue.indexOf('.') > 0) {
24
- cellValue = cellValue.substr(0, cellValue.indexOf('.'))
25
- }
26
- return XEUtils.toDateString(cellValue, format || 'yyyy-MM-dd HH:mm:ss')
27
- },
28
- formatDate({ cellValue }, format) {
29
- return XEUtils.toDateString(cellValue, format || 'yyyy-MM-dd')
30
- },
31
- // 四舍五入金额,每隔3位逗号分隔,默认2位数
32
- formatAmount({ cellValue }, digits = 2) {
33
- return '¥' + XEUtils.commafy(XEUtils.toNumber(cellValue), { digits })
34
- },
35
- // 四舍五入金额,每隔3位逗号分隔,默认2位数,美元金额符号
36
- formatAmountUSD({ cellValue }, digits = 2) {
37
- return '$'+ XEUtils.commafy(XEUtils.toNumber(cellValue), { digits })
38
- },
39
- // 四舍五入金额,每隔3位逗号分隔,默认2位数,人民币金额符号
40
- formatAmountRMB({ cellValue }, digits = 2) {
41
- return '¥' + XEUtils.commafy(XEUtils.toNumber(cellValue), { digits })
42
- },
43
- // 格式化银行卡,默认每4位空格隔开
44
- formatBankcard({ cellValue }) {
45
- return XEUtils.commafy(XEUtils.toValueString(cellValue), {
46
- spaceNumber: 4,
47
- separator: ' '
48
- })
49
- },
50
- // 四舍五入,默认两位数
51
- formatFixedNumber({ cellValue }, digits = 2) {
52
- return XEUtils.toFixed(XEUtils.round(cellValue, digits), digits)
53
- },
54
- // 向下舍入,默认两位数
55
- formatCutNumber({ cellValue }, digits = 2) {
56
- return XEUtils.toFixed(XEUtils.floor(cellValue, digits), digits)
57
- },
58
- formatPercent({ cellValue }) {
59
- return cellValue + '%'
60
- },
61
- formatPercentAndFixedNumber({ cellValue }) {
62
- return XEUtils.toFixed(XEUtils.round(cellValue, digits), digits) +'%'
63
- },
64
- formatPercentValue({ cellValue },digits=2) {
65
- return XEUtils.round(cellValue*100,digits) + '%'
66
- }
1
+ import VXETable from 'vxe-table'
2
+ import XEUtils from 'xe-utils'
3
+ VXETable.formats.mixin({
4
+ // 格式化性别
5
+ formatSex({ cellValue }) {
6
+ return cellValue ? (cellValue === '1' ? '男' : '女') : ''
7
+ },
8
+ formatCheckbox({ cellValue }) {
9
+ return cellValue === true ? '是' : '否'
10
+ },
11
+ // 格式化下拉选项
12
+ formatSelect(scope) {
13
+ let dataSource = scope.column.params.dataSource
14
+ if (!dataSource) {
15
+ // console.error(scope.cellValue + ' 字典缺失')
16
+ return scope.cellValue
17
+ }
18
+ const item = dataSource.find(item => item.value === scope.cellValue)
19
+ return item ? item.caption : scope.cellValue
20
+ },
21
+ // 格式化日期,默认 yyyy-MM-dd HH:mm:ss
22
+ formatDateTime({ cellValue }, format) {
23
+ if (cellValue && cellValue.indexOf('.') > 0) {
24
+ cellValue = cellValue.substr(0, cellValue.indexOf('.'))
25
+ }
26
+ return XEUtils.toDateString(cellValue, format || 'yyyy-MM-dd HH:mm:ss')
27
+ },
28
+ formatDate({ cellValue }, format) {
29
+ return XEUtils.toDateString(cellValue, format || 'yyyy-MM-dd')
30
+ },
31
+ // 四舍五入金额,每隔3位逗号分隔,默认2位数
32
+ formatAmount({ cellValue }, digits = 2) {
33
+ return '¥' + XEUtils.commafy(XEUtils.toNumber(cellValue), { digits })
34
+ },
35
+ // 四舍五入金额,每隔3位逗号分隔,默认2位数,美元金额符号
36
+ formatAmountUSD({ cellValue }, digits = 2) {
37
+ return '$'+ XEUtils.commafy(XEUtils.toNumber(cellValue), { digits })
38
+ },
39
+ // 四舍五入金额,每隔3位逗号分隔,默认2位数,人民币金额符号
40
+ formatAmountRMB({ cellValue }, digits = 2) {
41
+ return '¥' + XEUtils.commafy(XEUtils.toNumber(cellValue), { digits })
42
+ },
43
+ // 格式化银行卡,默认每4位空格隔开
44
+ formatBankcard({ cellValue }) {
45
+ return XEUtils.commafy(XEUtils.toValueString(cellValue), {
46
+ spaceNumber: 4,
47
+ separator: ' '
48
+ })
49
+ },
50
+ // 四舍五入,默认两位数
51
+ formatFixedNumber({ cellValue }, digits = 2) {
52
+ return XEUtils.toFixed(XEUtils.round(cellValue, digits), digits)
53
+ },
54
+ // 向下舍入,默认两位数
55
+ formatCutNumber({ cellValue }, digits = 2) {
56
+ return XEUtils.toFixed(XEUtils.floor(cellValue, digits), digits)
57
+ },
58
+ formatPercent({ cellValue }) {
59
+ return cellValue + '%'
60
+ },
61
+ formatPercentAndFixedNumber({ cellValue }) {
62
+ return XEUtils.toFixed(XEUtils.round(cellValue, digits), digits) +'%'
63
+ },
64
+ formatPercentValue({ cellValue },digits=2) {
65
+ return XEUtils.round(cellValue*100,digits) + '%'
66
+ }
67
67
  })
@@ -1,105 +1,105 @@
1
- import {notification,Modal,message } from 'ant-design-vue'
2
- export function successMsg(msg, desc){
3
- message.success({ content: msg, duration: 2 })
4
- // notification['success']({ message: msg, description: desc, top: '100px' })
5
- }
6
- export function warningMsg(msg, desc){
7
- notification['warning'](
8
- {
9
- message: h => {
10
- return h("div", null, [
11
- h("div", {
12
- domProps: { innerHTML: msg },
13
- style: {
14
- 'white-space': 'pre-wrap', /* 保持空白符格式,允许正常的换行 */
15
- 'overflow-wrap': 'break-word', /* 允许单词在边界内断开 */
16
- 'word-wrap': 'break-word', /* 旧版浏览器的兼容性写法 */
17
- 'overflow-y': 'auto',
18
- 'max-width': '260px', /* 你想要的任何最大宽度 */
19
- 'max-height': '500px',
20
- }
21
- }, null),
22
- ])
23
- },
24
- description: h => {
25
- return h("div", null, [
26
- h("div", {
27
- domProps: { innerHTML: desc },
28
- style: {
29
- 'white-space': 'pre-wrap',
30
- 'overflow-wrap': 'break-word',
31
- 'word-wrap': 'break-word',
32
- 'overflow-y': 'auto',
33
- 'max-width': '260px',
34
- 'max-height': '500px',
35
- }
36
- }, null),
37
- ])
38
- },
39
- top: '100px'
40
- }
41
- )
42
- }
43
- export function errorMsg(msg, desc){
44
- notification['error'](
45
- {
46
- message: h => {
47
- return h("div", null, [
48
- h("div", {
49
- domProps: { innerHTML: msg },
50
- style: {
51
- 'white-space': 'pre-wrap', /* 保持空白符格式,允许正常的换行 */
52
- 'overflow-wrap': 'break-word', /* 允许单词在边界内断开 */
53
- 'word-wrap': 'break-word', /* 旧版浏览器的兼容性写法 */
54
- 'overflow-y': 'auto',
55
- 'max-width': '260px', /* 你想要的任何最大宽度 */
56
- 'max-height': '500px',
57
- }
58
- }, null),
59
- ])
60
- },
61
- description: h => {
62
- return h("div", null, [
63
- h("div", {
64
- domProps: { innerHTML: desc },
65
- style: {
66
- 'white-space': 'pre-wrap',
67
- 'overflow-wrap': 'break-word',
68
- 'word-wrap': 'break-word',
69
- 'overflow-y': 'auto',
70
- 'max-width': '260px',
71
- 'max-height': '500px',
72
- }
73
- }, null),
74
- ])
75
- },
76
- top: '100px'
77
- }
78
- )
79
- }
80
- export function infoMsg(dataInfo){
81
- notification['info'](dataInfo)
82
- }
83
- export function closeMsg(key){
84
- notification.close(key)
85
- }
86
- export const confirmMsg = Modal.confirm
87
-
88
-
89
-
90
- export function confirmMsgAsync(msgObj) {
91
- return new Promise((resolve, reject) => {
92
- confirmMsg({
93
- title: msgObj.title,
94
- content: msgObj.content,
95
- width: msgObj.width? msgObj.width : 416,
96
- zIndex:1000000,
97
- onOk() {
98
- resolve(true)
99
- },
100
- onCancel() {
101
- resolve(false)
102
- }
103
- })
104
- })
105
- }
1
+ import {notification,Modal,message } from 'ant-design-vue'
2
+ export function successMsg(msg, desc){
3
+ message.success({ content: msg, duration: 2 })
4
+ // notification['success']({ message: msg, description: desc, top: '100px' })
5
+ }
6
+ export function warningMsg(msg, desc){
7
+ notification['warning'](
8
+ {
9
+ message: h => {
10
+ return h("div", null, [
11
+ h("div", {
12
+ domProps: { innerHTML: msg },
13
+ style: {
14
+ 'white-space': 'pre-wrap', /* 保持空白符格式,允许正常的换行 */
15
+ 'overflow-wrap': 'break-word', /* 允许单词在边界内断开 */
16
+ 'word-wrap': 'break-word', /* 旧版浏览器的兼容性写法 */
17
+ 'overflow-y': 'auto',
18
+ 'max-width': '260px', /* 你想要的任何最大宽度 */
19
+ 'max-height': '500px',
20
+ }
21
+ }, null),
22
+ ])
23
+ },
24
+ description: h => {
25
+ return h("div", null, [
26
+ h("div", {
27
+ domProps: { innerHTML: desc },
28
+ style: {
29
+ 'white-space': 'pre-wrap',
30
+ 'overflow-wrap': 'break-word',
31
+ 'word-wrap': 'break-word',
32
+ 'overflow-y': 'auto',
33
+ 'max-width': '260px',
34
+ 'max-height': '500px',
35
+ }
36
+ }, null),
37
+ ])
38
+ },
39
+ top: '100px'
40
+ }
41
+ )
42
+ }
43
+ export function errorMsg(msg, desc){
44
+ notification['error'](
45
+ {
46
+ message: h => {
47
+ return h("div", null, [
48
+ h("div", {
49
+ domProps: { innerHTML: msg },
50
+ style: {
51
+ 'white-space': 'pre-wrap', /* 保持空白符格式,允许正常的换行 */
52
+ 'overflow-wrap': 'break-word', /* 允许单词在边界内断开 */
53
+ 'word-wrap': 'break-word', /* 旧版浏览器的兼容性写法 */
54
+ 'overflow-y': 'auto',
55
+ 'max-width': '260px', /* 你想要的任何最大宽度 */
56
+ 'max-height': '500px',
57
+ }
58
+ }, null),
59
+ ])
60
+ },
61
+ description: h => {
62
+ return h("div", null, [
63
+ h("div", {
64
+ domProps: { innerHTML: desc },
65
+ style: {
66
+ 'white-space': 'pre-wrap',
67
+ 'overflow-wrap': 'break-word',
68
+ 'word-wrap': 'break-word',
69
+ 'overflow-y': 'auto',
70
+ 'max-width': '260px',
71
+ 'max-height': '500px',
72
+ }
73
+ }, null),
74
+ ])
75
+ },
76
+ top: '100px'
77
+ }
78
+ )
79
+ }
80
+ export function infoMsg(dataInfo){
81
+ notification['info'](dataInfo)
82
+ }
83
+ export function closeMsg(key){
84
+ notification.close(key)
85
+ }
86
+ export const confirmMsg = Modal.confirm
87
+
88
+
89
+
90
+ export function confirmMsgAsync(msgObj) {
91
+ return new Promise((resolve, reject) => {
92
+ confirmMsg({
93
+ title: msgObj.title,
94
+ content: msgObj.content,
95
+ width: msgObj.width? msgObj.width : 416,
96
+ zIndex:1000000,
97
+ onOk() {
98
+ resolve(true)
99
+ },
100
+ onCancel() {
101
+ resolve(false)
102
+ }
103
+ })
104
+ })
105
+ }
@@ -1,45 +1,45 @@
1
- const fs = require('fs')
2
-
3
- const path = require('path')
4
- const chalk = require('chalk')
5
-
6
- // 解决 node_modules 修改源码,导致重新装包而要手动替换源码的重复操作。
7
- // 将 new_node_modules 内的文件 覆盖 真正的 node_modules
8
-
9
- const REAL_NODE_MODULES = path.resolve('./node_modules') // 旧node_modules
10
-
11
- const MY_NODE_MODULES = path.resolve('new_node_modules') // 新node_modules
12
-
13
- copy(MY_NODE_MODULES, REAL_NODE_MODULES)
14
-
15
- /**
16
-
17
- *复制目录中的所有文件包括子目录
18
- *@param{string}需要复制的目录、文件
19
- *@param{string}复制到指定的目录、文件
20
- *@param{function}每次复制前,都会经过一次filterFn,若返回true,则复制。
21
-
22
- */
23
-
24
- function copy(origin, target, filterFn = () => true) {
25
- if (fs.statSync(origin).isDirectory()) {
26
- // 来源是个文件夹,那目标也整一个文件夹
27
-
28
- if (!fs.existsSync(target)) {
29
- fs.mkdirSync(target)
30
- }
31
-
32
- fs.readdirSync(origin).forEach(originName => {
33
- const originFilePath = path.resolve(origin, originName)
34
-
35
- const targetFilePath = path.resolve(target, originName)
36
-
37
- copy(originFilePath, targetFilePath, filterFn)
38
- })
39
- } else if (filterFn(origin, target)) {
40
- console.info(chalk.blue('已被覆盖的文件:', target))
41
- fs.copyFileSync(origin, target)
42
- }
43
- }
44
-
1
+ const fs = require('fs')
2
+
3
+ const path = require('path')
4
+ const chalk = require('chalk')
5
+
6
+ // 解决 node_modules 修改源码,导致重新装包而要手动替换源码的重复操作。
7
+ // 将 new_node_modules 内的文件 覆盖 真正的 node_modules
8
+
9
+ const REAL_NODE_MODULES = path.resolve('./node_modules') // 旧node_modules
10
+
11
+ const MY_NODE_MODULES = path.resolve('new_node_modules') // 新node_modules
12
+
13
+ copy(MY_NODE_MODULES, REAL_NODE_MODULES)
14
+
15
+ /**
16
+
17
+ *复制目录中的所有文件包括子目录
18
+ *@param{string}需要复制的目录、文件
19
+ *@param{string}复制到指定的目录、文件
20
+ *@param{function}每次复制前,都会经过一次filterFn,若返回true,则复制。
21
+
22
+ */
23
+
24
+ function copy(origin, target, filterFn = () => true) {
25
+ if (fs.statSync(origin).isDirectory()) {
26
+ // 来源是个文件夹,那目标也整一个文件夹
27
+
28
+ if (!fs.existsSync(target)) {
29
+ fs.mkdirSync(target)
30
+ }
31
+
32
+ fs.readdirSync(origin).forEach(originName => {
33
+ const originFilePath = path.resolve(origin, originName)
34
+
35
+ const targetFilePath = path.resolve(target, originName)
36
+
37
+ copy(originFilePath, targetFilePath, filterFn)
38
+ })
39
+ } else if (filterFn(origin, target)) {
40
+ console.info(chalk.blue('已被覆盖的文件:', target))
41
+ fs.copyFileSync(origin, target)
42
+ }
43
+ }
44
+
45
45
  console.info(chalk.bold.yellow('💡💡💡 以上的文件已被rewrite_node_modules中的文件替换,升级版本后请注意检查!!!'))