|
@@ -330,7 +330,7 @@ export default {
|
|
|
let svg = document.createElementNS(svgNS, 'svg');
|
|
let svg = document.createElementNS(svgNS, 'svg');
|
|
|
svg.setAttribute(
|
|
svg.setAttribute(
|
|
|
'style',
|
|
'style',
|
|
|
- `position:absolute; width: 62px; height: ${Math.max(8, height)}px; top: ${top}px; left: ${left}px;`,
|
|
|
|
|
|
|
+ `position:absolute; width: 74px; height: ${Math.max(8, height)}px; top: ${top}px; left: ${left}px;overflow: visible;`,
|
|
|
);
|
|
);
|
|
|
svg.classList.add('connection-line', `svg-${mark}-${curMark}`); // 添加类名
|
|
svg.classList.add('connection-line', `svg-${mark}-${curMark}`); // 添加类名
|
|
|
// 向SVG元素添加 path 元素
|
|
// 向SVG元素添加 path 元素
|
|
@@ -338,6 +338,20 @@ export default {
|
|
|
path.setAttribute('d', `M ${size ? 0 : width} 0 L ${size ? width : 0} ${height}`); // 设置路径数据
|
|
path.setAttribute('d', `M ${size ? 0 : width} 0 L ${size ? width : 0} ${height}`); // 设置路径数据
|
|
|
this.setPathAttr(path);
|
|
this.setPathAttr(path);
|
|
|
svg.appendChild(path);
|
|
svg.appendChild(path);
|
|
|
|
|
+ // 在 svg 元素中的 path 元素上两端添加圆形标记
|
|
|
|
|
+ let circleStart = document.createElementNS(svgNS, 'circle');
|
|
|
|
|
+ circleStart.setAttribute('cx', size ? '0' : width); // 设置圆心的 x 坐标
|
|
|
|
|
+ circleStart.setAttribute('cy', '0'); // 设置圆心的 y 坐标
|
|
|
|
|
+ circleStart.setAttribute('r', '4'); // 设置半径
|
|
|
|
|
+ const assistColor = this.data?.unified_attrib?.topic_color || '#306eff';
|
|
|
|
|
+ circleStart.setAttribute('fill', assistColor); // 设置填充颜色
|
|
|
|
|
+ svg.appendChild(circleStart);
|
|
|
|
|
+ let circleEnd = document.createElementNS(svgNS, 'circle');
|
|
|
|
|
+ circleEnd.setAttribute('cx', size ? width : '0'); // 设置圆心的 x 坐标
|
|
|
|
|
+ circleEnd.setAttribute('cy', height); // 设置圆心的 y 坐标
|
|
|
|
|
+ circleEnd.setAttribute('r', '4'); // 设置半径
|
|
|
|
|
+ circleEnd.setAttribute('fill', assistColor); // 设置填充颜色
|
|
|
|
|
+ svg.appendChild(circleEnd);
|
|
|
this.$refs[isShowRightAnswer ? 'answerList' : 'list'].appendChild(svg); // 将SVG元素插入到文档中
|
|
this.$refs[isShowRightAnswer ? 'answerList' : 'list'].appendChild(svg); // 将SVG元素插入到文档中
|
|
|
|
|
|
|
|
// 清除当前连线点
|
|
// 清除当前连线点
|
|
@@ -525,7 +539,7 @@ export default {
|
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
&:not(:last-child, .isMobile) {
|
|
&:not(:last-child, .isMobile) {
|
|
|
- margin-right: 52px;
|
|
|
|
|
|
|
+ margin-right: 64px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&.focus {
|
|
&.focus {
|