From eedb0cc0060d7e33c7c8480f56567e287b1dd7e7 Mon Sep 17 00:00:00 2001 From: Vishali Date: Mon, 8 Sep 2025 19:00:08 +0530 Subject: [PATCH] feat(upload): add RTL demo and RTL styles for upload --- src/upload/demos/enUS/index.demo-entry.md | 1 + src/upload/demos/enUS/rtl-debug.demo.vue | 95 +++++++++++++++++++++++ src/upload/src/styles/rtl.cssr.ts | 38 ++++++++- 3 files changed, 131 insertions(+), 3 deletions(-) create mode 100644 src/upload/demos/enUS/rtl-debug.demo.vue diff --git a/src/upload/demos/enUS/index.demo-entry.md b/src/upload/demos/enUS/index.demo-entry.md index 20858f95971..cf4c4b2cb53 100644 --- a/src/upload/demos/enUS/index.demo-entry.md +++ b/src/upload/demos/enUS/index.demo-entry.md @@ -18,6 +18,7 @@ custom-request.vue custom-download.vue abstract.vue download.vue +rtl-debug.vue ``` ## API diff --git a/src/upload/demos/enUS/rtl-debug.demo.vue b/src/upload/demos/enUS/rtl-debug.demo.vue new file mode 100644 index 00000000000..49e732223aa --- /dev/null +++ b/src/upload/demos/enUS/rtl-debug.demo.vue @@ -0,0 +1,95 @@ + +# RTL Debug + + + + + diff --git a/src/upload/src/styles/rtl.cssr.ts b/src/upload/src/styles/rtl.cssr.ts index 92b44360a8a..2090338b307 100644 --- a/src/upload/src/styles/rtl.cssr.ts +++ b/src/upload/src/styles/rtl.cssr.ts @@ -1,8 +1,40 @@ -import { cB, cM } from '../../../_utils/cssr' +import { c, cB, cE, cM } from '../../../_utils/cssr' export default cB('upload', [ cM('rtl', ` direction: rtl; - text-align: right; - `) + `, [ + cB('upload-dragger', ` + text-align: center; + `), + cB('upload-file-list', [ + cB('upload-file', ` + padding: 0px 6px 0 12px; + `, [ + cB('upload-file-info', [ + cE('thumbnail', [ + cB('base-icon', ` + margin-left: 2px; + margin-right: 0; + `) + ]), + cE('action', ` + left: 0; + right: unset; + `, [ + cB('button', [ + c('&:not(:last-child)', { + marginLeft: '4px', + marginRight: '0' + }) + ]), + cM('image-type', ` + left: 0; + right: unset; + `) + ]) + ]) + ]) + ]) + ]) ])