白色主题
This commit is contained in:
@@ -51,7 +51,7 @@ isComponent: true
|
||||
|
||||
名称 | 类型 | 默认值 | 说明 | 必传
|
||||
-- | -- | -- | -- | --
|
||||
add-content | String / Slot | - | 添加按钮内容。值为空,使用默认图标渲染;值为 slot 则表示使用插槽渲染;其他值无效。 | N
|
||||
add-content | String / Slot | - | 添加按钮内容 | N
|
||||
allow-upload-duplicate-file | Boolean | false | 【开发中】是否允许重复上传相同文件名的文件 | N
|
||||
config | Object | - | 图片上传配置,视频上传配置,文件上传配置等,包含图片尺寸、图片来源、视频来源、视频拍摄最长时间等。更多细节查看小程序官网。[图片上传](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.chooseImage.html)。[视频上传](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.chooseVideo.html)。TS 类型:`UploadMpConfig` `type UploadMpConfig = ImageConfig \| VideoConfig` `interface ImageConfig { count?: number; sizeType?: Array<SizeTypeValues>; sourceType?: Array<SourceTypeValues> }` `type SizeTypeValues = 'original' \| 'compressed'` `type SourceTypeValues = 'album' \| 'camera'` `interface VideoConfig { sourceType?: Array<SourceTypeValues>; compressed?: boolean; maxDuration?: number; camera?: 'back' \| 'front' }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/upload/type.ts) | N
|
||||
custom-style `v0.25.0` | String | - | 自定义组件样式 | N
|
||||
|
||||
@@ -9,7 +9,7 @@ const props = {
|
||||
config: {
|
||||
type: Object,
|
||||
},
|
||||
customStyle: {
|
||||
style: {
|
||||
type: String,
|
||||
value: '',
|
||||
},
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface TdUploadProps {
|
||||
type: ObjectConstructor;
|
||||
value?: UploadMpConfig;
|
||||
};
|
||||
customStyle?: {
|
||||
style?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-grid": "../grid/grid",
|
||||
"t-grid-item": "../grid/grid-item",
|
||||
"t-grid-item": "../grid-item/grid-item",
|
||||
"t-popup": "../popup/popup",
|
||||
"t-icon": "../icon/icon",
|
||||
"t-image": "../image/image"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<view style="{{ customStyle }}" class="{{classPrefix}} {{prefix}}-class">
|
||||
<view style="{{ style }}" class="{{classPrefix}} {{prefix}}-class">
|
||||
<t-grid gutter="{{gutter}}" border="{{false}}" align="center" column="{{column}}">
|
||||
<!-- 图片/视频 -->
|
||||
<t-grid-item
|
||||
@@ -50,8 +50,7 @@
|
||||
</view>
|
||||
<!-- 删除 -->
|
||||
<view class="{{classPrefix}}__close-btn hotspot-expanded" bindtap="onDelete" data-index="{{index}}">
|
||||
<slot wx:if="{{deleteBtn === 'slot'}}" name="delete-btn" />
|
||||
<t-icon wx:else name="close" size="16" color="#fff" />
|
||||
<t-icon name="close" size="16" color="#fff" />
|
||||
</view>
|
||||
</view>
|
||||
</t-grid-item>
|
||||
@@ -63,9 +62,10 @@
|
||||
bindclick="onAddTap"
|
||||
>
|
||||
<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" />
|
||||
<slot name="add-content" />
|
||||
<block wx:if="{{addContent}}">{{addContent}}</block>
|
||||
<view wx:else class="{{classPrefix}}__add-icon">
|
||||
<t-icon name="add" />
|
||||
</view>
|
||||
</view>
|
||||
</t-grid-item>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
.t-upload__add-icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: var(--td-upload-add-icon-font-size, 56rpx);
|
||||
@@ -42,6 +42,9 @@
|
||||
color: var(--td-upload-add-color, var(--td-font-gray-3, rgba(0, 0, 0, 0.4)));
|
||||
border-radius: var(--td-upload-radius, var(--td-radius-default, 12rpx));
|
||||
}
|
||||
.t-upload__add-icon:only-child {
|
||||
display: flex;
|
||||
}
|
||||
.t-upload__thumbnail {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user