Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: 更新当前代码,会导致某些 UI 库(Ant Design Vue)组件属性设置失效? #4432

Closed
5 tasks done
M69W opened this issue Sep 19, 2024 · 1 comment
Closed
5 tasks done

Comments

@M69W
Copy link

M69W commented Sep 19, 2024

Version

Vben Admin V5

Describe the bug?

当前最新代码[d574fb8],会导致某些 UI 库组件属性设置失效

https://next.antdv.com/components/image-cn

:width="200"
:height="200"

Reproduction

apps/web-antd/src/views/demos/antd/index.vue

<script lang="ts" setup>
import { ref } from 'vue';


import { Page } from '@vben/common-ui';


import {
  Button as aButton,
  Image as aImage,
  Space as aSpace,
  Button,
  Card,
  message,
  notification,
  Space,
} from 'ant-design-vue';


type NotificationType = 'error' | 'info' | 'success' | 'warning';


const random = ref();


function info() {
  message.info('How many roads must a man walk down');
}


function error() {
  message.error({
    content: 'Once upon a time you dressed so fine',
    duration: 2500,
  });
}


function warning() {
  message.warning('How many roads must a man walk down');
}
function success() {
  message.success('Cause you walked hand in hand With another man in my place');
}


function notify(type: NotificationType) {
  notification[type]({
    duration: 2500,
    message: '说点啥呢',
    type,
  });
}
</script>


<template>
  <Page
    description="支持多语言,主题功能集成切换等"
    title="Ant Design Vue组件使用演示"
  >
    <a-space>
      <a-image
        :height="100"
        :src="`https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?${random}`"
        :width="100"
      >
        <template #placeholder>
          <a-image
            :preview="false"
            :width="100"
            src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?x-oss-process=image/blur,r_50,s_50/quality,q_1/resize,m_mfit,h_200,w_200"
          />
        </template>
      </a-image>
      <a-button type="primary" @click="random = Date.now()">reload</a-button>
    </a-space>
    <Card class="mb-5" title="按钮">
      <Space>
        <Button>Default</Button>
        <Button type="primary"> Primary </Button>
        <Button> Info </Button>
        <Button danger> Error </Button>
      </Space>
    </Card>
    <Card class="mb-5" title="Message">
      <Space>
        <Button @click="info"> 信息 </Button>
        <Button danger @click="error"> 错误 </Button>
        <Button @click="warning"> 警告 </Button>
        <Button @click="success"> 成功 </Button>
      </Space>
    </Card>


    <Card class="mb-5" title="Notification">
      <Space>
        <Button @click="notify('info')"> 信息 </Button>
        <Button danger @click="notify('error')"> 错误 </Button>
        <Button @click="notify('warning')"> 警告 </Button>
        <Button @click="notify('success')"> 成功 </Button>
      </Space>
    </Card>
  </Page>
</template>

重现

重现URL:http://localhost:5666/demos/ant-design

System Info

System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i5
  Binaries:
    Node: 20.16.0
    Yarn: 1.22.22
    npm: 10.8.1
    pnpm: 9.6.0
  Browsers:
    Chrome: 128.0.6613.138

Relevant log output

No response

Validations

@mynetfan
Copy link
Collaborator

这是antd design vue的版本BUG。你可以先锁定上一个版本号,或者等待ant design vue的下一个版本
"ant-design-vue": "4.2.3"

@M69W M69W closed this as completed Sep 19, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants