Skip to content

Commit

Permalink
fix(upload): update style
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeJim committed Dec 30, 2022
1 parent 455325e commit fe2e0c6
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/upload/_example/messageFile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Component({
data: {
originFiles: [
{
url: 'https://tdesign.gtimg.com/site/upload1.png',
url: 'https://tdesign.gtimg.com/miniprogram/images/upload1.png',
name: 'uploaded1.png',
type: 'image',
},
Expand Down
6 changes: 3 additions & 3 deletions src/upload/_example/multiple/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ Component({
data: {
originFiles: [
{
url: 'https://tdesign.gtimg.com/site/upload1.png',
url: 'https://tdesign.gtimg.com/miniprogram/images/upload1.png',
name: 'uploaded1.png',
type: 'image',
},
{
url: 'https://tdesign.gtimg.com/site/upload1.png',
url: 'https://tdesign.gtimg.com/miniprogram/images/upload3.png',
name: 'uploaded2.png',
type: 'image',
},
{
url: 'https://tdesign.gtimg.com/site/upload1.png',
url: 'https://tdesign.gtimg.com/miniprogram/images/upload4.png',
name: 'uploaded1.png',
type: 'image',
},
Expand Down
8 changes: 1 addition & 7 deletions src/upload/_example/single/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
Component({
data: {
fileList: [
{
url: 'https://tdesign.gtimg.com/site/upload1.png',
name: 'uploaded1.png',
type: 'image',
},
],
fileList: [],
},
methods: {
handleAdd(e) {
Expand Down
8 changes: 7 additions & 1 deletion src/upload/_example/single/index.wxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<view class="wrapper">
<t-upload mediaType="{{['video','image']}}" files="{{fileList}}" bind:add="handleAdd" bind:remove="handleRemove">
<t-upload
mediaType="{{['video','image']}}"
max="{{1}}"
files="{{fileList}}"
bind:add="handleAdd"
bind:remove="handleRemove"
>
</t-upload>
</view>
8 changes: 4 additions & 4 deletions src/upload/_example/status/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@ Component({
data: {
originFiles: [
{
url: 'https://tdesign.gtimg.com/site/upload1.png',
url: 'https://tdesign.gtimg.com/miniprogram/images/upload1.png',
name: 'uploaded1.png',
type: 'image',
status: 'loading',
},
{
url: 'https://tdesign.gtimg.com/site/upload1.png',
url: 'https://tdesign.gtimg.com/miniprogram/images/upload2.png',
name: 'uploaded2.png',
type: 'image',
percent: 68,
status: 'loading',
},
{
url: 'https://tdesign.gtimg.com/site/upload1.png',
url: 'https://tdesign.gtimg.com/miniprogram/images/upload3.png',
name: 'uploaded3.png',
type: 'image',
status: 'reload',
},
{
url: 'https://tdesign.gtimg.com/site/upload1.png',
url: 'https://tdesign.gtimg.com/miniprogram/images/upload4.png',
name: 'uploaded4.png',
type: 'image',
status: 'failed',
Expand Down
2 changes: 1 addition & 1 deletion src/upload/_example/upload.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ page {
.upload-demo {
background-color: #fff;
box-sizing: border-box;
padding: 24rpx 32rpx;
padding: 32rpx;

&__title {
font-size: 32rpx;
Expand Down
2 changes: 2 additions & 0 deletions src/upload/upload.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@upload-add-color: var(--td-upload-add-color, @font-gray-3);
@upload-add-bg-color: var(--td-upload-add-bg-color, @gray-color-1);
@upload-radius: var(--td-upload-radius, @radius-default);
@upload-add-icon-font-size: var(--td-upload-add-icon-font-size, 56rpx);

.@{prefix}-upload {
&__grid {
Expand All @@ -21,6 +22,7 @@
display: flex;
align-items: center;
justify-content: center;
font-size: @upload-add-icon-font-size;
background-color: @upload-add-bg-color;
color: @upload-add-color;
border-radius: @upload-radius;
Expand Down
2 changes: 1 addition & 1 deletion src/upload/upload.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<view class="{{classPrefix}}__wrapper" style="{{gridItemStyle}}">
<view class="{{classPrefix}}__add-icon">
<slot wx:if="{{addContent === 'slot'}}" name="add-content" />
<t-icon wx:else name="add" size="40rpx" color="rgba(0,0,0,0.26)" />
<t-icon wx:else name="add" />
</view>
</view>
</t-grid-item>
Expand Down

0 comments on commit fe2e0c6

Please sign in to comment.