sh-view 2.7.9 → 2.8.0
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 +2 -2
- package/packages/components/sh-calendar/index.vue +167 -36
- package/packages/components/sh-date/index.vue +37 -9
- package/packages/components/sh-icon/css/font/icons.scss +34 -34
- package/packages/components/sh-image/index.vue +2 -1
- package/packages/components/sh-table/js/tableMethods.js +12 -20
- package/packages/components/sh-tree/components/table-tree.vue +0 -1
- package/packages/components/sh-tree/index.vue +228 -228
- package/packages/vxeTable/css/index.scss +30 -6
- package/packages/vxeTable/render/filters/vxe-filter-input.vue +26 -25
- package/packages/vxeTable/render/filters/vxe-filter-time.vue +26 -0
- package/packages/vxeTable/render/globalRenders.jsx +26 -7
- package/packages/vxeTable/render/mixin/filter-hooks.js +31 -13
|
@@ -1,28 +1,46 @@
|
|
|
1
|
-
import { computed,
|
|
1
|
+
import { computed, ref, watch } from 'vue'
|
|
2
2
|
|
|
3
|
-
export default function (props, context, proxy) {
|
|
3
|
+
export default function (props, context, proxy, initRenderData) {
|
|
4
4
|
const { $vUtils } = proxy
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
let renderOption = ref({})
|
|
6
7
|
|
|
7
8
|
// 初始化
|
|
8
9
|
const initData = () => {
|
|
9
10
|
const { column, $panel } = props.rparams
|
|
10
11
|
const option = column.filters[0]
|
|
11
|
-
|
|
12
|
-
$panel.changeOption(null, Boolean(
|
|
12
|
+
renderOption.value = option
|
|
13
|
+
$panel.changeOption(null, Boolean(renderOption.value.data), option)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// 过滤回调option
|
|
17
|
+
const vxeFilterChange = ({ value, $event }) => {
|
|
18
|
+
const { $panel } = props.rparams
|
|
19
|
+
$panel.changeOption(null, Boolean(renderOption.value.data), renderOption.value)
|
|
13
20
|
}
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
|
|
22
|
+
// 过滤确认
|
|
23
|
+
const vxeFilterConfirm = () => {
|
|
24
|
+
const { $panel } = props.rparams
|
|
25
|
+
$panel.confirmFilter()
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 过滤充值
|
|
29
|
+
const vxeFilterReset = () => {
|
|
16
30
|
const { $panel } = props.rparams
|
|
17
|
-
$panel.
|
|
31
|
+
$panel.resetFilter()
|
|
18
32
|
}
|
|
19
33
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
34
|
+
watch(
|
|
35
|
+
() => props.rkey,
|
|
36
|
+
() => (initRenderData ? initRenderData() : initData()),
|
|
37
|
+
{ deep: true, immediate: true }
|
|
38
|
+
)
|
|
23
39
|
|
|
24
40
|
return {
|
|
25
|
-
|
|
26
|
-
|
|
41
|
+
renderOption,
|
|
42
|
+
vxeFilterChange,
|
|
43
|
+
vxeFilterConfirm,
|
|
44
|
+
vxeFilterReset
|
|
27
45
|
}
|
|
28
46
|
}
|