重新构建路由和配置样式文件
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* 标签组件样式
|
||||
*/
|
||||
|
||||
@layer components {
|
||||
/* 基础标签 */
|
||||
.badge {
|
||||
@apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
|
||||
}
|
||||
|
||||
/* 标签尺寸 */
|
||||
.badge-sm {
|
||||
@apply px-2 py-0.5 text-xs;
|
||||
}
|
||||
|
||||
.badge-md {
|
||||
@apply px-2.5 py-1 text-sm;
|
||||
}
|
||||
|
||||
.badge-lg {
|
||||
@apply px-3 py-1 text-sm;
|
||||
}
|
||||
|
||||
/* 标签颜色 */
|
||||
.badge-primary {
|
||||
@apply bg-[rgba(0,104,74,0.1)] text-[#00684a];
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
@apply bg-gray-100 text-gray-800;
|
||||
}
|
||||
|
||||
.badge-success {
|
||||
@apply bg-[rgba(82,196,26,0.1)] text-[#52c41a];
|
||||
}
|
||||
|
||||
.badge-warning {
|
||||
@apply bg-[rgba(250,173,20,0.1)] text-[#faad14];
|
||||
}
|
||||
|
||||
.badge-danger {
|
||||
@apply bg-[rgba(245,34,45,0.1)] text-[#f5222d];
|
||||
}
|
||||
|
||||
.badge-info {
|
||||
@apply bg-[rgba(24,144,255,0.1)] text-[#1890ff];
|
||||
}
|
||||
|
||||
/* 标签边框样式 */
|
||||
.badge-outlined {
|
||||
@apply bg-transparent border;
|
||||
}
|
||||
|
||||
.badge-outlined.badge-primary {
|
||||
@apply border-[#00684a] text-[#00684a];
|
||||
}
|
||||
|
||||
.badge-outlined.badge-secondary {
|
||||
@apply border-gray-300 text-gray-700;
|
||||
}
|
||||
|
||||
.badge-outlined.badge-success {
|
||||
@apply border-[#52c41a] text-[#52c41a];
|
||||
}
|
||||
|
||||
.badge-outlined.badge-warning {
|
||||
@apply border-[#faad14] text-[#faad14];
|
||||
}
|
||||
|
||||
.badge-outlined.badge-danger {
|
||||
@apply border-[#f5222d] text-[#f5222d];
|
||||
}
|
||||
|
||||
.badge-outlined.badge-info {
|
||||
@apply border-[#1890ff] text-[#1890ff];
|
||||
}
|
||||
|
||||
/* 标签带图标 */
|
||||
.badge-with-icon {
|
||||
@apply pl-1.5;
|
||||
}
|
||||
|
||||
.badge-with-icon i,
|
||||
.badge-with-icon svg {
|
||||
@apply mr-1;
|
||||
}
|
||||
|
||||
/* 计数标签 */
|
||||
.badge-count {
|
||||
@apply absolute -top-1 -right-1 flex items-center justify-center h-4 w-4 rounded-full text-[10px] font-bold text-white;
|
||||
}
|
||||
|
||||
.badge-count.badge-primary {
|
||||
@apply bg-[#00684a] text-white;
|
||||
}
|
||||
|
||||
.badge-count.badge-danger {
|
||||
@apply bg-[#f5222d] text-white;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* 按钮组件样式
|
||||
*/
|
||||
|
||||
/* 基础按钮 */
|
||||
.btn {
|
||||
@apply inline-flex items-center justify-center px-4 py-2
|
||||
border border-transparent rounded-md font-medium text-sm
|
||||
focus:outline-none focus:ring-2 focus:ring-offset-2 transition-all duration-200
|
||||
disabled:opacity-50 disabled:cursor-not-allowed;
|
||||
}
|
||||
|
||||
/* 按钮尺寸 */
|
||||
.btn-xs {
|
||||
@apply px-2.5 py-1 text-xs;
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
@apply px-3 py-1.5 text-sm;
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
@apply px-5 py-2.5 text-base;
|
||||
}
|
||||
|
||||
/* 按钮类型 */
|
||||
.btn-primary {
|
||||
@apply bg-[#00684a] text-white hover:bg-[#005a3f] focus:ring-[#00684a];
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
@apply bg-gray-200 text-gray-800 hover:bg-gray-300 focus:ring-gray-300;
|
||||
}
|
||||
|
||||
.btn-outline {
|
||||
@apply bg-transparent border border-[#00684a] text-[#00684a]
|
||||
hover:bg-[rgba(0,104,74,0.05)] focus:ring-[#00684a];
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
@apply bg-[#f5222d] text-white hover:bg-[#cf1f29] focus:ring-[#f5222d];
|
||||
}
|
||||
|
||||
.btn-text {
|
||||
@apply bg-transparent text-[#00684a] shadow-none border-none
|
||||
hover:bg-[rgba(0,104,74,0.05)] focus:ring-0;
|
||||
}
|
||||
|
||||
/* 图标按钮 */
|
||||
.btn-icon {
|
||||
@apply p-2 rounded-full;
|
||||
}
|
||||
|
||||
.btn-icon.btn-sm {
|
||||
@apply p-1.5;
|
||||
}
|
||||
|
||||
.btn-icon i, .btn-icon svg {
|
||||
@apply text-current w-5 h-5;
|
||||
}
|
||||
|
||||
/* 按钮组 */
|
||||
.btn-group {
|
||||
@apply inline-flex;
|
||||
}
|
||||
|
||||
.btn-group .btn {
|
||||
@apply rounded-none;
|
||||
}
|
||||
|
||||
.btn-group .btn:first-child {
|
||||
@apply rounded-l-md;
|
||||
}
|
||||
|
||||
.btn-group .btn:last-child {
|
||||
@apply rounded-r-md;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* 卡片组件样式
|
||||
*/
|
||||
|
||||
/* 基础卡片 */
|
||||
.card {
|
||||
@apply bg-white rounded-lg shadow overflow-hidden transition-all duration-200;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
@apply shadow-md;
|
||||
}
|
||||
|
||||
/* 卡片头部 */
|
||||
.card-header {
|
||||
@apply px-5 py-4 border-b border-gray-100 flex items-center justify-between;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
@apply text-base font-medium text-gray-900;
|
||||
}
|
||||
|
||||
.card-title i {
|
||||
@apply text-xl mr-2 text-primary;
|
||||
}
|
||||
|
||||
/* 卡片内容 */
|
||||
.card-body {
|
||||
@apply p-5;
|
||||
}
|
||||
|
||||
/* 卡片底部 */
|
||||
.card-footer {
|
||||
@apply px-5 py-4 bg-gray-50 border-t border-gray-100;
|
||||
}
|
||||
|
||||
/* 卡片变体 */
|
||||
.card-compact {
|
||||
@apply shadow-sm;
|
||||
}
|
||||
|
||||
.card-compact .card-header {
|
||||
@apply py-3;
|
||||
}
|
||||
|
||||
.card-compact .card-body {
|
||||
@apply p-4;
|
||||
}
|
||||
|
||||
.card-compact .card-footer {
|
||||
@apply py-3;
|
||||
}
|
||||
|
||||
/* 卡片布局 */
|
||||
.card-grid {
|
||||
@apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4;
|
||||
}
|
||||
|
||||
/* 内容卡片 */
|
||||
.content-card {
|
||||
@apply border border-gray-100 rounded-lg shadow-sm hover:shadow transition-shadow duration-200;
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/**
|
||||
* 表单组件样式
|
||||
*/
|
||||
|
||||
@layer components {
|
||||
/* 表单组 */
|
||||
.form-group {
|
||||
@apply mb-4;
|
||||
}
|
||||
|
||||
.form-group:last-child {
|
||||
@apply mb-0;
|
||||
}
|
||||
|
||||
/* 表单标签 */
|
||||
.form-label {
|
||||
@apply block text-sm font-medium text-gray-700 mb-1;
|
||||
}
|
||||
|
||||
.form-label.required::after {
|
||||
content: "*";
|
||||
@apply text-[#f5222d] ml-1;
|
||||
}
|
||||
|
||||
/* 表单控件 */
|
||||
.form-input,
|
||||
.form-select,
|
||||
.form-textarea {
|
||||
@apply block w-full rounded-md border-gray-300 shadow-sm py-2 px-3 text-sm
|
||||
focus:border-[#00684a] focus:ring focus:ring-[#00684a] focus:ring-opacity-20
|
||||
disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed;
|
||||
}
|
||||
|
||||
.form-select {
|
||||
@apply pr-10;
|
||||
}
|
||||
|
||||
.form-textarea {
|
||||
@apply min-h-[100px];
|
||||
}
|
||||
|
||||
/* 表单控件尺寸 */
|
||||
.form-input-sm,
|
||||
.form-select-sm,
|
||||
.form-textarea-sm {
|
||||
@apply py-1.5 px-2.5 text-xs;
|
||||
}
|
||||
|
||||
.form-input-lg,
|
||||
.form-select-lg,
|
||||
.form-textarea-lg {
|
||||
@apply py-2.5 px-3.5 text-base;
|
||||
}
|
||||
|
||||
/* 表单验证状态 */
|
||||
.form-input.error,
|
||||
.form-select.error,
|
||||
.form-textarea.error {
|
||||
@apply border-[#f5222d] focus:border-[#f5222d] focus:ring-[#f5222d];
|
||||
}
|
||||
|
||||
.form-input.success,
|
||||
.form-select.success,
|
||||
.form-textarea.success {
|
||||
@apply border-[#52c41a] focus:border-[#52c41a] focus:ring-[#52c41a];
|
||||
}
|
||||
|
||||
/* 表单帮助文本 */
|
||||
.form-help {
|
||||
@apply mt-1 text-sm text-gray-500;
|
||||
}
|
||||
|
||||
.form-error {
|
||||
@apply mt-1 text-sm text-[#f5222d];
|
||||
}
|
||||
|
||||
/* 表单复选框和单选框 */
|
||||
.form-checkbox-group,
|
||||
.form-radio-group {
|
||||
@apply space-y-2;
|
||||
}
|
||||
|
||||
.form-check {
|
||||
@apply flex items-center;
|
||||
}
|
||||
|
||||
.form-checkbox,
|
||||
.form-radio {
|
||||
@apply h-4 w-4 text-[#00684a] border-gray-300 focus:ring-[#00684a] focus:ring-opacity-20 rounded;
|
||||
}
|
||||
|
||||
.form-radio {
|
||||
@apply rounded-full;
|
||||
}
|
||||
|
||||
.form-check-label {
|
||||
@apply ml-2 block text-sm text-gray-700;
|
||||
}
|
||||
|
||||
/* 行内表单 */
|
||||
.form-inline {
|
||||
@apply flex flex-wrap items-end space-x-2;
|
||||
}
|
||||
|
||||
/* 水平表单 */
|
||||
.form-horizontal .form-group {
|
||||
@apply flex items-center;
|
||||
}
|
||||
|
||||
.form-horizontal .form-label {
|
||||
@apply w-1/3 mb-0;
|
||||
}
|
||||
|
||||
.form-horizontal .form-control-container {
|
||||
@apply w-2/3;
|
||||
}
|
||||
|
||||
/* 搜索框 */
|
||||
.search-box {
|
||||
@apply relative flex;
|
||||
}
|
||||
|
||||
.search-box input {
|
||||
@apply pr-10;
|
||||
}
|
||||
|
||||
.search-box button {
|
||||
@apply absolute inset-y-0 right-0 flex items-center px-2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* 组件样式索引文件
|
||||
* 集中导入所有组件样式
|
||||
*/
|
||||
|
||||
/* 布局相关组件 */
|
||||
@import "../layout.css";
|
||||
/* 已合并到layout.css中 */
|
||||
/* @import "./sidebar.css"; */
|
||||
|
||||
/* UI 基础组件 */
|
||||
@import "./button.css";
|
||||
@import "./card.css";
|
||||
@import "./form.css";
|
||||
@import "./table.css";
|
||||
@import "./badge.css";
|
||||
@import "./navigation.css";
|
||||
|
||||
/**
|
||||
* 注意:如果上述导入的文件不存在,将会在构建时报错
|
||||
* 请确保先创建这些文件,或者先注释掉不存在的文件
|
||||
*/
|
||||
@@ -0,0 +1,148 @@
|
||||
/**
|
||||
* 导航组件样式
|
||||
*/
|
||||
|
||||
@layer components {
|
||||
/* 顶部导航栏 */
|
||||
.navbar {
|
||||
@apply bg-white border-b border-gray-200 h-16 fixed top-0 right-0 left-0 z-20 flex items-center px-5;
|
||||
}
|
||||
|
||||
.navbar-container {
|
||||
@apply flex items-center justify-between w-full;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
@apply flex items-center space-x-2;
|
||||
}
|
||||
|
||||
.navbar-brand-logo {
|
||||
@apply h-8 w-auto;
|
||||
}
|
||||
|
||||
.navbar-brand-text {
|
||||
@apply font-medium text-lg text-gray-900;
|
||||
}
|
||||
|
||||
.navbar-menu {
|
||||
@apply flex items-center space-x-4;
|
||||
}
|
||||
|
||||
.navbar-item {
|
||||
@apply relative px-3 py-2 text-sm text-gray-600 hover:text-[#00684a] transition-colors;
|
||||
}
|
||||
|
||||
.navbar-item.active {
|
||||
@apply text-[#00684a] font-medium;
|
||||
}
|
||||
|
||||
.navbar-item.active::after {
|
||||
content: '';
|
||||
@apply absolute bottom-0 left-0 w-full h-0.5 bg-[#00684a];
|
||||
}
|
||||
|
||||
/* 标签页导航 */
|
||||
.tabs {
|
||||
@apply border-b border-gray-200;
|
||||
}
|
||||
|
||||
.tabs-list {
|
||||
@apply flex -mb-px space-x-6;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
@apply py-3 px-1 border-b-2 border-transparent text-sm font-medium text-gray-500
|
||||
hover:text-gray-700 hover:border-gray-300 cursor-pointer;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
@apply border-[#00684a] text-[#00684a];
|
||||
}
|
||||
|
||||
/* 面包屑导航 */
|
||||
.breadcrumbs {
|
||||
@apply flex items-center text-sm text-gray-500 mb-4;
|
||||
}
|
||||
|
||||
.breadcrumb-item {
|
||||
@apply flex items-center;
|
||||
}
|
||||
|
||||
.breadcrumb-item:not(:last-child)::after {
|
||||
content: "/";
|
||||
@apply mx-2;
|
||||
}
|
||||
|
||||
.breadcrumb-item:last-child {
|
||||
@apply text-gray-800 font-medium;
|
||||
}
|
||||
|
||||
/* 步骤导航 */
|
||||
.steps {
|
||||
@apply flex justify-between items-center;
|
||||
}
|
||||
|
||||
.step-item {
|
||||
@apply flex-1 relative;
|
||||
}
|
||||
|
||||
.step-item:not(:last-child)::after {
|
||||
content: '';
|
||||
@apply absolute top-1/2 right-0 w-full h-0.5 bg-gray-200 -translate-y-1/2 z-0;
|
||||
}
|
||||
|
||||
.step-item.active:not(:last-child)::after {
|
||||
@apply bg-[#00684a];
|
||||
}
|
||||
|
||||
.step-item.completed:not(:last-child)::after {
|
||||
@apply bg-[#00684a];
|
||||
}
|
||||
|
||||
.step-circle {
|
||||
@apply h-8 w-8 rounded-full bg-white border-2 border-gray-300 flex items-center justify-center
|
||||
text-xs font-medium text-gray-500 relative z-10;
|
||||
}
|
||||
|
||||
.step-item.active .step-circle {
|
||||
@apply border-[#00684a] text-[#00684a];
|
||||
}
|
||||
|
||||
.step-item.completed .step-circle {
|
||||
@apply bg-[#00684a] border-[#00684a] text-white;
|
||||
}
|
||||
|
||||
.step-label {
|
||||
@apply mt-2 text-xs font-medium text-gray-500 text-center;
|
||||
}
|
||||
|
||||
.step-item.active .step-label {
|
||||
@apply text-[#00684a];
|
||||
}
|
||||
|
||||
.step-item.completed .step-label {
|
||||
@apply text-[#00684a];
|
||||
}
|
||||
|
||||
/* 下拉菜单 */
|
||||
.dropdown {
|
||||
@apply relative inline-block;
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
@apply cursor-pointer;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
@apply absolute right-0 z-10 w-48 mt-2 origin-top-right bg-white rounded-md shadow-lg
|
||||
ring-1 ring-black ring-opacity-5 focus:outline-none py-1;
|
||||
}
|
||||
|
||||
.dropdown-item {
|
||||
@apply block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left;
|
||||
}
|
||||
|
||||
.dropdown-divider {
|
||||
@apply my-1 border-t border-gray-100;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* 表格组件样式
|
||||
*/
|
||||
|
||||
@layer components {
|
||||
/* 基础表格 */
|
||||
.table-container {
|
||||
@apply w-full overflow-x-auto;
|
||||
}
|
||||
|
||||
.table {
|
||||
@apply min-w-full divide-y divide-gray-200;
|
||||
}
|
||||
|
||||
.table thead {
|
||||
@apply bg-gray-50;
|
||||
}
|
||||
|
||||
.table th {
|
||||
@apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
|
||||
}
|
||||
|
||||
.table tbody {
|
||||
@apply bg-white divide-y divide-gray-200;
|
||||
}
|
||||
|
||||
.table td {
|
||||
@apply px-6 py-4 whitespace-nowrap text-sm text-gray-500;
|
||||
}
|
||||
|
||||
.table tr:hover {
|
||||
@apply bg-gray-50;
|
||||
}
|
||||
|
||||
/* 紧凑表格 */
|
||||
.table-compact th {
|
||||
@apply px-4 py-2 text-xs;
|
||||
}
|
||||
|
||||
.table-compact td {
|
||||
@apply px-4 py-2 text-xs;
|
||||
}
|
||||
|
||||
/* 边框表格 */
|
||||
.table-bordered {
|
||||
@apply border border-gray-200;
|
||||
}
|
||||
|
||||
.table-bordered th,
|
||||
.table-bordered td {
|
||||
@apply border border-gray-200;
|
||||
}
|
||||
|
||||
/* 条纹表格 */
|
||||
.table-striped tbody tr:nth-child(odd) {
|
||||
@apply bg-gray-50;
|
||||
}
|
||||
|
||||
/* 可选择行表格 */
|
||||
.table-selectable tbody tr {
|
||||
@apply cursor-pointer;
|
||||
}
|
||||
|
||||
.table-selectable tbody tr.selected {
|
||||
@apply bg-[rgba(0,104,74,0.05)];
|
||||
}
|
||||
|
||||
/* 表格分页 */
|
||||
.table-pagination {
|
||||
@apply flex items-center justify-between py-3 px-4 bg-white border-t border-gray-200;
|
||||
}
|
||||
|
||||
.table-pagination-info {
|
||||
@apply text-sm text-gray-500;
|
||||
}
|
||||
|
||||
.table-pagination-actions {
|
||||
@apply flex items-center space-x-2;
|
||||
}
|
||||
|
||||
/* 响应式处理 */
|
||||
@screen md {
|
||||
.table-responsive {
|
||||
@apply overflow-x-visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user