lw-cdp-ui 1.2.48 → 1.2.49

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 (88) hide show
  1. package/package.json +1 -1
  2. package/dist/assets/images/empty.jpg +0 -0
  3. package/dist/assets/images/login.svg +0 -558
  4. package/dist/assets/images/logo.jpg +0 -0
  5. package/dist/assets/images/logo.svg +0 -78
  6. package/dist/assets/images/logo1.svg +0 -86
  7. package/dist/assets/images/register.svg +0 -351
  8. package/dist/components/lwCronSelect/index.vue +0 -218
  9. package/dist/components/lwFlow/components/lfControl.vue +0 -126
  10. package/dist/components/lwFlow/components/lfNodePanel.vue +0 -98
  11. package/dist/components/lwFlow/config/dagre.js +0 -279
  12. package/dist/components/lwFlow/config/nodesList.js +0 -243
  13. package/dist/components/lwFlow/index.vue +0 -781
  14. package/dist/components/lwFlow/nodeEdit/audienceReceive.vue +0 -262
  15. package/dist/components/lwFlow/nodeEdit/basicSettings.vue +0 -88
  16. package/dist/components/lwFlow/nodeEdit/eventReceive.vue +0 -145
  17. package/dist/components/lwFlow/nodeEdit/index.vue +0 -306
  18. package/dist/components/lwFlow/nodeEdit/sms.vue +0 -107
  19. package/dist/components/lwFlow/nodeEdit/styleSettings.vue +0 -236
  20. package/dist/components/lwFlow/nodes/basisEnd.js +0 -56
  21. package/dist/components/lwFlow/nodes/basisStart.js +0 -56
  22. package/dist/components/lwFlow/nodes/custom.js +0 -129
  23. package/dist/components/lwFlow/nodes/et2lTable.js +0 -132
  24. package/dist/components/lwFlow/nodesData/datas/audienceReceive.js +0 -137
  25. package/dist/components/lwFlow/nodesData/datas/base.js +0 -190
  26. package/dist/components/lwFlow/nodesData/datas/collap.js +0 -95
  27. package/dist/components/lwFlow/nodesData/datas/eventReceive.js +0 -106
  28. package/dist/components/lwFlow/nodesData/datas/expand.js +0 -85
  29. package/dist/components/lwFlow/nodesData/datas/filter.js +0 -85
  30. package/dist/components/lwFlow/nodesData/datas/joiner.js +0 -96
  31. package/dist/components/lwFlow/nodesData/datas/mapper.js +0 -111
  32. package/dist/components/lwFlow/nodesData/datas/reduce.js +0 -69
  33. package/dist/components/lwFlow/nodesData/datas/sms.js +0 -69
  34. package/dist/components/lwFlow/nodesData/datas/source.js +0 -142
  35. package/dist/components/lwFlow/nodesData/datas/target.js +0 -95
  36. package/dist/components/lwFlow/nodesData/datas/timer.js +0 -180
  37. package/dist/components/lwFlow/nodesData/index.js +0 -41
  38. package/dist/components/lwForm/index.vue +0 -631
  39. package/dist/components/lwFormJson/JsonItem.vue +0 -302
  40. package/dist/components/lwFormJson/StatsConfig.vue +0 -544
  41. package/dist/components/lwFormJson/TreeItem.vue +0 -149
  42. package/dist/components/lwFormJson/index.vue +0 -362
  43. package/dist/components/lwFormJson/menuList.js +0 -324
  44. package/dist/components/lwFormMini/FormItem.vue +0 -466
  45. package/dist/components/lwFormMini/ViewItem.vue +0 -391
  46. package/dist/components/lwFormMini/index.vue +0 -421
  47. package/dist/components/lwFormMini/textToPassword.vue +0 -61
  48. package/dist/components/lwFormView/index.vue +0 -390
  49. package/dist/components/lwFormView/textToPassword.vue +0 -59
  50. package/dist/components/lwIconSelect/iconSelect.js +0 -289
  51. package/dist/components/lwIconSelect/index.vue +0 -142
  52. package/dist/components/lwLayout/components/NavMenu.vue +0 -36
  53. package/dist/components/lwLayout/components/aside.vue +0 -295
  54. package/dist/components/lwLayout/components/bu.vue +0 -88
  55. package/dist/components/lwLayout/components/iframeView.vue +0 -57
  56. package/dist/components/lwLayout/components/lang.vue +0 -77
  57. package/dist/components/lwLayout/components/setting.vue +0 -102
  58. package/dist/components/lwLayout/components/sideM.vue +0 -135
  59. package/dist/components/lwLayout/components/tags.vue +0 -388
  60. package/dist/components/lwLayout/components/topbar.vue +0 -69
  61. package/dist/components/lwLayout/components/userbar.vue +0 -214
  62. package/dist/components/lwLayout/index.vue +0 -469
  63. package/dist/components/lwLogin/index.vue +0 -511
  64. package/dist/components/lwLogin/locale/en-us.js +0 -37
  65. package/dist/components/lwLogin/locale/zh-cn.js +0 -37
  66. package/dist/components/lwSearch/date/date.vue +0 -113
  67. package/dist/components/lwSearch/dateRange/dateRange.vue +0 -118
  68. package/dist/components/lwSearch/dates/dates.vue +0 -366
  69. package/dist/components/lwSearch/index.vue +0 -628
  70. package/dist/components/lwSearch/input/input.vue +0 -55
  71. package/dist/components/lwSearch/locale/en-us.js +0 -15
  72. package/dist/components/lwSearch/locale/zh-cn.js +0 -15
  73. package/dist/components/lwSearch/select/select.vue +0 -58
  74. package/dist/components/lwSvgIcon/index.vue +0 -29
  75. package/dist/components/lwTable/index.js +0 -286
  76. package/dist/components/lwTable/index.scss +0 -238
  77. package/dist/components/lwTable/index.vue +0 -346
  78. package/dist/components/lwTable/locale/en-US.js +0 -26
  79. package/dist/components/lwTable/locale/zh-CN.js +0 -26
  80. package/dist/components/lwTable/useFullscreen.js +0 -73
  81. package/dist/components/lwTableForm/index.vue +0 -662
  82. package/dist/components/lwTableSelect/index.vue +0 -266
  83. package/dist/components/lwTableSelect/tableSelect.js +0 -23
  84. package/dist/components/lwUpload/index.vue +0 -564
  85. package/dist/lw-cdp-ui.esm.js +0 -19906
  86. package/dist/lw-cdp-ui.umd.js +0 -22
  87. package/dist/style.css +0 -1
  88. package/dist/vite.svg +0 -1
