sh-view 2.6.0 → 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/js/useForm.js +3 -8
- package/packages/components/global-components/sh-form/query.vue +1 -3
- package/packages/components/global-components/sh-table/components/importModal.vue +26 -23
- package/packages/components/global-components/sh-table/components/sh-column.vue +2 -2
- package/packages/components/global-components/sh-table/grid.vue +4 -63
- package/packages/components/global-components/sh-table/js/useTable.js +45 -15
- package/packages/components/global-components/sh-table/table.vue +4 -61
- 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
|
@@ -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>
|