spark-grid-vue3 0.0.78 → 0.0.79
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spark-grid-vue3",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.79",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"src"
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"@vue/test-utils": "^2.4.6",
|
|
25
25
|
"@vue/compiler-sfc": "^3.5.10",
|
|
26
26
|
"@vue/tsconfig": "^0.5.1",
|
|
27
|
+
"element-plus": "^2.7.0",
|
|
27
28
|
"get-value": "^3.0.1",
|
|
28
29
|
"happy-dom": "^15.10.2",
|
|
29
30
|
"mitt": "^3.0.1",
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
"peerDependencies": {
|
|
41
42
|
"@imengyu/vue3-context-menu": "^1.4.2",
|
|
42
43
|
"axios": "^1.7.7",
|
|
44
|
+
"element-plus": "^2.7.0",
|
|
43
45
|
"get-value": "^3.0.1",
|
|
44
46
|
"lodash": "^4.17.21",
|
|
45
47
|
"uuid": "^10.0.0"
|
|
@@ -75,12 +75,12 @@ const pagination = () => {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
const pagesLeft = () => {
|
|
78
|
-
const iteration = props.grid.currentPage -
|
|
78
|
+
const iteration = props.grid.currentPage - 2
|
|
79
79
|
return iteration >= 1 ? iteration : 1
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
const pagesRight = () => {
|
|
83
|
-
const iteration = props.grid.currentPage +
|
|
83
|
+
const iteration = props.grid.currentPage + 2
|
|
84
84
|
return iteration > totalPages() ? totalPages() : iteration
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="has-feedback has-feedback-left">
|
|
3
|
-
<
|
|
3
|
+
<ElInput v-if="!type" v-model="filterValue" @keyup.enter="search" @change="search" :disabled="disabled"
|
|
4
|
+
clearable size="small" />
|
|
4
5
|
|
|
5
|
-
<
|
|
6
|
+
<ElDatePicker :disabled="disabled" v-model="filterValue" @change="search()" v-if="isDate" :type="dateType"
|
|
7
|
+
size="small" clearable value-format="YYYY-MM-DD" format="DD/MM/YYYY"
|
|
8
|
+
start-placeholder="Data início" end-placeholder="Data fim" />
|
|
6
9
|
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
</select>
|
|
10
|
+
<ElSelect v-if="isType(DataTableSearchType.BOOLEAN)" v-model="filterValue" :disabled="disabled"
|
|
11
|
+
@change="search()" clearable size="small" placeholder="">
|
|
12
|
+
<ElOption label="Não" value="0" />
|
|
13
|
+
<ElOption label="Sim" value="1" />
|
|
14
|
+
</ElSelect>
|
|
13
15
|
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
+
<ElSelect v-if="isType(DataTableSearchType.LIST)" v-model="filterValue" :disabled="disabled"
|
|
17
|
+
@change="search()" multiple clearable size="small" collapse-tags placeholder="Selecione...">
|
|
18
|
+
<ElOption v-for="item in filterListValues" :key="item.value" :label="item.label" :value="item.value" />
|
|
19
|
+
</ElSelect>
|
|
16
20
|
|
|
17
21
|
<div v-if="showSearchIcon" class="form-control-feedback">
|
|
18
22
|
<i class="icon-search4 text-size-base"></i>
|
|
@@ -25,9 +29,11 @@ import { computed, onMounted, onUnmounted, ref, watch } from "vue"
|
|
|
25
29
|
import { DataTableSearchType } from "../values/column"
|
|
26
30
|
import { SearchConfigListValue, DataTableSearchTypeDefinition } from "@/types";
|
|
27
31
|
import { EventEmitter } from "../utils/EventEmitter";
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
32
|
+
import { ElInput, ElDatePicker, ElSelect, ElOption } from "element-plus";
|
|
33
|
+
import "element-plus/es/components/input/style/css";
|
|
34
|
+
import "element-plus/es/components/date-picker/style/css";
|
|
35
|
+
import "element-plus/es/components/select/style/css";
|
|
36
|
+
import "element-plus/es/components/option/style/css";
|
|
31
37
|
|
|
32
38
|
const filterValue = ref<any>(null)
|
|
33
39
|
const filterListValues = ref<SearchConfigListValue[]>([])
|