<script setup lang="ts">
|
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app';
|
|
import { restoreTheme } from './stores/theme';
|
|
onLaunch(() => {
|
restoreTheme();
|
});
|
|
onShow(() => {
|
restoreTheme();
|
console.info('[App] 应用进入前台');
|
});
|
|
onHide(() => {
|
console.info('[App] 应用进入后台');
|
});
|
</script>
|
|
<style lang="scss">
|
/* #ifdef H5 */
|
:root {
|
--color-primary: #1769d8;
|
--color-primary-dark: #0f54b8;
|
--color-primary-light: #4b8ee8;
|
--color-primary-soft: #eef5ff;
|
--color-primary-border: #bfdbff;
|
--color-bg-page: #f6f7f9;
|
--color-bg-card: #ffffff;
|
--color-text-primary: #202c3d;
|
--color-text-secondary: #65758b;
|
--color-text-muted: #8a96a8;
|
--color-border: #e5eaf0;
|
}
|
/* #endif */
|
|
/* #ifndef H5 */
|
page {
|
--color-primary: #1769d8;
|
--color-primary-dark: #0f54b8;
|
--color-primary-light: #4b8ee8;
|
--color-primary-soft: #eef5ff;
|
--color-primary-border: #bfdbff;
|
--color-bg-page: #f6f7f9;
|
--color-bg-card: #ffffff;
|
--color-text-primary: #202c3d;
|
--color-text-secondary: #65758b;
|
--color-text-muted: #8a96a8;
|
--color-border: #e5eaf0;
|
}
|
/* #endif */
|
|
page {
|
min-height: 100%;
|
color: var(--color-text-primary, #202c3d);
|
background: var(--color-bg-page, #f6f7f9);
|
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
font-size: 28rpx;
|
line-height: 1.5;
|
}
|
|
view, text, button, input { box-sizing: border-box; }
|
|
.required, .required-mark {
|
color: #e34b4b;
|
}
|
|
.tags {
|
display: flex;
|
flex-wrap: wrap;
|
gap: 10rpx;
|
margin-top: 16rpx;
|
}
|
|
.status-wrap {
|
display: flex !important;
|
flex: none !important;
|
flex-direction: row !important;
|
align-self: stretch !important;
|
align-items: center !important;
|
justify-content: flex-end !important;
|
min-width: 0;
|
}
|
|
text.tag,
|
text.small-tag,
|
text.value-tag,
|
text.status,
|
text.enabled,
|
text.disabled,
|
text.on,
|
text.off,
|
.badge,
|
.type-tag,
|
.typeTag,
|
.mode-tag,
|
.logType,
|
.tags text {
|
display: inline-flex !important;
|
align-items: center !important;
|
justify-content: center !important;
|
align-self: center !important;
|
max-width: 100%;
|
width: auto !important;
|
height: 36rpx !important;
|
min-height: 36rpx;
|
padding: 4rpx 12rpx !important;
|
color: var(--color-primary, #1769d8) !important;
|
font-size: 22rpx !important;
|
line-height: 1.2 !important;
|
background: var(--color-primary-soft, #eef5ff) !important;
|
border: 1rpx solid var(--color-primary-border, #bfdbff) !important;
|
border-radius: 999rpx !important;
|
white-space: nowrap;
|
word-break: keep-all;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
}
|
|
text.tag,
|
text.value-tag,
|
text.status,
|
text.enabled,
|
text.disabled,
|
text.on,
|
text.off,
|
.badge,
|
.type-tag,
|
.typeTag,
|
.mode-tag,
|
.logType {
|
min-width: 0;
|
}
|
|
text.status.enabled,
|
text.status.success,
|
text.tag.enabled,
|
text.tag.audited,
|
text.tag.done,
|
text.enabled,
|
text.on,
|
.tags text.enabled {
|
color: #16835d !important;
|
background: #eaf8f2 !important;
|
border-color: #bdebd7 !important;
|
}
|
|
text.status.disabled,
|
text.status.stopped,
|
text.disabled,
|
text.off,
|
.tags text.disabled {
|
color: #8d9bad !important;
|
background: #f0f3f6 !important;
|
border-color: #dbe3ec !important;
|
}
|
|
text.status.warning,
|
text.status.maintain,
|
.tags text.warning {
|
color: #c47a16 !important;
|
background: #fff3df !important;
|
border-color: #f4d6a5 !important;
|
}
|
|
text.status.danger,
|
text.tag.invalid,
|
.tags text.danger {
|
color: #c65050 !important;
|
background: #fff4f4 !important;
|
border-color: #efc2c2 !important;
|
}
|
|
text.status.tag-draft,
|
text.tag.tag-draft,
|
.tags text.tag-draft {
|
color: #66778c !important;
|
background: #f6f8fb !important;
|
border-color: #dce4ee !important;
|
}
|
|
text.status.tag-progress,
|
text.status.tag-wait,
|
text.tag.tag-progress,
|
text.tag.tag-wait,
|
.tags text.tag-progress,
|
.tags text.tag-wait {
|
color: #b57800 !important;
|
background: #fff7dd !important;
|
border-color: #f3dc98 !important;
|
}
|
|
text.status.tag-approved,
|
text.tag.tag-approved,
|
.tags text.tag-approved {
|
color: var(--color-primary, #1769d8) !important;
|
background: var(--color-primary-soft, #edf5ff) !important;
|
border-color: var(--color-primary-border, #bfdbff) !important;
|
}
|
|
text.status.tag-ok,
|
text.status.tag-success,
|
text.status.tag-enabled,
|
text.status.tag-finished,
|
text.tag.tag-ok,
|
text.tag.tag-success,
|
text.tag.tag-enabled,
|
text.tag.tag-finished,
|
.tags text.tag-ok,
|
.tags text.tag-success,
|
.tags text.tag-enabled,
|
.tags text.tag-finished {
|
color: #17865a !important;
|
background: #eafaf2 !important;
|
border-color: #b8efd5 !important;
|
}
|
|
text.status.tag-finish,
|
text.tag.tag-finish,
|
.tags text.tag-finish {
|
color: #7a52c6 !important;
|
background: #f3edff !important;
|
border-color: #d4c0ff !important;
|
}
|
|
text.status.tag-stop,
|
text.status.tag-cancelled,
|
text.status.tag-danger,
|
text.tag.tag-stop,
|
text.tag.tag-cancelled,
|
text.tag.tag-danger,
|
.tags text.tag-stop,
|
.tags text.tag-cancelled,
|
.tags text.tag-danger {
|
color: #c65050 !important;
|
background: #fff7f7 !important;
|
border-color: #e3a0a0 !important;
|
}
|
|
text.status.tag-info,
|
text.status.tag-disabled,
|
text.tag.tag-info,
|
text.tag.tag-disabled,
|
.tags text.tag-info,
|
.tags text.tag-disabled {
|
color: #66778c !important;
|
background: #f6f8fb !important;
|
border-color: #dce4ee !important;
|
}
|
|
.field input,
|
.field textarea,
|
.field .value,
|
.field .readonly {
|
text-align: right !important;
|
}
|
|
.field.column textarea,
|
.field.area textarea,
|
.column textarea,
|
.area textarea {
|
display: block !important;
|
box-sizing: border-box !important;
|
align-self: stretch !important;
|
width: auto !important;
|
min-width: 0 !important;
|
max-width: 100% !important;
|
min-height: 120rpx !important;
|
padding: 14rpx 16rpx !important;
|
color: #1e3049 !important;
|
line-height: 1.5 !important;
|
text-align: left !important;
|
background: #f8fafc !important;
|
border: 1rpx solid #e6edf5 !important;
|
border-radius: 8rpx !important;
|
}
|
|
.field .picker {
|
display: flex !important;
|
align-items: center !important;
|
justify-content: flex-end !important;
|
text-align: right !important;
|
}
|
|
.field .picker > text:first-child,
|
.field .select > text:first-child {
|
min-width: 0 !important;
|
flex: 1 !important;
|
overflow: hidden !important;
|
text-align: right !important;
|
text-overflow: ellipsis !important;
|
white-space: nowrap !important;
|
}
|
|
.field .picker > text:last-child,
|
.field .select > text:last-child,
|
.status-picker > text:last-child,
|
.picker-arrow {
|
flex: none !important;
|
display: inline-flex !important;
|
align-items: center !important;
|
justify-content: center !important;
|
align-self: center !important;
|
margin-left: 16rpx !important;
|
font-size: 34rpx !important;
|
line-height: 1 !important;
|
}
|
|
.field .picker-value,
|
.item-field .picker-value,
|
.status-picker {
|
display: flex !important;
|
align-items: center !important;
|
justify-content: flex-end !important;
|
text-align: right !important;
|
}
|
|
.field .picker-value > text:first-child,
|
.item-field .picker-value > text:first-child {
|
min-width: 0 !important;
|
flex: 1 !important;
|
overflow: hidden !important;
|
text-align: right !important;
|
text-overflow: ellipsis !important;
|
white-space: nowrap !important;
|
}
|
|
.field .picker-value > text:last-child,
|
.item-field .picker-value > text:last-child {
|
flex: none !important;
|
display: inline-flex !important;
|
align-items: center !important;
|
justify-content: center !important;
|
align-self: center !important;
|
margin-left: 16rpx !important;
|
color: #8092a7 !important;
|
font-size: 34rpx !important;
|
line-height: 1 !important;
|
}
|
|
.safe-top { padding-top: calc(30rpx + env(safe-area-inset-top)); }
|
.safe-bottom { padding-bottom: env(safe-area-inset-bottom); }
|
</style>
|