rayyy-vue-table-components 1.2.16 → 1.2.17

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.
@@ -17,9 +17,11 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
17
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
18
18
  "keydown:enter": (data: string) => any;
19
19
  "update:clear": () => any;
20
+ "update:resetFilter": () => any;
20
21
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
21
22
  "onKeydown:enter"?: ((data: string) => any) | undefined;
22
23
  "onUpdate:clear"?: (() => any) | undefined;
24
+ "onUpdate:resetFilter"?: (() => any) | undefined;
23
25
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
24
26
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
25
27
  export default _default;
@@ -10,7 +10,13 @@ declare function __VLS_template(): {
10
10
  rootEl: any;
11
11
  };
12
12
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
14
+ "update:reset": () => any;
15
+ "update:submit": () => any;
16
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ "onUpdate:reset"?: (() => any) | undefined;
18
+ "onUpdate:submit"?: (() => any) | undefined;
19
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
21
  export default _default;
16
22
  type __VLS_WithTemplateSlots<T, S> = T & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rayyy-vue-table-components",
3
- "version": "1.2.16",
3
+ "version": "1.2.17",
4
4
  "description": "Vue 3 + Element Plus 表格組件庫",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",
@@ -1,7 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { ref } from 'vue'
3
3
  import BaseInput from '@/components/items/BaseInput.vue'
4
- import { Search } from '@element-plus/icons-vue'
5
4
  import FilterBtn from '@/components/items/FilterBtn.vue'
6
5
 
7
6
  defineProps<{
@@ -14,6 +13,7 @@ defineProps<{
14
13
  const emits = defineEmits<{
15
14
  (e: 'keydown:enter', data: string): void
16
15
  (e: 'update:clear'): void
16
+ (e: 'update:resetFilter'): void
17
17
  }>()
18
18
 
19
19
  const keyword = ref('')
@@ -24,6 +24,9 @@ const doSearch = () => {
24
24
  const clearableClick = () => {
25
25
  emits('update:clear')
26
26
  }
27
+ const resetFilter = () => {
28
+ emits('update:resetFilter')
29
+ }
27
30
  </script>
28
31
 
29
32
  <template>
@@ -44,7 +47,7 @@ const clearableClick = () => {
44
47
  </div>
45
48
 
46
49
  <div class="filter-customer" v-if="showFilter">
47
- <filter-btn :badge-value="badgeValue">
50
+ <filter-btn :badge-value="badgeValue" @update:reset="resetFilter">
48
51
  <slot name="filterBody" />
49
52
  </filter-btn>
50
53
  </div>
@@ -3,7 +3,7 @@ import { computed, ref } from 'vue'
3
3
  import { useWindowSize } from '@vueuse/core'
4
4
  import { BaseBtn } from '@/components'
5
5
  import { Search, Filter } from '@element-plus/icons-vue'
6
- import { layoutStore } from '@/stores/layoutStore.ts'
6
+
7
7
 
8
8
  const { width } = useWindowSize()
9
9
 
@@ -17,8 +17,13 @@ function onClickBtn() {
17
17
  showDrawer.value = !showDrawer.value
18
18
  }
19
19
 
20
+ const emit = defineEmits<{
21
+ (e: 'update:reset'): void
22
+ (e: 'update:submit'): void
23
+ }>()
24
+
20
25
  const resetValue = () => {
21
- layoutStore.filterDrawerResetClick()
26
+ emit('update:reset')
22
27
  }
23
28
  const computedDrawerSize = computed(() => {
24
29
  if (width.value > 1200) {