init: initial commit
@@ -0,0 +1,9 @@
|
||||
// app.js
|
||||
App({
|
||||
onLaunch() {
|
||||
console.log('App Launch');
|
||||
},
|
||||
globalData: {
|
||||
userInfo: null
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/garden/index",
|
||||
"pages/garden/add/index",
|
||||
"pages/tasks/index",
|
||||
"pages/community/index",
|
||||
"pages/community/create/index",
|
||||
"pages/wiki/index",
|
||||
"pages/profile/index",
|
||||
"pages/plant-detail/edit/index",
|
||||
"pages/plant-detail/index"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"navigationBarTitleText": "Plant App",
|
||||
"navigationBarTextStyle": "black"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#90A4AE",
|
||||
"selectedColor": "#558B2F",
|
||||
"backgroundColor": "rgba(255, 255, 255, 0.85)",
|
||||
"borderStyle": "white",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/garden/index",
|
||||
"text": "花园",
|
||||
"iconPath": "assets/icons/garden.png",
|
||||
"selectedIconPath": "assets/icons/garden_active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/tasks/index",
|
||||
"text": "任务",
|
||||
"iconPath": "assets/icons/tasks.png",
|
||||
"selectedIconPath": "assets/icons/tasks_active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/community/index",
|
||||
"text": "社区",
|
||||
"iconPath": "assets/icons/community.png",
|
||||
"selectedIconPath": "assets/icons/community_active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/wiki/index",
|
||||
"text": "百科",
|
||||
"iconPath": "assets/icons/wiki.png",
|
||||
"selectedIconPath": "assets/icons/wiki_active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/profile/index",
|
||||
"text": "我的",
|
||||
"iconPath": "assets/icons/profile.png",
|
||||
"selectedIconPath": "assets/icons/profile_active.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sitemapLocation": "sitemap.json"
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
/** app.wxss **/
|
||||
page {
|
||||
--primary: #558B2F;
|
||||
--primary-light: #9CCC65;
|
||||
--primary-dark: #33691E;
|
||||
--secondary: #8D6E63;
|
||||
--bg-garden: #F1F8E9;
|
||||
--bg-card: rgba(255, 255, 255, 0.9);
|
||||
--text-main: #263238;
|
||||
--text-muted: #78909C;
|
||||
--accent: #FF7043;
|
||||
--danger: #EF5350;
|
||||
--success: #66BB6A;
|
||||
|
||||
--shadow-sm: 0 2px 8px rgba(85, 139, 47, 0.08);
|
||||
--shadow-md: 0 8px 16px rgba(85, 139, 47, 0.12);
|
||||
--shadow-lg: 0 16px 32px rgba(85, 139, 47, 0.16);
|
||||
|
||||
--radius-sm: 12rpx;
|
||||
--radius-md: 20rpx;
|
||||
--radius-lg: 32rpx;
|
||||
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
|
||||
background-color: var(--bg-garden);
|
||||
color: var(--text-main);
|
||||
box-sizing: border-box;
|
||||
|
||||
/* TDesign Theme Overrides */
|
||||
--td-brand-color: var(--primary);
|
||||
--td-brand-color-active: var(--primary-dark);
|
||||
--td-brand-color-light: var(--primary-light);
|
||||
--td-brand-color-focus: var(--primary-light);
|
||||
--td-brand-color-disabled: #E6E6E6;
|
||||
}
|
||||
|
||||
view, scroll-view, swiper, button, input, textarea, label, navigator, image {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 200rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--bg-card);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 20rpx;
|
||||
box-shadow: var(--shadow-sm);
|
||||
margin-bottom: 16rpx;
|
||||
border: 1px solid rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
/* Global scrollbar hiding for all scroll-view components */
|
||||
::-webkit-scrollbar {
|
||||
display: none !important;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
}
|
||||
|
||||
scroll-view {
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
scroll-view::-webkit-scrollbar {
|
||||
display: none !important;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
}
|
||||
|
After Width: | Height: | Size: 374 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 19-7-7 7-7"/><path d="M19 12H5"/></svg>
|
||||
|
After Width: | Height: | Size: 226 B |
|
After Width: | Height: | Size: 478 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
|
||||
|
After Width: | Height: | Size: 286 B |
|
After Width: | Height: | Size: 437 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="4" rx="2" ry="2"/><line x1="16" x2="16" y1="2" y2="6"/><line x1="8" x2="8" y1="2" y2="6"/><line x1="3" x2="21" y1="10" y2="10"/></svg>
|
||||
|
After Width: | Height: | Size: 346 B |
|
After Width: | Height: | Size: 674 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>
|
||||
|
After Width: | Height: | Size: 304 B |
|
After Width: | Height: | Size: 377 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ccc" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>
|
||||
|
After Width: | Height: | Size: 215 B |
|
After Width: | Height: | Size: 355 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ccc" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>
|
||||
|
After Width: | Height: | Size: 205 B |
|
After Width: | Height: | Size: 752 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#90A4AE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
|
||||
|
After Width: | Height: | Size: 340 B |
|
After Width: | Height: | Size: 749 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#558B2F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
|
||||
|
After Width: | Height: | Size: 340 B |
|
After Width: | Height: | Size: 687 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#FFD700" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m2 4 3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14"/></svg>
|
||||
|
After Width: | Height: | Size: 237 B |
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#29B6F6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.8-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z"/><path d="M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97"/></svg>
|
||||
|
After Width: | Height: | Size: 438 B |
|
After Width: | Height: | Size: 494 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#2196F3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><line x1="16" x2="8" y1="13" y2="13"/><line x1="16" x2="8" y1="17" y2="17"/><line x1="10" x2="8" y1="9" y2="9"/></svg>
|
||||
|
After Width: | Height: | Size: 411 B |
|
After Width: | Height: | Size: 665 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#90A4AE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
|
After Width: | Height: | Size: 283 B |
|
After Width: | Height: | Size: 647 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#558B2F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
|
||||
|
After Width: | Height: | Size: 283 B |
|
After Width: | Height: | Size: 733 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>
|
||||
|
After Width: | Height: | Size: 328 B |
|
After Width: | Height: | Size: 857 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/></svg>
|
||||
|
After Width: | Height: | Size: 282 B |
|
After Width: | Height: | Size: 608 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>
|
||||
|
After Width: | Height: | Size: 308 B |
|
After Width: | Height: | Size: 548 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#BDBDBD" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
|
||||
|
After Width: | Height: | Size: 276 B |
|
After Width: | Height: | Size: 857 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#9C27B0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="7"/><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"/></svg>
|
||||
|
After Width: | Height: | Size: 273 B |
|
After Width: | Height: | Size: 513 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#90A4AE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
|
After Width: | Height: | Size: 266 B |
|
After Width: | Height: | Size: 544 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#558B2F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
|
||||
|
After Width: | Height: | Size: 266 B |
|
After Width: | Height: | Size: 547 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#4CAF50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7V5a2 2 0 0 1 2-2h2"/><path d="M17 3h2a2 2 0 0 1 2 2v2"/><path d="M21 17v2a2 2 0 0 1-2 2h-2"/><path d="M7 21H5a2 2 0 0 1-2-2v-2"/><rect width="10" height="6" x="7" y="9" rx="2"/><path d="M7 12h10"/></svg>
|
||||
|
After Width: | Height: | Size: 393 B |
|
After Width: | Height: | Size: 749 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#8D6E63" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><line x1="20" x2="8.12" y1="4" y2="15.88"/><line x1="14.47" x2="20" y1="14.48" y2="20"/><line x1="8.12" x2="12" y1="8.12" y2="12"/></svg>
|
||||
|
After Width: | Height: | Size: 373 B |
|
After Width: | Height: | Size: 686 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#333" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" x2="16.65" y1="21" y2="16.65"/></svg>
|
||||
|
After Width: | Height: | Size: 256 B |
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.47a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.39a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>
|
||||
|
After Width: | Height: | Size: 789 B |
|
After Width: | Height: | Size: 751 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#9C27B0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>
|
||||
|
After Width: | Height: | Size: 238 B |
|
After Width: | Height: | Size: 615 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#78909C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 22v-5l5-5 5 5-5 5z"/><path d="M9.5 14.5 16 8"/><path d="m17 2 5 5-.5.5a3.53 3.53 0 0 1-5 0s0 0 0 0a3.53 3.53 0 0 1 0-5L17 2z"/></svg>
|
||||
|
After Width: | Height: | Size: 322 B |
|
After Width: | Height: | Size: 863 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#FF9800" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>
|
||||
|
After Width: | Height: | Size: 297 B |
|
After Width: | Height: | Size: 528 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#90A4AE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/><path d="M12 11h4"/><path d="M12 16h4"/><path d="M8 11h.01"/><path d="M8 16h.01"/></svg>
|
||||
|
After Width: | Height: | Size: 403 B |
|
After Width: | Height: | Size: 529 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#558B2F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="8" height="4" x="8" y="2" rx="1" ry="1"/><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/><path d="M12 11h4"/><path d="M12 16h4"/><path d="M8 11h.01"/><path d="M8 16h.01"/></svg>
|
||||
|
After Width: | Height: | Size: 403 B |
|
After Width: | Height: | Size: 675 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#FFD700" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9H4.5a2.5 2.5 0 0 1 0-5H6"/><path d="M18 9h1.5a2.5 2.5 0 0 0 0-5H18"/><path d="M4 22h16"/><path d="M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22"/><path d="M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22"/><path d="M18 2H6v7a6 6 0 0 0 12 0V2Z"/></svg>
|
||||
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 499 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#90A4AE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
|
||||
|
After Width: | Height: | Size: 289 B |
|
After Width: | Height: | Size: 485 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#558B2F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
|
||||
|
After Width: | Height: | Size: 289 B |
|
After Width: | Height: | Size: 447 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
|
||||
|
After Width: | Height: | Size: 224 B |
|
After Width: | Height: | Size: 689 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#2196F3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>
|
||||
|
After Width: | Height: | Size: 241 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1,103 @@
|
||||
/// <reference types="miniprogram-api-typings" />
|
||||
/// <reference types="miniprogram-api-typings" />
|
||||
import { SuperComponent } from '../common/src/index';
|
||||
export default class ActionSheet extends SuperComponent {
|
||||
static show: (options: import("./show").ActionSheetShowOption) => WechatMiniprogram.Component.TrivialInstance;
|
||||
behaviors: WechatMiniprogram.Behavior.BehaviorIdentifier<{
|
||||
distanceTop: number;
|
||||
}, {
|
||||
usingCustomNavbar: {
|
||||
type: BooleanConstructor;
|
||||
value: false;
|
||||
};
|
||||
customNavbarHeight: {
|
||||
type: NumberConstructor;
|
||||
value: number;
|
||||
};
|
||||
}, {
|
||||
calculateCustomNavbarDistanceTop(): void;
|
||||
}, WechatMiniprogram.Component.BehaviorOption>[];
|
||||
externalClasses: string[];
|
||||
properties: {
|
||||
align?: {
|
||||
type: StringConstructor;
|
||||
value?: "left" | "center";
|
||||
};
|
||||
cancelText?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
count?: {
|
||||
type: NumberConstructor;
|
||||
value?: number;
|
||||
};
|
||||
description?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
items: {
|
||||
type: ArrayConstructor;
|
||||
value?: (string | import("./type").ActionSheetItem)[];
|
||||
required?: boolean;
|
||||
};
|
||||
popupProps?: {
|
||||
type: ObjectConstructor;
|
||||
value?: import("../popup").TdPopupProps;
|
||||
};
|
||||
showCancel?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
showOverlay?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
theme?: {
|
||||
type: StringConstructor;
|
||||
value?: "list" | "grid";
|
||||
};
|
||||
usingCustomNavbar?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
visible?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
defaultVisible?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
};
|
||||
data: {
|
||||
prefix: string;
|
||||
classPrefix: string;
|
||||
gridThemeItems: any[];
|
||||
currentSwiperIndex: number;
|
||||
defaultPopUpProps: {};
|
||||
defaultPopUpzIndex: number;
|
||||
};
|
||||
controlledProps: {
|
||||
key: string;
|
||||
event: string;
|
||||
}[];
|
||||
observers: {
|
||||
items(): void;
|
||||
};
|
||||
lifetimes: {
|
||||
ready(): void;
|
||||
};
|
||||
methods: {
|
||||
init(): void;
|
||||
memoInitialData(): void;
|
||||
splitGridThemeActions(): void;
|
||||
show(options: any): void;
|
||||
close(): void;
|
||||
onPopupVisibleChange({ detail }: {
|
||||
detail: any;
|
||||
}): void;
|
||||
onSwiperChange(e: WechatMiniprogram.TouchEvent): void;
|
||||
onSelect(event: WechatMiniprogram.TouchEvent): void;
|
||||
onCancel(): void;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
import{__decorate}from"tslib";import{chunk}from"../common/utils";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import{ActionSheetTheme,show}from"./show";import props from"./props";import useCustomNavbar from"../mixins/using-custom-navbar";const{prefix:prefix}=config,name=`${prefix}-action-sheet`;let ActionSheet=class extends SuperComponent{constructor(){super(...arguments),this.behaviors=[useCustomNavbar],this.externalClasses=[`${prefix}-class`,`${prefix}-class-content`,`${prefix}-class-cancel`],this.properties=Object.assign({},props),this.data={prefix:prefix,classPrefix:name,gridThemeItems:[],currentSwiperIndex:0,defaultPopUpProps:{},defaultPopUpzIndex:11500},this.controlledProps=[{key:"visible",event:"visible-change"}],this.observers={items(){this.splitGridThemeActions()}},this.lifetimes={ready(){this.init()}},this.methods={init(){this.memoInitialData(),this.splitGridThemeActions()},memoInitialData(){this.initialData=Object.assign(Object.assign({},this.properties),this.data)},splitGridThemeActions(){this.data.theme===ActionSheetTheme.Grid&&this.setData({gridThemeItems:chunk(this.data.items,this.data.count)})},show(e){this.setData(Object.assign(Object.assign(Object.assign({},this.initialData),e),{visible:!0})),this.splitGridThemeActions(),this.autoClose=!0,this._trigger("visible-change",{visible:!0})},close(){this.triggerEvent("close",{trigger:"command"}),this._trigger("visible-change",{visible:!1})},onPopupVisibleChange({detail:e}){e.visible||(this.triggerEvent("close",{trigger:"overlay"}),this._trigger("visible-change",{visible:!1})),this.autoClose&&(this.setData({visible:!1}),this.autoClose=!1)},onSwiperChange(e){const{current:t}=e.detail;this.setData({currentSwiperIndex:t})},onSelect(e){const{currentSwiperIndex:t,items:i,gridThemeItems:s,count:o,theme:r}=this.data,{index:n}=e.currentTarget.dataset,a=r===ActionSheetTheme.Grid,h=a?s[t][n]:i[n],c=a?n+t*o:n;h&&(this.triggerEvent("selected",{selected:h,index:c}),h.disabled||(this.triggerEvent("close",{trigger:"select"}),this._trigger("visible-change",{visible:!1})))},onCancel(){this.triggerEvent("cancel"),this.autoClose&&(this.setData({visible:!1}),this.autoClose=!1)}}}};ActionSheet.show=show,ActionSheet=__decorate([wxComponent()],ActionSheet);export default ActionSheet;
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"t-icon":"../icon/icon","t-popup":"../popup/popup","t-grid":"../grid/grid","t-grid-item":"../grid-item/grid-item"}}
|
||||
@@ -0,0 +1 @@
|
||||
<wxs src="./action-sheet.wxs" module="_this"/><wxs src="../common/utils.wxs" module="_"/><import src="./template/list.wxml"/><import src="./template/grid.wxml"/><view id="{{classPrefix}}" style="{{_._style([style, customStyle])}}" class="{{_.cls(classPrefix, [align, theme, ['no-description', !description]])}} class {{prefix}}-class"><t-popup visible="{{visible}}" placement="bottom" usingCustomNavbar="{{usingCustomNavbar}}" bind:visible-change="onPopupVisibleChange" show-overlay="{{showOverlay}}" z-index="{{ popupProps.zIndex || defaultPopUpzIndex }}" overlay-props="{{ popupProps.overlayProps || defaultPopUpProps }}"><view class="{{classPrefix}}__content {{prefix}}-class-content" tabindex="0"><view wx:if="{{description}}" tabindex="0" class="{{classPrefix}}__description">{{description}}</view><block wx:if="{{gridThemeItems.length}}"><template is="grid" data="{{classPrefix, prefix, gridThemeItems, count, currentSwiperIndex}}"/></block><view wx:elif="{{items && items.length}}" class="{{classPrefix}}__list"><block wx:for="{{ items }}" wx:key="index"><template is="list" data="{{index, classPrefix, listThemeItemClass: _.cls(classPrefix + '__list-item', [['disabled', item.disabled]]), item}}"/></block></view></view><slot/><view wx:if="{{showCancel}}" class="{{classPrefix}}__footer"><view class="{{classPrefix}}__gap-{{theme}}"/><view class="{{classPrefix}}__cancel {{prefix}}-class-cancel" hover-class="{{classPrefix}}__cancel--hover" hover-stay-time="70" bind:tap="onCancel" aria-role="button">{{ cancelText || '取消' }}</view></view></t-popup></view>
|
||||
@@ -0,0 +1,19 @@
|
||||
var getListThemeItemClass = function (props) {
|
||||
var classPrefix = props.classPrefix;
|
||||
var item = props.item;
|
||||
var prefix = props.prefix;
|
||||
var classList = [classPrefix + '__list-item'];
|
||||
if (item.disabled) {
|
||||
classList.push(prefix + '-is-disabled');
|
||||
}
|
||||
return classList.join(' ');
|
||||
};
|
||||
|
||||
var isImage = function (name) {
|
||||
return name.indexOf('/') !== -1;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getListThemeItemClass: getListThemeItemClass,
|
||||
isImage: isImage,
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
@import '../common/style/index.wxss';.t-action-sheet__content{color:var(--td-action-sheet-color,var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9))));border-top-left-radius:var(--td-action-sheet-border-radius,var(--td-radius-extraLarge,24rpx));border-top-right-radius:var(--td-action-sheet-border-radius,var(--td-radius-extraLarge,24rpx));background-color:var(--td-bg-color-container,var(--td-font-white-1,#fff));overflow:hidden;}
|
||||
.t-action-sheet__content:focus{outline:0;}
|
||||
.t-action-sheet--grid{padding-top:var(--td-spacer,16rpx);}
|
||||
.t-action-sheet--grid .t-action-sheet__description::after{display:none;}
|
||||
.t-action-sheet--left .t-action-sheet__description{text-align:left;}
|
||||
.t-action-sheet--left .t-action-sheet__list-item-content,.t-action-sheet--left .t-action-sheet__list-item-desc{justify-content:start;}
|
||||
.t-action-sheet--left .t-action-sheet__list-item-icon--suffix{margin-left:auto;}
|
||||
.t-action-sheet__grid{padding-bottom:16rpx;}
|
||||
.t-action-sheet__grid--swiper{padding-bottom:48rpx;}
|
||||
.t-action-sheet__description{color:var(--td-action-sheet-description-color,var(--td-text-color-placeholder,var(--td-font-gray-3,rgba(0,0,0,.4))));font:var(--td-action-sheet-description-font,var(--td-font-body-medium,28rpx / 44rpx var(--td-font-family,PingFang SC,Microsoft YaHei,Arial Regular)));text-align:center;padding:var(--td-spacer-1,24rpx) var(--td-spacer-2,32rpx);position:relative;}
|
||||
.t-action-sheet__description:focus{outline:0;}
|
||||
.t-action-sheet__description::after{content:'';display:block;position:absolute;top:unset;bottom:0;left:unset;right:unset;background-color:var(--td-action-sheet-border-color,var(--td-component-stroke,var(--td-gray-color-3,#e7e7e7)));}
|
||||
.t-action-sheet__description::after{height:1px;left:0;right:0;transform:scaleY(.5);}
|
||||
.t-action-sheet__list-item{flex-direction:column;padding:var(--td-spacer-2,32rpx);display:flex;align-items:center;justify-content:center;}
|
||||
.t-action-sheet__list-item:not(:last-child){position:relative;}
|
||||
.t-action-sheet__list-item:not(:last-child)::after{content:'';display:block;position:absolute;top:unset;bottom:0;left:unset;right:unset;background-color:var(--td-action-sheet-border-color,var(--td-component-stroke,var(--td-gray-color-3,#e7e7e7)));}
|
||||
.t-action-sheet__list-item:not(:last-child)::after{height:1px;left:0;right:0;transform:scaleY(.5);}
|
||||
.t-action-sheet__list-item:focus{outline:0;}
|
||||
.t-action-sheet__list-item--disabled{color:var(--td-action-sheet-disabled-color,var(--td-text-color-disabled,var(--td-font-gray-4,rgba(0,0,0,.26))));}
|
||||
.t-action-sheet__list-item-content,.t-action-sheet__list-item-desc{width:100%;display:flex;align-items:center;justify-content:center;}
|
||||
.t-action-sheet__list-item-text{font:var(--td-font-body-large,32rpx / 48rpx var(--td-font-family,PingFang SC,Microsoft YaHei,Arial Regular));}
|
||||
.t-action-sheet__list-item-desc{font:var(--td-font-body-small,24rpx / 40rpx var(--td-font-family,PingFang SC,Microsoft YaHei,Arial Regular));color:var(--td-action-sheet-description-color,var(--td-text-color-placeholder,var(--td-font-gray-3,rgba(0,0,0,.4))));margin-top:var(--td-spacer,16rpx);}
|
||||
.t-action-sheet__list-item-desc,.t-action-sheet__list-item-text{word-wrap:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
|
||||
.t-action-sheet__list-item-icon{font-size:48rpx;margin-right:var(--td-spacer,16rpx);}
|
||||
.t-action-sheet__list-item-icon--suffix{margin-right:0;margin-left:var(--td-spacer,16rpx);}
|
||||
.t-action-sheet__swiper-wrap{margin-top:8rpx;position:relative;}
|
||||
.t-action-sheet__footer{background-color:var(--td-bg-color-container,var(--td-font-white-1,#fff));}
|
||||
.t-action-sheet__gap-list{height:16rpx;background-color:var(--td-action-sheet-gap-color,var(--td-bg-color-page,var(--td-gray-color-1,#f3f3f3)));}
|
||||
.t-action-sheet__gap-grid{height:1rpx;background-color:var(--td-action-sheet-border-color,var(--td-component-stroke,var(--td-gray-color-3,#e7e7e7)));}
|
||||
.t-action-sheet__cancel{padding:var(--td-spacer-1,24rpx) var(--td-spacer-2,32rpx);font:var(--td-font-body-large,32rpx / 48rpx var(--td-font-family,PingFang SC,Microsoft YaHei,Arial Regular));color:var(--td-action-sheet-cancel-color,var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9))));display:flex;align-items:center;justify-content:center;}
|
||||
.t-action-sheet__dots{position:absolute;left:50%;bottom:var(--td-spacer-2,32rpx);transform:translateX(-50%);display:flex;flex-direction:row;}
|
||||
.t-action-sheet__dots-item{width:var(--td-action-sheet-dot-size,16rpx);height:var(--td-action-sheet-dot-size,16rpx);background-color:var(--td-action-sheet-dot-color,var(--td-text-color-disabled,var(--td-font-gray-4,rgba(0,0,0,.26))));border-radius:50%;margin:0 var(--td-spacer,16rpx);transition:all .4s ease-in;}
|
||||
.t-action-sheet__dots-item.t-is-active{background-color:var(--td-action-sheet-dot-active-color,var(--td-brand-color,var(--td-primary-color-7,#0052d9)));}
|
||||
@@ -0,0 +1,8 @@
|
||||
/// <reference types="miniprogram-api-typings" />
|
||||
import { ActionSheetItem, ActionSheetTheme, ActionSheetShowOption } from './show';
|
||||
export { ActionSheetItem, ActionSheetTheme, ActionSheetShowOption };
|
||||
declare const _default: {
|
||||
show(options: ActionSheetShowOption): WechatMiniprogram.Component.TrivialInstance;
|
||||
close(options: ActionSheetShowOption): void;
|
||||
};
|
||||
export default _default;
|
||||
@@ -0,0 +1 @@
|
||||
import{show,close,ActionSheetTheme}from"./show";export{ActionSheetTheme};export default{show:e=>show(e),close:e=>close(e)};
|
||||
@@ -0,0 +1,3 @@
|
||||
import { TdActionSheetProps } from './type';
|
||||
declare const props: TdActionSheetProps;
|
||||
export default props;
|
||||
@@ -0,0 +1 @@
|
||||
const props={align:{type:String,value:"center"},cancelText:{type:String,value:""},count:{type:Number,value:8},description:{type:String,value:""},items:{type:Array,required:!0},popupProps:{type:Object,value:{}},showCancel:{type:Boolean,value:!0},showOverlay:{type:Boolean,value:!0},theme:{type:String,value:"list"},usingCustomNavbar:{type:Boolean,value:!1},visible:{type:Boolean,value:null},defaultVisible:{type:Boolean,value:!1}};export default props;
|
||||
@@ -0,0 +1,26 @@
|
||||
/// <reference types="miniprogram-api-typings" />
|
||||
/// <reference types="miniprogram-api-typings" />
|
||||
import { ActionSheetItem } from './type';
|
||||
export { ActionSheetItem };
|
||||
declare type Context = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
|
||||
export declare enum ActionSheetTheme {
|
||||
List = "list",
|
||||
Grid = "grid"
|
||||
}
|
||||
interface ActionSheetProps {
|
||||
align: 'center' | 'left';
|
||||
cancelText?: string;
|
||||
count?: number;
|
||||
description: string;
|
||||
items: Array<string | ActionSheetItem>;
|
||||
showCancel?: boolean;
|
||||
theme?: ActionSheetTheme;
|
||||
visible: boolean;
|
||||
defaultVisible?: boolean;
|
||||
}
|
||||
export interface ActionSheetShowOption extends Omit<ActionSheetProps, 'visible'> {
|
||||
context?: Context;
|
||||
selector?: string;
|
||||
}
|
||||
export declare const show: (options: ActionSheetShowOption) => WechatMiniprogram.Component.TrivialInstance;
|
||||
export declare const close: (options: ActionSheetShowOption) => void;
|
||||
@@ -0,0 +1 @@
|
||||
import{__rest}from"tslib";import{getInstance}from"../common/utils";export var ActionSheetTheme;!function(t){t.List="list",t.Grid="grid"}(ActionSheetTheme||(ActionSheetTheme={}));export const show=function(t){const e=Object.assign({},t),{context:o,selector:n="#t-action-sheet"}=e,c=__rest(e,["context","selector"]),s=getInstance(o,n);if(s)return s.show(Object.assign({},c)),s;console.error("未找到组件,请确认 selector && context 是否正确")};export const close=function(t){const{context:e,selector:o="#t-action-sheet"}=Object.assign({},t),n=getInstance(e,o);n&&n.close()};
|
||||
@@ -0,0 +1 @@
|
||||
<template name="grid"><block wx:if="{{gridThemeItems.length === 1}}"><t-grid align="center" t-class="{{classPrefix}}__grid" column="{{count / 2}}" class="{{classPrefix}}__single-wrap"><t-grid-item t-class="{{classPrefix}}__grid-item" class="{{classPrefix}}__square" wx:for="{{gridThemeItems[0]}}" wx:key="index" bind:tap="onSelect" data-index="{{index}}" icon="{{ { name: item.icon, color: item.color } }}" text="{{item.label || ''}}" description="{{item.description || ''}}" image="{{item.image || ''}}" style="--td-grid-item-text-color: {{item.color}}"></t-grid-item></t-grid></block><block wx:elif="{{gridThemeItems.length > 1}}"><view class="{{classPrefix}}__swiper-wrap"><swiper style="height: 456rpx" autoplay="{{false}}" current="{{currentSwiperIndex}}" bindchange="onSwiperChange"><swiper-item wx:for="{{gridThemeItems}}" wx:key="index"><t-grid align="center" t-class="{{classPrefix}}__grid {{classPrefix}}__grid--swiper" column="{{count / 2}}"><t-grid-item t-class="{{classPrefix}}__grid-item" class="{{classPrefix}}__square" wx:for="{{item}}" wx:key="index" data-index="{{index}}" bind:tap="onSelect" icon="{{ { name: item.icon, color: item.color } }}" text="{{item.label || ''}}" description="{{item.description || ''}}" image="{{item.image || ''}}" style="--td-grid-item-text-color: {{item.color}}"></t-grid-item></t-grid></swiper-item></swiper><view class="{{classPrefix}}__nav"><view class="{{classPrefix}}__dots"><view wx:for="{{gridThemeItems.length}}" wx:key="index" class="{{classPrefix}}__dots-item {{index === currentSwiperIndex ? prefix + '-is-active' : ''}}"/></view></view></view></block></template>
|
||||
@@ -0,0 +1 @@
|
||||
<template name="list"><view data-index="{{index}}" style="{{ item.color ? 'color: ' + item.color : '' }}" class="{{listThemeItemClass}}" bind:tap="onSelect" aria-role="{{ariaRole || 'button'}}" aria-label="{{item.label || item}}" tabindex="0"><view class="{{classPrefix}}__list-item-content"><t-icon wx:if="{{item.icon}}" name="{{item.icon}}" class="{{classPrefix}}__list-item-icon"/><view class="{{classPrefix}}__list-item-text">{{item.label || item}}</view><t-icon wx:if="{{item.suffixIcon}}" name="{{item.suffixIcon}}" class="{{classPrefix}}__list-item-icon {{classPrefix}}__list-item-icon--suffix"/></view><view wx:if="{{item.description}}" class="{{classPrefix}}__list-item-desc">{{item.description}}</view></view></template>
|
||||
@@ -0,0 +1,60 @@
|
||||
import { PopupProps } from '../popup/index';
|
||||
export interface TdActionSheetProps {
|
||||
align?: {
|
||||
type: StringConstructor;
|
||||
value?: 'center' | 'left';
|
||||
};
|
||||
cancelText?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
count?: {
|
||||
type: NumberConstructor;
|
||||
value?: number;
|
||||
};
|
||||
description?: {
|
||||
type: StringConstructor;
|
||||
value?: string;
|
||||
};
|
||||
items: {
|
||||
type: ArrayConstructor;
|
||||
value?: Array<string | ActionSheetItem>;
|
||||
required?: boolean;
|
||||
};
|
||||
popupProps?: {
|
||||
type: ObjectConstructor;
|
||||
value?: PopupProps;
|
||||
};
|
||||
showCancel?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
showOverlay?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
theme?: {
|
||||
type: StringConstructor;
|
||||
value?: 'list' | 'grid';
|
||||
};
|
||||
usingCustomNavbar?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
visible?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
defaultVisible?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
}
|
||||
export interface ActionSheetItem {
|
||||
label: string;
|
||||
description?: string;
|
||||
color?: string;
|
||||
disabled?: boolean;
|
||||
icon?: string;
|
||||
suffixIcon?: string;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export{};
|
||||
@@ -0,0 +1,53 @@
|
||||
import { SuperComponent, ComponentsOptionsType } from '../../../components/common/src/index';
|
||||
import { TdAttachmentsProps } from './type';
|
||||
export interface AttachmentsProps extends TdAttachmentsProps {
|
||||
}
|
||||
export default class Attachments extends SuperComponent {
|
||||
options: ComponentsOptionsType;
|
||||
properties: {
|
||||
inChat: {
|
||||
type: BooleanConstructor;
|
||||
value: boolean;
|
||||
};
|
||||
addable?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
imageViewer?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
items: {
|
||||
type: ArrayConstructor;
|
||||
value?: import("./type").FileItem[];
|
||||
required?: boolean;
|
||||
};
|
||||
removable?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
};
|
||||
data: {
|
||||
classPrefix: string;
|
||||
files: any[];
|
||||
};
|
||||
observers: {
|
||||
items(): void;
|
||||
};
|
||||
methods: {
|
||||
onFileWrapTap(e: any): void;
|
||||
onRemoveTap(e: any): void;
|
||||
handleFileClick(item: any): void;
|
||||
handleRemove(item: any, index: any): void;
|
||||
renderDesc(item: any): string;
|
||||
renderIcon(item: any): any;
|
||||
renderFileType(item: any): any;
|
||||
renderExtension(item: any): any;
|
||||
setFiles(): void;
|
||||
};
|
||||
lifetimes: {
|
||||
created(): void;
|
||||
attached(): void;
|
||||
detached(): void;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../common/src/index";import config from"../common/config";import props from"./props";const{prefix:prefix}=config,name=`${prefix}-attachments`;let Attachments=class extends SuperComponent{constructor(){super(...arguments),this.options={multipleSlots:!0},this.properties=Object.assign(Object.assign({},props),{inChat:{type:Boolean,value:!1}}),this.data={classPrefix:name,files:[]},this.observers={items(){this.setFiles()}},this.methods={onFileWrapTap(e){var i;const{index:t}=e.currentTarget.dataset||{},o=null===(i=this.data.files)||void 0===i?void 0:i[t];o&&this.handleFileClick(o)},onRemoveTap(e){var i;const{index:t}=e.currentTarget.dataset||{},o=null===(i=this.data.files)||void 0===i?void 0:i[t];"function"==typeof(null==e?void 0:e.stopPropagation)&&e.stopPropagation(),void 0!==o&&this.handleRemove(o,t)},handleFileClick(e){this.data.imageViewer&&"image"===e.fileType&&wx.previewImage({urls:[e.url]}),this.triggerEvent("fileClick",{item:e})},handleRemove(e,i){this.triggerEvent("remove",{item:e,index:i})},renderDesc(e){const i=e.size||0;let t,o;if(i<1024)t=i,o="B";else if(i<1048576){const e=i/1024;t=e%1==0?e:e.toFixed(2),o="KB"}else{const e=i/1048576;t=e%1==0?e:e.toFixed(2),o="MB"}return`${t} ${o}`},renderIcon(e){const i={file:{name:"file-zip-filled",color:"#E37318"},video:{name:"video-filled",color:"#D54941"},pdf:{name:"file-pdf-filled",color:"#D54941"},doc:{name:"file-word-filled",color:"#0052d9"},excel:{name:"file-excel-filled",color:"#2BA471"},ppt:{name:"file-powerpoint-filled",color:"#E37318"},audio:{name:"video-filled",color:"#D54941"}};return i[e.fileType]||i.file},renderFileType(e){if(e.fileType)return e.fileType;if(["image","video","audio","pdf","doc","ppt","txt","excel"].includes(e.type))return e.fileType;const i=e.url||"",t=i.lastIndexOf(".");return{jpg:"image",jpeg:"image",png:"image",gif:"image",bmp:"image",webp:"image",mp4:"video",mov:"video",avi:"video",mkv:"video",webm:"video",mp3:"audio",wav:"audio",ogg:"audio",aac:"audio",pdf:"pdf",doc:"doc",docx:"doc",ppt:"ppt",pptx:"ppt",xls:"excel",xlsx:"excel",txt:"txt"}[-1!==t?i.substring(t+1).toLowerCase():""]||""},renderExtension(e){if(e.extension)return e.extension;return e.extension||(e.url?e.url.split(".").pop().toLowerCase():"")},setFiles(){this.setData({files:this.properties.items.map(e=>Object.assign(Object.assign({},e),{fileType:this.data.renderFileType(e),desc:this.data.renderDesc(e),fileIcon:this.data.renderIcon(e)}))})}},this.lifetimes={created(){this.data.handleFileClick=this.handleFileClick.bind(this),this.data.handleRemove=this.handleRemove.bind(this),this.data.renderDesc=this.renderDesc.bind(this),this.data.renderIcon=this.renderIcon.bind(this),this.data.renderFileType=this.renderFileType.bind(this),this.data.renderExtension=this.renderExtension.bind(this)},attached(){this.setFiles()},detached(){}}}};Attachments=__decorate([wxComponent()],Attachments);export default Attachments;
|
||||
@@ -0,0 +1 @@
|
||||
{"component":true,"styleIsolation":"apply-shared","usingComponents":{"t-icon":"../icon/icon","t-image":"../image/image","t-loading":"../loading/loading"}}
|
||||
@@ -0,0 +1 @@
|
||||
<wxs src="./attachments.wxs" module="_this"/><wxs src="../common/utils.wxs" module="_"/><view class="{{classPrefix}} {{[inChat ? classPrefix + '--chatting' : '', _this.getFileTypeClass(inChat, files)]}}" style="{{_._style([style, customStyle])}}"><view class="{{classPrefix}}__left"><view class="{{classPrefix}}__scrollable scroll-x"><block wx:for="{{files}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{classPrefix}}__files" bindtap="onFileWrapTap" data-index="{{index}}"><block wx:if="{{item.fileType==='image'}}"><view class="file-image {{classPrefix}}__file {{removable ? classPrefix + '__file--removable' : ''}}"><block wx:if="{{item.status==='pending' || item.status==='fail' || item.status==='error'}}"><view class="{{item.status}} {{classPrefix}}__file--{{item.status}}"><t-loading theme="circular" size="48rpx"/></view></block><block wx:else><image class="image" src="{{item.url}}" mode="{{_this.getImageMode(item)}}" lazy-load="false" style="{{inChat ? _this.imageStyle(item) : ''}}"></image></block><view wx:if="{{removable}}" class="{{classPrefix}}__remove"><t-icon data-index="{{index}}" name="multiply" size="16px" catchtap="onRemoveTap"/></view></view></block><block wx:else><view class="file {{classPrefix}}__file {{removable ? classPrefix + '__file--removable' : ''}}"><view class="image"><block wx:if="{{item.status==='pending'}}"><view class="loading {{classPrefix}}__file--pending"><t-loading theme="circular" size="48rpx"/></view></block><block wx:elif="{{item.status==='fail'}}"><view class="fail {{classPrefix}}__file--fail"><t-loading theme="circular" size="48rpx"/></view></block><block wx:elif="{{item.status==='error'}}"><view class="error {{classPrefix}}__file--error"><t-loading theme="circular" size="48rpx"/></view></block><block wx:else><t-icon name="{{item.fileIcon.name}}" color="{{item.fileIcon.color}}" size="48rpx"></t-icon></block></view><view class="{{classPrefix}}__content"><view class="{{classPrefix}}__title">{{item.name}}</view><block><view wx:if="{{item.status==='pending'}}" class="{{classPrefix}}__desc">上传中...{{item.progress || 0+"%"}}</view><view wx:elif="{{item.status==='fail'}}" class="{{classPrefix}}__desc">上传失败</view><view wx:elif="{{item.status==='error'}}" class="{{classPrefix}}__desc">{{item.errorMessage}}</view><view wx:else class="{{classPrefix}}__desc">{{item.desc}}</view></block></view><view wx:if="{{removable}}" class="{{classPrefix}}__remove"><t-icon data-index="{{index}}" name="multiply" size="16px" catchtap="onRemoveTap"/></view></view></block></view></block></view></view></view>
|
||||
@@ -0,0 +1,53 @@
|
||||
var utils = require('../common/utils.wxs');
|
||||
|
||||
function imageStyle(imageProps) {
|
||||
if (imageProps && imageProps.width && imageProps.height) {
|
||||
return utils._style({
|
||||
width: utils.addUnit(imageProps.width),
|
||||
height: utils.addUnit(imageProps.height),
|
||||
});
|
||||
}
|
||||
// 兜底逻辑:没有传入 width 和 height 时,使用默认最大宽高尺寸
|
||||
return utils._style({
|
||||
width: '400rpx',
|
||||
height: '400rpx',
|
||||
});
|
||||
}
|
||||
|
||||
function getImageMode(imageProps) {
|
||||
if (imageProps && imageProps.width && imageProps.height) {
|
||||
return imageProps.width > imageProps.height ? 'widthFix' : 'heightFix';
|
||||
}
|
||||
// 兜底逻辑:没有传入 width 和 height 时,使用 aspectFit 保持图片比例
|
||||
return imageProps && imageProps.mode ? imageProps.mode : 'scaleToFill';
|
||||
}
|
||||
|
||||
function getFileTypeClass(inChat, files) {
|
||||
// 如果 inChat 不为 true,返回空字符串
|
||||
if (!inChat) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// 如果 files 为空或不存在,返回空字符串
|
||||
if (!files || files.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// 检查是否所有文件的 fileType 都是 'image'
|
||||
var allImages = true;
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
if (files[i].fileType !== 'image') {
|
||||
allImages = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 根据判断结果返回相应的类名
|
||||
return allImages ? 'all_images' : 'all_files';
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
imageStyle: imageStyle,
|
||||
getImageMode: getImageMode,
|
||||
getFileTypeClass: getFileTypeClass,
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
@import '../common/style/index.wxss';.t-attachments{display:flex;width:100%;height:auto;}
|
||||
.t-attachments__scrollable{height:100%;display:flex;align-items:center;justify-content:flex-start;}
|
||||
.t-attachments .scroll-x{white-space:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;}
|
||||
.t-attachments .scroll-x::-webkit-scrollbar{display:none;}
|
||||
.t-attachments .wrap{flex-wrap:wrap;overflow-x:hidden;}
|
||||
.t-attachments__left{flex:1;overflow:hidden;}
|
||||
.t-attachments__file--error,.t-attachments__file--fail,.t-attachments__file--pending,.t-attachments__file--success{position:absolute;width:100%;height:100%;top:0;left:0;border-radius:var(--td-radius-extraLarge,24rpx);display:flex;flex-direction:column;align-items:center;justify-content:center;}
|
||||
.t-attachments__files{box-sizing:border-box;margin-left:16rpx;}
|
||||
.t-attachments__files:first-of-type{margin-left:0;}
|
||||
.t-attachments__file{border-radius:var(--td-radius-extraLarge,24rpx);display:block;position:relative;background-color:var(--td-bg-color-secondarycontainer,var(--td-gray-color-1,#f3f3f3));overflow:visible;}
|
||||
.t-attachments__file--removable{margin-top:12rpx;margin-right:8rpx;}
|
||||
.t-attachments__file .t-attachments__remove{background-color:var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9)));color:var(--td-bg-color-container,var(--td-font-white-1,#fff));border-radius:var(--td-radius-circle,50%);position:absolute;right:-8rpx;top:-8rpx;}
|
||||
.t-attachments__file.file-image{width:104rpx;height:104rpx;}
|
||||
.t-attachments__file.file-image .image{width:100%;height:100%;border-radius:var(--td-radius-extraLarge,24rpx);}
|
||||
.t-attachments__file.file{width:256rpx;height:104rpx;display:flex;align-items:stretch;justify-content:flex-start;padding:0 24rpx;}
|
||||
.t-attachments__file.file .image{width:64rpx;height:auto;box-sizing:border-box;overflow:hidden;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;}
|
||||
.t-attachments__file.file .image image{width:100%;height:100%;}
|
||||
.t-attachments__file.file .t-attachments__content{flex:1;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;margin-left:16rpx;}
|
||||
.t-attachments__file.file .t-attachments__content .t-attachments__title{width:100%;color:var(--td-text-color-primary,var(--td-font-gray-1,rgba(0,0,0,.9)));font:var(--td-font-body-medium,28rpx / 44rpx var(--td-font-family,PingFang SC,Microsoft YaHei,Arial Regular));font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:-2rpx;padding:0;}
|
||||
.t-attachments__file.file .t-attachments__content .t-attachments__desc{width:100%;color:var(--td-text-color-placeholder,var(--td-font-gray-3,rgba(0,0,0,.4)));font:var(--td-font-body-small,24rpx / 40rpx var(--td-font-family,PingFang SC,Microsoft YaHei,Arial Regular));font-style:normal;margin-top:-4rpx;}
|
||||
.t-attachments--chatting.all_images{width:100%;}
|
||||
.t-attachments--chatting.all_images .file-image.t-attachments__file{background-color:transparent!important;}
|
||||
.t-attachments--chatting.all_images .file-image{width:auto;height:auto;}
|
||||
.t-attachments--chatting.all_images .file-image .image{max-width:400rpx;max-height:400rpx;border-radius:var(--td-radius-extraLarge,24rpx);}
|
||||
.t-attachments--chatting.all_files{width:auto;}
|
||||
.t-attachments--chatting.all_files .t-attachments__files:not(:last-child){margin-bottom:16rpx;}
|
||||
.t-attachments--chatting.all_files .file-image.t-attachments__file{background-color:transparent!important;}
|
||||
.t-attachments--chatting.all_files .file-image{width:auto;height:auto;}
|
||||
.t-attachments--chatting.all_files .file-image .image{max-width:400rpx;max-height:400rpx;border-radius:var(--td-radius-extraLarge,24rpx);}
|
||||
.t-attachments--chatting.all_files .t-attachments__files{margin-left:0;}
|
||||
.t-attachments--chatting.all_files .t-attachments__scrollable{display:contents;}
|
||||
.t-attachments--chatting.all_files .file.t-attachments__file{width:352rpx;}
|
||||
.t-chat__inner.right .t-attachments--chatting .file-image.t-attachments__file{text-align:right;}
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from './props';
|
||||
export * from './type';
|
||||
export * from './attachments';
|
||||
@@ -0,0 +1 @@
|
||||
export*from"./props";export*from"./type";export*from"./attachments";
|
||||
@@ -0,0 +1,3 @@
|
||||
import { TdAttachmentsProps } from './type';
|
||||
declare const props: TdAttachmentsProps;
|
||||
export default props;
|
||||
@@ -0,0 +1 @@
|
||||
const props={addable:{type:Boolean,value:!0},imageViewer:{type:Boolean,value:!0},items:{type:Array,value:[],required:!0},removable:{type:Boolean,value:!0}};export default props;
|
||||
@@ -0,0 +1,32 @@
|
||||
export interface TdAttachmentsProps {
|
||||
addable?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
imageViewer?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
items: {
|
||||
type: ArrayConstructor;
|
||||
value?: FileItem[];
|
||||
required?: boolean;
|
||||
};
|
||||
removable?: {
|
||||
type: BooleanConstructor;
|
||||
value?: boolean;
|
||||
};
|
||||
}
|
||||
export interface FileItem {
|
||||
fileType: 'image' | 'video' | 'audio' | 'pdf' | 'doc' | 'ppt' | 'txt';
|
||||
name: string;
|
||||
url: string;
|
||||
size: number;
|
||||
status?: 'success' | 'fail' | 'pending' | 'error';
|
||||
progress?: number;
|
||||
errorMessage?: string;
|
||||
fileIcon?: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
mode?: 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'scaleToFill';
|
||||
}
|
||||