MrShi
2025-01-22 a2633dee261ba41c96c51e58098728222b2e3360
admin/src/views/index.vue
@@ -66,7 +66,9 @@
          </el-option>
        </el-select>
      </div>
      <div class="main_right_date">
        <el-calendar v-model="value" :mark-data="markData"></el-calendar>
      </div>
    </div>
  </div>
</template>
@@ -90,7 +92,18 @@
        { name: '资产清单', icon: require('@/assets/indexIcon/ic_zichan@2x.png') },
      ],
      options: [],
      value: ''
      value: '',
      markData: [
        {
          date: '2025-01-22', // 标记的日期
          // 自定义标记内容
          content: '<div style="color: red;">重要事件</div>'
        },
        {
          date: '2025-01-19',
          content: '生日'
        }
      ]
    }
  },
  methods: {
@@ -253,6 +266,24 @@
        color: #222222;
        margin-bottom: 12px;
      }
      .main_right_date {
        width: 100%;
        height: 300px;
        ::v-deep .el-calendar-table tr td:first-child{
          border: none;
        }
        ::v-deep .el-calendar-table tr:first-child td{
          border: none;
        }
        ::v-deep .el-calendar-table__row td{
          border: none;
        }
        ::v-deep .el-calendar-table .el-calendar-day {
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
    }
  }
</style>