sh-view 2.6.2 → 2.6.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 (38) hide show
  1. package/package.json +1 -1
  2. package/packages/components/global-components/sh-form/form.vue +110 -108
  3. package/packages/components/global-components/sh-form/js/useForm.js +3 -0
  4. package/packages/components/global-components/sh-form/query.vue +70 -68
  5. package/packages/components/global-components/sh-table/components/sh-column.vue +69 -69
  6. package/packages/components/global-components/sh-table/grid.vue +160 -159
  7. package/packages/components/global-components/sh-table/table.vue +218 -217
  8. package/packages/components/other-components/sh-cron-modal/mixin/cron-hooks.js +179 -177
  9. package/packages/components/other-components/sh-cron-modal/tabs/cron-day-box.vue +101 -99
  10. package/packages/components/other-components/sh-cron-modal/tabs/cron-hour-box.vue +68 -66
  11. package/packages/components/other-components/sh-cron-modal/tabs/cron-minute-box.vue +68 -66
  12. package/packages/components/other-components/sh-cron-modal/tabs/cron-month-box.vue +68 -66
  13. package/packages/components/other-components/sh-cron-modal/tabs/cron-second-box.vue +68 -66
  14. package/packages/components/other-components/sh-cron-modal/tabs/cron-week-box.vue +126 -125
  15. package/packages/components/other-components/sh-cron-modal/tabs/cron-year-box.vue +59 -57
  16. package/packages/components/other-components/sh-preview/components/sh-excel.vue +929 -927
  17. package/packages/components/other-components/sh-preview/components/sh-word.vue +78 -76
  18. package/packages/vxeTable/render/cell/vxe-render-checkbox.vue +28 -26
  19. package/packages/vxeTable/render/cell/vxe-render-checkgroup.vue +43 -42
  20. package/packages/vxeTable/render/cell/vxe-render-code.vue +36 -34
  21. package/packages/vxeTable/render/cell/vxe-render-goption.vue +104 -103
  22. package/packages/vxeTable/render/cell/vxe-render-href.vue +21 -19
  23. package/packages/vxeTable/render/cell/vxe-render-input.vue +53 -52
  24. package/packages/vxeTable/render/cell/vxe-render-money.vue +33 -31
  25. package/packages/vxeTable/render/cell/vxe-render-progress.vue +28 -26
  26. package/packages/vxeTable/render/cell/vxe-render-radio.vue +28 -26
  27. package/packages/vxeTable/render/cell/vxe-render-radiogroup.vue +43 -42
  28. package/packages/vxeTable/render/cell/vxe-render-select.vue +52 -51
  29. package/packages/vxeTable/render/cell/vxe-render-switch.vue +28 -26
  30. package/packages/vxeTable/render/cell/vxe-render-table.vue +51 -50
  31. package/packages/vxeTable/render/cell/vxe-render-textarea.vue +28 -26
  32. package/packages/vxeTable/render/cell/vxe-render-time.vue +44 -41
  33. package/packages/vxeTable/render/cell/vxe-render-tree.vue +63 -60
  34. package/packages/vxeTable/render/cell/vxe-render-upload.vue +28 -26
  35. package/packages/vxeTable/render/filters/vxe-filter-input.vue +25 -23
  36. package/packages/vxeTable/render/footer/vxe-footer-input.vue +23 -21
  37. package/packages/vxeTable/render/footer/vxe-footer-money.vue +30 -28
  38. package/packages/vxeTable/render/header/vxe-header-money.vue +31 -29
