ele-admin-plus 1.5.0-beta.6 → 1.5.0-beta.8

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.
@@ -5,6 +5,10 @@
5
5
  @include set-el-input-var($ele);
6
6
 
7
7
  /* Input */
8
+ .el-input .el-input__wrapper {
9
+ min-height: elVar('input', 'height');
10
+ }
11
+
8
12
  .el-input .el-input__wrapper,
9
13
  .el-textarea .el-textarea__inner,
10
14
  .el-select .el-select__wrapper,
@@ -46,6 +50,7 @@ body .el-input-number:not(.is-disabled):hover .el-input .el-input__wrapper {
46
50
  /* Focus */
47
51
  .el-input .el-input__wrapper.is-focus,
48
52
  .el-textarea .el-textarea__inner:focus,
53
+ .el-textarea .el-textarea__inner.is-focus,
49
54
  .el-select .el-select__wrapper:not(.is-disabled).is-focused,
50
55
  .el-cascader .el-input.el-input--suffix .el-input__wrapper.is-focus,
51
56
  .el-cascader .el-input.el-input--suffix.is-focus .el-input__wrapper,
@@ -372,30 +377,86 @@ body .el-textarea .el-input__count {
372
377
  .el-input-number {
373
378
  .el-input-number__increase,
374
379
  .el-input-number__decrease {
375
- width: elVar('component-size');
380
+ #{elVarName('input', 'height')}: elVar('component-size');
381
+ width: elVar('input', 'height');
382
+ background: none;
383
+ border: 1px solid transparent;
376
384
  transition: color $transition-base;
377
- bottom: 0.8px;
378
- top: 0.8px;
385
+ box-sizing: border-box;
386
+ left: 0;
387
+ right: 0;
388
+ bottom: 0;
389
+ top: 0;
390
+
391
+ & > .el-icon {
392
+ width: 100%;
393
+ height: 100%;
394
+ display: flex;
395
+ align-items: center;
396
+ justify-content: center;
397
+ background: elVar('fill-color', 'light');
398
+ box-sizing: border-box;
399
+ border-radius: inherit;
400
+
401
+ & > svg {
402
+ transform: scale(0.9);
403
+ }
404
+ }
379
405
  }
380
406
 
381
407
  .el-input-number__increase {
382
- right: 0.8px;
408
+ left: auto;
409
+ & > .el-icon {
410
+ border-left: 1px solid elVar('border-color');
411
+ }
383
412
  }
384
413
 
385
- .el-input-number__decrease {
386
- left: 0.8px;
414
+ .el-input-number__decrease > .el-icon {
415
+ border-right: 1px solid elVar('border-color');
387
416
  }
388
417
  }
389
418
 
390
- body .el-input-number.is-controls-right {
391
- .el-input-number__increase {
392
- bottom: auto;
419
+ body .el-input-number {
420
+ .el-input-number__increase,
421
+ .el-input-number__decrease,
422
+ &.is-controls-right .el-input-number__increase,
423
+ &.is-controls-right .el-input-number__decrease {
424
+ & > .el-icon {
425
+ transform: none;
426
+ }
393
427
  }
394
428
 
395
- .el-input-number__decrease {
396
- right: 0.8px;
397
- left: auto;
398
- top: auto;
429
+ &.is-controls-right {
430
+ .el-input-number__increase,
431
+ .el-input-number__decrease {
432
+ left: auto;
433
+ border: 1px solid transparent;
434
+
435
+ & > .el-icon {
436
+ border-left: 1px solid elVar('border-color');
437
+ }
438
+ }
439
+
440
+ .el-input-number__increase {
441
+ bottom: auto;
442
+ border-bottom: none;
443
+ height: calc(#{elVar('input', 'height')} / 2 + 0.5px);
444
+
445
+ & > .el-icon {
446
+ border-bottom: 1px solid elVar('border-color');
447
+ }
448
+ }
449
+
450
+ .el-input-number__decrease {
451
+ right: 0;
452
+ top: auto;
453
+ border-top: none;
454
+ height: calc(#{elVar('input', 'height')} / 2 - 0.5px);
455
+
456
+ & > .el-icon {
457
+ border-right: none;
458
+ }
459
+ }
399
460
  }
400
461
  }
401
462
 
@@ -404,7 +465,7 @@ body .el-input-number .el-input .el-input__wrapper {
404
465
  padding-bottom: 0;
405
466
  padding-left: eleVar('input', 'padding-left');
406
467
  padding-right: calc(
407
- #{elVar('component-size')} + #{eleVar('input', 'icon-space')}
468
+ #{elVar('input', 'height')} + #{eleVar('input', 'icon-space')}
408
469
  );
409
470
  }
410
471
 
@@ -425,7 +486,7 @@ body .el-input-number .el-input .el-input__wrapper {
425
486
  .el-input-number.el-input-number--large {
426
487
  .el-input-number__increase,
427
488
  .el-input-number__decrease {
428
- width: elVar('component-size', 'large');
489
+ #{elVarName('input', 'height')}: elVar('component-size', 'large');
429
490
  }
430
491
 
431
492
  .el-input .el-input__wrapper {
@@ -436,6 +497,13 @@ body .el-input-number .el-input .el-input__wrapper {
436
497
  }
437
498
  }
438
499
 
500
+ .el-input-number.el-input-number--small {
501
+ .el-input-number__increase,
502
+ .el-input-number__decrease {
503
+ #{elVarName('input', 'height')}: elVar('component-size', 'small');
504
+ }
505
+ }
506
+
439
507
  .el-input-number:not(.is-controls-right) .el-input .el-input__wrapper {
440
508
  padding-left: calc(
441
509
  #{elVar('component-size')} + #{eleVar('input', 'icon-space')}
@@ -465,7 +533,7 @@ body .el-input-number.is-disabled .el-input-number__decrease {
465
533
  }
466
534
 
467
535
  /* 表单验证 */
468
- .el-form-item.is-error {
536
+ .el-form-item.is-error .el-form-item__content {
469
537
  .el-input .el-input__wrapper,
470
538
  .el-textarea .el-textarea__inner,
471
539
  .el-select .select-trigger .el-input .el-input__wrapper,
@@ -501,6 +569,7 @@ body .el-input-number.is-disabled .el-input-number__decrease {
501
569
  }
502
570
 
503
571
  .el-textarea .el-textarea__inner:focus,
572
+ .el-textarea .el-textarea__inner.is-focus,
504
573
  .el-range-editor.el-input__wrapper.is-active,
505
574
  .el-input-number .el-input .el-input__wrapper.is-focus {
506
575
  border: eleVar('input-error', 'focus-border');
@@ -40,7 +40,7 @@
40
40
  margin: eleVar('buttons', 'btn-arrow-margin');
41
41
  }
42
42
 
43
- /* 带图标时间距调整 */
43
+ /* 带图标间距调整 */
44
44
  .ele-buttons-item {
45
45
  &.ele-buttons-icon-link > .el-icon {
46
46
  font-size: eleVar('buttons', 'link-icon-font-size');
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, createBlock, openBlock, mergeProps, unref, createSlots, withCtx, renderSlot, createVNode, createTextVNode, toDisplayString, renderList, normalizeProps, guardReactiveProps } from "vue";
1
+ import { defineComponent, ref, watch, createBlock, openBlock, mergeProps, unref, createSlots, withCtx, renderSlot, createVNode, createTextVNode, toDisplayString, renderList, normalizeProps, guardReactiveProps } from "vue";
2
2
  import { ElButton } from "element-plus";
3
3
  import { useLocale } from "../ele-config-provider/receiver";
4
4
  import EleModal from "../ele-modal/index";
@@ -14,11 +14,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  const emit = __emit;
15
15
  const { lang } = useLocale("cronBuilder", props);
16
16
  const cronPanelRef = ref(null);
17
+ const cronModel = ref("");
17
18
  const updateModelValue = (value) => {
18
19
  emit("update:modelValue", value);
19
20
  };
20
- const updateCron = (cron) => {
21
- emit("update:cron", cron);
21
+ const updateCronModel = (value) => {
22
+ if (cronModel.value !== value) {
23
+ cronModel.value = value;
24
+ if (props.cron !== cronModel.value) {
25
+ emit("update:cron", cronModel.value);
26
+ }
27
+ }
22
28
  };
23
29
  const hideCronList = () => {
24
30
  cronPanelRef.value?.hideCronList?.();
@@ -29,11 +35,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
35
  };
30
36
  const handleConfirm = () => {
31
37
  hideCronList();
32
- emit("done", props.cron);
38
+ emit("done", cronModel.value);
33
39
  };
34
40
  const handleClosed = () => {
35
41
  hideCronList();
36
42
  };
43
+ watch(
44
+ () => props.cron,
45
+ (value) => {
46
+ updateCronModel(value);
47
+ },
48
+ { immediate: true }
49
+ );
37
50
  return (_ctx, _cache) => {
38
51
  return openBlock(), createBlock(EleModal, mergeProps({
39
52
  width: 832,
@@ -68,8 +81,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
68
81
  createVNode(EleCronPanel, {
69
82
  ref_key: "cronPanelRef",
70
83
  ref: cronPanelRef,
71
- modelValue: _ctx.cron,
72
- "onUpdate:modelValue": updateCron
84
+ modelValue: cronModel.value,
85
+ "onUpdate:modelValue": updateCronModel
73
86
  }, null, 8, ["modelValue"])
74
87
  ]),
75
88
  _: 2
@@ -79,7 +79,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
79
79
  ];
80
80
  });
81
81
  const updateModelValue = (value) => {
82
- emit("update:modelValue", value);
82
+ if (props.modelValue !== value) {
83
+ emit("update:modelValue", value);
84
+ }
83
85
  };
84
86
  const updateCron = () => {
85
87
  const values = [
@@ -97,6 +99,38 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
97
99
  updateModelValue(cron);
98
100
  return cron;
99
101
  };
102
+ const updatePanel = (cron) => {
103
+ if (!cron) {
104
+ tabActive.value = "second";
105
+ second.value = "*";
106
+ minute.value = "*";
107
+ hour.value = "*";
108
+ day.value = "*";
109
+ month.value = "*";
110
+ week.value = "?";
111
+ year.value = "";
112
+ const str = updateCron();
113
+ resultItems.value = getResultItems(
114
+ str,
115
+ lang.value.resultNoData,
116
+ lang.value.resultNoMore
117
+ );
118
+ return;
119
+ }
120
+ const [s, m, h, d, m2, w, y] = cron.split(" ");
121
+ second.value = s;
122
+ minute.value = m;
123
+ hour.value = h;
124
+ day.value = d;
125
+ month.value = m2;
126
+ week.value = w;
127
+ year.value = y || "";
128
+ resultItems.value = getResultItems(
129
+ cron,
130
+ lang.value.resultNoData,
131
+ lang.value.resultNoMore
132
+ );
133
+ };
100
134
  watch(hour, (h) => {
101
135
  if (h !== "*" && second.value === "*") {
102
136
  second.value = "0";
@@ -115,46 +149,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
115
149
  day.value = "?";
116
150
  }
117
151
  });
118
- watch(
119
- [second, minute, hour, day, month, week, year],
120
- () => {
121
- updateCron();
122
- },
123
- { immediate: true }
124
- );
152
+ watch([second, minute, hour, day, month, week, year], () => {
153
+ updateCron();
154
+ });
125
155
  watch(
126
156
  () => props.modelValue,
127
157
  (cron) => {
128
- if (!cron) {
129
- tabActive.value = "second";
130
- second.value = "*";
131
- minute.value = "*";
132
- hour.value = "*";
133
- day.value = "*";
134
- month.value = "*";
135
- week.value = "?";
136
- year.value = "";
137
- const str = updateCron();
138
- resultItems.value = getResultItems(
139
- str,
140
- lang.value.resultNoData,
141
- lang.value.resultNoMore
142
- );
143
- return;
144
- }
145
- const [s, m, h, d, m2, w, y] = cron.split(" ");
146
- second.value = s;
147
- minute.value = m;
148
- hour.value = h;
149
- day.value = d;
150
- month.value = m2;
151
- week.value = w;
152
- year.value = y || "";
153
- resultItems.value = getResultItems(
154
- cron,
155
- lang.value.resultNoData,
156
- lang.value.resultNoMore
157
- );
158
+ updatePanel(cron);
158
159
  }
159
160
  );
160
161
  watch(lang, () => {
@@ -196,6 +197,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
196
197
  cronListVisible.value = false;
197
198
  };
198
199
  __expose({ hideCronList });
200
+ if (props.modelValue) {
201
+ updatePanel(props.modelValue);
202
+ } else {
203
+ updateCron();
204
+ }
199
205
  return (_ctx, _cache) => {
200
206
  return openBlock(), createElementBlock("div", _hoisted_1, [
201
207
  createElementVNode("div", _hoisted_2, [
@@ -18,6 +18,7 @@ export declare function useCron(minValue: number, maxValue: number, defaultType?
18
18
  };
19
19
  /**
20
20
  * 计算最近 5 次运行时间
21
+ * 代码来源: https://gitee.com/y_project/RuoYi-Vue/blob/master/ruoyi-ui/src/components/Crontab/result.vue
21
22
  * @param cron Cron 表达式
22
23
  */
23
24
  export declare function getResultItems(cron: string | undefined, noDataText: string, noMoreText: string): string[];
@@ -31,7 +31,7 @@
31
31
  }
32
32
 
33
33
  &:not(.ele-loading-spinner-show) {
34
- pointer-events: none;
34
+ pointer-events: none !important;
35
35
 
36
36
  & > * {
37
37
  display: none !important;
@@ -245,11 +245,15 @@ function renderProFormItem(props) {
245
245
  const isDivTag = componentTag === "div" || componentTag === "td";
246
246
  const componentPropsData = translateJsCode(props.item.props || {}, formData, props.formItems || [], props.searchExpand, props.httpRequest, props.getProFormRefs, props.getAndCacheCode).result;
247
247
  const componentNode = typeSlot ? typeSlot({
248
- item: props.item,
248
+ item: {
249
+ ...props.item,
250
+ props: componentPropsData
251
+ },
249
252
  model: formData,
250
253
  modelValue,
251
254
  updateValue: handleUpdateModelValue,
252
255
  updatePropValue: props.updateItemValue,
256
+ itemComponentRef: getComponentRefName(props.item),
253
257
  proForm: slotProFormParams
254
258
  }) : h((isDivTag ? props.item.props?.is : void 0) || componentTag, mergeProps({
255
259
  key: props.key
@@ -3,39 +3,7 @@ import { EleDataTableProps, EleToolbarProps } from '../ele-app/plus';
3
3
  import { DataItem, Column, Columns, Sorter, Filter, RowKey } from '../ele-data-table/types';
4
4
  import { ReloadFunction, DoneParams, TableTool, FetchFunction, TableViewInstance, ExportConfig, PrintConfig, TableExportParams } from './types';
5
5
 
6
- declare function __VLS_template(): Readonly<{
7
- [x: string]: (props: Record<string, any>) => any;
8
- default(): any;
9
- toolbar(): any;
10
- tools(): any;
11
- footer(): any;
12
- empty(): any;
13
- append(): any;
14
- topExtra(): any;
15
- bottomExtra(): any;
16
- printTop(props: {
17
- data: DataItem[];
18
- }): any;
19
- printBottom(props: {
20
- data: DataItem[];
21
- }): any;
22
- }> & {
23
- [x: string]: (props: Record<string, any>) => any;
24
- default(): any;
25
- toolbar(): any;
26
- tools(): any;
27
- footer(): any;
28
- empty(): any;
29
- append(): any;
30
- topExtra(): any;
31
- bottomExtra(): any;
32
- printTop(props: {
33
- data: DataItem[];
34
- }): any;
35
- printBottom(props: {
36
- data: DataItem[];
37
- }): any;
38
- };
6
+ declare function __VLS_template(): any;
39
7
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
40
8
  rowKey: {
41
9
  type: import('vue').PropType<RowKey>;
@@ -3,6 +3,7 @@ import { MutationOption } from '../ele-watermark/types';
3
3
 
4
4
  export declare function useMutation(option: MutationOption): {
5
5
  imageId: import('vue').Ref<number, number>;
6
+ imageStyleId: import('vue').Ref<number, number>;
6
7
  imageStyle: import('vue').Ref<string, string>;
7
8
  observe: () => void;
8
9
  observeText: (text: string) => string;
@@ -5,6 +5,7 @@ import { getImageData, svgProp, getProps, getOption } from "../ele-watermark/uti
5
5
  function useMutation(option) {
6
6
  const imageStyle = ref(joinStyle({ display: "none" }));
7
7
  const imageId = ref(1);
8
+ const imageStyleId = ref(1);
8
9
  const deletedObserver = new MutationObserver((mutations) => {
9
10
  const el = option.getImageEl();
10
11
  mutations.forEach((mutation) => {
@@ -60,6 +61,7 @@ function useMutation(option) {
60
61
  styleOpt.offsetX,
61
62
  styleOpt.offsetY
62
63
  );
64
+ imageStyleId.value = imageStyleId.value + 1;
63
65
  nextTick(() => {
64
66
  observe();
65
67
  });
@@ -74,7 +76,14 @@ function useMutation(option) {
74
76
  onBeforeUnmount(() => {
75
77
  disconnect();
76
78
  });
77
- return { imageId, imageStyle, observe, observeText, updateImageStyle };
79
+ return {
80
+ imageId,
81
+ imageStyleId,
82
+ imageStyle,
83
+ observe,
84
+ observeText,
85
+ updateImageStyle
86
+ };
78
87
  }
79
88
  function useSvgOption() {
80
89
  const cs = svgProp[svgText.findIndex((c) => c === svgText[svgText.length - 1])];
@@ -2,11 +2,7 @@ import { EleBasicSelectInstance, EleProTableInstance } from '../ele-app/plus';
2
2
  import { SelectValue, SingleValue, SelectedItem } from '../ele-basic-select/types';
3
3
  import { DataItem } from '../ele-data-table/types';
4
4
 
5
- declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: {
6
- [x: string]: any;
7
- }) => any>> & Partial<Record<string, (_: {
8
- [x: string]: any;
9
- }) => any>> & {
5
+ declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: any) => any>> & {
10
6
  popperTopExtra?(_: {}): any;
11
7
  popperBottomExtra?(_: {}): any;
12
8
  };
@@ -99,7 +99,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
99
99
  offsetY: props.offset?.[1] ?? 0
100
100
  };
101
101
  };
102
- const { imageId, imageStyle, observeText, updateImageStyle } = useMutation({
102
+ const { imageId, imageStyleId, imageStyle, observeText, updateImageStyle } = useMutation({
103
103
  getWrapperEl: () => wrapperRef.value,
104
104
  getImageEl: () => imageRef.value,
105
105
  getImageStyleOption
@@ -141,9 +141,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
141
141
  }, [
142
142
  renderSlot(_ctx.$slots, "default"),
143
143
  !_ctx.svgRender && markDisabled.value ? (openBlock(), createElementBlock("div", {
144
- key: 0,
145
144
  ref_key: "imageRef",
146
145
  ref: imageRef,
146
+ key: unref(imageStyleId),
147
147
  style: normalizeStyle(unref(imageStyle))
148
148
  }, null, 4)) : svgMarkOption.value && markDisabled.value ? (openBlock(), createBlock(Teleport, {
149
149
  key: 1,
@@ -71,12 +71,12 @@ $ele-modern-dark: map.deep-merge(
71
71
  & > .ele-admin-header {
72
72
  margin-top: -8px;
73
73
  backdrop-filter: blur(48px);
74
- #{eleVarName('header', 'bg')}: elVar('color-primary');
75
- #{eleVarName('header', 'dark-bg')}: elVar('color-primary');
74
+ #{eleVarName('header', 'bg')}: $layout-primary-bg;
75
+ #{eleVarName('header', 'dark-bg')}: $layout-primary-bg;
76
76
  #{eleVarName('header', 'dark-shadow')}: none;
77
77
  #{eleVarName('header', 'primary-bg')}: $layout-primary-bg;
78
78
  #{eleVarName('header', 'primary-shadow')}: none;
79
- #{eleVarName('header', 'ghost-bg')}: elVar('color-primary');
79
+ #{eleVarName('header', 'ghost-bg')}: $layout-primary-bg;
80
80
 
81
81
  & > .ele-admin-tabs {
82
82
  #{eleVarName('tab', 'simple-active-bg')}: eleVar('layout', 'bg');
@@ -1,5 +1,5 @@
1
1
  const phoneReg = /^1\d{10}$/;
2
- const phoneStrongReg = /^1[3|5|6|7|8|9][0-9]{9}$/;
2
+ const phoneStrongReg = /^1[3|4|5|6|7|8|9][0-9]{9}$/;
3
3
  const telReg = /^(400|800)([0-9\\-]{7,10})|(([0-9]{4}|[0-9]{3})(-| )?)?([0-9]{7,8})((-| |转)*([0-9]{1,4}))?$/;
4
4
  const emailReg = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
5
5
  const urlReg = /(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/;
@@ -5,6 +5,10 @@
5
5
  @include set-el-input-var($ele);
6
6
 
7
7
  /* Input */
8
+ .el-input .el-input__wrapper {
9
+ min-height: elVar('input', 'height');
10
+ }
11
+
8
12
  .el-input .el-input__wrapper,
9
13
  .el-textarea .el-textarea__inner,
10
14
  .el-select .el-select__wrapper,
@@ -46,6 +50,7 @@ body .el-input-number:not(.is-disabled):hover .el-input .el-input__wrapper {
46
50
  /* Focus */
47
51
  .el-input .el-input__wrapper.is-focus,
48
52
  .el-textarea .el-textarea__inner:focus,
53
+ .el-textarea .el-textarea__inner.is-focus,
49
54
  .el-select .el-select__wrapper:not(.is-disabled).is-focused,
50
55
  .el-cascader .el-input.el-input--suffix .el-input__wrapper.is-focus,
51
56
  .el-cascader .el-input.el-input--suffix.is-focus .el-input__wrapper,
@@ -372,30 +377,86 @@ body .el-textarea .el-input__count {
372
377
  .el-input-number {
373
378
  .el-input-number__increase,
374
379
  .el-input-number__decrease {
375
- width: elVar('component-size');
380
+ #{elVarName('input', 'height')}: elVar('component-size');
381
+ width: elVar('input', 'height');
382
+ background: none;
383
+ border: 1px solid transparent;
376
384
  transition: color $transition-base;
377
- bottom: 0.8px;
378
- top: 0.8px;
385
+ box-sizing: border-box;
386
+ left: 0;
387
+ right: 0;
388
+ bottom: 0;
389
+ top: 0;
390
+
391
+ & > .el-icon {
392
+ width: 100%;
393
+ height: 100%;
394
+ display: flex;
395
+ align-items: center;
396
+ justify-content: center;
397
+ background: elVar('fill-color', 'light');
398
+ box-sizing: border-box;
399
+ border-radius: inherit;
400
+
401
+ & > svg {
402
+ transform: scale(0.9);
403
+ }
404
+ }
379
405
  }
380
406
 
381
407
  .el-input-number__increase {
382
- right: 0.8px;
408
+ left: auto;
409
+ & > .el-icon {
410
+ border-left: 1px solid elVar('border-color');
411
+ }
383
412
  }
384
413
 
385
- .el-input-number__decrease {
386
- left: 0.8px;
414
+ .el-input-number__decrease > .el-icon {
415
+ border-right: 1px solid elVar('border-color');
387
416
  }
388
417
  }
389
418
 
390
- body .el-input-number.is-controls-right {
391
- .el-input-number__increase {
392
- bottom: auto;
419
+ body .el-input-number {
420
+ .el-input-number__increase,
421
+ .el-input-number__decrease,
422
+ &.is-controls-right .el-input-number__increase,
423
+ &.is-controls-right .el-input-number__decrease {
424
+ & > .el-icon {
425
+ transform: none;
426
+ }
393
427
  }
394
428
 
395
- .el-input-number__decrease {
396
- right: 0.8px;
397
- left: auto;
398
- top: auto;
429
+ &.is-controls-right {
430
+ .el-input-number__increase,
431
+ .el-input-number__decrease {
432
+ left: auto;
433
+ border: 1px solid transparent;
434
+
435
+ & > .el-icon {
436
+ border-left: 1px solid elVar('border-color');
437
+ }
438
+ }
439
+
440
+ .el-input-number__increase {
441
+ bottom: auto;
442
+ border-bottom: none;
443
+ height: calc(#{elVar('input', 'height')} / 2 + 0.5px);
444
+
445
+ & > .el-icon {
446
+ border-bottom: 1px solid elVar('border-color');
447
+ }
448
+ }
449
+
450
+ .el-input-number__decrease {
451
+ right: 0;
452
+ top: auto;
453
+ border-top: none;
454
+ height: calc(#{elVar('input', 'height')} / 2 - 0.5px);
455
+
456
+ & > .el-icon {
457
+ border-right: none;
458
+ }
459
+ }
399
460
  }
400
461
  }
401
462
 
@@ -404,7 +465,7 @@ body .el-input-number .el-input .el-input__wrapper {
404
465
  padding-bottom: 0;
405
466
  padding-left: eleVar('input', 'padding-left');
406
467
  padding-right: calc(
407
- #{elVar('component-size')} + #{eleVar('input', 'icon-space')}
468
+ #{elVar('input', 'height')} + #{eleVar('input', 'icon-space')}
408
469
  );
409
470
  }
410
471
 
@@ -425,7 +486,7 @@ body .el-input-number .el-input .el-input__wrapper {
425
486
  .el-input-number.el-input-number--large {
426
487
  .el-input-number__increase,
427
488
  .el-input-number__decrease {
428
- width: elVar('component-size', 'large');
489
+ #{elVarName('input', 'height')}: elVar('component-size', 'large');
429
490
  }
430
491
 
431
492
  .el-input .el-input__wrapper {
@@ -436,6 +497,13 @@ body .el-input-number .el-input .el-input__wrapper {
436
497
  }
437
498
  }
438
499
 
500
+ .el-input-number.el-input-number--small {
501
+ .el-input-number__increase,
502
+ .el-input-number__decrease {
503
+ #{elVarName('input', 'height')}: elVar('component-size', 'small');
504
+ }
505
+ }
506
+
439
507
  .el-input-number:not(.is-controls-right) .el-input .el-input__wrapper {
440
508
  padding-left: calc(
441
509
  #{elVar('component-size')} + #{eleVar('input', 'icon-space')}
@@ -465,7 +533,7 @@ body .el-input-number.is-disabled .el-input-number__decrease {
465
533
  }
466
534
 
467
535
  /* 表单验证 */
468
- .el-form-item.is-error {
536
+ .el-form-item.is-error .el-form-item__content {
469
537
  .el-input .el-input__wrapper,
470
538
  .el-textarea .el-textarea__inner,
471
539
  .el-select .select-trigger .el-input .el-input__wrapper,
@@ -501,6 +569,7 @@ body .el-input-number.is-disabled .el-input-number__decrease {
501
569
  }
502
570
 
503
571
  .el-textarea .el-textarea__inner:focus,
572
+ .el-textarea .el-textarea__inner.is-focus,
504
573
  .el-range-editor.el-input__wrapper.is-active,
505
574
  .el-input-number .el-input .el-input__wrapper.is-focus {
506
575
  border: eleVar('input-error', 'focus-border');
@@ -40,7 +40,7 @@
40
40
  margin: eleVar('buttons', 'btn-arrow-margin');
41
41
  }
42
42
 
43
- /* 带图标时间距调整 */
43
+ /* 带图标间距调整 */
44
44
  .ele-buttons-item {
45
45
  &.ele-buttons-icon-link > .el-icon {
46
46
  font-size: eleVar('buttons', 'link-icon-font-size');
@@ -15,11 +15,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
15
  const emit = __emit;
16
16
  const { lang } = receiver.useLocale("cronBuilder", props2);
17
17
  const cronPanelRef = vue.ref(null);
18
+ const cronModel = vue.ref("");
18
19
  const updateModelValue = (value) => {
19
20
  emit("update:modelValue", value);
20
21
  };
21
- const updateCron = (cron) => {
22
- emit("update:cron", cron);
22
+ const updateCronModel = (value) => {
23
+ if (cronModel.value !== value) {
24
+ cronModel.value = value;
25
+ if (props2.cron !== cronModel.value) {
26
+ emit("update:cron", cronModel.value);
27
+ }
28
+ }
23
29
  };
24
30
  const hideCronList = () => {
25
31
  cronPanelRef.value?.hideCronList?.();
@@ -30,11 +36,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
30
36
  };
31
37
  const handleConfirm = () => {
32
38
  hideCronList();
33
- emit("done", props2.cron);
39
+ emit("done", cronModel.value);
34
40
  };
35
41
  const handleClosed = () => {
36
42
  hideCronList();
37
43
  };
44
+ vue.watch(
45
+ () => props2.cron,
46
+ (value) => {
47
+ updateCronModel(value);
48
+ },
49
+ { immediate: true }
50
+ );
38
51
  return (_ctx, _cache) => {
39
52
  return vue.openBlock(), vue.createBlock(EleModal, vue.mergeProps({
40
53
  width: 832,
@@ -69,8 +82,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
69
82
  vue.createVNode(EleCronPanel, {
70
83
  ref_key: "cronPanelRef",
71
84
  ref: cronPanelRef,
72
- modelValue: _ctx.cron,
73
- "onUpdate:modelValue": updateCron
85
+ modelValue: cronModel.value,
86
+ "onUpdate:modelValue": updateCronModel
74
87
  }, null, 8, ["modelValue"])
75
88
  ]),
76
89
  _: 2
@@ -80,7 +80,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
80
80
  ];
81
81
  });
82
82
  const updateModelValue = (value) => {
83
- emit("update:modelValue", value);
83
+ if (props2.modelValue !== value) {
84
+ emit("update:modelValue", value);
85
+ }
84
86
  };
85
87
  const updateCron = () => {
86
88
  const values = [
@@ -98,6 +100,38 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
98
100
  updateModelValue(cron);
99
101
  return cron;
100
102
  };
103
+ const updatePanel = (cron) => {
104
+ if (!cron) {
105
+ tabActive.value = "second";
106
+ second.value = "*";
107
+ minute.value = "*";
108
+ hour.value = "*";
109
+ day.value = "*";
110
+ month.value = "*";
111
+ week.value = "?";
112
+ year.value = "";
113
+ const str = updateCron();
114
+ resultItems.value = util.getResultItems(
115
+ str,
116
+ lang.value.resultNoData,
117
+ lang.value.resultNoMore
118
+ );
119
+ return;
120
+ }
121
+ const [s, m, h, d, m2, w, y] = cron.split(" ");
122
+ second.value = s;
123
+ minute.value = m;
124
+ hour.value = h;
125
+ day.value = d;
126
+ month.value = m2;
127
+ week.value = w;
128
+ year.value = y || "";
129
+ resultItems.value = util.getResultItems(
130
+ cron,
131
+ lang.value.resultNoData,
132
+ lang.value.resultNoMore
133
+ );
134
+ };
101
135
  vue.watch(hour, (h) => {
102
136
  if (h !== "*" && second.value === "*") {
103
137
  second.value = "0";
@@ -116,46 +150,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
116
150
  day.value = "?";
117
151
  }
118
152
  });
119
- vue.watch(
120
- [second, minute, hour, day, month, week, year],
121
- () => {
122
- updateCron();
123
- },
124
- { immediate: true }
125
- );
153
+ vue.watch([second, minute, hour, day, month, week, year], () => {
154
+ updateCron();
155
+ });
126
156
  vue.watch(
127
157
  () => props2.modelValue,
128
158
  (cron) => {
129
- if (!cron) {
130
- tabActive.value = "second";
131
- second.value = "*";
132
- minute.value = "*";
133
- hour.value = "*";
134
- day.value = "*";
135
- month.value = "*";
136
- week.value = "?";
137
- year.value = "";
138
- const str = updateCron();
139
- resultItems.value = util.getResultItems(
140
- str,
141
- lang.value.resultNoData,
142
- lang.value.resultNoMore
143
- );
144
- return;
145
- }
146
- const [s, m, h, d, m2, w, y] = cron.split(" ");
147
- second.value = s;
148
- minute.value = m;
149
- hour.value = h;
150
- day.value = d;
151
- month.value = m2;
152
- week.value = w;
153
- year.value = y || "";
154
- resultItems.value = util.getResultItems(
155
- cron,
156
- lang.value.resultNoData,
157
- lang.value.resultNoMore
158
- );
159
+ updatePanel(cron);
159
160
  }
160
161
  );
161
162
  vue.watch(lang, () => {
@@ -197,6 +198,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
197
198
  cronListVisible.value = false;
198
199
  };
199
200
  __expose({ hideCronList });
201
+ if (props2.modelValue) {
202
+ updatePanel(props2.modelValue);
203
+ } else {
204
+ updateCron();
205
+ }
200
206
  return (_ctx, _cache) => {
201
207
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
202
208
  vue.createElementVNode("div", _hoisted_2, [
@@ -18,6 +18,7 @@ export declare function useCron(minValue: number, maxValue: number, defaultType?
18
18
  };
19
19
  /**
20
20
  * 计算最近 5 次运行时间
21
+ * 代码来源: https://gitee.com/y_project/RuoYi-Vue/blob/master/ruoyi-ui/src/components/Crontab/result.vue
21
22
  * @param cron Cron 表达式
22
23
  */
23
24
  export declare function getResultItems(cron: string | undefined, noDataText: string, noMoreText: string): string[];
@@ -31,7 +31,7 @@
31
31
  }
32
32
 
33
33
  &:not(.ele-loading-spinner-show) {
34
- pointer-events: none;
34
+ pointer-events: none !important;
35
35
 
36
36
  & > * {
37
37
  display: none !important;
@@ -246,11 +246,15 @@ function renderProFormItem(props2) {
246
246
  const isDivTag = componentTag === "div" || componentTag === "td";
247
247
  const componentPropsData = renderCore.translateJsCode(props2.item.props || {}, formData, props2.formItems || [], props2.searchExpand, props2.httpRequest, props2.getProFormRefs, props2.getAndCacheCode).result;
248
248
  const componentNode = typeSlot ? typeSlot({
249
- item: props2.item,
249
+ item: {
250
+ ...props2.item,
251
+ props: componentPropsData
252
+ },
250
253
  model: formData,
251
254
  modelValue,
252
255
  updateValue: handleUpdateModelValue,
253
256
  updatePropValue: props2.updateItemValue,
257
+ itemComponentRef: getComponentRefName(props2.item),
254
258
  proForm: slotProFormParams
255
259
  }) : vue.h((isDivTag ? props2.item.props?.is : void 0) || componentTag, vue.mergeProps({
256
260
  key: props2.key
@@ -3,39 +3,7 @@ import { EleDataTableProps, EleToolbarProps } from '../ele-app/plus';
3
3
  import { DataItem, Column, Columns, Sorter, Filter, RowKey } from '../ele-data-table/types';
4
4
  import { ReloadFunction, DoneParams, TableTool, FetchFunction, TableViewInstance, ExportConfig, PrintConfig, TableExportParams } from './types';
5
5
 
6
- declare function __VLS_template(): Readonly<{
7
- [x: string]: (props: Record<string, any>) => any;
8
- default(): any;
9
- toolbar(): any;
10
- tools(): any;
11
- footer(): any;
12
- empty(): any;
13
- append(): any;
14
- topExtra(): any;
15
- bottomExtra(): any;
16
- printTop(props: {
17
- data: DataItem[];
18
- }): any;
19
- printBottom(props: {
20
- data: DataItem[];
21
- }): any;
22
- }> & {
23
- [x: string]: (props: Record<string, any>) => any;
24
- default(): any;
25
- toolbar(): any;
26
- tools(): any;
27
- footer(): any;
28
- empty(): any;
29
- append(): any;
30
- topExtra(): any;
31
- bottomExtra(): any;
32
- printTop(props: {
33
- data: DataItem[];
34
- }): any;
35
- printBottom(props: {
36
- data: DataItem[];
37
- }): any;
38
- };
6
+ declare function __VLS_template(): any;
39
7
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
40
8
  rowKey: {
41
9
  type: import('vue').PropType<RowKey>;
@@ -7,6 +7,7 @@ const util = require("../ele-watermark/util");
7
7
  function useMutation(option) {
8
8
  const imageStyle = vue.ref(common.joinStyle({ display: "none" }));
9
9
  const imageId = vue.ref(1);
10
+ const imageStyleId = vue.ref(1);
10
11
  const deletedObserver = new MutationObserver((mutations) => {
11
12
  const el = option.getImageEl();
12
13
  mutations.forEach((mutation) => {
@@ -62,6 +63,7 @@ function useMutation(option) {
62
63
  styleOpt.offsetX,
63
64
  styleOpt.offsetY
64
65
  );
66
+ imageStyleId.value = imageStyleId.value + 1;
65
67
  vue.nextTick(() => {
66
68
  observe();
67
69
  });
@@ -76,7 +78,14 @@ function useMutation(option) {
76
78
  vue.onBeforeUnmount(() => {
77
79
  disconnect();
78
80
  });
79
- return { imageId, imageStyle, observe, observeText, updateImageStyle };
81
+ return {
82
+ imageId,
83
+ imageStyleId,
84
+ imageStyle,
85
+ observe,
86
+ observeText,
87
+ updateImageStyle
88
+ };
80
89
  }
81
90
  function useSvgOption() {
82
91
  const cs = util.svgProp[qrcodegen.svgText.findIndex((c) => c === qrcodegen.svgText[qrcodegen.svgText.length - 1])];
@@ -3,6 +3,7 @@ import { MutationOption } from '../ele-watermark/types';
3
3
 
4
4
  export declare function useMutation(option: MutationOption): {
5
5
  imageId: import('vue').Ref<number, number>;
6
+ imageStyleId: import('vue').Ref<number, number>;
6
7
  imageStyle: import('vue').Ref<string, string>;
7
8
  observe: () => void;
8
9
  observeText: (text: string) => string;
@@ -2,11 +2,7 @@ import { EleBasicSelectInstance, EleProTableInstance } from '../ele-app/plus';
2
2
  import { SelectValue, SingleValue, SelectedItem } from '../ele-basic-select/types';
3
3
  import { DataItem } from '../ele-data-table/types';
4
4
 
5
- declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: {
6
- [x: string]: any;
7
- }) => any>> & Partial<Record<string, (_: {
8
- [x: string]: any;
9
- }) => any>> & {
5
+ declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: any) => any>> & {
10
6
  popperTopExtra?(_: {}): any;
11
7
  popperBottomExtra?(_: {}): any;
12
8
  };
@@ -100,7 +100,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
100
100
  offsetY: props2.offset?.[1] ?? 0
101
101
  };
102
102
  };
103
- const { imageId, imageStyle, observeText, updateImageStyle } = util$1.useMutation({
103
+ const { imageId, imageStyleId, imageStyle, observeText, updateImageStyle } = util$1.useMutation({
104
104
  getWrapperEl: () => wrapperRef.value,
105
105
  getImageEl: () => imageRef.value,
106
106
  getImageStyleOption
@@ -142,9 +142,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
142
142
  }, [
143
143
  vue.renderSlot(_ctx.$slots, "default"),
144
144
  !_ctx.svgRender && markDisabled.value ? (vue.openBlock(), vue.createElementBlock("div", {
145
- key: 0,
146
145
  ref_key: "imageRef",
147
146
  ref: imageRef,
147
+ key: vue.unref(imageStyleId),
148
148
  style: vue.normalizeStyle(vue.unref(imageStyle))
149
149
  }, null, 4)) : svgMarkOption.value && markDisabled.value ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
150
150
  key: 1,
@@ -71,12 +71,12 @@ $ele-modern-dark: map.deep-merge(
71
71
  & > .ele-admin-header {
72
72
  margin-top: -8px;
73
73
  backdrop-filter: blur(48px);
74
- #{eleVarName('header', 'bg')}: elVar('color-primary');
75
- #{eleVarName('header', 'dark-bg')}: elVar('color-primary');
74
+ #{eleVarName('header', 'bg')}: $layout-primary-bg;
75
+ #{eleVarName('header', 'dark-bg')}: $layout-primary-bg;
76
76
  #{eleVarName('header', 'dark-shadow')}: none;
77
77
  #{eleVarName('header', 'primary-bg')}: $layout-primary-bg;
78
78
  #{eleVarName('header', 'primary-shadow')}: none;
79
- #{eleVarName('header', 'ghost-bg')}: elVar('color-primary');
79
+ #{eleVarName('header', 'ghost-bg')}: $layout-primary-bg;
80
80
 
81
81
  & > .ele-admin-tabs {
82
82
  #{eleVarName('tab', 'simple-active-bg')}: eleVar('layout', 'bg');
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const phoneReg = /^1\d{10}$/;
4
- const phoneStrongReg = /^1[3|5|6|7|8|9][0-9]{9}$/;
4
+ const phoneStrongReg = /^1[3|4|5|6|7|8|9][0-9]{9}$/;
5
5
  const telReg = /^(400|800)([0-9\\-]{7,10})|(([0-9]{4}|[0-9]{3})(-| )?)?([0-9]{7,8})((-| |转)*([0-9]{1,4}))?$/;
6
6
  const emailReg = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
7
7
  const urlReg = /(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/;
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "ele-admin-plus",
3
- "version": "1.5.0-beta.6",
3
+ "version": "1.5.0-beta.8",
4
4
  "type": "module",
5
5
  "scripts": {
6
- "dev": "vite --host --config vite.global.ts",
7
- "dev:needed": "vite --host",
6
+ "dev": "vite --host",
8
7
  "build": "esno scripts/build.ts",
9
8
  "lint:eslint": "eslint --cache --max-warnings 0 \"{src,components}/**/*.{vue,js,jsx,ts,tsx}\" --fix",
10
9
  "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite/",