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