doway-coms 2.1.2 → 2.1.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 (77) hide show
  1. package/.browserslistrc +2 -2
  2. package/README.md +28 -28
  3. package/package.json +53 -53
  4. package/packages/AuditsList/index.js +7 -7
  5. package/packages/AuditsList/src/index.vue +262 -262
  6. package/packages/BaseButton/index.js +7 -7
  7. package/packages/BaseButton/src/index.vue +241 -241
  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 +197 -197
  12. package/packages/BaseDateWeek/index.js +7 -7
  13. package/packages/BaseDateWeek/src/index.vue +163 -163
  14. package/packages/BaseDatetime/index.js +7 -7
  15. package/packages/BaseDatetime/src/index.vue +196 -196
  16. package/packages/BaseForm/index.js +7 -7
  17. package/packages/BaseForm/src/index.vue +727 -727
  18. package/packages/BaseGantt/index.js +9 -9
  19. package/packages/BaseGantt/src/index.vue +608 -608
  20. package/packages/BaseGrid/index.js +9 -9
  21. package/packages/BaseGrid/src/SeqSetting.vue +278 -278
  22. package/packages/BaseGrid/src/index.vue +3382 -3380
  23. package/packages/BaseGridAdjust/index.js +9 -9
  24. package/packages/BaseGridAdjust/src/index.vue +482 -482
  25. package/packages/BaseInput/index.js +7 -7
  26. package/packages/BaseInput/src/index.vue +164 -164
  27. package/packages/BaseIntervalInput/index.js +7 -7
  28. package/packages/BaseIntervalInput/src/index.vue +310 -310
  29. package/packages/BaseKanbanEmpty/index.js +7 -7
  30. package/packages/BaseKanbanEmpty/src/index.vue +176 -176
  31. package/packages/BaseNumberInput/index.js +7 -7
  32. package/packages/BaseNumberInput/src/index.vue +267 -267
  33. package/packages/BasePagination/index.js +7 -7
  34. package/packages/BasePagination/src/index.vue +91 -91
  35. package/packages/BasePictureCard/index.js +7 -7
  36. package/packages/BasePictureCard/src/index.vue +580 -580
  37. package/packages/BasePrintPreview/index.js +7 -7
  38. package/packages/BasePrintPreview/src/index.vue +129 -129
  39. package/packages/BasePulldown/index.js +7 -7
  40. package/packages/BasePulldown/src/index.vue +1165 -1165
  41. package/packages/BaseSearch/index.js +7 -7
  42. package/packages/BaseSearch/src/index.vue +935 -935
  43. package/packages/BaseSelect/index.js +7 -7
  44. package/packages/BaseSelect/src/index.vue +155 -155
  45. package/packages/BaseSelectMulti/index.js +7 -7
  46. package/packages/BaseSelectMulti/src/index.vue +148 -148
  47. package/packages/BaseTextArea/index.js +7 -7
  48. package/packages/BaseTextArea/src/index.vue +178 -178
  49. package/packages/BaseTime/index.js +7 -7
  50. package/packages/BaseTime/src/index.vue +166 -166
  51. package/packages/BaseTool/index.js +7 -7
  52. package/packages/BaseTool/src/index.vue +349 -349
  53. package/packages/BaseToolStatus/index.js +7 -7
  54. package/packages/BaseToolStatus/src/index.vue +388 -388
  55. package/packages/BaseTreeSelect/index.js +8 -8
  56. package/packages/BaseTreeSelect/src/index.vue +416 -416
  57. package/packages/LeaveAMessage/index.js +7 -7
  58. package/packages/LeaveAMessage/src/index.vue +597 -597
  59. package/packages/index.js +191 -191
  60. package/packages/styles/default.less +80 -80
  61. package/packages/utils/api.js +99 -99
  62. package/packages/utils/auth.js +38 -38
  63. package/packages/utils/common.js +601 -601
  64. package/packages/utils/dom.js +181 -181
  65. package/packages/utils/enum.js +85 -85
  66. package/packages/utils/filters.js +458 -458
  67. package/packages/utils/gridFormat.js +60 -60
  68. package/packages/utils/msg.js +84 -84
  69. package/packages/utils/patchFiles.js +44 -44
  70. package/packages/utils/request.js +178 -178
  71. package/packages/utils/store.js +303 -303
  72. package/vue.config.js +59 -59
  73. package/dist/css/chunk-vendors.7f83d8f9.css +0 -8
  74. package/dist/css/index.86478f73.css +0 -3
  75. package/dist/favicon.ico +0 -0
  76. package/dist/js/chunk-vendors.307eaa8f.js +0 -347
  77. package/dist/js/index.48e7f7ac.js +0 -2
