From dfd2d0218bbcea93b4bfb0e7ca7ac9b1cc1cc7da Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 27 六月 2024 16:08:28 +0800 Subject: [PATCH] 工艺路线树形增加客户编码 --- src/components/Drawer/src/components/DrawerFooter.vue | 62 +++++++++++++++---------------- 1 files changed, 30 insertions(+), 32 deletions(-) diff --git a/src/components/Drawer/src/components/DrawerFooter.vue b/src/components/Drawer/src/components/DrawerFooter.vue index 507b693..6093fcf 100644 --- a/src/components/Drawer/src/components/DrawerFooter.vue +++ b/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; -- Gitblit v1.9.3