Skip to content

Commit

Permalink
feat: 优化autoResize
Browse files Browse the repository at this point in the history
  • Loading branch information
shijia.sj committed Nov 20, 2024
2 parents a5269fd + fa0b112 commit 6d15382
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 190 deletions.
130 changes: 50 additions & 80 deletions compiled/alipay/demo/pages/AutoResize/index.axml
Original file line number Diff line number Diff line change
@@ -1,138 +1,108 @@
<ant-container title="基本用法">
<ant-container
title="中文"
style="width:200rpx;"
>
<ant-container title="中文">
<ant-auto-resize
text="提现"
minFontSize="24"
maxFontSize="48"
text="页面遇到一些小问题"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">提现</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">页面遇到一些小问题</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="英文"
style="width: 200rpx;"
>
<ant-container title="英文">
<ant-auto-resize
text="Withdraw"
minFontSize="24"
maxFontSize="32"
text="The page is experiencing some minor issues"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">
Withdraw
The page is experiencing some minor issues
</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="英文-ratio"
style="width: 200rpx;"
>
<ant-container title="英文-ratio">
<ant-auto-resize
text="Withdraw"
text="The page is experiencing some minor issues"
ratio="{{4}}"
minFontSize="24"
maxFontSize="32"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">
Withdraw
The page is experiencing some minor issues
</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="日文"
style="width: 200rpx;"
>
<ant-container title="日文">
<ant-auto-resize
text="現金引き出し"
minFontSize="24"
maxFontSize="48"
text="ページにいくつかの小さな問題が発生しています"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">
現金引き出し
ページにいくつかの小さな問題が発生しています
</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="韩文"
style="width: 200rpx;"
>
<ant-container title="韩文">
<ant-auto-resize
text="현금인출"
minFontSize="24"
maxFontSize="48"
text="페이지에 작은 문제가 발생했습니다"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">현금인출</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">페이지에 작은 문제가 발생했습니다</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="阿拉伯"
style="width: 200rpx;"
>
<ant-container title="阿拉伯">
<ant-auto-resize
text="سحب الرصي"
minFontSize="24"
maxFontSize="48"
text="تواجه الصفحة بعض المشكلات البسيطة"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">
سحب الرصي
تواجه الصفحة بعض المشكلات البسيطة
</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="西班牙"
style="width: 200rpx;"
>
<ant-container title="西班牙">
<ant-auto-resize
text="Retirar"
minFontSize="24"
maxFontSize="48"
text="La página ha encontrado algunos pequeños problemas"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">
Retirar
La página ha encontrado algunos pequeños problemas
</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="俄语"
style="width: 200rpx;"
>
<ant-container title="俄语">
<ant-auto-resize
text="Вывод средств"
minFontSize="24"
maxFontSize="48"
text="На странице возникли небольшие проблемы"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">
Вывод средств
На странице возникли небольшие проблемы
</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="法语"
style="width: 200rpx;"
>
<ant-container title="法语">
<ant-auto-resize
text="Retrait"
minFontSize="24"
maxFontSize="48"
text="La page rencontre quelques problèmes mineurs"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">
Retrait
La page rencontre quelques problèmes mineurs
</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="德语"
style="width: 200rpx;"
>
<ant-container title="德语">
<ant-auto-resize
text="Abheben"
minFontSize="24"
maxFontSize="48"
text="Auf der Seite treten einige kleinere Probleme auf"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">
Abheben
Auf der Seite treten einige kleinere Probleme auf
</view>
</ant-auto-resize>
</ant-container>
Expand Down
130 changes: 50 additions & 80 deletions compiled/wechat/demo/pages/AutoResize/index.wxml
Original file line number Diff line number Diff line change
@@ -1,123 +1,93 @@
<ant-container title="基本用法">
<ant-container
title="中文"
style="width:200rpx;"
>
<ant-container title="中文">
<ant-auto-resize
text="提现"
minFontSize="24"
maxFontSize="48"
text="页面遇到一些小问题"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">提现</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">页面遇到一些小问题</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="英文"
style="width: 200rpx;"
>
<ant-container title="英文">
<ant-auto-resize
text="Withdraw"
minFontSize="24"
maxFontSize="32"
text="The page is experiencing some minor issues"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">Withdraw</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">The page is experiencing some minor issues</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="英文-ratio"
style="width: 200rpx;"
>
<ant-container title="英文-ratio">
<ant-auto-resize
text="Withdraw"
text="The page is experiencing some minor issues"
ratio="{{4}}"
minFontSize="24"
maxFontSize="32"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">Withdraw</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">The page is experiencing some minor issues</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="日文"
style="width: 200rpx;"
>
<ant-container title="日文">
<ant-auto-resize
text="現金引き出し"
minFontSize="24"
maxFontSize="48"
text="ページにいくつかの小さな問題が発生しています"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">現金引き出し</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">ページにいくつかの小さな問題が発生しています</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="韩文"
style="width: 200rpx;"
>
<ant-container title="韩文">
<ant-auto-resize
text="현금인출"
minFontSize="24"
maxFontSize="48"
text="페이지에 작은 문제가 발생했습니다"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">현금인출</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">페이지에 작은 문제가 발생했습니다</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="阿拉伯"
style="width: 200rpx;"
>
<ant-container title="阿拉伯">
<ant-auto-resize
text="سحب الرصي"
minFontSize="24"
maxFontSize="48"
text="تواجه الصفحة بعض المشكلات البسيطة"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">سحب الرصي</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">تواجه الصفحة بعض المشكلات البسيطة</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="西班牙"
style="width: 200rpx;"
>
<ant-container title="西班牙">
<ant-auto-resize
text="Retirar"
minFontSize="24"
maxFontSize="48"
text="La página ha encontrado algunos pequeños problemas"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">Retirar</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">La página ha encontrado algunos pequeños problemas</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="俄语"
style="width: 200rpx;"
>
<ant-container title="俄语">
<ant-auto-resize
text="Вывод средств"
minFontSize="24"
maxFontSize="48"
text="На странице возникли небольшие проблемы"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">Вывод средств</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">На странице возникли небольшие проблемы</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="法语"
style="width: 200rpx;"
>
<ant-container title="法语">
<ant-auto-resize
text="Retrait"
minFontSize="24"
maxFontSize="48"
text="La page rencontre quelques problèmes mineurs"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">Retrait</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">La page rencontre quelques problèmes mineurs</view>
</ant-auto-resize>
</ant-container>
<ant-container
title="德语"
style="width: 200rpx;"
>
<ant-container title="德语">
<ant-auto-resize
text="Abheben"
minFontSize="24"
maxFontSize="48"
text="Auf der Seite treten einige kleinere Probleme auf"
min-font-size="24"
max-font-size="60"
>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">Abheben</view>
<view style="background-color: #1677ff; color: #fff; height: 60rpx;">Auf der Seite treten einige kleinere Probleme auf</view>
</ant-auto-resize>
</ant-container>
</ant-container>
Loading

0 comments on commit 6d15382

Please sign in to comment.