@@ -1,628 +0,0 @@
1
- <template>
2
- <div id="search-wrap">
3
- <div class="search-content">
4
- <el-form ref="searchForm" :model="form" @submit.prevent :label-align="labelAlign" style="width: 100%">
5
- <el-row :class="(options.length - expandNumber === 0) ? 'expand-row' : (options.length - expandNumber < columnNumber) ? '' : isExpandStatus ? ((options.length % columnNumber === 0) ? 'expand-row' : '') : (options.length >= expandNumber ? 'expand-row' : '')" type="flex" justify="start" :gutter="10">
6
- <template v-for="(item, index) in options" :key="item.prop">
7
- <el-col :class="(!isExpandStatus && item.isExpand) ? '' : (options.length - expandNumber < columnNumber) ? '' : (!isExpandStatus && index > (expandNumber - 1) ? 'hide' : '')" :span="columnNumber ? 24/columnNumber : (item.span || 8)">
8
- <el-form-item :label-width="hideLabel ? 0 : labelWidth" :required="item.required" :label="hideLabel ? '' : $t(item.label)">
9
- <template v-if="item.dateSection && item.prop && item.prop.length === 2">
10
- <el-row :gutter="10" class="date-section">
11
- <el-col :span="12" :style="{ width: '45%', flex: '0 0 45%' }">
12
- <component :is="setComponent(item.renderType)" :disabled="item.disabled" :item="item" v-model="form[item.prop[0]]" :disabled-date="(date) => disabledDate(date, 'prev', form[item.prop[1]])" :propValueFormat="item.valueFormat || 'YYYY-MM-DD 00:00:00'" />
13
- </el-col>
14
- <span class="date-section-line"> - </span>
15
- <el-col :span="12" :style="{ width: '45%', flex: '0 0 45%' }">
16
- <component :is="setComponent(item.renderType)" :disabled="item.disabled" :item="item" v-model="form[item.prop[1]]" :disabled-date="(date) => disabledDate(date, 'next', form[item.prop[0]])" :propValueFormat="item.valueFormat || 'YYYY-MM-DD 23:59:59'" />
17
- </el-col>
18
- </el-row>
19
- </template>
20
- <template v-else>
21
- <component v-model="form[item.prop]" :is="setComponent(item.renderType)" :disabled="item.disabled" :item="item" style="width: 100%" />
22
- </template>
23
- </el-form-item>
24
- </el-col>
25
- </template>
26
- </el-row>
27
-
28
- <div class="control" :style="{bottom: ((options.length%columnNumber === 0) ? '0px' : '10px')}">
29
- <el-button class="reset" @click="resetForm('searchForm')">
30
- {{$t('btn.reset')}}
31
- </el-button>
32
- <el-button class="submit" type="primary" @click="submitForm('searchForm')">
33
- {{$t('btn.query')}}
34
- </el-button>
35
-
36
- <div :class="options.length - expandNumber >= columnNumber ? 'expand-button' : 'hidden'" @click="isExpandStatus = !isExpandStatus">
37
- <span>{{ isExpandStatus ? "收起" : "展开" }}</span>
38
- </div>
39
- </div>
40
- </el-form>
41
- </div>
42
- </div>
43
- </template>
44
-
45
- <script>
46
- import SearchInput from "./input/input.vue";
47
- import SearchSelect from "./select/select.vue";
48
- import SearchDate from "./date/date.vue";
49
- import SearchDates from "./dates/dates.vue";
50
- import SearchDateRange from "./dateRange/dateRange.vue";
51
- import dayjs from "dayjs";
52
-
53
- export default {
54
- components: {
55
- SearchInput,
56
- SearchSelect,
57
- SearchDate,
58
- SearchDates,
59
- SearchDateRange,
60
- },
61
- name: "lwSearch",
62
- props: {
63
- options: {
64
- // 配置项
65
- type: Array,
66
- default: () => [],
67
- },
68
- modelValue: {
69
- // 绑定的结果对象
70
- type: Object,
71
- default: () => ({}),
72
- },
73
- labelWidth: {
74
- // label全局宽度
75
- type: String,
76
- default: "70px",
77
- },
78
- labelPosition: {
79
- // label全局位置
80
- type: String,
81
- default: "left",
82
- },
83
- columnNumber: {
84
- // 每行列数量
85
- type: Number,
86
- default: 4,
87
- },
88
- isSave: {
89
- // 是否保存功能
90
- type: Boolean,
91
- default: false,
92
- },
93
- isCloud: {
94
- // 是否保存功能
95
- type: Boolean,
96
- default: false,
97
- },
98
- saveKey: {
99
- // 保存功能指定localStorage searchSaveData对象中key
100
- type: String,
101
- default: "",
102
- },
103
- isExpand: {
104
- // 默认是否展开
105
- type: Boolean,
106
- default: false,
107
- },
108
- expandNumber: {
109
- // 默认收起展示数量
110
- type: Number,
111
- default: 4,
112
- },
113
- hasExpandAll: {
114
- // 默认收起展示数量
115
- type: Boolean,
116
- default: false,
117
- },
118
- hideLabel: {
119
- // 是否隐藏标签
120
- type: Boolean,
121
- default: false,
122
- },
123
- labelAlign: {
124
- //标签对齐方式
125
- type: String,
126
- default: "right",
127
- },
128
- },
129
- data() {
130
- return {
131
- form: {}, // 内部维护数据
132
- defaultForm: {}, // 原始数据
133
- isExpandStatus: false, // 是否展开搜索条件
134
- isChange: false, // 是否展示变式下拉框
135
- saveList: [], // 搜索保存数据列表
136
- saveFormName: "", // 当前保存数据名称
137
- isSaveShow: false, // 是否展示保存操作
138
- isSelectShow: false, // 是否展示选择操作
139
- selectForm: "", // 当前选中数据
140
- currentExpandNumber: 4, // 当前收起展示数量
141
- isExpandAll: true,
142
- currentTemplate: {},
143
- variantList: [],
144
- varianId: [],
145
- systemName: "shopManagement",
146
- };
147
- },
148
- watch: {
149
- modelValue: {
150
- handler(newVal) {
151
- if (JSON.stringify(newVal) !== JSON.stringify(this.form)) {
152
- this.form = JSON.parse(JSON.stringify(newVal));
153
- }
154
- },
155
- deep: true,
156
- },
157
- form: {
158
- handler(newVal) {
159
- if (JSON.stringify(newVal) !== JSON.stringify(this.modelValue)) {
160
- this.$emit("update:modelValue", newVal);
161
- }
162
- },
163
- deep: true,
164
- },
165
- },
166
- mounted() {
167
- this.isExpandStatus = this.isExpand;
168
- this.currentExpandNumber = this.expandNumber || this.columnNumber;
169
- this.form = JSON.parse(JSON.stringify(this.modelValue));
170
- this.defaultForm =
171
- JSON.stringify(this.defaultForm) === "{}"
172
- ? JSON.parse(JSON.stringify(this.modelValue))
173
- : this.defaultForm;
174
- },
175
- methods: {
176
- // 根据renderType设置对应组件
177
- setComponent(type) {
178
- const typeList = {
179
- input: "SearchInput",
180
- select: "SearchSelect",
181
- date: "SearchDate",
182
- dates: "SearchDates",
183
- dateRange: "SearchDateRange",
184
- };
185
- return typeList[type] || "SearchInput";
186
- },
187
- // 触发提交
188
- submitForm(formEl) {
189
- if (!this.$refs[formEl]) return;
190
- this.$refs[formEl].validate((valid) => {
191
- if (valid) {
192
- this.$emit("search");
193
- }
194
- });
195
- },
196
- // 重置条件
197
- resetForm(formEl) {
198
- if (!this.$refs[formEl]) return;
199
- this.$refs[formEl].resetFields();
200
- this.form = JSON.parse(JSON.stringify(this.defaultForm));
201
- // 保留页面table分页数据
202
- this.form.size = this.modelValue.size;
203
- // this.form.page = this.modelValue.page;
204
- this.$emit("reset");
205
- },
206
-
207
- // 关闭变式
208
- handleChangeHide(vis) {
209
- if (vis === false) {
210
- this.isChange = false;
211
- this.isSaveShow = false;
212
- this.isSelectShow = false;
213
- this.saveFormName = "";
214
- this.selectForm = "";
215
- }
216
- },
217
- // 保存搜索表单
218
- handleSaveSearchForm() {
219
- if (this.saveKey && this.isSave) {
220
- if (Object.keys(this.form).length === 0) {
221
- this.$message.error("搜索条件为空!");
222
- return;
223
- }
224
- let tempObj = Object.assign({}, this.form, {
225
- searchSaveName: this.saveFormName,
226
- id: dayjs().valueOf() + Math.random() + "",
227
- });
228
- let obj = {
229
- route: this.$route.name,
230
- system: this.systemName,
231
- variant: [tempObj],
232
- };
233
- let resObj = this.variantList.find((it) => {
234
- return it.route === this.$route.name;
235
- });
236
- if (resObj) {
237
- resObj.variant.push(tempObj);
238
- } else {
239
- this.variantList.push(obj);
240
- }
241
- if (this.isCloud) {
242
- let params = {
243
- id: this.varianId,
244
- username: JSON.parse(sessionStorage.userAuthInfo).username,
245
- system: this.systemName,
246
- menu: this.saveKey,
247
- content: JSON.stringify(this.variantList),
248
- };
249
- } else {
250
- localStorage.setItem("variantList", JSON.stringify(this.variantList));
251
- }
252
- }
253
- },
254
- // 选择保存过的搜索历史
255
- handleSearchSelect(val) {
256
- let obj = this.saveList.find((it) => {
257
- return it.id === val;
258
- });
259
- if (obj) {
260
- let rObj = JSON.parse(JSON.stringify(obj));
261
- delete rObj.id;
262
- delete rObj.searchSaveName;
263
- this.$emit("update:modelValue", rObj);
264
- }
265
- },
266
- // 删除保存过的搜索历史
267
- handleDeleteSearchList(index) {
268
- let tempList = JSON.parse(JSON.stringify(this.saveList));
269
- tempList.splice(index, 1);
270
- if (this.saveKey && this.isSave) {
271
- // 更新逻辑,视具体API而定
272
- }
273
- },
274
- // 禁止选择日期
275
- disabledDate(date, currentSource, limitDate = "") {
276
- if (limitDate) {
277
- if (currentSource === "prev") {
278
- return dayjs(date.getTime()).isAfter(dayjs(limitDate), "day");
279
- }
280
- if (currentSource === "next") {
281
- return dayjs(date.getTime()).isBefore(dayjs(limitDate), "day");
282
- }
283
- }
284
- },
285
- // 一键收缩展开
286
- expandAll() {
287
- this.isExpandAll = !this.isExpandAll;
288
- },
289
- },
290
- };
291
- </script>
292
- <style lang="scss" scoped>
293
- @keyframes slide-animation {
294
- from {
295
- width: 100%;
296
- height: auto;
297
- margin-top: 0;
298
- padding: 15px 60px 0 15px;
299
- // transform: scale(1);
300
- opacity: 1;
301
- }
302
-
303
- to {
304
- width: 0;
305
- height: 0;
306
- margin-top: -10px;
307
- padding: 0;
308
- // transform: scale(0);
309
- opacity: 0;
310
- }
311
- }
312
-
313
- #search-wrap {
314
- width: 100%;
315
- background: var(--color-bg-2);
316
- // position: relative;
317
- overflow: hidden;
318
- .arco-col {
319
- margin: 5px 0;
320
- padding: 0 !important;
321
- }
322
-
323
- .arco-form-item-label {
324
- padding-right: 10px;
325
- }
326
-
327
- // .el-col-6 {
328
- // margin: 5px 0;
329
- // }
330
-
331
- .control-button {
332
- position: absolute;
333
- top: 10px;
334
- right: 20px;
335
- z-index: 99;
336
- cursor: pointer;
337
-
338
- .expand-img {
339
- width: 24px;
340
- height: 24px;
341
- cursor: pointer;
342
- transition: all 0.5s linear;
343
-
344
- &.close {
345
- transform: rotate(180deg);
346
- }
347
- }
348
- }
349
-
350
- .arco-form-item-content-flex {
351
- display: block;
352
- }
353
-
354
- .search-content {
355
- position: relative;
356
- // border: 1px solid #e5e5e5;
357
- box-sizing: border-box;
358
- width: 100%;
359
- // transition: width .3s linear;
360
- margin-top: 0;
361
- padding: 0 0 0px 0;
362
-
363
- &.close {
364
- width: 0;
365
- height: 0;
366
- margin-top: -10px;
367
- padding: 0;
368
- overflow: hidden;
369
- opacity: 0;
370
- animation: slide-animation 0.3s;
371
- }
372
-
373
- .expand-row {
374
- padding-bottom: 40px;
375
- }
376
-
377
- .control {
378
- position: absolute;
379
- right: 0;
380
- bottom: 0;
381
- z-index: 9;
382
- display: flex;
383
- justify-content: flex-end;
384
- align-items: flex-end;
385
- .reset {
386
- width: 90px;
387
- height: 32px;
388
- margin-right: 0px;
389
- border: none;
390
- background-color: #eeeefc;
391
- color: var(--el-color-primary);
392
- border-radius: 2px;
393
- font-size: 12px;
394
- & > span {
395
- display: flex;
396
- align-items: center;
397
- justify-content: center;
398
-
399
- .el-icon--left {
400
- margin-right: 5px;
401
- }
402
- }
403
- }
404
-
405
- .submit {
406
- width: 90px;
407
- height: 32px;
408
- background-color: var(--el-color-primary);
409
- border: none;
410
- border-radius: 2px;
411
- & > span {
412
- display: flex;
413
- align-items: center;
414
- justify-content: center;
415
-
416
- .el-icon--left {
417
- margin-right: 5px;
418
- }
419
- }
420
- }
421
-
422
- .expand-button {
423
- display: flex;
424
- align-items: center;
425
- justify-content: flex-end;
426
- box-sizing: border-box;
427
- width: 40px;
428
- padding-right: 5px;
429
- cursor: pointer;
430
-
431
- & > span {
432
- color: #505050;
433
- font-size: 12px;
434
- }
435
- }
436
-
437
- .hidden {
438
- visibility: hidden;
439
- width: 0px;
440
- }
441
-
442
- .save {
443
- position: relative;
444
- // width: 84px;
445
- height: 30px;
446
- padding: 0;
447
- padding: 0 10px;
448
- // background: #bda87c;
449
-
450
- .save-text {
451
- display: flex;
452
- align-items: center;
453
- justify-content: center;
454
- width: 84px;
455
- height: 30px;
456
-
457
- & > span {
458
- padding-right: 10px;
459
- padding-left: 10px;
460
- border-right: 1px solid #fff;
461
- }
462
-
463
- & > i {
464
- padding-left: 10px;
465
- }
466
- }
467
- }
468
- }
469
-
470
- .el-form {
471
- position: relative;
472
- }
473
-
474
- .el-form-item {
475
- margin-bottom: 10px;
476
-
477
- .el-form-item__label {
478
- padding-right: 5px;
479
- font-size: 12px;
480
- user-select: none;
481
- }
482
- // .arco-select__tags-text {
483
- // max-width: 80px !important;
484
- // }
485
- .select-trigger {
486
- width: 100%;
487
-
488
- .el-select__tags {
489
- // max-width: calc(100% - 0px) !important;
490
- & > span {
491
- max-width: 100%;
492
-
493
- .el-tag--info {
494
- max-width: 100% !important;
495
-
496
- &:first-child {
497
- .el-select__tags-text {
498
- max-width: 100% !important;
499
- }
500
- }
501
-
502
- &:nth-child(2) {
503
- // display: none;
504
- .arco-select__tags-text {
505
- max-width: 100% !important;
506
- }
507
- }
508
- }
509
- }
510
- }
511
- }
512
-
513
- .el-date-editor.el-input,
514
- .el-date-editor.el-input__inner {
515
- width: 100%;
516
- }
517
-
518
- .el-select .el-select__tags {
519
- display: flex;
520
- flex-wrap: nowrap;
521
-
522
- & > span {
523
- display: flex;
524
- flex-wrap: nowrap;
525
- }
526
- }
527
-
528
- .date-section {
529
- position: relative;
530
- margin-bottom: 0 !important;
531
-
532
- .el-input--small .el-input__inner {
533
- padding-right: 20px;
534
- padding-left: 15px;
535
- }
536
-
537
- .el-input__prefix {
538
- display: none;
539
- }
540
-
541
- .date-section-line {
542
- position: absolute;
543
- top: 50%;
544
- left: 50%;
545
- transform: translate(-50%, -50%);
546
- }
547
- }
548
- }
549
- }
550
- }
551
-
552
- .hide {
553
- display: none !important;
554
- }
555
-
556
- .search-panel-popover {
557
- // background: red;
558
- box-sizing: border-box;
559
- position: relative;
560
- .save-controls {
561
- & > div {
562
- & > span {
563
- cursor: pointer;
564
- display: block;
565
- padding: 5px 0;
566
- &:hover {
567
- color: #155752;
568
- }
569
- }
570
- }
571
- .save-form {
572
- width: 160px;
573
- height: 40px;
574
- background: #ffffff;
575
- display: flex;
576
- align-items: center;
577
- justify-content: flex-start;
578
- transform: translateX(-14px);
579
- .save-form-button {
580
- margin-left: 10px;
581
- }
582
- .save-form-input {
583
- width: 84px;
584
- }
585
- .el-button--primary.is-disabled {
586
- background: #155752;
587
- opacity: 0.6;
588
- }
589
- .save-form-select {
590
- width: 160px;
591
- }
592
- }
593
- }
594
- }
595
-
596
- .select-popper {
597
- .el-select-dropdown__item {
598
- padding: 0 10px;
599
- }
600
- .select-content {
601
- display: flex;
602
- align-items: center;
603
- justify-content: space-between;
604
- box-sizing: border-box;
605
- .select-content-button {
606
- border: none;
607
- background: none;
608
- flex-shrink: 0;
609
- box-sizing: border-box;
610
- padding: 7px;
611
- border-radius: 100%;
612
- &:hover {
613
- .el-icon--close {
614
- opacity: 1;
615
- }
616
- }
617
- .el-icon--close {
618
- opacity: 0.6;
619
- display: block;
620
- color: #155752;
621
- width: 12px;
622
- height: 12px;
623
- }
624
- }
625
- }
626
- }
627
- </style>
628
-
@@ -1,55 +0,0 @@
1
- <template>
2
- <div>
3
- <el-input
4
- :type="item.type || 'text'"
5
- :disabled="item.disabled"
6
- :placeholder="item.label || $t('lwSearch.please_input')"
7
- :maxlength="item.maxlength"
8
- :minlength="item.minlength"
9
- :show-word-limit="item.showWordLimit"
10
- :autosize="item.autosize || { minRows: 2 }"
11
- allow-clear
12
- clearable
13
- v-model="value"
14
- />
15
- </div>
16
- </template>
17
-
18
- <script>
19
- export default {
20
- emits: ["update:modelValue", "change"],
21
- name: "Input",
22
- props: {
23
- disabled: { // 是否禁止操作
24
- type: Boolean,
25
- default: false
26
- },
27
- modelValue: { // 绑定的结果
28
- type: [String, Number],
29
- default: ""
30
- },
31
- item: { // 配置项
32
- type: Object,
33
- default: () => ({})
34
- },
35
- },
36
- data() {
37
- return {
38
- value: this.modelValue
39
- };
40
- },
41
- watch: {
42
- modelValue(newVal) {
43
- this.value = newVal;
44
- },
45
- value(newVal) {
46
- const filter = this.item.filter ?? false;
47
- if (filter) {
48
- newVal = newVal.replace(/ /g, ',').replace(/\,/g, ',').replace(/\,/g, ',').replace(/\n/g, ',');
49
- }
50
- this.$emit('update:modelValue', newVal);
51
- this.$emit('change', newVal);
52
- }
53
- }
54
- };
55
- </script>
@@ -1,15 +0,0 @@
1
- export default {
2
- lwSearch: {
3
- please_select: 'Please select',
4
- please_input: 'Please input',
5
- dateRange: {
6
- startPlaceholder: 'Start Time',
7
- endPlaceholder: 'End Time'
8
- },
9
- monthRange: {
10
- rangeSeparator:'To',
11
- startPlaceholder: 'Start Month',
12
- endPlaceholder: 'End Month'
13
- }
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- export default {
2
- lwSearch: {
3
- please_select: '请选择',
4
- please_input: '请输入',
5
- dateRange: {
6
- startPlaceholder: '开始时间',
7
- endPlaceholder: '结束时间'
8
- },
9
- monthRange: {
10
- rangeSeparator:'至',
11
- startPlaceholder: '开始月',
12
- endPlaceholder: '结束月'
13
- }
14
- }
15
- }