rayyy-vue-table-components 1.2.23 → 1.2.25

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.
@@ -2,6 +2,7 @@ type __VLS_Props = {
2
2
  title?: string;
3
3
  showBack?: boolean | string | object;
4
4
  depth?: number;
5
+ maxHeight?: string;
5
6
  };
6
7
  declare function __VLS_template(): {
7
8
  attrs: Partial<{}>;
@@ -15,6 +16,7 @@ declare function __VLS_template(): {
15
16
  };
16
17
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
18
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
19
+ maxHeight: string;
18
20
  title: string;
19
21
  showBack: boolean | string | object;
20
22
  depth: number;
@@ -470,6 +470,8 @@ export interface MainPanelProps {
470
470
  showBack?: boolean | string | object
471
471
  /** 返回深度 */
472
472
  depth?: number
473
+ /** 最大高度 */
474
+ maxHeight?: string
473
475
  }
474
476
 
475
477
  /** MainPanel 組件 Emits 類型 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rayyy-vue-table-components",
3
- "version": "1.2.23",
3
+ "version": "1.2.25",
4
4
  "description": "Vue 3 + Element Plus 表格組件庫",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",
@@ -12,7 +12,6 @@
12
12
  "import": "./dist/index.es.js",
13
13
  "require": "./dist/index.umd.js"
14
14
  },
15
- "./dist/rayyy-vue-table-components.css": "./dist/rayyy-vue-table-components.css",
16
15
  "./tailwind-preset": "./tailwind-preset.js",
17
16
  "./types": {
18
17
  "types": "./src/types/index.ts",
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { computed, ref, useAttrs } from 'vue'
2
+ import { ref, useAttrs } from 'vue'
3
3
  import { BaseBtn } from '@/components'
4
4
  import { Search, Filter } from '@element-plus/icons-vue'
5
5
 
@@ -25,14 +25,6 @@ const emit = defineEmits<{
25
25
  const resetValue = () => {
26
26
  emit('update:reset')
27
27
  }
28
- const computedDrawerSize = computed(() => {
29
- if (props.drawerSize) {
30
- return props.drawerSize
31
- } else {
32
- return '50%'
33
- }
34
- })
35
-
36
28
  const submitFilter = () => {
37
29
  showDrawer.value = false
38
30
  }
@@ -58,7 +50,7 @@ const submitFilter = () => {
58
50
  </el-icon>
59
51
  </slot>
60
52
  </base-btn>
61
- <el-drawer v-model="showDrawer" append-to-body :size="computedDrawerSize">
53
+ <el-drawer v-model="showDrawer" append-to-body :size="drawerSize">
62
54
  <template #header>
63
55
  <div class="flex justify-center text-base text-black font-semibold">
64
56
  <span>查詢條件</span>
@@ -6,11 +6,13 @@ const props = withDefaults(
6
6
  title?: string
7
7
  showBack?: boolean | string | object
8
8
  depth?: number
9
+ maxHeight?: string
9
10
  }>(),
10
11
  {
11
12
  title: '',
12
13
  showBack: false,
13
14
  depth: 1,
15
+ maxHeight: 'calc(100vh-120px)',
14
16
  },
15
17
  )
16
18
  </script>
@@ -18,7 +20,7 @@ const props = withDefaults(
18
20
  <template>
19
21
  <function-header :title="props.title" :showBack="props.showBack" :depth="props.depth" />
20
22
 
21
- <el-scrollbar class="max-h-[calc(100vh-120px)] max-w-[100vw] overflow-auto">
23
+ <el-scrollbar :class="`max-h-[${props.maxHeight}] max-w-screen overflow-auto`">
22
24
  <div v-if="$slots.searchBar" class="px-4 pt-1.5">
23
25
  <slot name="searchBar" />
24
26
  </div>
@@ -33,5 +35,3 @@ const props = withDefaults(
33
35
  <slot name="footer" />
34
36
  </div>
35
37
  </template>
36
-
37
-
@@ -50,7 +50,7 @@ const changePageSize = (limit: number) => {
50
50
  :show-filter="showAllFeatures || showFilter"
51
51
  :show-search="showAllFeatures || showSearch"
52
52
  :badge-value="badgeValue"
53
- :filterDrawerSize="filterDrawerSize"
53
+ :filter-drawer-size="filterDrawerSize"
54
54
  @keydown:enter="search"
55
55
  @update:clear="clearable"
56
56
  >
@@ -471,6 +471,8 @@ export interface MainPanelProps {
471
471
  showBack?: boolean | string | object
472
472
  /** 返回深度 */
473
473
  depth?: number
474
+ /** 最大高度 */
475
+ maxHeight?: string
474
476
  }
475
477
 
476
478
  /** MainPanel 組件 Emits 類型 */