JsonFormatter.less 3.19 KB
.jsonMain{

}
.jsonFormatterContainer {
  display: flex;
  width: 100%;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.jsonPanel {
  width: 30%;
  padding: 20px;
  background-color: #f9f9f9;
  font-size: 13px;
  max-height: 600px;
  overflow: hidden;
}
.jsonPanel2 {
  width: 60%;
  padding: 20px;
  background-color: #f9f9f9;
  font-size: 13px;
  max-height: 600px;
  overflow: auto;
}

.jsonPanel3 {
  width: 30%;
  padding: 20px;
  background-color: #f9f9f9;
  font-size: 13px;
  max-height: 600px;
  overflow: auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
}

.jsonPanel h3,
.jsonPanel2 h3,
.jsonPanel3 h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
}

.jsonPanel2 pre {
  width: 100%;
  margin: 0;
  background-color: #fff;
  padding: 10px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  overflow: auto;
}

.divider {
  width: 1px;
  background-color: #e8e8e8;
}
.jsonTextarea {
  min-height: 520px; /* 设置最小高度为 6 行,假设每行约 20px */
  width: 100%;
  height: fit-content;
  padding: 10px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  resize: vertical;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}
.btnStyle{
  padding: 10px;
  display: flex;
  justify-content: right;
}
.btnStyle button {
  margin-right: 20px;
}

.answerContainer,
.formattedJson {
  border: 2px solid #ccc; /* 初始灰色边框 */
  border-radius: 4px;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0); /* 初始无阴影 */
  padding: 10px;
  margin-bottom: 20px;
  min-height: 300px;
  transition: all 0.3s ease; /* 过渡效果 */
}

.answerContainer:hover,
.formattedJson:hover {
  border-color: #007BFF; /* 悬浮时彩色边框 */
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.5); /* 悬浮时阴影效果 */
}

.questionBox {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: absolute;
  bottom: 10px;
  //width: calc(100% - 40px); /* 减去左右内边距 */
  padding: 20px;
  background-color: #f9f9f9;
  box-sizing: border-box;
}

.questionInput {
  width: calc(100% - 20px);
  padding: 8px;
  margin-right: 10px;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  box-sizing: border-box;
  resize: none; /* 禁止调整大小 */
}

.answerText {
  margin: 0;
  color: #333;
}

// ... 原有样式 ...

.historyIcon {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-size: 20px;
  cursor: pointer;
}

.qaHistoryItem {
  margin-bottom: 15px; /* 增加项与项之间的间距 */
}

.qaQuestion {
  background-color: #e6f7ff; /* 问题背景颜色 */
  border-radius: 8px; /* 圆角边框 */
  padding: 10px; /* 内边距 */
  margin-bottom: 8px; /* 与回复之间的间距 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
  font-weight: bold;
}

.qaAnswer {
  background-color: #f6ffed; /* 回复背景颜色 */
  border-radius: 8px; /* 圆角边框 */
  padding: 10px; /* 内边距 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
  color: #666;
}

.qaHistoryContainer {
  max-height: 300px; /* 设置最大高度 */
  overflow-y: auto; /* 超出高度时显示滚动条 */
}