vue-color-ui 0.0.57 → 0.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/docs/README.md +0 -120
- package/docs/components/ChatList.md +0 -171
- package/docs/components/ChatRoom.md +0 -175
- package/docs/components/DrawerModal.md +0 -83
- package/docs/components/GridGroup.md +0 -101
- package/docs/components/Loading.md +0 -164
- package/docs/components/Menu.md +0 -195
- package/docs/components/TAvatar.md +0 -49
- package/docs/components/TAvatarGroup.md +0 -40
- package/docs/components/TButton.md +0 -96
- package/docs/components/TIcon.md +0 -50
- package/docs/components/TImageCard.md +0 -135
- package/docs/components/TInputBar.md +0 -148
- package/docs/components/TNavBar.md +0 -118
- package/docs/components/TNavCard.md +0 -62
- package/docs/components/TNewCard.md +0 -60
- package/docs/components/TProductCard.md +0 -105
- package/docs/components/TProfileCard.md +0 -125
- package/docs/components/TSearchBar.md +0 -73
- package/docs/components/TShareCard.md +0 -88
- package/docs/components/TStatCard.md +0 -117
- package/docs/components/TSteps.md +0 -93
- package/docs/components/TTab.md +0 -66
- package/docs/components/TTabs.md +0 -126
- package/docs/components/TTag.md +0 -88
- package/docs/components/TTitle.md +0 -75
- package/docs/components/TTopBar.md +0 -105
- package/docs/components/TVirtualScrollSlide.md +0 -145
- package/docs/components/TimeLine.md +0 -155
- package/docs/guides/colors.md +0 -117
- package/lib/css/animation.css +0 -184
- package/lib/css/icon.css +0 -1226
- package/lib/css/main.css +0 -4225
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.nav-list{display:flex;flex-wrap:wrap;padding:0 20px;justify-content:space-between}.nav-li{padding:15px;border-radius:6px;width:45%;margin:0 2.5% 20px;background-size:cover;background-position:center;position:relative;z-index:1;cursor:pointer}.nav-li:after{content:"";position:absolute;z-index:-1;background-color:inherit;width:100%;height:100%;left:0;bottom:-10%;border-radius:5px;opacity:.2;transform:scale(.9)}.nav-li.cur{color:#fff;background:#5eb95e;box-shadow:2px 2px 3px #5eb95e66}.nav-title{font-size:16px;font-weight:300}.nav-title:first-letter{font-size:20px;margin-right:2px}.nav-name{font-size:14px;text-transform:Capitalize;margin-top:10px;position:relative}.nav-name:before{content:"";position:absolute;display:block;width:20px;height:3px;background:#fff;bottom:0;right:0;opacity:.5}.nav-name:after{content:"";position:absolute;display:block;width:50px;height:1px;background:#fff;bottom:0;right:20px;opacity:.3}.nav-name:first-letter{font-weight:700;font-size:18px;margin-right:1px}.nav-li text{position:absolute;right:15px;top:15px;font-size:26px;width:30px;height:30px;text-align:center;line-height:30px}.text-light{font-weight:300}@keyframes show{0%{transform:translateY(-50px)}60%{transform:translateY(20px)}to{transform:translateY(0)}}@-webkit-keyframes show{0%{transform:translateY(-50px)}60%{transform:translateY(20px)}to{transform:translateY(0)}}.cu-card-cover[data-v-bbdb83ff]{width:100%}.cu-card .content img[data-v-bbdb83ff]{width:33%;object-fit:cover}.cu-card-cover{width:100%}.cu-card .content img{width:33%;object-fit:cover}.cu-card.product.is-card[data-v-fd7d4356]{box-shadow:0 2px 12px #00000014!important;border:none!important}.cu-card.product .cu-item[data-v-fd7d4356]{transition:all .3s ease;cursor:pointer;border:none!important}.cu-card.product .cu-item[data-v-fd7d4356]:hover{transform:translateY(-4px);box-shadow:0 8px 24px #0000001f}.product-image[data-v-fd7d4356]{position:relative;width:100%;height:200px;overflow:hidden;border-radius:8px 8px 0 0}.product-image .bg-img[data-v-fd7d4356]{width:100%;height:100%;background-size:cover;background-position:center;transition:transform .3s ease}.cu-card.product .cu-item:hover .product-image .bg-img[data-v-fd7d4356]{transform:scale(1.05)}.product-badge[data-v-fd7d4356]{position:absolute;top:12px;left:12px;padding:4px 10px;border-radius:12px;font-size:11px;color:#fff;font-weight:600;box-shadow:0 2px 8px #0003;z-index:2}.product-discount[data-v-fd7d4356]{position:absolute;top:12px;right:12px;padding:4px 10px;background:linear-gradient(135deg,#ff6b6b,#ee5a6f);border-radius:12px;font-size:11px;color:#fff;font-weight:600;box-shadow:0 2px 8px #ff6b6b4d;z-index:2}.product-info[data-v-fd7d4356]{padding:16px}.product-title[data-v-fd7d4356]{font-size:15px;font-weight:600;color:#333;margin-bottom:8px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.product-subtitle[data-v-fd7d4356]{margin-bottom:10px;line-height:1.5;color:#666;font-size:13px}.product-price[data-v-fd7d4356]{display:flex;align-items:baseline;gap:8px;margin-bottom:12px}.price-current[data-v-fd7d4356]{font-size:20px;font-weight:700;color:#ff4757;letter-spacing:-.5px}.price-original[data-v-fd7d4356]{text-decoration:line-through;color:#999;font-size:13px}.product-tags[data-v-fd7d4356]{display:flex;gap:6px;margin-bottom:12px;flex-wrap:wrap}.product-tags .cu-tag[data-v-fd7d4356]{font-size:11px;padding:3px 8px;border-radius:10px;height:auto}.product-footer[data-v-fd7d4356]{display:flex;align-items:center;padding-top:12px;border-top:1px solid #f0f0f0;color:#888;font-size:12px}.product-footer span[data-v-fd7d4356]{display:inline-flex;align-items:center}.cu-card.profile.is-card[data-v-e849d1ac]{box-shadow:0 2px 12px #00000014!important;border:none!important}.cu-card.profile .cu-item[data-v-e849d1ac]{overflow:hidden;transition:all .3s ease;border:none!important}.cu-card.profile .cu-item[data-v-e849d1ac]:hover{box-shadow:0 8px 24px #0000001f}.profile-header[data-v-e849d1ac]{padding:32px 20px 24px;text-align:center;position:relative;background:linear-gradient(135deg,var(--bg-color-start, #667eea) 0%,var(--bg-color-end, #764ba2) 100%)}.profile-avatar[data-v-e849d1ac]{position:relative;display:inline-block;margin-bottom:14px}.profile-avatar .cu-avatar[data-v-e849d1ac]{box-shadow:0 4px 12px #0003;border:3px solid rgba(255,255,255,.3);transition:transform .3s ease}.cu-card.profile .cu-item:hover .profile-avatar .cu-avatar[data-v-e849d1ac]{transform:scale(1.05)}.profile-verified[data-v-e849d1ac]{position:absolute;bottom:2px;right:2px;width:26px;height:26px;background:linear-gradient(135deg,#4caf50,#45a049);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px;border:3px solid white;box-shadow:0 2px 8px #4caf5066}.profile-name[data-v-e849d1ac]{font-size:20px;font-weight:700;color:#fff;margin-bottom:8px;text-shadow:0 2px 4px rgba(0,0,0,.1)}.profile-title[data-v-e849d1ac]{opacity:.95;font-size:13px}.profile-content[data-v-e849d1ac]{padding:24px 16px}.profile-desc[data-v-e849d1ac]{margin-bottom:20px;line-height:1.7;text-align:center;color:#555;font-size:14px}.profile-stats[data-v-e849d1ac]{display:flex;justify-content:space-around;padding:20px 0;border-top:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0;margin-bottom:20px}.stat-item[data-v-e849d1ac]{text-align:center;cursor:pointer;flex:1;transition:transform .2s ease;padding:8px;border-radius:8px}.stat-item[data-v-e849d1ac]:hover{background:#f8f9fa;transform:translateY(-2px)}.stat-value[data-v-e849d1ac]{font-size:20px;font-weight:700;color:#333;margin-bottom:6px;line-height:1.2}.stat-label[data-v-e849d1ac]{font-size:13px;color:#666}.profile-tags[data-v-e849d1ac]{display:flex;gap:8px;margin-bottom:20px;justify-content:center;flex-wrap:wrap}.profile-tags .cu-tag[data-v-e849d1ac]{font-size:12px;padding:3px 12px;border-radius:12px;height:auto}.profile-actions[data-v-e849d1ac]{display:flex;gap:12px;justify-content:center}.profile-actions .cu-btn[data-v-e849d1ac]{min-width:100px;border-radius:20px;font-weight:600;transition:all .3s ease}.profile-actions .cu-btn[data-v-e849d1ac]:hover{transform:translateY(-2px);box-shadow:0 4px 12px #00000026}.profile-actions .cu-btn[class*=line][data-v-e849d1ac]:after{border:none!important}.stat-card[data-v-88732615]{padding:24px;border-radius:12px;position:relative;overflow:hidden;cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);box-shadow:0 4px 12px #0000001a;min-height:140px;display:flex;flex-direction:column;justify-content:space-between}.stat-card[data-v-88732615]:before{content:"";position:absolute;top:-50%;right:-50%;width:200%;height:200%;background:radial-gradient(circle,rgba(255,255,255,.1) 0%,transparent 70%);pointer-events:none}.stat-card[data-v-88732615]:hover{transform:translateY(-4px) scale(1.02);box-shadow:0 8px 24px #00000026}.stat-card[data-v-88732615]:after{content:"";position:absolute;z-index:-1;background-color:inherit;width:100%;height:100%;left:0;bottom:-12%;border-radius:8px;opacity:.25;transform:scale(.92);filter:blur(8px)}.stat-icon[data-v-88732615]{font-size:40px;color:#fff;opacity:.95;margin-bottom:16px;text-shadow:0 2px 8px rgba(0,0,0,.2);transition:transform .3s ease}.stat-card:hover .stat-icon[data-v-88732615]{transform:scale(1.1) rotate(5deg)}.stat-content[data-v-88732615]{color:#fff;z-index:1}.stat-value[data-v-88732615]{font-size:32px;font-weight:700;margin-bottom:6px;line-height:1.2;text-shadow:0 2px 4px rgba(0,0,0,.1);letter-spacing:-.5px}.stat-label[data-v-88732615]{font-size:14px;opacity:.95;margin-bottom:4px;font-weight:500}.stat-sublabel[data-v-88732615]{font-size:12px;opacity:.85;margin-top:4px}.stat-trend[data-v-88732615]{position:absolute;top:16px;right:16px;font-size:12px;font-weight:700;padding:6px 10px;border-radius:12px;background:#ffffff40;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);display:flex;align-items:center;gap:4px;box-shadow:0 2px 8px #0000001a;transition:all .3s ease}.stat-card:hover .stat-trend[data-v-88732615]{background:#ffffff59;transform:scale(1.1)}.trend-up[data-v-88732615]{color:#4caf50}.trend-down[data-v-88732615]{color:#ff5252}.cu-card.image.is-card[data-v-0c86f8a4]{box-shadow:0 2px 12px #00000014!important;border:none!important}.cu-card.image .cu-item[data-v-0c86f8a4]{transition:all .3s ease;cursor:pointer;overflow:hidden;border:none!important}.cu-card.image .cu-item[data-v-0c86f8a4]:hover{transform:translateY(-4px);box-shadow:0 8px 24px #0000001f}.image-card-header[data-v-0c86f8a4]{padding:14px 16px;border-bottom:1px solid #f0f0f0;background:#fafafa}.image-card-content[data-v-0c86f8a4]{position:relative;overflow:hidden}.bg-img[data-v-0c86f8a4]{width:100%;background-size:cover;background-position:center;transition:transform .5s ease}.cu-card.image .cu-item:hover .bg-img[data-v-0c86f8a4]{transform:scale(1.08)}.image-square[data-v-0c86f8a4]{height:220px}.image-wide[data-v-0c86f8a4]{height:180px}.image-tall[data-v-0c86f8a4]{height:320px}.image-overlay[data-v-0c86f8a4]{position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(135deg,#00000080,#0000004d);display:flex;align-items:center;justify-content:center;color:#fff;opacity:0;transition:opacity .3s ease}.cu-card.image .cu-item:hover .image-overlay[data-v-0c86f8a4]{opacity:1}.overlay-content[data-v-0c86f8a4]{display:flex;flex-direction:column;align-items:center;gap:10px;font-size:16px;font-weight:600;transform:translateY(10px);transition:transform .3s ease}.cu-card.image .cu-item:hover .overlay-content[data-v-0c86f8a4]{transform:translateY(0)}.overlay-content span[class*=cuIcon-][data-v-0c86f8a4]{font-size:36px;filter:drop-shadow(0 2px 4px rgba(0,0,0,.3))}.image-card-info[data-v-0c86f8a4]{padding:16px}.image-title[data-v-0c86f8a4]{font-size:16px;font-weight:600;color:#333;margin-bottom:8px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.image-desc[data-v-0c86f8a4]{line-height:1.6;color:#666;font-size:13px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.image-card-footer[data-v-0c86f8a4]{padding:12px 16px;display:flex;justify-content:space-between;align-items:center;border-top:1px solid #f0f0f0;background:#fafafa}.footer-left[data-v-0c86f8a4]{display:flex;align-items:center;gap:16px}.footer-left span[data-v-0c86f8a4]{display:inline-flex;align-items:center;color:#666;font-size:13px}.footer-action[data-v-0c86f8a4]{font-size:22px;color:#666;cursor:pointer;transition:all .3s ease;padding:4px;border-radius:50%;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.footer-action[data-v-0c86f8a4]:hover{background:#f0f0f0;color:#333;transform:scale(1.1)}.cu-bar .search-form input[data-v-bd9fd5b7]{border:none!important;outline:none!important}.cu-bar .search-form input[data-v-bd9fd5b7]:focus{border:none!important;outline:none!important}.string-list[data-v-3ba18203]{width:100%;display:block;list-style:none;background-color:#fff;padding:2px 5px;margin:0;box-shadow:0 4px 8px #0000001a}.string-list li[data-v-3ba18203]{line-height:1.5rem;padding:8px 12px;border-bottom:1px solid #eee;transition:background-color .3s,color .3s}.string-list li[data-v-3ba18203]:last-child{border-bottom:none}.string-list li[data-v-3ba18203]:hover{background-color:#f0f0f0;color:#333;cursor:pointer;border-radius:4px}.emoji-panel[data-v-e9a4aa4d]{background-color:#fff;border:1px solid #ccc;padding:10px;display:flex;flex-wrap:wrap;z-index:1000;height:280px;overflow-y:auto}.emoji-panel span[data-v-e9a4aa4d]{cursor:pointer;font-size:24px;margin:5px}.function-panel-container[data-v-3ef96b26]{background-color:#fff;box-sizing:border-box;width:100vw;border-top:1px solid #66666631}.function-panel[data-v-3ef96b26]{display:flex;flex-wrap:wrap;background-color:#fff;padding:10px;z-index:1000;max-width:360px;gap:18px;margin:0 auto}.function-item[data-v-3ef96b26]{display:flex;flex-direction:column;align-items:center;margin:10px 0;cursor:pointer;width:70px;height:70px;background-color:#f9f9f9;border-radius:10px;justify-content:center;transition:background-color .3s}.function-item[data-v-3ef96b26]:hover{background-color:#e6e6e6}.function-item span[data-v-3ef96b26]{margin-top:5px;font-size:14px;color:#333;text-align:center}.t-input-bar-container[data-v-5c0d8d64]{display:block;width:100%}input[data-v-5c0d8d64]:focus{outline:none}.cu-bar.input[data-v-5c0d8d64]{display:flex;align-items:center;background-color:#fff}.cu-bar.input .action[data-v-5c0d8d64]{display:flex;align-items:center;justify-content:center}.cu-bar.input input[data-v-5c0d8d64]{flex:1;border:none;background:transparent}.tab-content{padding:10px 16px;background:#fff}.reply-preview[data-v-2e628864]{background-color:#f5f5f5;border-left:3px solid #0081ff;padding:4px 8px;margin:4px 0;border-radius:2px;font-size:11px;color:#666;cursor:pointer;transition:background-color .2s;max-width:100%;overflow:hidden}.reply-preview[data-v-2e628864]:hover{background-color:#eee}.reply-content[data-v-2e628864]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-label[data-v-2e628864]{color:#0081ff;font-weight:700;margin-right:5px}.link-content[data-v-52c7eb4d]{padding:0;overflow:hidden;max-width:300px}.link-item[data-v-52c7eb4d]{display:flex;align-items:center;padding:12px;text-decoration:none;color:inherit;transition:background-color .2s}.link-item[data-v-52c7eb4d]:hover{background-color:#00000005}.link-icon[data-v-52c7eb4d]{flex-shrink:0;width:40px;height:40px;display:flex;align-items:center;justify-content:center;margin-right:12px;border-radius:6px;background:#f5f5f5}.emoji[data-v-52c7eb4d],.link-icon-font[data-v-52c7eb4d]{font-size:20px}.link-info[data-v-52c7eb4d]{flex:1;min-width:0}.link-title[data-v-52c7eb4d]{font-weight:500;font-size:14px;line-height:1.4;margin-bottom:4px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.link-url[data-v-52c7eb4d]{font-size:12px;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-content[data-v-52c7eb4d]{padding:16px;max-width:280px;position:relative;display:inline-block!important}.card-content[data-v-52c7eb4d]:after,.card-content[data-v-52c7eb4d]:before{display:none!important}.card-header[data-v-52c7eb4d]{display:flex;align-items:center;margin-bottom:8px}.card-emoji[data-v-52c7eb4d],.card-icon[data-v-52c7eb4d]{font-size:18px;margin-right:8px;flex-shrink:0}.card-title[data-v-52c7eb4d]{margin:0;font-size:16px;font-weight:600;color:#333;flex:1;min-width:0}.card-body[data-v-52c7eb4d]{font-size:14px;line-height:1.5;color:#666;margin-bottom:12px;word-wrap:break-word}.card-footer[data-v-52c7eb4d]{text-align:right;margin-top:8px}.card-link[data-v-52c7eb4d]{color:#1890ff;text-decoration:none;font-size:12px;display:inline-block}.card-link[data-v-52c7eb4d]:hover{text-decoration:underline}@media (max-width: 480px){.link-content[data-v-52c7eb4d],.card-content[data-v-52c7eb4d]{max-width:250px}.link-icon[data-v-52c7eb4d]{width:32px;height:32px;margin-right:8px}.emoji[data-v-52c7eb4d],.link-icon-font[data-v-52c7eb4d]{font-size:16px}.card-content[data-v-52c7eb4d]{padding:12px}}.loading-animation[data-v-e5a9ce26]{display:inline-flex;justify-content:center;align-items:center}canvas[data-v-e5a9ce26]{display:block;margin:0 auto;max-width:100%;max-height:100%}.slide-wrapper[data-v-392cb42c]{overflow:hidden;position:relative;width:100vw;height:100vh}.slide-list[data-v-392cb42c]{position:absolute;width:100%;transition:transform .3s ease}.slide-item[data-v-392cb42c]{position:absolute;width:100%}
|
|
1
|
+
.nav-list{display:flex;flex-wrap:wrap;padding:0 20px;justify-content:space-between}.nav-li{padding:15px;border-radius:6px;width:45%;margin:0 2.5% 20px;background-size:cover;background-position:center;position:relative;z-index:1;cursor:pointer}.nav-li:after{content:"";position:absolute;z-index:-1;background-color:inherit;width:100%;height:100%;left:0;bottom:-10%;border-radius:5px;opacity:.2;transform:scale(.9)}.nav-li.cur{color:#fff;background:#5eb95e;box-shadow:2px 2px 3px #5eb95e66}.nav-title{font-size:16px;font-weight:300}.nav-title:first-letter{font-size:20px;margin-right:2px}.nav-name{font-size:14px;text-transform:Capitalize;margin-top:10px;position:relative}.nav-name:before{content:"";position:absolute;display:block;width:20px;height:3px;background:#fff;bottom:0;right:0;opacity:.5}.nav-name:after{content:"";position:absolute;display:block;width:50px;height:1px;background:#fff;bottom:0;right:20px;opacity:.3}.nav-name:first-letter{font-weight:700;font-size:18px;margin-right:1px}.nav-li text{position:absolute;right:15px;top:15px;font-size:26px;width:30px;height:30px;text-align:center;line-height:30px}.text-light{font-weight:300}@keyframes show{0%{transform:translateY(-50px)}60%{transform:translateY(20px)}to{transform:translateY(0)}}@-webkit-keyframes show{0%{transform:translateY(-50px)}60%{transform:translateY(20px)}to{transform:translateY(0)}}.cu-card-cover[data-v-bbdb83ff]{width:100%}.cu-card .content img[data-v-bbdb83ff]{width:33%;object-fit:cover}.cu-card-cover{width:100%}.cu-card .content img{width:33%;object-fit:cover}.cu-card.product.is-card[data-v-fd7d4356]{box-shadow:0 2px 12px #00000014!important;border:none!important}.cu-card.product .cu-item[data-v-fd7d4356]{transition:all .3s ease;cursor:pointer;border:none!important}.cu-card.product .cu-item[data-v-fd7d4356]:hover{transform:translateY(-4px);box-shadow:0 8px 24px #0000001f}.product-image[data-v-fd7d4356]{position:relative;width:100%;height:200px;overflow:hidden;border-radius:8px 8px 0 0}.product-image .bg-img[data-v-fd7d4356]{width:100%;height:100%;background-size:cover;background-position:center;transition:transform .3s ease}.cu-card.product .cu-item:hover .product-image .bg-img[data-v-fd7d4356]{transform:scale(1.05)}.product-badge[data-v-fd7d4356]{position:absolute;top:12px;left:12px;padding:4px 10px;border-radius:12px;font-size:11px;color:#fff;font-weight:600;box-shadow:0 2px 8px #0003;z-index:2}.product-discount[data-v-fd7d4356]{position:absolute;top:12px;right:12px;padding:4px 10px;background:linear-gradient(135deg,#ff6b6b,#ee5a6f);border-radius:12px;font-size:11px;color:#fff;font-weight:600;box-shadow:0 2px 8px #ff6b6b4d;z-index:2}.product-info[data-v-fd7d4356]{padding:16px}.product-title[data-v-fd7d4356]{font-size:15px;font-weight:600;color:#333;margin-bottom:8px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.product-subtitle[data-v-fd7d4356]{margin-bottom:10px;line-height:1.5;color:#666;font-size:13px}.product-price[data-v-fd7d4356]{display:flex;align-items:baseline;gap:8px;margin-bottom:12px}.price-current[data-v-fd7d4356]{font-size:20px;font-weight:700;color:#ff4757;letter-spacing:-.5px}.price-original[data-v-fd7d4356]{text-decoration:line-through;color:#999;font-size:13px}.product-tags[data-v-fd7d4356]{display:flex;gap:6px;margin-bottom:12px;flex-wrap:wrap}.product-tags .cu-tag[data-v-fd7d4356]{font-size:11px;padding:3px 8px;border-radius:10px;height:auto}.product-footer[data-v-fd7d4356]{display:flex;align-items:center;padding-top:12px;border-top:1px solid #f0f0f0;color:#888;font-size:12px}.product-footer span[data-v-fd7d4356]{display:inline-flex;align-items:center}.cu-card.profile.is-card[data-v-e849d1ac]{box-shadow:0 2px 12px #00000014!important;border:none!important}.cu-card.profile .cu-item[data-v-e849d1ac]{overflow:hidden;transition:all .3s ease;border:none!important}.cu-card.profile .cu-item[data-v-e849d1ac]:hover{box-shadow:0 8px 24px #0000001f}.profile-header[data-v-e849d1ac]{padding:32px 20px 24px;text-align:center;position:relative;background:linear-gradient(135deg,var(--bg-color-start, #667eea) 0%,var(--bg-color-end, #764ba2) 100%)}.profile-avatar[data-v-e849d1ac]{position:relative;display:inline-block;margin-bottom:14px}.profile-avatar .cu-avatar[data-v-e849d1ac]{box-shadow:0 4px 12px #0003;border:3px solid rgba(255,255,255,.3);transition:transform .3s ease}.cu-card.profile .cu-item:hover .profile-avatar .cu-avatar[data-v-e849d1ac]{transform:scale(1.05)}.profile-verified[data-v-e849d1ac]{position:absolute;bottom:2px;right:2px;width:26px;height:26px;background:linear-gradient(135deg,#4caf50,#45a049);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px;border:3px solid white;box-shadow:0 2px 8px #4caf5066}.profile-name[data-v-e849d1ac]{font-size:20px;font-weight:700;color:#fff;margin-bottom:8px;text-shadow:0 2px 4px rgba(0,0,0,.1)}.profile-title[data-v-e849d1ac]{opacity:.95;font-size:13px}.profile-content[data-v-e849d1ac]{padding:24px 16px}.profile-desc[data-v-e849d1ac]{margin-bottom:20px;line-height:1.7;text-align:center;color:#555;font-size:14px}.profile-stats[data-v-e849d1ac]{display:flex;justify-content:space-around;padding:20px 0;border-top:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0;margin-bottom:20px}.stat-item[data-v-e849d1ac]{text-align:center;cursor:pointer;flex:1;transition:transform .2s ease;padding:8px;border-radius:8px}.stat-item[data-v-e849d1ac]:hover{background:#f8f9fa;transform:translateY(-2px)}.stat-value[data-v-e849d1ac]{font-size:20px;font-weight:700;color:#333;margin-bottom:6px;line-height:1.2}.stat-label[data-v-e849d1ac]{font-size:13px;color:#666}.profile-tags[data-v-e849d1ac]{display:flex;gap:8px;margin-bottom:20px;justify-content:center;flex-wrap:wrap}.profile-tags .cu-tag[data-v-e849d1ac]{font-size:12px;padding:3px 12px;border-radius:12px;height:auto}.profile-actions[data-v-e849d1ac]{display:flex;gap:12px;justify-content:center}.profile-actions .cu-btn[data-v-e849d1ac]{min-width:100px;border-radius:20px;font-weight:600;transition:all .3s ease}.profile-actions .cu-btn[data-v-e849d1ac]:hover{transform:translateY(-2px);box-shadow:0 4px 12px #00000026}.profile-actions .cu-btn[class*=line][data-v-e849d1ac]:after{border:none!important}.stat-card[data-v-88732615]{padding:24px;border-radius:12px;position:relative;overflow:hidden;cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);box-shadow:0 4px 12px #0000001a;min-height:140px;display:flex;flex-direction:column;justify-content:space-between}.stat-card[data-v-88732615]:before{content:"";position:absolute;top:-50%;right:-50%;width:200%;height:200%;background:radial-gradient(circle,rgba(255,255,255,.1) 0%,transparent 70%);pointer-events:none}.stat-card[data-v-88732615]:hover{transform:translateY(-4px) scale(1.02);box-shadow:0 8px 24px #00000026}.stat-card[data-v-88732615]:after{content:"";position:absolute;z-index:-1;background-color:inherit;width:100%;height:100%;left:0;bottom:-12%;border-radius:8px;opacity:.25;transform:scale(.92);filter:blur(8px)}.stat-icon[data-v-88732615]{font-size:40px;color:#fff;opacity:.95;margin-bottom:16px;text-shadow:0 2px 8px rgba(0,0,0,.2);transition:transform .3s ease}.stat-card:hover .stat-icon[data-v-88732615]{transform:scale(1.1) rotate(5deg)}.stat-content[data-v-88732615]{color:#fff;z-index:1}.stat-value[data-v-88732615]{font-size:32px;font-weight:700;margin-bottom:6px;line-height:1.2;text-shadow:0 2px 4px rgba(0,0,0,.1);letter-spacing:-.5px}.stat-label[data-v-88732615]{font-size:14px;opacity:.95;margin-bottom:4px;font-weight:500}.stat-sublabel[data-v-88732615]{font-size:12px;opacity:.85;margin-top:4px}.stat-trend[data-v-88732615]{position:absolute;top:16px;right:16px;font-size:12px;font-weight:700;padding:6px 10px;border-radius:12px;background:#ffffff40;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);display:flex;align-items:center;gap:4px;box-shadow:0 2px 8px #0000001a;transition:all .3s ease}.stat-card:hover .stat-trend[data-v-88732615]{background:#ffffff59;transform:scale(1.1)}.trend-up[data-v-88732615]{color:#4caf50}.trend-down[data-v-88732615]{color:#ff5252}.cu-card.image.is-card[data-v-0c86f8a4]{box-shadow:0 2px 12px #00000014!important;border:none!important}.cu-card.image .cu-item[data-v-0c86f8a4]{transition:all .3s ease;cursor:pointer;overflow:hidden;border:none!important}.cu-card.image .cu-item[data-v-0c86f8a4]:hover{transform:translateY(-4px);box-shadow:0 8px 24px #0000001f}.image-card-header[data-v-0c86f8a4]{padding:14px 16px;border-bottom:1px solid #f0f0f0;background:#fafafa}.image-card-content[data-v-0c86f8a4]{position:relative;overflow:hidden}.bg-img[data-v-0c86f8a4]{width:100%;background-size:cover;background-position:center;transition:transform .5s ease}.cu-card.image .cu-item:hover .bg-img[data-v-0c86f8a4]{transform:scale(1.08)}.image-square[data-v-0c86f8a4]{height:220px}.image-wide[data-v-0c86f8a4]{height:180px}.image-tall[data-v-0c86f8a4]{height:320px}.image-overlay[data-v-0c86f8a4]{position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(135deg,#00000080,#0000004d);display:flex;align-items:center;justify-content:center;color:#fff;opacity:0;transition:opacity .3s ease}.cu-card.image .cu-item:hover .image-overlay[data-v-0c86f8a4]{opacity:1}.overlay-content[data-v-0c86f8a4]{display:flex;flex-direction:column;align-items:center;gap:10px;font-size:16px;font-weight:600;transform:translateY(10px);transition:transform .3s ease}.cu-card.image .cu-item:hover .overlay-content[data-v-0c86f8a4]{transform:translateY(0)}.overlay-content span[class*=cuIcon-][data-v-0c86f8a4]{font-size:36px;filter:drop-shadow(0 2px 4px rgba(0,0,0,.3))}.image-card-info[data-v-0c86f8a4]{padding:16px}.image-title[data-v-0c86f8a4]{font-size:16px;font-weight:600;color:#333;margin-bottom:8px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.image-desc[data-v-0c86f8a4]{line-height:1.6;color:#666;font-size:13px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.image-card-footer[data-v-0c86f8a4]{padding:12px 16px;display:flex;justify-content:space-between;align-items:center;border-top:1px solid #f0f0f0;background:#fafafa}.footer-left[data-v-0c86f8a4]{display:flex;align-items:center;gap:16px}.footer-left span[data-v-0c86f8a4]{display:inline-flex;align-items:center;color:#666;font-size:13px}.footer-action[data-v-0c86f8a4]{font-size:22px;color:#666;cursor:pointer;transition:all .3s ease;padding:4px;border-radius:50%;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.footer-action[data-v-0c86f8a4]:hover{background:#f0f0f0;color:#333;transform:scale(1.1)}.tabbar .action{min-width:50px!important}.cu-bar .search-form input[data-v-bd9fd5b7]{border:none!important;outline:none!important}.cu-bar .search-form input[data-v-bd9fd5b7]:focus{border:none!important;outline:none!important}.string-list[data-v-3ba18203]{width:100%;display:block;list-style:none;background-color:#fff;padding:2px 5px;margin:0;box-shadow:0 4px 8px #0000001a}.string-list li[data-v-3ba18203]{line-height:1.5rem;padding:8px 12px;border-bottom:1px solid #eee;transition:background-color .3s,color .3s}.string-list li[data-v-3ba18203]:last-child{border-bottom:none}.string-list li[data-v-3ba18203]:hover{background-color:#f0f0f0;color:#333;cursor:pointer;border-radius:4px}.emoji-panel[data-v-e9a4aa4d]{background-color:#fff;border:1px solid #ccc;padding:10px;display:flex;flex-wrap:wrap;z-index:1000;height:280px;overflow-y:auto}.emoji-panel span[data-v-e9a4aa4d]{cursor:pointer;font-size:24px;margin:5px}.function-panel-container[data-v-3ef96b26]{background-color:#fff;box-sizing:border-box;width:100vw;border-top:1px solid #66666631}.function-panel[data-v-3ef96b26]{display:flex;flex-wrap:wrap;background-color:#fff;padding:10px;z-index:1000;max-width:360px;gap:18px;margin:0 auto}.function-item[data-v-3ef96b26]{display:flex;flex-direction:column;align-items:center;margin:10px 0;cursor:pointer;width:70px;height:70px;background-color:#f9f9f9;border-radius:10px;justify-content:center;transition:background-color .3s}.function-item[data-v-3ef96b26]:hover{background-color:#e6e6e6}.function-item span[data-v-3ef96b26]{margin-top:5px;font-size:14px;color:#333;text-align:center}.t-input-bar-container[data-v-5c0d8d64]{display:block;width:100%}input[data-v-5c0d8d64]:focus{outline:none}.cu-bar.input[data-v-5c0d8d64]{display:flex;align-items:center;background-color:#fff}.cu-bar.input .action[data-v-5c0d8d64]{display:flex;align-items:center;justify-content:center}.cu-bar.input input[data-v-5c0d8d64]{flex:1;border:none;background:transparent}.tab-content{padding:10px 16px;background:#fff}.reply-preview[data-v-2e628864]{background-color:#f5f5f5;border-left:3px solid #0081ff;padding:4px 8px;margin:4px 0;border-radius:2px;font-size:11px;color:#666;cursor:pointer;transition:background-color .2s;max-width:100%;overflow:hidden}.reply-preview[data-v-2e628864]:hover{background-color:#eee}.reply-content[data-v-2e628864]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-label[data-v-2e628864]{color:#0081ff;font-weight:700;margin-right:5px}.link-content[data-v-52c7eb4d]{padding:0;overflow:hidden;max-width:300px}.link-item[data-v-52c7eb4d]{display:flex;align-items:center;padding:12px;text-decoration:none;color:inherit;transition:background-color .2s}.link-item[data-v-52c7eb4d]:hover{background-color:#00000005}.link-icon[data-v-52c7eb4d]{flex-shrink:0;width:40px;height:40px;display:flex;align-items:center;justify-content:center;margin-right:12px;border-radius:6px;background:#f5f5f5}.emoji[data-v-52c7eb4d],.link-icon-font[data-v-52c7eb4d]{font-size:20px}.link-info[data-v-52c7eb4d]{flex:1;min-width:0}.link-title[data-v-52c7eb4d]{font-weight:500;font-size:14px;line-height:1.4;margin-bottom:4px;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.link-url[data-v-52c7eb4d]{font-size:12px;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-content[data-v-52c7eb4d]{padding:16px;max-width:280px;position:relative;display:inline-block!important}.card-content[data-v-52c7eb4d]:after,.card-content[data-v-52c7eb4d]:before{display:none!important}.card-header[data-v-52c7eb4d]{display:flex;align-items:center;margin-bottom:8px}.card-emoji[data-v-52c7eb4d],.card-icon[data-v-52c7eb4d]{font-size:18px;margin-right:8px;flex-shrink:0}.card-title[data-v-52c7eb4d]{margin:0;font-size:16px;font-weight:600;color:#333;flex:1;min-width:0}.card-body[data-v-52c7eb4d]{font-size:14px;line-height:1.5;color:#666;margin-bottom:12px;word-wrap:break-word}.card-footer[data-v-52c7eb4d]{text-align:right;margin-top:8px}.card-link[data-v-52c7eb4d]{color:#1890ff;text-decoration:none;font-size:12px;display:inline-block}.card-link[data-v-52c7eb4d]:hover{text-decoration:underline}@media (max-width: 480px){.link-content[data-v-52c7eb4d],.card-content[data-v-52c7eb4d]{max-width:250px}.link-icon[data-v-52c7eb4d]{width:32px;height:32px;margin-right:8px}.emoji[data-v-52c7eb4d],.link-icon-font[data-v-52c7eb4d]{font-size:16px}.card-content[data-v-52c7eb4d]{padding:12px}}.loading-animation[data-v-e5a9ce26]{display:inline-flex;justify-content:center;align-items:center}canvas[data-v-e5a9ce26]{display:block;margin:0 auto;max-width:100%;max-height:100%}.slide-wrapper[data-v-392cb42c]{overflow:hidden;position:relative;width:100vw;height:100vh}.slide-list[data-v-392cb42c]{position:absolute;width:100%;transition:transform .3s ease}.slide-item[data-v-392cb42c]{position:absolute;width:100%}
|
package/package.json
CHANGED
package/docs/README.md
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# vue-color-ui 文档
|
|
2
|
-
|
|
3
|
-
欢迎使用 `vue-color-ui` 组件库文档。这里包含了所有组件的详细使用说明。
|
|
4
|
-
|
|
5
|
-
## 📚 文档导航
|
|
6
|
-
|
|
7
|
-
### 快速开始
|
|
8
|
-
|
|
9
|
-
- [安装指南](#安装)
|
|
10
|
-
- [Nuxt 3 快速开始](#nuxt-3-快速开始)
|
|
11
|
-
- [基本使用](#基本使用)
|
|
12
|
-
|
|
13
|
-
### 指南
|
|
14
|
-
|
|
15
|
-
- [颜色系统](./guides/colors.md) - 了解颜色和渐变的使用
|
|
16
|
-
|
|
17
|
-
### 组件文档
|
|
18
|
-
|
|
19
|
-
#### 基础组件
|
|
20
|
-
|
|
21
|
-
- [TIcon](./components/TIcon.md) - 图标组件
|
|
22
|
-
- [TTitle](./components/TTitle.md) - 标题组件
|
|
23
|
-
- [TAvatar](./components/TAvatar.md) - 头像组件
|
|
24
|
-
- [TAvatarGroup](./components/TAvatarGroup.md) - 头像组组件
|
|
25
|
-
- [TButton](./components/TButton.md) - 按钮组件
|
|
26
|
-
- [TTag](./components/TTag.md) - 标签组件
|
|
27
|
-
|
|
28
|
-
#### 导航组件
|
|
29
|
-
|
|
30
|
-
- [TNavBar](./components/TNavBar.md) - 导航栏组件
|
|
31
|
-
- [TTopBar](./components/TTopBar.md) - 顶部操作条
|
|
32
|
-
- [TTabs](./components/TTabs.md) - 标签页组件
|
|
33
|
-
- [TTab](./components/TTab.md) - 标签页子组件
|
|
34
|
-
|
|
35
|
-
#### 卡片组件
|
|
36
|
-
|
|
37
|
-
- [TNavCard](./components/TNavCard.md) - 导航卡片
|
|
38
|
-
- [TNewCard](./components/TNewCard.md) - 新闻卡片
|
|
39
|
-
- [TShareCard](./components/TShareCard.md) - 分享卡片
|
|
40
|
-
- [TImageCard](./components/TImageCard.md) - 图片卡片
|
|
41
|
-
- [TProductCard](./components/TProductCard.md) - 商品卡片
|
|
42
|
-
- [TProfileCard](./components/TProfileCard.md) - 个人资料卡片
|
|
43
|
-
- [TStatCard](./components/TStatCard.md) - 统计卡片
|
|
44
|
-
|
|
45
|
-
#### 表单组件
|
|
46
|
-
|
|
47
|
-
- [TSearchBar](./components/TSearchBar.md) - 搜索栏
|
|
48
|
-
- [TInputBar](./components/TInputBar.md) - 输入栏
|
|
49
|
-
|
|
50
|
-
#### 聊天组件
|
|
51
|
-
|
|
52
|
-
- [ChatList](./components/ChatList.md) - 聊天列表
|
|
53
|
-
- [ChatRoom](./components/ChatRoom.md) - 聊天室
|
|
54
|
-
|
|
55
|
-
#### 布局组件
|
|
56
|
-
|
|
57
|
-
- [GridGroup](./components/GridGroup.md) - 网格组
|
|
58
|
-
- [Menu](./components/Menu.md) - 菜单组件
|
|
59
|
-
|
|
60
|
-
#### 高级组件
|
|
61
|
-
|
|
62
|
-
- [TVirtualScrollSlide](./components/TVirtualScrollSlide.md) - 虚拟滚动滑动组件
|
|
63
|
-
- [TimeLine](./components/TimeLine.md) - 时间轴组件
|
|
64
|
-
- [TSteps](./components/TSteps.md) - 步骤条组件
|
|
65
|
-
- [DrawerModal](./components/DrawerModal.md) - 抽屉模态框
|
|
66
|
-
- [Loading](./components/Loading.md) - 加载动画组件
|
|
67
|
-
|
|
68
|
-
## 安装
|
|
69
|
-
|
|
70
|
-
使用 npm 安装 `vue-color-ui`:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
npm install vue-color-ui
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Nuxt 3 快速开始
|
|
77
|
-
|
|
78
|
-
在 Nuxt 3 项目中快速配置 `vue-color-ui`:
|
|
79
|
-
|
|
80
|
-
1. 创建插件文件 `plugins/vue-color-ui.ts`:
|
|
81
|
-
|
|
82
|
-
```typescript
|
|
83
|
-
import TempColorUI from "vue-color-ui";
|
|
84
|
-
import "vue-color-ui/lib/style.css";
|
|
85
|
-
import "vue-color-ui/lib/css/main.css";
|
|
86
|
-
import "vue-color-ui/lib/css/animation.css";
|
|
87
|
-
import "vue-color-ui/lib/css/icon.css";
|
|
88
|
-
|
|
89
|
-
export default defineNuxtPlugin((app) => {
|
|
90
|
-
app.vueApp.use(TempColorUI);
|
|
91
|
-
});
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## 基本使用
|
|
95
|
-
|
|
96
|
-
在你的 Vue 组件中,你可以直接使用 `vue-color-ui` 提供的组件。例如:
|
|
97
|
-
|
|
98
|
-
```vue
|
|
99
|
-
<template>
|
|
100
|
-
<TNavBar :items="navItems" />
|
|
101
|
-
</template>
|
|
102
|
-
|
|
103
|
-
<script setup>
|
|
104
|
-
const navItems = [
|
|
105
|
-
{ icon: "homefill", label: "首页" },
|
|
106
|
-
{ icon: "similar", label: "分类" },
|
|
107
|
-
{ img: "https://ossweb-img.qq.com/images/lol/img/champion/Morgana.png", label: "积分" },
|
|
108
|
-
{ icon: "cart", label: "购物车", badge: 99 },
|
|
109
|
-
{ icon: "my", label: "我的" }
|
|
110
|
-
];
|
|
111
|
-
</script>
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## 贡献
|
|
115
|
-
|
|
116
|
-
这个项目是一个临时解决方案,等原作者更新了之后再决定是否继续维护。如果你有任何建议或发现任何问题,欢迎提交 issue 或 pull request。
|
|
117
|
-
|
|
118
|
-
## 许可证
|
|
119
|
-
|
|
120
|
-
[MIT](../LICENSE)
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
# ChatList 组件
|
|
2
|
-
|
|
3
|
-
`ChatList` 组件用于展示一个聊天列表,其中每一项都是一个 `ChatListItem`。该组件支持显示用户信息、未读消息数、消息内容等,并允许自定义头像、标签和各种状态。
|
|
4
|
-
|
|
5
|
-
## 属性
|
|
6
|
-
|
|
7
|
-
### ChatList属性
|
|
8
|
-
|
|
9
|
-
| 属性名 | 类型 | 默认值 | 描述 |
|
|
10
|
-
| --- | --- | --- | --- |
|
|
11
|
-
| `items` | `ChatListItemOption[]` | `[]` | 聊天列表项的数组,每个项包含用户信息、时间、未读消息数等 |
|
|
12
|
-
|
|
13
|
-
### ChatListItemOption属性
|
|
14
|
-
|
|
15
|
-
| 属性名 | 类型 | 默认值 | 描述 |
|
|
16
|
-
| --- | --- | --- | --- |
|
|
17
|
-
| `userinfo` | `object` | `{}` | 用户信息对象,包含头像、名称、标签等 |
|
|
18
|
-
| `userinfo.avatar` | `string` | `''` | 用户头像的URL |
|
|
19
|
-
| `userinfo.avatarShape` | `string` | `'circle'` | 头像形状,可选值:`'circle'`、`'square'` |
|
|
20
|
-
| `userinfo.name` | `string` | `''` | 用户名称 |
|
|
21
|
-
| `userinfo.tag` | `string` | `''` | 用户标签 |
|
|
22
|
-
| `userinfo.tagColor` | `string` | `'grey'` | 标签颜色 |
|
|
23
|
-
| `time` | `string` | `''` | 消息时间 |
|
|
24
|
-
| `roomId` | `string` | `''` | 聊天室ID |
|
|
25
|
-
| `roomName` | `string` | `''` | 聊天室名称 |
|
|
26
|
-
| `avatarName` | `string` | `'friendfill'` | 默认头像图标名称 |
|
|
27
|
-
| `avatarBg` | `string` | `'grey'` | 头像背景颜色 |
|
|
28
|
-
| `unread` | `string\|number` | `''` | 未读消息数 |
|
|
29
|
-
| `unreadColor` | `string` | `'red'` | 未读消息数标签颜色 |
|
|
30
|
-
| `badge` | `string` | `''` | 徽章内容 |
|
|
31
|
-
| `icon` | `string` | `''` | 图标名称 |
|
|
32
|
-
| `iconClass` | `string` | `''` | 图标样式类名 |
|
|
33
|
-
| `isDisconnected` | `boolean` | `false` | 是否断开连接 |
|
|
34
|
-
| `isCurrent` | `boolean` | `false` | 是否当前选中项 |
|
|
35
|
-
| `content` | `string` | `''` | 消息内容 |
|
|
36
|
-
| `event` | `Function` | `() => {}` | 点击事件回调函数 |
|
|
37
|
-
|
|
38
|
-
## 示例
|
|
39
|
-
|
|
40
|
-
### 示例 1: 基本使用
|
|
41
|
-
|
|
42
|
-
```vue
|
|
43
|
-
<template>
|
|
44
|
-
<ChatList :items="chatItems" />
|
|
45
|
-
</template>
|
|
46
|
-
|
|
47
|
-
<script setup>
|
|
48
|
-
const chatItems = [
|
|
49
|
-
{
|
|
50
|
-
userinfo: {
|
|
51
|
-
avatar: "https://example.com/avatar1.jpg",
|
|
52
|
-
name: "用户1",
|
|
53
|
-
tag: "VIP",
|
|
54
|
-
tagColor: "red"
|
|
55
|
-
},
|
|
56
|
-
time: "10:30 AM",
|
|
57
|
-
unread: 2,
|
|
58
|
-
content: "Hello, how are you?",
|
|
59
|
-
event: (item) => console.log('Clicked on:', item)
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
userinfo: {
|
|
63
|
-
avatar: "https://example.com/avatar2.jpg",
|
|
64
|
-
name: "用户2"
|
|
65
|
-
},
|
|
66
|
-
isDisconnected: true,
|
|
67
|
-
content: "Disconnected"
|
|
68
|
-
}
|
|
69
|
-
];
|
|
70
|
-
</script>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### 示例 2: 自定义头像和标签
|
|
74
|
-
|
|
75
|
-
```vue
|
|
76
|
-
<template>
|
|
77
|
-
<ChatList :items="customChatItems" />
|
|
78
|
-
</template>
|
|
79
|
-
|
|
80
|
-
<script setup>
|
|
81
|
-
const customChatItems = [
|
|
82
|
-
{
|
|
83
|
-
userinfo: {
|
|
84
|
-
avatar: "https://example.com/avatar3.jpg",
|
|
85
|
-
avatarShape: "square",
|
|
86
|
-
name: "用户3",
|
|
87
|
-
tag: "New",
|
|
88
|
-
tagColor: "blue"
|
|
89
|
-
},
|
|
90
|
-
time: "Yesterday",
|
|
91
|
-
unread: 5,
|
|
92
|
-
unreadColor: "green",
|
|
93
|
-
content: "New message received"
|
|
94
|
-
}
|
|
95
|
-
];
|
|
96
|
-
</script>
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### 示例 3: 带徽章和图标的聊天项
|
|
100
|
-
|
|
101
|
-
```vue
|
|
102
|
-
<template>
|
|
103
|
-
<ChatList :items="badgeChatItems" />
|
|
104
|
-
</template>
|
|
105
|
-
|
|
106
|
-
<script setup>
|
|
107
|
-
const badgeChatItems = [
|
|
108
|
-
{
|
|
109
|
-
userinfo: {
|
|
110
|
-
avatar: "https://example.com/avatar4.jpg",
|
|
111
|
-
name: "用户4"
|
|
112
|
-
},
|
|
113
|
-
badge: "Admin",
|
|
114
|
-
icon: "settings",
|
|
115
|
-
iconClass: "custom-icon-class",
|
|
116
|
-
content: "System settings updated"
|
|
117
|
-
}
|
|
118
|
-
];
|
|
119
|
-
</script>
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### 示例 4: 使用回调函数处理点击事件
|
|
123
|
-
|
|
124
|
-
```vue
|
|
125
|
-
<template>
|
|
126
|
-
<ChatList :items="clickableChatItems" />
|
|
127
|
-
</template>
|
|
128
|
-
|
|
129
|
-
<script setup>
|
|
130
|
-
const clickableChatItems = [
|
|
131
|
-
{
|
|
132
|
-
userinfo: {
|
|
133
|
-
avatar: "https://example.com/avatar5.jpg",
|
|
134
|
-
name: "用户5"
|
|
135
|
-
},
|
|
136
|
-
content: "Click me!",
|
|
137
|
-
event: (item) => alert('Clicked on: ' + item.userinfo.name)
|
|
138
|
-
}
|
|
139
|
-
];
|
|
140
|
-
</script>
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## 属性类型定义
|
|
144
|
-
|
|
145
|
-
### `ChatListItemOption`
|
|
146
|
-
|
|
147
|
-
`ChatListItemOption` 是一个对象类型,包含以下属性:
|
|
148
|
-
|
|
149
|
-
| 属性名 | 类型 | 描述 |
|
|
150
|
-
| --- | --- | --- |
|
|
151
|
-
| `userinfo` | `object` | 用户信息对象,包含头像、名称、标签等 |
|
|
152
|
-
| `userinfo.avatar` | `string` | 用户头像的URL |
|
|
153
|
-
| `userinfo.avatarShape` | `string` | 头像形状,可选值:`'circle'`、`'square'` |
|
|
154
|
-
| `userinfo.name` | `string` | 用户名称 |
|
|
155
|
-
| `userinfo.tag` | `string` | 用户标签 |
|
|
156
|
-
| `userinfo.tagColor` | `string` | 标签颜色 |
|
|
157
|
-
| `time` | `string` | 消息时间 |
|
|
158
|
-
| `roomId` | `string` | 聊天室ID |
|
|
159
|
-
| `roomName` | `string` | 聊天室名称 |
|
|
160
|
-
| `avatarName` | `string` | 默认头像图标名称 |
|
|
161
|
-
| `avatarBg` | `string` | 头像背景颜色 |
|
|
162
|
-
| `unread` | `string\|number` | 未读消息数 |
|
|
163
|
-
| `unreadColor` | `string` | 未读消息数标签颜色 |
|
|
164
|
-
| `badge` | `string` | 徽章内容 |
|
|
165
|
-
| `icon` | `string` | 图标名称 |
|
|
166
|
-
| `iconClass` | `string` | 图标样式类名 |
|
|
167
|
-
| `isDisconnected` | `boolean` | 是否断开连接 |
|
|
168
|
-
| `isCurrent` | `boolean` | 是否当前选中项 |
|
|
169
|
-
| `content` | `string` | 消息内容 |
|
|
170
|
-
| `event` | `Function` | 点击事件回调函数 |
|
|
171
|
-
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
# ChatRoom 组件
|
|
2
|
-
|
|
3
|
-
`ChatRoom` 是一个聊天室组件,用于展示聊天消息列表,支持多种消息类型。
|
|
4
|
-
|
|
5
|
-
## 属性
|
|
6
|
-
|
|
7
|
-
| 属性名 | 类型 | 默认值 | 描述 |
|
|
8
|
-
| ---------- | --------------- | ------ | ---------- |
|
|
9
|
-
| `messages` | `ChatMessage[]` | `[]` | 消息数组 |
|
|
10
|
-
|
|
11
|
-
### ChatMessage 类型
|
|
12
|
-
|
|
13
|
-
| 属性名 | 类型 | 描述 |
|
|
14
|
-
| --------- | ------------------------------------------------------------ | -------------- |
|
|
15
|
-
| `id` | `number` | 消息ID(必填) |
|
|
16
|
-
| `type` | `"text" \| "image" \| "audio" \| "location" \| "info" \| "markdown" \| "card" \| "link" \| string` | 消息类型 |
|
|
17
|
-
| `content` | `string` | 消息内容 |
|
|
18
|
-
| `date` | `string` | 消息时间 |
|
|
19
|
-
| `self` | `boolean` | 是否自己发送 |
|
|
20
|
-
| `avatar` | `string` | 头像URL |
|
|
21
|
-
| `url` | `string` | 链接URL(link/card类型) |
|
|
22
|
-
| `title` | `string` | 标题(link/card类型) |
|
|
23
|
-
| `emoji` | `string` | 表情(link/card类型) |
|
|
24
|
-
| `icon` | `string` | 图标名称(link/card类型) |
|
|
25
|
-
| `iconColor` | `string` | 图标颜色(link/card类型) |
|
|
26
|
-
|
|
27
|
-
## 插槽
|
|
28
|
-
|
|
29
|
-
| 插槽名 | 参数 | 描述 |
|
|
30
|
-
| ---------------- | ----------------- | -------------- |
|
|
31
|
-
| `custom-message` | `{ message }` | 自定义消息类型 |
|
|
32
|
-
|
|
33
|
-
## 消息类型
|
|
34
|
-
|
|
35
|
-
### text - 文本消息
|
|
36
|
-
普通文本消息
|
|
37
|
-
|
|
38
|
-
### image - 图片消息
|
|
39
|
-
图片消息(当前版本暂未实现显示)
|
|
40
|
-
|
|
41
|
-
### audio - 音频消息
|
|
42
|
-
音频消息,显示音频时长
|
|
43
|
-
|
|
44
|
-
### location - 位置消息
|
|
45
|
-
位置消息,显示位置信息
|
|
46
|
-
|
|
47
|
-
### info - 信息消息
|
|
48
|
-
系统信息消息,如"对方撤回一条消息"
|
|
49
|
-
|
|
50
|
-
### warning - 警告消息
|
|
51
|
-
警告类型的消息
|
|
52
|
-
|
|
53
|
-
### markdown - Markdown消息
|
|
54
|
-
Markdown格式的消息(需自定义渲染)
|
|
55
|
-
|
|
56
|
-
### card - 卡片消息
|
|
57
|
-
卡片类型的消息,包含标题、描述、链接等
|
|
58
|
-
|
|
59
|
-
### link - 链接消息
|
|
60
|
-
链接类型的消息,显示链接预览
|
|
61
|
-
|
|
62
|
-
## 示例
|
|
63
|
-
|
|
64
|
-
### 基本使用
|
|
65
|
-
|
|
66
|
-
```vue
|
|
67
|
-
<template>
|
|
68
|
-
<ChatRoom :messages="messages" />
|
|
69
|
-
</template>
|
|
70
|
-
|
|
71
|
-
<script setup>
|
|
72
|
-
const messages = [
|
|
73
|
-
{
|
|
74
|
-
id: 1,
|
|
75
|
-
type: "text",
|
|
76
|
-
content: "你好!",
|
|
77
|
-
date: "10:30",
|
|
78
|
-
self: true,
|
|
79
|
-
avatar: "https://example.com/avatar1.jpg"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
id: 2,
|
|
83
|
-
type: "text",
|
|
84
|
-
content: "你好,有什么可以帮助你的吗?",
|
|
85
|
-
date: "10:31",
|
|
86
|
-
self: false,
|
|
87
|
-
avatar: "https://example.com/avatar2.jpg"
|
|
88
|
-
}
|
|
89
|
-
];
|
|
90
|
-
</script>
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### 多种消息类型
|
|
94
|
-
|
|
95
|
-
```vue
|
|
96
|
-
<template>
|
|
97
|
-
<ChatRoom :messages="messages" />
|
|
98
|
-
</template>
|
|
99
|
-
|
|
100
|
-
<script setup>
|
|
101
|
-
const messages = [
|
|
102
|
-
{
|
|
103
|
-
id: 1,
|
|
104
|
-
type: "text",
|
|
105
|
-
content: "这是一条文本消息",
|
|
106
|
-
date: "10:30",
|
|
107
|
-
self: true,
|
|
108
|
-
avatar: "https://example.com/avatar1.jpg"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
id: 2,
|
|
112
|
-
type: "audio",
|
|
113
|
-
content: '3"',
|
|
114
|
-
date: "10:31",
|
|
115
|
-
self: true,
|
|
116
|
-
avatar: "https://example.com/avatar1.jpg"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
id: 3,
|
|
120
|
-
type: "location",
|
|
121
|
-
content: "北京市朝阳区",
|
|
122
|
-
date: "10:32",
|
|
123
|
-
self: true,
|
|
124
|
-
avatar: "https://example.com/avatar1.jpg"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
id: 4,
|
|
128
|
-
type: "info",
|
|
129
|
-
content: "对方撤回一条消息",
|
|
130
|
-
date: "",
|
|
131
|
-
self: false,
|
|
132
|
-
avatar: ""
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
id: 5,
|
|
136
|
-
type: "link",
|
|
137
|
-
content: "链接消息内容",
|
|
138
|
-
date: "10:35",
|
|
139
|
-
self: false,
|
|
140
|
-
avatar: "https://example.com/avatar2.jpg",
|
|
141
|
-
url: "https://example.com/article",
|
|
142
|
-
title: "文章标题",
|
|
143
|
-
emoji: "📊"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
id: 6,
|
|
147
|
-
type: "card",
|
|
148
|
-
content: "卡片消息描述",
|
|
149
|
-
date: "10:36",
|
|
150
|
-
self: true,
|
|
151
|
-
avatar: "https://example.com/avatar1.jpg",
|
|
152
|
-
title: "卡片标题",
|
|
153
|
-
url: "https://example.com/details"
|
|
154
|
-
}
|
|
155
|
-
];
|
|
156
|
-
</script>
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### 自定义消息类型
|
|
160
|
-
|
|
161
|
-
```vue
|
|
162
|
-
<template>
|
|
163
|
-
<ChatRoom :messages="messages">
|
|
164
|
-
<template #custom-message="{ message }">
|
|
165
|
-
<div v-if="message.type === 'markdown'" class="markdown-message">
|
|
166
|
-
<div v-html="message.content"></div>
|
|
167
|
-
</div>
|
|
168
|
-
<div v-else-if="message.type === 'custom-type'" class="custom-message">
|
|
169
|
-
{{ message.customContent }}
|
|
170
|
-
</div>
|
|
171
|
-
</template>
|
|
172
|
-
</ChatRoom>
|
|
173
|
-
</template>
|
|
174
|
-
```
|
|
175
|
-
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# DrawerModal 组件
|
|
2
|
-
|
|
3
|
-
`DrawerModal` 是一个抽屉模态框组件,用于显示弹窗内容。
|
|
4
|
-
|
|
5
|
-
## 属性
|
|
6
|
-
|
|
7
|
-
| 属性名 | 类型 | 默认值 | 描述 |
|
|
8
|
-
| ------------ | --------- | ------ | ------------------------ |
|
|
9
|
-
| `title` | `string` | - | 模态框标题(必填) |
|
|
10
|
-
| `modelValue` | `boolean` | - | 显示/隐藏状态(v-model) |
|
|
11
|
-
|
|
12
|
-
## 事件
|
|
13
|
-
|
|
14
|
-
| 事件名 | 参数 | 描述 |
|
|
15
|
-
| ------------------ | ----------------- | -------------- |
|
|
16
|
-
| `update:modelValue` | `(value: boolean)` | 状态变化时触发 |
|
|
17
|
-
|
|
18
|
-
## 插槽
|
|
19
|
-
|
|
20
|
-
| 插槽名 | 描述 |
|
|
21
|
-
| ------ | -------------- |
|
|
22
|
-
| 默认 | 模态框内容 |
|
|
23
|
-
|
|
24
|
-
## 示例
|
|
25
|
-
|
|
26
|
-
### 基本使用
|
|
27
|
-
|
|
28
|
-
```vue
|
|
29
|
-
<template>
|
|
30
|
-
<button @click="showModal = true">打开模态框</button>
|
|
31
|
-
<DrawerModal title="标题" v-model="showModal">
|
|
32
|
-
<p>这是模态框的内容</p>
|
|
33
|
-
</DrawerModal>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script setup>
|
|
37
|
-
import { ref } from 'vue';
|
|
38
|
-
|
|
39
|
-
const showModal = ref(false);
|
|
40
|
-
</script>
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### 自定义内容
|
|
44
|
-
|
|
45
|
-
```vue
|
|
46
|
-
<template>
|
|
47
|
-
<button @click="showModal = true">打开模态框</button>
|
|
48
|
-
<DrawerModal title="详细信息" v-model="showModal">
|
|
49
|
-
<div class="modal-content">
|
|
50
|
-
<h3>标题</h3>
|
|
51
|
-
<p>详细内容...</p>
|
|
52
|
-
<button @click="showModal = false">关闭</button>
|
|
53
|
-
</div>
|
|
54
|
-
</DrawerModal>
|
|
55
|
-
</template>
|
|
56
|
-
|
|
57
|
-
<script setup>
|
|
58
|
-
import { ref } from 'vue';
|
|
59
|
-
|
|
60
|
-
const showModal = ref(false);
|
|
61
|
-
</script>
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### 在模态框中使用其他组件
|
|
65
|
-
|
|
66
|
-
```vue
|
|
67
|
-
<template>
|
|
68
|
-
<button @click="showModal = true">打开聊天列表</button>
|
|
69
|
-
<DrawerModal title="聊天列表" v-model="showModal">
|
|
70
|
-
<ChatList :items="chatItems" />
|
|
71
|
-
</DrawerModal>
|
|
72
|
-
</template>
|
|
73
|
-
|
|
74
|
-
<script setup>
|
|
75
|
-
import { ref } from 'vue';
|
|
76
|
-
|
|
77
|
-
const showModal = ref(false);
|
|
78
|
-
const chatItems = ref([
|
|
79
|
-
// ... 聊天项数据
|
|
80
|
-
]);
|
|
81
|
-
</script>
|
|
82
|
-
```
|
|
83
|
-
|