From a4ee6ba0ca28833cbbb8cf0e675561b10fa4c1af Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期四, 12 九月 2024 01:23:40 +0800
Subject: [PATCH] 规则维护更新

---
 src/components/Table/src/components/TableTitle.vue |   59 +++++++++++++++++++++++++++--------------------------------
 1 files changed, 27 insertions(+), 32 deletions(-)

diff --git a/src/components/Table/src/components/TableTitle.vue b/src/components/Table/src/components/TableTitle.vue
index 0f7417b..ea92086 100644
--- a/src/components/Table/src/components/TableTitle.vue
+++ b/src/components/Table/src/components/TableTitle.vue
@@ -3,43 +3,38 @@
     {{ getTitle }}
   </BasicTitle>
 </template>
-<script lang="ts">
-  import { computed, defineComponent, PropType } from 'vue';
-  import { BasicTitle } from '/@/components/Basic/index';
-  import { useDesign } from '/@/hooks/web/useDesign';
-  import { isFunction } from '/@/utils/is';
+<script lang="ts" setup>
+  import { computed, PropType } from 'vue';
+  import { BasicTitle } from '@/components/Basic';
+  import { useDesign } from '@/hooks/web/useDesign';
+  import { isFunction } from '@/utils/is';
 
-  export default defineComponent({
-    name: 'BasicTableTitle',
-    components: { BasicTitle },
-    props: {
-      title: {
-        type: [Function, String] as PropType<string | ((data) => string)>,
-      },
-      getSelectRows: {
-        type: Function as PropType<() => any[]>,
-      },
-      helpMessage: {
-        type: [String, Array] as PropType<string | string[]>,
-      },
+  defineOptions({ name: 'BasicTableTitle' });
+
+  const props = defineProps({
+    title: {
+      type: [Function, String] as PropType<string | ((data) => string)>,
     },
-    setup(props) {
-      const { prefixCls } = useDesign('basic-table-title');
+    getSelectRows: {
+      type: Function as PropType<() => any[]>,
+    },
+    helpMessage: {
+      type: [String, Array] as PropType<string | string[]>,
+    },
+  });
 
-      const getTitle = computed(() => {
-        const { title, getSelectRows = () => {} } = props;
-        let tit = title;
+  const { prefixCls } = useDesign('basic-table-title');
 
-        if (isFunction(title)) {
-          tit = title({
-            selectRows: getSelectRows(),
-          });
-        }
-        return tit;
+  const getTitle = computed(() => {
+    const { title, getSelectRows = () => {} } = props;
+    let tit = title;
+
+    if (isFunction(title)) {
+      tit = title({
+        selectRows: getSelectRows(),
       });
-
-      return { getTitle, prefixCls };
-    },
+    }
+    return tit;
   });
 </script>
 <style lang="less">

--
Gitblit v1.9.3