@@ -1,267 +1,267 @@
1
- <template>
2
- <div class="d-control-container">
3
- <div
4
- class="d-control-label"
5
- v-if="showLabel === true"
6
- :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
7
- >
8
- {{ label }}
9
- <span
10
- v-if="rules && Object.getOwnPropertyNames(rules).length > 0"
11
- class="d-control-label-required"
12
- >*</span
13
- >
14
- <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
15
- <img src="../../styles/icon/help.png" alt="" style="width: 14px">
16
- </Tooltip>
17
- </div>
18
- <div
19
- :class="{
20
- 'd-control': showLabel === true,
21
- 'd-grid-control': showLabel === false
22
- }"
23
- >
24
- <ValidationProvider
25
- :name="label"
26
- v-slot="v"
27
- :rules="rules"
28
- v-if="edit === true"
29
- >
30
- <span v-if="percent">
31
- <InputNumber
32
- :size="'small'"
33
- v-model="percentValue"
34
- @change="numberChange"
35
- @blur="blur"
36
- :placeholder="placeholder"
37
- :formatter="numberFormatter"
38
- :parser="numberParse"
39
- style="width: 100%"
40
- :class="{ 'd-error-input': v.errors.length > 0 }"
41
- />
42
- </span>
43
- <span v-else>
44
- <InputNumber
45
- :size="'small'"
46
- v-model="currentValue"
47
- @change="numberChange"
48
- @blur="blur"
49
- :placeholder="placeholder"
50
- :formatter="numberFormatter"
51
- :parser="numberParse"
52
- style="width: 100%"
53
- :class="{ 'd-error-input': v.errors.length > 0 }"
54
- />
55
- </span>
56
- <div class="d-error-msg">
57
- {{ v.errors[0] }}
58
- </div>
59
- </ValidationProvider>
60
- <span v-else>
61
- <span v-if="percent">{{ currentValue*100 }}%</span>
62
- <span v-else>{{ currentValue }}</span>
63
- </span>
64
- </div>
65
- </div>
66
- </template>
67
-
68
- <script>
69
- import XEUtils from 'xe-utils'
70
- import { InputNumber } from 'ant-design-vue'
71
- import { ValidationProvider } from 'vee-validate'
72
- import { Tooltip } from 'ant-design-vue'
73
-
74
- export default {
75
- name: 'BaseNumberInput',
76
- components:{
77
- InputNumber,
78
- ValidationProvider,
79
- Tooltip,
80
-
81
- },
82
- data() {
83
- return {
84
- testValue: 0,
85
- filterValue: '',
86
- isInputChanged: false,
87
- inputTimeout: null,
88
- searchRows: [],
89
- filterCols: [],
90
- gridLoading: false,
91
- gridPagerConfig: {
92
- total: 0,
93
- currentPage: 1,
94
- pageSize: 10
95
- },
96
- percentValue: 0,
97
- }
98
- },
99
- computed: {
100
- currentValue: {
101
- // 动态计算currentValue的值
102
- get: function() {
103
- if (this.percent) {
104
- this.percentValue = this.value*100
105
- }
106
- return this.value // 将props中的value赋值给currentValue
107
- },
108
- set: function(val) {
109
- if (val === '') {
110
- val = 0
111
- }
112
- if (XEUtils.isNumber(val)) {
113
- this.$emit('input', val)
114
- }
115
- // 通过$emit触发父组件
116
- }
117
- }
118
- },
119
- props: {
120
- showLabel: {
121
- type: Boolean,
122
- default: function() {
123
- return true
124
- }
125
- },
126
- labelWidth: {
127
- type: Number,
128
- default: function() {
129
- return 0
130
- }
131
- },
132
- value: {
133
- type: Number,
134
- default: function() {
135
- return 0
136
- }
137
- },
138
- max: {
139
- //最大值
140
- type: Number,
141
- default: function() {
142
- return null
143
- }
144
- },
145
- min: {
146
- //最小值
147
- type: Number,
148
- default: function() {
149
- return 0
150
- }
151
- },
152
- precision: {
153
- //小数位精度
154
- type: Number,
155
- default: function() {
156
- return 0
157
- }
158
- },
159
- rules: {
160
- type: Object,
161
- default: function() {
162
- return null
163
- }
164
- },
165
- edit: {
166
- type: Boolean,
167
- default: function() {
168
- return false
169
- }
170
- },
171
- name: {
172
- type: String,
173
- default: function() {
174
- return ''
175
- }
176
- },
177
- label: {
178
- type: String,
179
- default: function() {
180
- return ''
181
- }
182
- },
183
- placeholder: {
184
- type: String,
185
- default: function() {
186
- return ''
187
- }
188
- },
189
- tooltip: {
190
- type: String,
191
- default: function() {
192
- return ''
193
- }
194
- },
195
- percent: {
196
- type: Boolean,
197
- default: function() {
198
- return false
199
- }
200
- },
201
- },
202
- created() {},
203
- methods: {
204
- numberChange(value) {
205
- if (this.percent) {
206
- this.currentValue = value/100
207
- }
208
- this.$emit('change')
209
- },
210
- blur() {
211
- this.$emit('blur')
212
- },
213
- numberFormatter(value) {
214
- // 百分比格式化
215
- if (this.percent) {
216
- return value + '%'
217
- }
218
- return value
219
- },
220
- numberParse(value) {
221
- // 百分比格式化
222
- if (this.percent) {
223
- value.replace('%', '')
224
- }
225
- if (value === null || value === '') {
226
- return value
227
- }
228
- let returnValue = value
229
- let tempPrecision = XEUtils.toNumber(this.precision)
230
- let reg = new RegExp(
231
- '^((-?)|(-?([1-9]{1}\\d*)|-?([0]{1})))(\\.(\\d){0,' +
232
- tempPrecision +
233
- '})?$'
234
- )
235
- if (!reg.test(value)) {
236
- //小数点验证不通过
237
- returnValue = XEUtils.floor(value, tempPrecision)
238
- }
239
- if (
240
- this.max !== null &&
241
- this.max !== undefined &&
242
- XEUtils.toNumber(returnValue) > this.max
243
- ) {
244
- returnValue = this.max
245
- }
246
- if (
247
- this.min !== null &&
248
- this.min !== undefined &&
249
- XEUtils.toNumber(returnValue) < this.min
250
- ) {
251
- returnValue = this.min
252
- }
253
- return returnValue
254
- }
255
- }
256
- }
257
- </script>
258
-
259
- <style lang="scss" scoped></style>
260
- <style>
261
- .ant-input-number-handler-wrap {
262
- display: none;
263
- }
264
- </style>
265
- <style lang="less">
266
- @import '../../styles/default.less';
267
- </style>
1
+ <template>
2
+ <div class="d-control-container">
3
+ <div
4
+ class="d-control-label"
5
+ v-if="showLabel === true"
6
+ :style="{ width: labelWidth > 0 ? labelWidth + 'px' : 'none' }"
7
+ >
8
+ {{ label }}
9
+ <span
10
+ v-if="rules && Object.getOwnPropertyNames(rules).length > 0"
11
+ class="d-control-label-required"
12
+ >*</span
13
+ >
14
+ <Tooltip :title="tooltip" v-if="tooltip" style="margin: 0 2px">
15
+ <img src="../../styles/icon/help.png" alt="" style="width: 14px">
16
+ </Tooltip>
17
+ </div>
18
+ <div
19
+ :class="{
20
+ 'd-control': showLabel === true,
21
+ 'd-grid-control': showLabel === false
22
+ }"
23
+ >
24
+ <ValidationProvider
25
+ :name="label"
26
+ v-slot="v"
27
+ :rules="rules"
28
+ v-if="edit === true"
29
+ >
30
+ <span v-if="percent">
31
+ <InputNumber
32
+ :size="'small'"
33
+ v-model="percentValue"
34
+ @change="numberChange"
35
+ @blur="blur"
36
+ :placeholder="placeholder"
37
+ :formatter="numberFormatter"
38
+ :parser="numberParse"
39
+ style="width: 100%"
40
+ :class="{ 'd-error-input': v.errors.length > 0 }"
41
+ />
42
+ </span>
43
+ <span v-else>
44
+ <InputNumber
45
+ :size="'small'"
46
+ v-model="currentValue"
47
+ @change="numberChange"
48
+ @blur="blur"
49
+ :placeholder="placeholder"
50
+ :formatter="numberFormatter"
51
+ :parser="numberParse"
52
+ style="width: 100%"
53
+ :class="{ 'd-error-input': v.errors.length > 0 }"
54
+ />
55
+ </span>
56
+ <div class="d-error-msg">
57
+ {{ v.errors[0] }}
58
+ </div>
59
+ </ValidationProvider>
60
+ <span v-else>
61
+ <span v-if="percent">{{ currentValue*100 }}%</span>
62
+ <span v-else>{{ currentValue }}</span>
63
+ </span>
64
+ </div>
65
+ </div>
66
+ </template>
67
+
68
+ <script>
69
+ import XEUtils from 'xe-utils'
70
+ import { InputNumber } from 'ant-design-vue'
71
+ import { ValidationProvider } from 'vee-validate'
72
+ import { Tooltip } from 'ant-design-vue'
73
+
74
+ export default {
75
+ name: 'BaseNumberInput',
76
+ components:{
77
+ InputNumber,
78
+ ValidationProvider,
79
+ Tooltip,
80
+
81
+ },
82
+ data() {
83
+ return {
84
+ testValue: 0,
85
+ filterValue: '',
86
+ isInputChanged: false,
87
+ inputTimeout: null,
88
+ searchRows: [],
89
+ filterCols: [],
90
+ gridLoading: false,
91
+ gridPagerConfig: {
92
+ total: 0,
93
+ currentPage: 1,
94
+ pageSize: 10
95
+ },
96
+ percentValue: 0,
97
+ }
98
+ },
99
+ computed: {
100
+ currentValue: {
101
+ // 动态计算currentValue的值
102
+ get: function() {
103
+ if (this.percent) {
104
+ this.percentValue = this.value*100
105
+ }
106
+ return this.value // 将props中的value赋值给currentValue
107
+ },
108
+ set: function(val) {
109
+ if (val === '') {
110
+ val = 0
111
+ }
112
+ if (XEUtils.isNumber(val)) {
113
+ this.$emit('input', val)
114
+ }
115
+ // 通过$emit触发父组件
116
+ }
117
+ }
118
+ },
119
+ props: {
120
+ showLabel: {
121
+ type: Boolean,
122
+ default: function() {
123
+ return true
124
+ }
125
+ },
126
+ labelWidth: {
127
+ type: Number,
128
+ default: function() {
129
+ return 0
130
+ }
131
+ },
132
+ value: {
133
+ type: Number,
134
+ default: function() {
135
+ return 0
136
+ }
137
+ },
138
+ max: {
139
+ //最大值
140
+ type: Number,
141
+ default: function() {
142
+ return null
143
+ }
144
+ },
145
+ min: {
146
+ //最小值
147
+ type: Number,
148
+ default: function() {
149
+ return 0
150
+ }
151
+ },
152
+ precision: {
153
+ //小数位精度
154
+ type: Number,
155
+ default: function() {
156
+ return 0
157
+ }
158
+ },
159
+ rules: {
160
+ type: Object,
161
+ default: function() {
162
+ return null
163
+ }
164
+ },
165
+ edit: {
166
+ type: Boolean,
167
+ default: function() {
168
+ return false
169
+ }
170
+ },
171
+ name: {
172
+ type: String,
173
+ default: function() {
174
+ return ''
175
+ }
176
+ },
177
+ label: {
178
+ type: String,
179
+ default: function() {
180
+ return ''
181
+ }
182
+ },
183
+ placeholder: {
184
+ type: String,
185
+ default: function() {
186
+ return ''
187
+ }
188
+ },
189
+ tooltip: {
190
+ type: String,
191
+ default: function() {
192
+ return ''
193
+ }
194
+ },
195
+ percent: {
196
+ type: Boolean,
197
+ default: function() {
198
+ return false
199
+ }
200
+ },
201
+ },
202
+ created() {},
203
+ methods: {
204
+ numberChange(value) {
205
+ if (this.percent) {
206
+ this.currentValue = value/100
207
+ }
208
+ this.$emit('change')
209
+ },
210
+ blur() {
211
+ this.$emit('blur')
212
+ },
213
+ numberFormatter(value) {
214
+ // 百分比格式化
215
+ if (this.percent) {
216
+ return value + '%'
217
+ }
218
+ return value
219
+ },
220
+ numberParse(value) {
221
+ // 百分比格式化
222
+ if (this.percent) {
223
+ value.replace('%', '')
224
+ }
225
+ if (value === null || value === '') {
226
+ return value
227
+ }
228
+ let returnValue = value
229
+ let tempPrecision = XEUtils.toNumber(this.precision)
230
+ let reg = new RegExp(
231
+ '^((-?)|(-?([1-9]{1}\\d*)|-?([0]{1})))(\\.(\\d){0,' +
232
+ tempPrecision +
233
+ '})?$'
234
+ )
235
+ if (!reg.test(value)) {
236
+ //小数点验证不通过
237
+ returnValue = XEUtils.floor(value, tempPrecision)
238
+ }
239
+ if (
240
+ this.max !== null &&
241
+ this.max !== undefined &&
242
+ XEUtils.toNumber(returnValue) > this.max
243
+ ) {
244
+ returnValue = this.max
245
+ }
246
+ if (
247
+ this.min !== null &&
248
+ this.min !== undefined &&
249
+ XEUtils.toNumber(returnValue) < this.min
250
+ ) {
251
+ returnValue = this.min
252
+ }
253
+ return returnValue
254
+ }
255
+ }
256
+ }
257
+ </script>
258
+
259
+ <style lang="scss" scoped></style>
260
+ <style>
261
+ .ant-input-number-handler-wrap {
262
+ display: none;
263
+ }
264
+ </style>
265
+ <style lang="less">
266
+ @import '../../styles/default.less';
267
+ </style>
@@ -1,8 +1,8 @@
1
- // 导入组件,组件必须声明 name
2
- import BasePagination from './src/index.vue';
3
- // 为组件提供 install 安装方法,供按需引入
4
- BasePagination.install = function(Vue) {
5
- Vue.component(BasePagination.name, BasePagination);
6
- };
7
- // 默认导出组件
1
+ // 导入组件,组件必须声明 name
2
+ import BasePagination from './src/index.vue';
3
+ // 为组件提供 install 安装方法,供按需引入
4
+ BasePagination.install = function(Vue) {
5
+ Vue.component(BasePagination.name, BasePagination);
6
+ };
7
+ // 默认导出组件
8
8
  export default BasePagination;