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

[Pagination] 分页组件的属性 pageSizeOptions 不会响应式更新每页条数下拉框选项文本 #2149

Closed
yeabear-projects opened this issue Dec 11, 2022 · 3 comments

Comments

@yeabear-projects
Copy link

yeabear-projects commented Dec 11, 2022

tdesign-vue-next 版本

0.25.0

重现链接

No response

重现步骤

<template>
    ...
    <t-config-provider :global-config="globalConfig">
      <t-table
        ...
        :pagination="pagination"
        ...
      >
        ...
      </t-table>
    </t-config-provider>
</template>

<script setup lang="ts">
...
const { t } = useI18n();

const globalConfig = computed(() => ({
  pagination: {
    itemsPerPage: t('page.option.pageSize', { slot: '{size}' }),
    total: t('page.option.total', { slot: '{total}' }),
  },
}));

const pagination = reactive({
  defaultPageSize: 5,
  total: 0,
  defaultCurrent: 1,
  current: 1,
  pageSize: 5,
  pageSizeOptions: [5, 10, 20, 50, 100],
});
...
</script>

期望结果

分页组件底部 每页条数下拉框 随着国际化更新选项文本

实际结果

语言为 中文
1

语言为 English
2

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

在实现国际化过程中碰到此问题

Select 组件也有类似问题,选项列表更新了,选中值没更新
3

@github-actions
Copy link
Contributor

👋 @yeabear-projects,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link
Contributor

github-actions bot commented Dec 11, 2022

♥️ 有劳 @kidjayhuang @youuss 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @yeabear-projects

@puppetsheep
Copy link

可以对所有的有层级的组件测试一下国际化响应式,似乎出问题的不止这一个组件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants