sh-view 2.6.1 → 2.6.2
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.
- package/package.json +1 -1
- package/packages/components/global-components/sh-form/form.vue +1 -3
- package/packages/components/global-components/sh-form/query.vue +1 -3
- package/packages/components/global-components/sh-table/components/sh-column.vue +2 -2
- package/packages/components/global-components/sh-table/grid.vue +2 -3
- package/packages/components/global-components/sh-table/table.vue +2 -3
- package/packages/components/other-components/sh-cron-modal/mixin/cron-hooks.js +4 -6
- package/packages/components/other-components/sh-cron-modal/tabs/cron-day-box.vue +4 -6
- package/packages/components/other-components/sh-cron-modal/tabs/cron-hour-box.vue +1 -3
- package/packages/components/other-components/sh-cron-modal/tabs/cron-minute-box.vue +1 -3
- package/packages/components/other-components/sh-cron-modal/tabs/cron-month-box.vue +1 -3
- package/packages/components/other-components/sh-cron-modal/tabs/cron-second-box.vue +1 -3
- package/packages/components/other-components/sh-cron-modal/tabs/cron-week-box.vue +2 -3
- package/packages/components/other-components/sh-cron-modal/tabs/cron-year-box.vue +1 -3
- package/packages/components/other-components/sh-preview/components/sh-excel.vue +1 -3
- package/packages/components/other-components/sh-preview/components/sh-word.vue +1 -3
- package/packages/vxeTable/render/cell/vxe-render-checkbox.vue +26 -28
- package/packages/vxeTable/render/cell/vxe-render-checkgroup.vue +42 -43
- package/packages/vxeTable/render/cell/vxe-render-code.vue +1 -3
- package/packages/vxeTable/render/cell/vxe-render-goption.vue +2 -3
- package/packages/vxeTable/render/cell/vxe-render-href.vue +1 -3
- package/packages/vxeTable/render/cell/vxe-render-input.vue +2 -3
- package/packages/vxeTable/render/cell/vxe-render-money.vue +31 -33
- package/packages/vxeTable/render/cell/vxe-render-progress.vue +26 -28
- package/packages/vxeTable/render/cell/vxe-render-radio.vue +26 -28
- package/packages/vxeTable/render/cell/vxe-render-radiogroup.vue +42 -43
- package/packages/vxeTable/render/cell/vxe-render-select.vue +2 -3
- package/packages/vxeTable/render/cell/vxe-render-switch.vue +26 -28
- package/packages/vxeTable/render/cell/vxe-render-table.vue +2 -3
- package/packages/vxeTable/render/cell/vxe-render-textarea.vue +26 -28
- package/packages/vxeTable/render/cell/vxe-render-time.vue +41 -44
- package/packages/vxeTable/render/cell/vxe-render-tree.vue +1 -4
- package/packages/vxeTable/render/cell/vxe-render-upload.vue +26 -28
- package/packages/vxeTable/render/filters/vxe-filter-input.vue +1 -3
- package/packages/vxeTable/render/footer/vxe-footer-input.vue +1 -3
- package/packages/vxeTable/render/footer/vxe-footer-money.vue +1 -3
- package/packages/vxeTable/render/header/vxe-header-money.vue +1 -3
package/package.json
CHANGED
|
@@ -48,9 +48,9 @@ export default defineComponent({
|
|
|
48
48
|
return h(resolveComponent('sh-column'), { column: child })
|
|
49
49
|
})
|
|
50
50
|
columnSlots.default = () => childrenList
|
|
51
|
-
return h(resolveComponent('vxe-colgroup'),
|
|
51
|
+
return h(resolveComponent('vxe-colgroup'), groupConfig.value, columnSlots)
|
|
52
52
|
}
|
|
53
|
-
return h(resolveComponent('vxe-column'),
|
|
53
|
+
return h(resolveComponent('vxe-column'), columnConfig.value, columnSlots)
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
return {
|
|
@@ -193,8 +193,7 @@ export default defineComponent({
|
|
|
193
193
|
tableHeight.value = parentHeight - otherHeight
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
return {
|
|
197
|
-
...useTableHooks,
|
|
196
|
+
return Object.assign({}, useTableHooks, {
|
|
198
197
|
tableWrapRef,
|
|
199
198
|
topSlotRef,
|
|
200
199
|
formSlotRef,
|
|
@@ -212,7 +211,7 @@ export default defineComponent({
|
|
|
212
211
|
isPagerSlot,
|
|
213
212
|
isBottomSlot,
|
|
214
213
|
handleResize
|
|
215
|
-
}
|
|
214
|
+
})
|
|
216
215
|
}
|
|
217
216
|
})
|
|
218
217
|
</script>
|
|
@@ -37,16 +37,14 @@ export default function (props, context, proxy, state) {
|
|
|
37
37
|
}
|
|
38
38
|
})
|
|
39
39
|
const typeRangeAttrs = computed(() => {
|
|
40
|
-
return {
|
|
41
|
-
...inputNumberAttrs.value,
|
|
40
|
+
return Object.assign(inputNumberAttrs.value, {
|
|
42
41
|
disabled: type.value !== TypeEnum.range || props.disabled
|
|
43
|
-
}
|
|
42
|
+
})
|
|
44
43
|
})
|
|
45
44
|
const typeLoopAttrs = computed(() => {
|
|
46
|
-
return {
|
|
47
|
-
...inputNumberAttrs.value,
|
|
45
|
+
return Object.assign(inputNumberAttrs.value, {
|
|
48
46
|
disabled: type.value !== TypeEnum.loop || props.disabled
|
|
49
|
-
}
|
|
47
|
+
})
|
|
50
48
|
})
|
|
51
49
|
const typeSpecifyAttrs = computed(() => {
|
|
52
50
|
return {
|
|
@@ -77,10 +77,9 @@ export default defineComponent({
|
|
|
77
77
|
|
|
78
78
|
const disabledChoice = computed(() => (props.week && props.week !== '?') || props.disabled)
|
|
79
79
|
const typeWorkAttrs = computed(() => {
|
|
80
|
-
return {
|
|
81
|
-
...useCron.inputNumberAttrs,
|
|
80
|
+
return Object.assign(useCron.inputNumberAttrs, {
|
|
82
81
|
disabled: useCron.type.value !== useCron.TypeEnum.work || props.disabled || disabledChoice.value
|
|
83
|
-
}
|
|
82
|
+
})
|
|
84
83
|
})
|
|
85
84
|
|
|
86
85
|
watch(
|
|
@@ -90,10 +89,9 @@ export default defineComponent({
|
|
|
90
89
|
}
|
|
91
90
|
)
|
|
92
91
|
|
|
93
|
-
return {
|
|
94
|
-
...useCron,
|
|
92
|
+
return Object.assign({}, useCron, {
|
|
95
93
|
typeWorkAttrs
|
|
96
|
-
}
|
|
94
|
+
})
|
|
97
95
|
}
|
|
98
96
|
})
|
|
99
97
|
</script>
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="vxe-render--inner" :class="{ 'vxe-render--inner--readonly': !redit, 'form-render': rform, 'td-render': !rform }">
|
|
3
|
-
<template v-if="redit || isEditAll">
|
|
4
|
-
<vxe-checkbox v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeCheckCallBack" />
|
|
5
|
-
</template>
|
|
6
|
-
<template v-else>
|
|
7
|
-
<vxe-checkbox :model-value="renderText" :disabled="true" :size="rsize" v-bind="rprops" />
|
|
8
|
-
</template>
|
|
9
|
-
</span>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
-
import cellProps from '../mixin/cell-props'
|
|
15
|
-
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
-
export default defineComponent({
|
|
17
|
-
name: 'VxeRenderCheckbox',
|
|
18
|
-
props: cellProps,
|
|
19
|
-
setup(props, context) {
|
|
20
|
-
const { proxy } = getCurrentInstance()
|
|
21
|
-
const useCell = cellHooks(props, context, proxy)
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})
|
|
28
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="vxe-render--inner" :class="{ 'vxe-render--inner--readonly': !redit, 'form-render': rform, 'td-render': !rform }">
|
|
3
|
+
<template v-if="redit || isEditAll">
|
|
4
|
+
<vxe-checkbox v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeCheckCallBack" />
|
|
5
|
+
</template>
|
|
6
|
+
<template v-else>
|
|
7
|
+
<vxe-checkbox :model-value="renderText" :disabled="true" :size="rsize" v-bind="rprops" />
|
|
8
|
+
</template>
|
|
9
|
+
</span>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
+
import cellProps from '../mixin/cell-props'
|
|
15
|
+
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
+
export default defineComponent({
|
|
17
|
+
name: 'VxeRenderCheckbox',
|
|
18
|
+
props: cellProps,
|
|
19
|
+
setup(props, context) {
|
|
20
|
+
const { proxy } = getCurrentInstance()
|
|
21
|
+
const useCell = cellHooks(props, context, proxy)
|
|
22
|
+
|
|
23
|
+
return Object.assign({}, useCell)
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
@@ -1,43 +1,42 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
-
<template v-if="redit || isEditAll">
|
|
4
|
-
<vxe-checkbox-group v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeCheckCallBack">
|
|
5
|
-
<vxe-checkbox v-for="checkitem in rprops.options" :key="checkitem.value" :label="checkitem.value" :content="checkitem.label" />
|
|
6
|
-
</vxe-checkbox-group>
|
|
7
|
-
</template>
|
|
8
|
-
<template v-else-if="!redit && showType">
|
|
9
|
-
<div v-for="roption in rprops.options" :key="roption">
|
|
10
|
-
<sh-tag v-if="roptionShow(roption)" :color="roption.tagColor || rprops.tagColor" :type="roption.tagType || rprops.tagType">{{ roption.label }}</sh-tag>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
<template v-else>
|
|
14
|
-
<span v-html="renderText"></span>
|
|
15
|
-
</template>
|
|
16
|
-
</span>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script>
|
|
20
|
-
import { computed, defineComponent, getCurrentInstance } from 'vue'
|
|
21
|
-
import cellProps from '../mixin/cell-props'
|
|
22
|
-
import cellHooks from '../mixin/cell-hooks'
|
|
23
|
-
export default defineComponent({
|
|
24
|
-
name: 'VxeRenderCheckgroup',
|
|
25
|
-
props: cellProps,
|
|
26
|
-
setup(props, context) {
|
|
27
|
-
const { proxy } = getCurrentInstance()
|
|
28
|
-
const useCell = cellHooks(props, context, proxy)
|
|
29
|
-
|
|
30
|
-
const showType = computed(() => props.rprops.showType === 'tag')
|
|
31
|
-
|
|
32
|
-
const roptionShow = roption => {
|
|
33
|
-
return useCell.renderText.value.split(props.rprops.split).includes(roption.label)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
+
<template v-if="redit || isEditAll">
|
|
4
|
+
<vxe-checkbox-group v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeCheckCallBack">
|
|
5
|
+
<vxe-checkbox v-for="checkitem in rprops.options" :key="checkitem.value" :label="checkitem.value" :content="checkitem.label" />
|
|
6
|
+
</vxe-checkbox-group>
|
|
7
|
+
</template>
|
|
8
|
+
<template v-else-if="!redit && showType">
|
|
9
|
+
<div v-for="roption in rprops.options" :key="roption">
|
|
10
|
+
<sh-tag v-if="roptionShow(roption)" :color="roption.tagColor || rprops.tagColor" :type="roption.tagType || rprops.tagType">{{ roption.label }}</sh-tag>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
<template v-else>
|
|
14
|
+
<span v-html="renderText"></span>
|
|
15
|
+
</template>
|
|
16
|
+
</span>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
import { computed, defineComponent, getCurrentInstance } from 'vue'
|
|
21
|
+
import cellProps from '../mixin/cell-props'
|
|
22
|
+
import cellHooks from '../mixin/cell-hooks'
|
|
23
|
+
export default defineComponent({
|
|
24
|
+
name: 'VxeRenderCheckgroup',
|
|
25
|
+
props: cellProps,
|
|
26
|
+
setup(props, context) {
|
|
27
|
+
const { proxy } = getCurrentInstance()
|
|
28
|
+
const useCell = cellHooks(props, context, proxy)
|
|
29
|
+
|
|
30
|
+
const showType = computed(() => props.rprops.showType === 'tag')
|
|
31
|
+
|
|
32
|
+
const roptionShow = roption => {
|
|
33
|
+
return useCell.renderText.value.split(props.rprops.split).includes(roption.label)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return Object.assign({}, useCell, {
|
|
37
|
+
showType,
|
|
38
|
+
roptionShow
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
</script>
|
|
@@ -92,13 +92,12 @@ export default defineComponent({
|
|
|
92
92
|
tableComponent.context.emit('option-click', renderBtnObj, props.rparams)
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
return {
|
|
96
|
-
...useCell,
|
|
95
|
+
return Object.assign({}, useCell, {
|
|
97
96
|
renderBtns,
|
|
98
97
|
isBtnRender,
|
|
99
98
|
getBtnContent,
|
|
100
99
|
vxeBtnCallback
|
|
101
|
-
}
|
|
100
|
+
})
|
|
102
101
|
}
|
|
103
102
|
})
|
|
104
103
|
</script>
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform, 'td-all': rprops.bill }">
|
|
3
|
-
<template v-if="redit || isEditAll">
|
|
4
|
-
<vxe-input v-model="renderValue" type="number" v-bind="rprops" :size="rsize" @change="vxeInputChange" @blur="vxeBlurCallback" @clear="vxeBlurCallback" />
|
|
5
|
-
</template>
|
|
6
|
-
<template v-else-if="rprops.bill">
|
|
7
|
-
<template v-for="(bil, bilindex) in billGroups" :key="bilindex">
|
|
8
|
-
<span class="cell-bill-number" :class="getBillClass(bil)">{{ getBillValue(bilindex) }}</span>
|
|
9
|
-
</template>
|
|
10
|
-
</template>
|
|
11
|
-
<template v-else>
|
|
12
|
-
<span class="blue" v-html="renderText"></span>
|
|
13
|
-
</template>
|
|
14
|
-
</span>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
import { computed, defineComponent, getCurrentInstance } from 'vue'
|
|
19
|
-
import cellProps from '../mixin/cell-props'
|
|
20
|
-
import cellHooks from '../mixin/cell-hooks'
|
|
21
|
-
export default defineComponent({
|
|
22
|
-
name: 'VxeRenderMoney',
|
|
23
|
-
props: cellProps,
|
|
24
|
-
setup(props, context) {
|
|
25
|
-
const { proxy } = getCurrentInstance()
|
|
26
|
-
const useCell = cellHooks(props, context, proxy)
|
|
27
|
-
|
|
28
|
-
return {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
})
|
|
33
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform, 'td-all': rprops.bill }">
|
|
3
|
+
<template v-if="redit || isEditAll">
|
|
4
|
+
<vxe-input v-model="renderValue" type="number" v-bind="rprops" :size="rsize" @change="vxeInputChange" @blur="vxeBlurCallback" @clear="vxeBlurCallback" />
|
|
5
|
+
</template>
|
|
6
|
+
<template v-else-if="rprops.bill">
|
|
7
|
+
<template v-for="(bil, bilindex) in billGroups" :key="bilindex">
|
|
8
|
+
<span class="cell-bill-number" :class="getBillClass(bil)">{{ getBillValue(bilindex) }}</span>
|
|
9
|
+
</template>
|
|
10
|
+
</template>
|
|
11
|
+
<template v-else>
|
|
12
|
+
<span class="blue" v-html="renderText"></span>
|
|
13
|
+
</template>
|
|
14
|
+
</span>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import { computed, defineComponent, getCurrentInstance } from 'vue'
|
|
19
|
+
import cellProps from '../mixin/cell-props'
|
|
20
|
+
import cellHooks from '../mixin/cell-hooks'
|
|
21
|
+
export default defineComponent({
|
|
22
|
+
name: 'VxeRenderMoney',
|
|
23
|
+
props: cellProps,
|
|
24
|
+
setup(props, context) {
|
|
25
|
+
const { proxy } = getCurrentInstance()
|
|
26
|
+
const useCell = cellHooks(props, context, proxy)
|
|
27
|
+
|
|
28
|
+
return Object.assign({}, useCell)
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
</script>
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
-
<template v-if="redit || isEditAll">
|
|
4
|
-
<vxe-input v-model="renderValue" type="number" v-bind="rprops" :size="rsize" @change="vxeInputChange" @blur="vxeBlurCallback" @clear="vxeBlurCallback" />
|
|
5
|
-
</template>
|
|
6
|
-
<template v-else>
|
|
7
|
-
<sh-progress :percent="renderText" v-bind="rprops" />
|
|
8
|
-
</template>
|
|
9
|
-
</span>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
-
import cellProps from '../mixin/cell-props'
|
|
15
|
-
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
-
export default defineComponent({
|
|
17
|
-
name: 'VxeRenderPropgress',
|
|
18
|
-
props: cellProps,
|
|
19
|
-
setup(props, context) {
|
|
20
|
-
const { proxy } = getCurrentInstance()
|
|
21
|
-
const useCell = cellHooks(props, context, proxy)
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})
|
|
28
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
+
<template v-if="redit || isEditAll">
|
|
4
|
+
<vxe-input v-model="renderValue" type="number" v-bind="rprops" :size="rsize" @change="vxeInputChange" @blur="vxeBlurCallback" @clear="vxeBlurCallback" />
|
|
5
|
+
</template>
|
|
6
|
+
<template v-else>
|
|
7
|
+
<sh-progress :percent="renderText" v-bind="rprops" />
|
|
8
|
+
</template>
|
|
9
|
+
</span>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
+
import cellProps from '../mixin/cell-props'
|
|
15
|
+
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
+
export default defineComponent({
|
|
17
|
+
name: 'VxeRenderPropgress',
|
|
18
|
+
props: cellProps,
|
|
19
|
+
setup(props, context) {
|
|
20
|
+
const { proxy } = getCurrentInstance()
|
|
21
|
+
const useCell = cellHooks(props, context, proxy)
|
|
22
|
+
|
|
23
|
+
return Object.assign({}, useCell)
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="vxe-render--inner" :class="{ 'vxe-render--inner--readonly': !redit, 'form-render': rform, 'td-render': !rform }">
|
|
3
|
-
<template v-if="redit || isEditAll">
|
|
4
|
-
<vxe-radio v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeRadioCallBack" />
|
|
5
|
-
</template>
|
|
6
|
-
<template v-else>
|
|
7
|
-
<vxe-radio :model-value="renderText" :disabled="true" v-bind="rprops" :size="rsize" />
|
|
8
|
-
</template>
|
|
9
|
-
</span>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
-
import cellProps from '../mixin/cell-props'
|
|
15
|
-
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
-
export default defineComponent({
|
|
17
|
-
name: 'VxeRenderRadio',
|
|
18
|
-
props: cellProps,
|
|
19
|
-
setup(props, context) {
|
|
20
|
-
const { proxy } = getCurrentInstance()
|
|
21
|
-
const useCell = cellHooks(props, context, proxy)
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})
|
|
28
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="vxe-render--inner" :class="{ 'vxe-render--inner--readonly': !redit, 'form-render': rform, 'td-render': !rform }">
|
|
3
|
+
<template v-if="redit || isEditAll">
|
|
4
|
+
<vxe-radio v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeRadioCallBack" />
|
|
5
|
+
</template>
|
|
6
|
+
<template v-else>
|
|
7
|
+
<vxe-radio :model-value="renderText" :disabled="true" v-bind="rprops" :size="rsize" />
|
|
8
|
+
</template>
|
|
9
|
+
</span>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
+
import cellProps from '../mixin/cell-props'
|
|
15
|
+
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
+
export default defineComponent({
|
|
17
|
+
name: 'VxeRenderRadio',
|
|
18
|
+
props: cellProps,
|
|
19
|
+
setup(props, context) {
|
|
20
|
+
const { proxy } = getCurrentInstance()
|
|
21
|
+
const useCell = cellHooks(props, context, proxy)
|
|
22
|
+
|
|
23
|
+
return Object.assign({}, useCell)
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
@@ -1,43 +1,42 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
-
<template v-if="redit || isEditAll">
|
|
4
|
-
<vxe-radio-group v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeRadioCallBack">
|
|
5
|
-
<vxe-radio v-for="checkitem in rprops.options" :key="checkitem.value" :label="checkitem.value" :content="checkitem.label" />
|
|
6
|
-
</vxe-radio-group>
|
|
7
|
-
</template>
|
|
8
|
-
<template v-else-if="!redit && showType">
|
|
9
|
-
<div v-for="roption in rprops.options" :key="roption">
|
|
10
|
-
<sh-tag v-if="roptionShow(roption)" :color="roption.tagColor || rprops.tagColor" :type="roption.tagType || rprops.tagType">{{ roption.label }}</sh-tag>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
<template v-else>
|
|
14
|
-
<span v-html="renderText"></span>
|
|
15
|
-
</template>
|
|
16
|
-
</span>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script>
|
|
20
|
-
import { computed, defineComponent, getCurrentInstance } from 'vue'
|
|
21
|
-
import cellProps from '../mixin/cell-props'
|
|
22
|
-
import cellHooks from '../mixin/cell-hooks'
|
|
23
|
-
export default defineComponent({
|
|
24
|
-
name: 'VxeRenderRadiogroup',
|
|
25
|
-
props: cellProps,
|
|
26
|
-
setup(props, context) {
|
|
27
|
-
const { proxy } = getCurrentInstance()
|
|
28
|
-
const useCell = cellHooks(props, context, proxy)
|
|
29
|
-
|
|
30
|
-
const showType = computed(() => props.rprops.showType === 'tag')
|
|
31
|
-
|
|
32
|
-
const roptionShow = roption => {
|
|
33
|
-
return useCell.renderText.value.split(props.rprops.split).includes(roption.label)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
+
<template v-if="redit || isEditAll">
|
|
4
|
+
<vxe-radio-group v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeRadioCallBack">
|
|
5
|
+
<vxe-radio v-for="checkitem in rprops.options" :key="checkitem.value" :label="checkitem.value" :content="checkitem.label" />
|
|
6
|
+
</vxe-radio-group>
|
|
7
|
+
</template>
|
|
8
|
+
<template v-else-if="!redit && showType">
|
|
9
|
+
<div v-for="roption in rprops.options" :key="roption">
|
|
10
|
+
<sh-tag v-if="roptionShow(roption)" :color="roption.tagColor || rprops.tagColor" :type="roption.tagType || rprops.tagType">{{ roption.label }}</sh-tag>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
<template v-else>
|
|
14
|
+
<span v-html="renderText"></span>
|
|
15
|
+
</template>
|
|
16
|
+
</span>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
import { computed, defineComponent, getCurrentInstance } from 'vue'
|
|
21
|
+
import cellProps from '../mixin/cell-props'
|
|
22
|
+
import cellHooks from '../mixin/cell-hooks'
|
|
23
|
+
export default defineComponent({
|
|
24
|
+
name: 'VxeRenderRadiogroup',
|
|
25
|
+
props: cellProps,
|
|
26
|
+
setup(props, context) {
|
|
27
|
+
const { proxy } = getCurrentInstance()
|
|
28
|
+
const useCell = cellHooks(props, context, proxy)
|
|
29
|
+
|
|
30
|
+
const showType = computed(() => props.rprops.showType === 'tag')
|
|
31
|
+
|
|
32
|
+
const roptionShow = roption => {
|
|
33
|
+
return useCell.renderText.value.split(props.rprops.split).includes(roption.label)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return Object.assign({}, useCell, {
|
|
37
|
+
showType,
|
|
38
|
+
roptionShow
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
</script>
|
|
@@ -42,11 +42,10 @@ export default defineComponent({
|
|
|
42
42
|
return options.filter(option => String(option.value) === String(renderValue))
|
|
43
43
|
})
|
|
44
44
|
|
|
45
|
-
return {
|
|
46
|
-
...useCell,
|
|
45
|
+
return Object.assign({}, useCell, {
|
|
47
46
|
showType,
|
|
48
47
|
showTags
|
|
49
|
-
}
|
|
48
|
+
})
|
|
50
49
|
}
|
|
51
50
|
})
|
|
52
51
|
</script>
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="vxe-render--inner" :class="{ 'vxe-render--inner--readonly': !redit, 'form-render': rform, 'td-render': !rform }">
|
|
3
|
-
<template v-if="redit || isEditAll">
|
|
4
|
-
<vxe-switch v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeChangeCallBack" />
|
|
5
|
-
</template>
|
|
6
|
-
<template v-else>
|
|
7
|
-
<span v-html="renderText"></span>
|
|
8
|
-
</template>
|
|
9
|
-
</span>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
-
import cellProps from '../mixin/cell-props'
|
|
15
|
-
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
-
export default defineComponent({
|
|
17
|
-
name: 'VxeRenderSwitch',
|
|
18
|
-
props: cellProps,
|
|
19
|
-
setup(props, context) {
|
|
20
|
-
const { proxy } = getCurrentInstance()
|
|
21
|
-
const useCell = cellHooks(props, context, proxy)
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})
|
|
28
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="vxe-render--inner" :class="{ 'vxe-render--inner--readonly': !redit, 'form-render': rform, 'td-render': !rform }">
|
|
3
|
+
<template v-if="redit || isEditAll">
|
|
4
|
+
<vxe-switch v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeChangeCallBack" />
|
|
5
|
+
</template>
|
|
6
|
+
<template v-else>
|
|
7
|
+
<span v-html="renderText"></span>
|
|
8
|
+
</template>
|
|
9
|
+
</span>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
+
import cellProps from '../mixin/cell-props'
|
|
15
|
+
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
+
export default defineComponent({
|
|
17
|
+
name: 'VxeRenderSwitch',
|
|
18
|
+
props: cellProps,
|
|
19
|
+
setup(props, context) {
|
|
20
|
+
const { proxy } = getCurrentInstance()
|
|
21
|
+
const useCell = cellHooks(props, context, proxy)
|
|
22
|
+
|
|
23
|
+
return Object.assign({}, useCell)
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
-
<template v-if="redit || isEditAll">
|
|
4
|
-
<vxe-textarea v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeInputChange" @blur="vxeBlurCallback" @clear="vxeBlurCallback" />
|
|
5
|
-
</template>
|
|
6
|
-
<template v-else>
|
|
7
|
-
<span>{{ renderText }}</span>
|
|
8
|
-
</template>
|
|
9
|
-
</span>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
-
import cellProps from '../mixin/cell-props'
|
|
15
|
-
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
-
export default defineComponent({
|
|
17
|
-
name: 'VxeRenderTextarea',
|
|
18
|
-
props: cellProps,
|
|
19
|
-
setup(props, context) {
|
|
20
|
-
const { proxy } = getCurrentInstance()
|
|
21
|
-
const useCell = cellHooks(props, context, proxy)
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})
|
|
28
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
+
<template v-if="redit || isEditAll">
|
|
4
|
+
<vxe-textarea v-model="renderValue" v-bind="rprops" :size="rsize" @change="vxeInputChange" @blur="vxeBlurCallback" @clear="vxeBlurCallback" />
|
|
5
|
+
</template>
|
|
6
|
+
<template v-else>
|
|
7
|
+
<span>{{ renderText }}</span>
|
|
8
|
+
</template>
|
|
9
|
+
</span>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
+
import cellProps from '../mixin/cell-props'
|
|
15
|
+
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
+
export default defineComponent({
|
|
17
|
+
name: 'VxeRenderTextarea',
|
|
18
|
+
props: cellProps,
|
|
19
|
+
setup(props, context) {
|
|
20
|
+
const { proxy } = getCurrentInstance()
|
|
21
|
+
const useCell = cellHooks(props, context, proxy)
|
|
22
|
+
|
|
23
|
+
return Object.assign({}, useCell)
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
@@ -1,44 +1,41 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
-
<template v-if="redit || isEditAll">
|
|
4
|
-
<vxe-input v-model="renderValue" v-bind="rprops" :size="rsize" :disabled-method="vxeDisabledMethod" @change="vxeChangeCallBack"></vxe-input>
|
|
5
|
-
</template>
|
|
6
|
-
<template v-else>
|
|
7
|
-
<span v-html="renderText"></span>
|
|
8
|
-
</template>
|
|
9
|
-
</span>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
-
import cellProps from '../mixin/cell-props'
|
|
15
|
-
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
-
export default defineComponent({
|
|
17
|
-
name: 'VxeRenderTime',
|
|
18
|
-
props: cellProps,
|
|
19
|
-
setup(props, context) {
|
|
20
|
-
const { proxy } = getCurrentInstance()
|
|
21
|
-
const { $vUtils } = proxy
|
|
22
|
-
const useCell = cellHooks(props, context, proxy)
|
|
23
|
-
|
|
24
|
-
// 禁用事件
|
|
25
|
-
const vxeDisabledMethod = ({ date, viewType }) => {
|
|
26
|
-
let { startTime, endTime } = props.rprops
|
|
27
|
-
if (startTime) {
|
|
28
|
-
startTime = $vUtils.format(startTime, props.rdata)
|
|
29
|
-
let { done, time } = $vUtils.getDateDiff(startTime, date)
|
|
30
|
-
return startTime ? !done : false
|
|
31
|
-
} else if (endTime) {
|
|
32
|
-
endTime = $vUtils.format(endTime, props.rdata)
|
|
33
|
-
let { done, time } = $vUtils.getDateDiff(endTime, date)
|
|
34
|
-
return done
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
})
|
|
44
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
+
<template v-if="redit || isEditAll">
|
|
4
|
+
<vxe-input v-model="renderValue" v-bind="rprops" :size="rsize" :disabled-method="vxeDisabledMethod" @change="vxeChangeCallBack"></vxe-input>
|
|
5
|
+
</template>
|
|
6
|
+
<template v-else>
|
|
7
|
+
<span v-html="renderText"></span>
|
|
8
|
+
</template>
|
|
9
|
+
</span>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
+
import cellProps from '../mixin/cell-props'
|
|
15
|
+
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
+
export default defineComponent({
|
|
17
|
+
name: 'VxeRenderTime',
|
|
18
|
+
props: cellProps,
|
|
19
|
+
setup(props, context) {
|
|
20
|
+
const { proxy } = getCurrentInstance()
|
|
21
|
+
const { $vUtils } = proxy
|
|
22
|
+
const useCell = cellHooks(props, context, proxy)
|
|
23
|
+
|
|
24
|
+
// 禁用事件
|
|
25
|
+
const vxeDisabledMethod = ({ date, viewType }) => {
|
|
26
|
+
let { startTime, endTime } = props.rprops
|
|
27
|
+
if (startTime) {
|
|
28
|
+
startTime = $vUtils.format(startTime, props.rdata)
|
|
29
|
+
let { done, time } = $vUtils.getDateDiff(startTime, date)
|
|
30
|
+
return startTime ? !done : false
|
|
31
|
+
} else if (endTime) {
|
|
32
|
+
endTime = $vUtils.format(endTime, props.rdata)
|
|
33
|
+
let { done, time } = $vUtils.getDateDiff(endTime, date)
|
|
34
|
+
return done
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return Object.assign({}, useCell, { vxeDisabledMethod })
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
</script>
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
-
<template v-if="redit || isEditAll">
|
|
4
|
-
<sh-upload v-model="renderValue" v-bind="rprops" :size="rsize" @input="vxeChangeCallBack({ value: $event })"></sh-upload>
|
|
5
|
-
</template>
|
|
6
|
-
<template v-else>
|
|
7
|
-
<sh-upload :model-value="renderText" v-bind="rprops" :disabled="true" :size="rsize"></sh-upload>
|
|
8
|
-
</template>
|
|
9
|
-
</span>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
-
import cellProps from '../mixin/cell-props'
|
|
15
|
-
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
-
export default defineComponent({
|
|
17
|
-
name: 'VxeRenderUpload',
|
|
18
|
-
props: cellProps,
|
|
19
|
-
setup(props, context) {
|
|
20
|
-
const { proxy } = getCurrentInstance()
|
|
21
|
-
const useCell = cellHooks(props, context, proxy)
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})
|
|
28
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span class="vxe-render--inner" :class="{ 'form-render': rform, 'td-render': !rform }">
|
|
3
|
+
<template v-if="redit || isEditAll">
|
|
4
|
+
<sh-upload v-model="renderValue" v-bind="rprops" :size="rsize" @input="vxeChangeCallBack({ value: $event })"></sh-upload>
|
|
5
|
+
</template>
|
|
6
|
+
<template v-else>
|
|
7
|
+
<sh-upload :model-value="renderText" v-bind="rprops" :disabled="true" :size="rsize"></sh-upload>
|
|
8
|
+
</template>
|
|
9
|
+
</span>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { defineComponent, getCurrentInstance } from 'vue'
|
|
14
|
+
import cellProps from '../mixin/cell-props'
|
|
15
|
+
import cellHooks from '../mixin/cell-hooks'
|
|
16
|
+
export default defineComponent({
|
|
17
|
+
name: 'VxeRenderUpload',
|
|
18
|
+
props: cellProps,
|
|
19
|
+
setup(props, context) {
|
|
20
|
+
const { proxy } = getCurrentInstance()
|
|
21
|
+
const useCell = cellHooks(props, context, proxy)
|
|
22
|
+
|
|
23
|
+
return Object.assign({}, useCell)
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
</script>
|