rayyy-vue-table-components 1.2.21 → 1.2.22
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/dist/index.es.js +297 -298
- package/dist/index.umd.js +6 -6
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/components/items/SearchBar.vue.d.ts +0 -1
- package/package.json +1 -1
- package/src/components/items/SearchBar.vue +1 -2
- package/src/components/layout/SearchableListPanel.vue +7 -4
package/package.json
CHANGED
|
@@ -6,7 +6,6 @@ import FilterBtn from './FilterBtn.vue'
|
|
|
6
6
|
defineProps<{
|
|
7
7
|
showFilter?: boolean
|
|
8
8
|
showSearch?: boolean
|
|
9
|
-
fullInput?: boolean
|
|
10
9
|
badgeValue?: number
|
|
11
10
|
}>()
|
|
12
11
|
|
|
@@ -39,7 +38,7 @@ const resetFilter = () => {
|
|
|
39
38
|
</div>
|
|
40
39
|
|
|
41
40
|
<div class="flex items-center justify-end">
|
|
42
|
-
<div v-if="showSearch"
|
|
41
|
+
<div v-if="showSearch" class="search-input">
|
|
43
42
|
<base-input
|
|
44
43
|
v-model="keyword"
|
|
45
44
|
placeholder="請輸入關鍵字搜尋列表"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { toRefs } from 'vue'
|
|
2
|
+
import { toRefs, computed } from 'vue'
|
|
3
3
|
import type { Pager } from '@/types'
|
|
4
4
|
import { MainPanel, SearchBar } from '@/components'
|
|
5
5
|
|
|
@@ -22,6 +22,9 @@ const emits = defineEmits<{
|
|
|
22
22
|
(e: 'updatePageSize', limit: number): boolean
|
|
23
23
|
}>()
|
|
24
24
|
|
|
25
|
+
const showAllFeatures = computed(() => {
|
|
26
|
+
return props.showDefaultSearch || (props.showSearch && props.showEdit && props.showFilter)
|
|
27
|
+
})
|
|
25
28
|
const search = (keyword: string) => {
|
|
26
29
|
emits('search', keyword)
|
|
27
30
|
}
|
|
@@ -43,15 +46,15 @@ const changePageSize = (limit: number) => {
|
|
|
43
46
|
<main-panel :title="props.title" :show-back="showBack">
|
|
44
47
|
<template #searchBar>
|
|
45
48
|
<search-bar
|
|
46
|
-
:show-filter="showFilter"
|
|
47
|
-
:show-search="showSearch"
|
|
49
|
+
:show-filter="showAllFeatures || showFilter"
|
|
50
|
+
:show-search="showAllFeatures || showSearch"
|
|
48
51
|
:badge-value="badgeValue"
|
|
49
52
|
@keydown:enter="search"
|
|
50
53
|
@update:clear="clearable"
|
|
51
54
|
>
|
|
52
55
|
<template #button>
|
|
53
56
|
<slot name="firstButton"></slot>
|
|
54
|
-
<slot name="customButton"> </slot>
|
|
57
|
+
<slot name="customButton" v-if="showAllFeatures || showEdit"> </slot>
|
|
55
58
|
<slot name="lastButton"></slot>
|
|
56
59
|
</template>
|
|
57
60
|
<template #filterBody>
|