feat: add miniapp reference assets and primitives
This commit is contained in:
@@ -1 +1,11 @@
|
||||
Component({properties:{title:{type:String,value:'加载失败'},description:{type:String,value:'请稍后重试'}},methods:{onRetry(){this.triggerEvent('retry')}}})
|
||||
Component({
|
||||
properties: {
|
||||
title: { type: String, value: '加载失败' },
|
||||
description: { type: String, value: '请稍后重试' },
|
||||
},
|
||||
methods: {
|
||||
onRetry() {
|
||||
this.triggerEvent('retry')
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
<view class="error-state"><view class="error-icon">!</view><text class="error-title">{{title}}</text><text class="error-desc">{{description}}</text><button class="retry-btn" bindtap="onRetry">重新加载</button></view>
|
||||
<view class="error-state">
|
||||
<image class="error-icon" src="/assets/icons/ui/warning.png" mode="aspectFit" />
|
||||
<text class="error-title">{{title}}</text>
|
||||
<text class="error-desc">{{description}}</text>
|
||||
<button class="retry-btn" bindtap="onRetry">重新加载</button>
|
||||
</view>
|
||||
|
||||
@@ -1 +1,45 @@
|
||||
.error-state{padding:64rpx 32rpx;text-align:center;background:var(--color-bg-card);border-radius:var(--radius-lg)}.error-icon{width:72rpx;height:72rpx;margin:0 auto 20rpx;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--color-danger-light);color:var(--color-danger);font-weight:700}.error-title,.error-desc{display:block}.error-title{font-size:30rpx;font-weight:600}.error-desc{margin-top:8rpx;font-size:24rpx;color:var(--color-text-tertiary)}.retry-btn{width:220rpx;height:80rpx;line-height:80rpx;margin-top:24rpx;border:0;border-radius:var(--radius-full);background:var(--color-primary);color:var(--color-text-inverse);font-size:26rpx}.retry-btn::after{border:0}
|
||||
.error-state {
|
||||
padding: 64rpx 32rpx;
|
||||
text-align: center;
|
||||
background: var(--color-bg-card);
|
||||
border-radius: var(--radius-lg);
|
||||
}
|
||||
|
||||
.error-icon {
|
||||
display: block;
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
margin: 0 auto 20rpx;
|
||||
}
|
||||
|
||||
.error-title,
|
||||
.error-desc {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.error-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.error-desc {
|
||||
margin-top: 8rpx;
|
||||
color: var(--color-text-tertiary);
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.retry-btn {
|
||||
width: 220rpx;
|
||||
height: 80rpx;
|
||||
margin-top: 24rpx;
|
||||
border: 0;
|
||||
border-radius: var(--radius-full);
|
||||
background: var(--color-primary);
|
||||
color: var(--color-text-inverse);
|
||||
font-size: 26rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.retry-btn::after {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user