@@ -1,125 +1,126 @@
1
- <template>
2
- <div class="sh-cron-config-list">
3
- <vxe-radio-group v-model="type">
4
- <div class="item">
5
- <vxe-radio :label="TypeEnum.unset" v-bind="beforeRadioAttrs">不设置</vxe-radio>
6
- <span class="tip-info">日和周只能设置其中之一</span>
7
- </div>
8
- <div class="item">
9
- <vxe-radio :label="TypeEnum.range" v-bind="beforeRadioAttrs">区间</vxe-radio>
10
- <span> 从 </span>
11
- <vxe-select v-model="valueRange.start" :options="weekOptions" v-bind="typeRangeSelectAttrs" />
12
- <span> 至 </span>
13
- <vxe-select v-model="valueRange.end" :options="weekOptions" v-bind="typeRangeSelectAttrs" />
14
- </div>
15
- <div class="item">
16
- <vxe-radio :label="TypeEnum.loop" v-bind="beforeRadioAttrs">循环</vxe-radio>
17
- <span> 从 </span>
18
- <vxe-select v-model="valueLoop.start" :options="weekOptions" v-bind="typeLoopSelectAttrs" />
19
- <span> 至 </span>
20
- <vxe-input v-model="valueLoop.interval" v-bind="typeLoopAttrs" />
21
- </div>
22
- <div class="item">
23
- <vxe-radio :label="TypeEnum.specify" v-bind="beforeRadioAttrs">指定</vxe-radio>
24
- <div class="list">
25
- <vxe-checkbox-group v-model="valueList">
26
- <template v-for="i in specifyRange" :key="i">
27
- <vxe-checkbox :label="i" v-bind="typeSpecifyAttrs">{{ i }}</vxe-checkbox>
28
- </template>
29
- </vxe-checkbox-group>
30
- </div>
31
- </div>
32
- </vxe-radio-group>
33
- </div>
34
- </template>
35
-
36
- <script>
37
- import { defineComponent, computed, getCurrentInstance, watch } from 'vue'
38
- import cronProps from '../mixin/cron-props'
39
- emits: cronEmits,
40
- import cronHooks from '../mixin/cron-hooks'
41
- import cronEmits from '../mixin/cron-emits'
42
- const WEEK_MAP_EN = {
43
- 1: 'SUN',
44
- 2: 'MON',
45
- 3: 'TUE',
46
- 4: 'WED',
47
- 5: 'THU',
48
- 6: 'FRI',
49
- 7: 'SAT'
50
- }
51
- const WEEK_MAP_CN = {
52
- 1: '周日',
53
- 2: '周一',
54
- 3: '周二',
55
- 4: '周三',
56
- 5: '周四',
57
- 6: '周五',
58
- 7: '周六'
59
- }
60
- export default defineComponent({
61
- name: 'CronWeekBox',
62
- props: {
63
- ...cronProps,
64
- day: {
65
- type: String,
66
- default: '*'
67
- }
68
- },
69
- setup(props, context) {
70
- const { proxy } = getCurrentInstance()
71
- const { $vUtils } = proxy
72
- const { emit, slots } = context
73
-
74
- const useCron = cronHooks(props, context, proxy, {
75
- defaultValue: '*',
76
- minValue: 1,
77
- maxValue: 7,
78
- valueRange: { start: 1, end: 7 },
79
- valueLoop: { start: 2, interval: 1 }
80
- })
81
-
82
- const disabledChoice = computed(() => {
83
- return (props.day && props.day !== '?') || props.disabled
84
- })
85
- const weekOptions = computed(() => {
86
- let options = []
87
- for (let weekKey of Object.keys(WEEK_MAP_CN)) {
88
- let weekName = WEEK_MAP_CN[weekKey]
89
- options.push({
90
- value: Number.parseInt(weekKey),
91
- label: weekName
92
- })
93
- }
94
- return options
95
- })
96
- const typeRangeSelectAttrs = computed(() => {
97
- return {
98
- class: ['cron-item-input'],
99
- disabled: useCron.typeRangeAttrs.value.disabled
100
- }
101
- })
102
- const typeLoopSelectAttrs = computed(() => {
103
- return {
104
- class: ['cron-item-input'],
105
- disabled: useCron.typeLoopAttrs.value.disabled
106
- }
107
- })
108
-
109
- watch(
110
- () => props.day,
111
- () => {
112
- useCron.updateValue(disabledChoice.value ? '?' : useCron.computeValue.value)
113
- }
114
- )
115
-
116
- return Object.assign({}, useCron, {
117
- weekOptions,
118
- typeRangeSelectAttrs,
119
- typeLoopSelectAttrs
120
- })
121
- }
122
- })
123
- </script>
124
-
125
- <style scoped></style>
1
+ <template>
2
+ <div class="sh-cron-config-list">
3
+ <vxe-radio-group v-model="type">
4
+ <div class="item">
5
+ <vxe-radio :label="TypeEnum.unset" v-bind="beforeRadioAttrs">不设置</vxe-radio>
6
+ <span class="tip-info">日和周只能设置其中之一</span>
7
+ </div>
8
+ <div class="item">
9
+ <vxe-radio :label="TypeEnum.range" v-bind="beforeRadioAttrs">区间</vxe-radio>
10
+ <span> 从 </span>
11
+ <vxe-select v-model="valueRange.start" :options="weekOptions" v-bind="typeRangeSelectAttrs" />
12
+ <span> 至 </span>
13
+ <vxe-select v-model="valueRange.end" :options="weekOptions" v-bind="typeRangeSelectAttrs" />
14
+ </div>
15
+ <div class="item">
16
+ <vxe-radio :label="TypeEnum.loop" v-bind="beforeRadioAttrs">循环</vxe-radio>
17
+ <span> 从 </span>
18
+ <vxe-select v-model="valueLoop.start" :options="weekOptions" v-bind="typeLoopSelectAttrs" />
19
+ <span> 至 </span>
20
+ <vxe-input v-model="valueLoop.interval" v-bind="typeLoopAttrs" />
21
+ </div>
22
+ <div class="item">
23
+ <vxe-radio :label="TypeEnum.specify" v-bind="beforeRadioAttrs">指定</vxe-radio>
24
+ <div class="list">
25
+ <vxe-checkbox-group v-model="valueList">
26
+ <template v-for="i in specifyRange" :key="i">
27
+ <vxe-checkbox :label="i" v-bind="typeSpecifyAttrs">{{ i }}</vxe-checkbox>
28
+ </template>
29
+ </vxe-checkbox-group>
30
+ </div>
31
+ </div>
32
+ </vxe-radio-group>
33
+ </div>
34
+ </template>
35
+
36
+ <script>
37
+ import { defineComponent, computed, getCurrentInstance, watch } from 'vue'
38
+ import cronProps from '../mixin/cron-props'
39
+ emits: cronEmits,
40
+ import cronHooks from '../mixin/cron-hooks'
41
+ import cronEmits from '../mixin/cron-emits'
42
+ const WEEK_MAP_EN = {
43
+ 1: 'SUN',
44
+ 2: 'MON',
45
+ 3: 'TUE',
46
+ 4: 'WED',
47
+ 5: 'THU',
48
+ 6: 'FRI',
49
+ 7: 'SAT'
50
+ }
51
+ const WEEK_MAP_CN = {
52
+ 1: '周日',
53
+ 2: '周一',
54
+ 3: '周二',
55
+ 4: '周三',
56
+ 5: '周四',
57
+ 6: '周五',
58
+ 7: '周六'
59
+ }
60
+ export default defineComponent({
61
+ name: 'CronWeekBox',
62
+ props: {
63
+ ...cronProps,
64
+ day: {
65
+ type: String,
66
+ default: '*'
67
+ }
68
+ },
69
+ setup(props, context) {
70
+ const { proxy } = getCurrentInstance()
71
+ const { $vUtils } = proxy
72
+ const { emit, slots } = context
73
+
74
+ const useCron = cronHooks(props, context, proxy, {
75
+ defaultValue: '*',
76
+ minValue: 1,
77
+ maxValue: 7,
78
+ valueRange: { start: 1, end: 7 },
79
+ valueLoop: { start: 2, interval: 1 }
80
+ })
81
+
82
+ const disabledChoice = computed(() => {
83
+ return (props.day && props.day !== '?') || props.disabled
84
+ })
85
+ const weekOptions = computed(() => {
86
+ let options = []
87
+ for (let weekKey of Object.keys(WEEK_MAP_CN)) {
88
+ let weekName = WEEK_MAP_CN[weekKey]
89
+ options.push({
90
+ value: Number.parseInt(weekKey),
91
+ label: weekName
92
+ })
93
+ }
94
+ return options
95
+ })
96
+ const typeRangeSelectAttrs = computed(() => {
97
+ return {
98
+ class: ['cron-item-input'],
99
+ disabled: useCron.typeRangeAttrs.value.disabled
100
+ }
101
+ })
102
+ const typeLoopSelectAttrs = computed(() => {
103
+ return {
104
+ class: ['cron-item-input'],
105
+ disabled: useCron.typeLoopAttrs.value.disabled
106
+ }
107
+ })
108
+
109
+ watch(
110
+ () => props.day,
111
+ () => {
112
+ useCron.updateValue(disabledChoice.value ? '?' : useCron.computeValue.value)
113
+ }
114
+ )
115
+
116
+ return {
117
+ ...useCron,
118
+ weekOptions,
119
+ typeRangeSelectAttrs,
120
+ typeLoopSelectAttrs
121
+ }
122
+ }
123
+ })
124
+ </script>
125
+
126
+ <style scoped></style>
@@ -1,57 +1,59 @@
1
- <template>
2
- <div class="sh-cron-config-list">
3
- <vxe-radio-group v-model="type">
4
- <div class="item">
5
- <vxe-radio :label="TypeEnum.every" v-bind="beforeRadioAttrs">每年</vxe-radio>
6
- </div>
7
- <div class="item">
8
- <vxe-radio :label="TypeEnum.range" v-bind="beforeRadioAttrs">区间</vxe-radio>
9
- <span> 从 </span>
10
- <vxe-input v-model="valueRange.start" v-bind="typeRangeAttrs" />
11
- <span> 年 至 </span>
12
- <vxe-input v-model="valueRange.end" v-bind="typeRangeAttrs" />
13
- <span> 年 </span>
14
- </div>
15
- <div class="item">
16
- <vxe-radio :label="TypeEnum.loop" v-bind="beforeRadioAttrs">循环</vxe-radio>
17
- <span> 年 </span>
18
- <vxe-input v-model="valueLoop.start" v-bind="typeLoopAttrs" />
19
- <span> 分开始,间隔 </span>
20
- <vxe-input v-model="valueLoop.interval" v-bind="typeLoopAttrs" />
21
- <span> 年 </span>
22
- </div>
23
- </vxe-radio-group>
24
- </div>
25
- </template>
26
-
27
- <script>
28
- import { defineComponent, computed, getCurrentInstance, watch } from 'vue'
29
- import cronProps from '../mixin/cron-props'
30
- import cronHooks from '../mixin/cron-hooks'
31
- import cronEmits from '../mixin/cron-emits'
32
- export default defineComponent({
33
- name: 'CronYearBox',
34
- props: {
35
- ...cronProps
36
- },
37
- emits: cronEmits,
38
- setup(props, context) {
39
- const { proxy } = getCurrentInstance()
40
- const { $vUtils } = proxy
41
- const { emit, slots } = context
42
-
43
- const nowYear = new Date().getFullYear()
44
-
45
- const useCron = cronHooks(props, context, proxy, {
46
- defaultValue: '*',
47
- minValue: 0,
48
- valueRange: { start: nowYear, end: nowYear + 100 },
49
- valueLoop: { start: nowYear, interval: 1 }
50
- })
51
-
52
- return Object.assign({}, useCron)
53
- }
54
- })
55
- </script>
56
-
57
- <style scoped></style>
1
+ <template>
2
+ <div class="sh-cron-config-list">
3
+ <vxe-radio-group v-model="type">
4
+ <div class="item">
5
+ <vxe-radio :label="TypeEnum.every" v-bind="beforeRadioAttrs">每年</vxe-radio>
6
+ </div>
7
+ <div class="item">
8
+ <vxe-radio :label="TypeEnum.range" v-bind="beforeRadioAttrs">区间</vxe-radio>
9
+ <span> 从 </span>
10
+ <vxe-input v-model="valueRange.start" v-bind="typeRangeAttrs" />
11
+ <span> 年 至 </span>
12
+ <vxe-input v-model="valueRange.end" v-bind="typeRangeAttrs" />
13
+ <span> 年 </span>
14
+ </div>
15
+ <div class="item">
16
+ <vxe-radio :label="TypeEnum.loop" v-bind="beforeRadioAttrs">循环</vxe-radio>
17
+ <span> 年 </span>
18
+ <vxe-input v-model="valueLoop.start" v-bind="typeLoopAttrs" />
19
+ <span> 分开始,间隔 </span>
20
+ <vxe-input v-model="valueLoop.interval" v-bind="typeLoopAttrs" />
21
+ <span> 年 </span>
22
+ </div>
23
+ </vxe-radio-group>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ import { defineComponent, computed, getCurrentInstance, watch } from 'vue'
29
+ import cronProps from '../mixin/cron-props'
30
+ import cronHooks from '../mixin/cron-hooks'
31
+ import cronEmits from '../mixin/cron-emits'
32
+ export default defineComponent({
33
+ name: 'CronYearBox',
34
+ props: {
35
+ ...cronProps
36
+ },
37
+ emits: cronEmits,
38
+ setup(props, context) {
39
+ const { proxy } = getCurrentInstance()
40
+ const { $vUtils } = proxy
41
+ const { emit, slots } = context
42
+
43
+ const nowYear = new Date().getFullYear()
44
+
45
+ const useCron = cronHooks(props, context, proxy, {
46
+ defaultValue: '*',
47
+ minValue: 0,
48
+ valueRange: { start: nowYear, end: nowYear + 100 },
49
+ valueLoop: { start: nowYear, interval: 1 }
50
+ })
51
+
52
+ return {
53
+ ...useCron
54
+ }
55
+ }
56
+ })
57
+ </script>
58
+
59
+ <style scoped></style>