Ben Lin
2024-10-30 28a53fe81cdb551d2bf2023167487a3060e0f180
src/components/Drawer/src/components/DrawerFooter.vue
@@ -24,44 +24,41 @@
    </template>
  </div>
</template>
<script lang="ts">
<script lang="ts" setup>
  import type { CSSProperties } from 'vue';
  import { defineComponent, computed } from 'vue';
  import { useDesign } from '/@/hooks/web/useDesign';
  import { computed } from 'vue';
  import { useDesign } from '@/hooks/web/useDesign';
  import { footerProps } from '../props';
  export default defineComponent({
    name: 'BasicDrawerFooter',
    props: {
      ...footerProps,
      height: {
        type: String,
        default: '60px',
      },
    },
    emits: ['ok', 'close'],
    setup(props, { emit }) {
      const { prefixCls } = useDesign('basic-drawer-footer');
  defineOptions({ name: 'BasicDrawerFooter' });
      const getStyle = computed((): CSSProperties => {
        const heightStr = `${props.height}`;
        return {
          height: heightStr,
          lineHeight: `calc(${heightStr} - 1px)`,
        };
      });
      function handleOk() {
        emit('ok');
      }
      function handleClose() {
        emit('close');
      }
      return { handleOk, prefixCls, handleClose, getStyle };
  const props = defineProps({
    ...footerProps,
    height: {
      type: String,
      default: '60px',
    },
  });
  const emit = defineEmits(['ok', 'close']);
  const { prefixCls } = useDesign('basic-drawer-footer');
  const getStyle = computed((): CSSProperties => {
    const heightStr = `${props.height}`;
    return {
      height: heightStr,
      lineHeight: `calc(${heightStr} - 1px)`,
    };
  });
  function handleOk() {
    emit('ok');
  }
  function handleClose() {
    emit('close');
  }
</script>
<style lang="less">
@@ -70,6 +67,7 @@
  .@{prefix-cls} {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0 12px 0 20px;
    border-top: 1px solid @border-color-base;