v-sistec-features 1.31.0 → 1.31.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
CHANGED
|
@@ -24,22 +24,19 @@
|
|
|
24
24
|
<path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" />
|
|
25
25
|
</svg>
|
|
26
26
|
</button>
|
|
27
|
-
|
|
28
|
-
|
|
29
27
|
</div>
|
|
30
28
|
|
|
31
29
|
<div class="dropdown-divider my-3"></div>
|
|
32
30
|
<div class="d-flex flex-column gap-2">
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
<template v-for="coluna in columns_list" :key="coluna.id">
|
|
32
|
+
<label v-if="!coluna.disable_hide" class="form-check cursor-pointer m-0">
|
|
33
|
+
<input class="form-check-input" type="checkbox" :checked="coluna.visible"
|
|
34
|
+
:disabled="coluna.disable_hide" @change="toggleColumnVisibility(coluna.id)">
|
|
35
|
+
<span class="form-check-label user-select-none">{{ coluna.header }}</span>
|
|
36
|
+
</label>
|
|
37
|
+
</template>
|
|
38
38
|
</div>
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
40
|
</div>
|
|
44
41
|
</div>
|
|
45
42
|
</template>
|
|
@@ -267,6 +267,7 @@ import VDataTableLoading from './VDataTableLoading.vue';
|
|
|
267
267
|
import VThDataTable from './VThDataTable.vue';
|
|
268
268
|
import { buildIcons } from '@/utils/svgFactory'
|
|
269
269
|
import { svgs } from '@/DatatableVue/style/svgs'
|
|
270
|
+
import { defaultDataTableConfig } from '@/DatatableVue/config/datatableDefaults';
|
|
270
271
|
const icons = buildIcons(svgs)
|
|
271
272
|
/*
|
|
272
273
|
Variável responsável por indicar se o componente já foi totalmente montado no DOM.
|
|
@@ -283,10 +284,13 @@ const {
|
|
|
283
284
|
handleMouseLeave
|
|
284
285
|
} = useImagePreview();
|
|
285
286
|
|
|
286
|
-
|
|
287
|
-
|
|
287
|
+
/*
|
|
288
|
+
Constante que define as props do componente com seus valores padrão.
|
|
289
|
+
Por que é usada: Recebe as propriedades enviadas pelo pai e previne que o Vue converta booleanos não declarados para false, aplicando nosso defaultDataTableConfig.
|
|
290
|
+
*/
|
|
291
|
+
const props = withDefaults(defineProps<VDataTableProps>(), defaultDataTableConfig as any);
|
|
288
292
|
// mescla a prop com o padrão e o global definido pelo usuario
|
|
289
|
-
const { options } = useDataTableConfig(props);
|
|
293
|
+
const { options } = useDataTableConfig(props as unknown as VDataTableProps);
|
|
290
294
|
|
|
291
295
|
const emit = defineEmits(['tradePage', 'beforeFetch', 'afterFetch', 'clickedClearSearch']);
|
|
292
296
|
|
|
@@ -30,7 +30,7 @@ export function useDataTableConfig(props: VDataTableProps) {
|
|
|
30
30
|
...defaultDataTableConfig, // 1º Camada: Prioridade Mínima (Valores Padrão)
|
|
31
31
|
...globalConfig, // 2º Camada: Prioridade Média (Valores Globais definidos por quem usa o plugin)
|
|
32
32
|
...propsPassadasPeloUsuario // 3º Camada: Prioridade Máxima (O que o dev digitou na tela)
|
|
33
|
-
} as DataTablePropsWithDefaults;
|
|
33
|
+
} as DataTablePropsWithDefaults;
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
return { options };
|