|
@@ -112,7 +112,6 @@ const calcStyle = (index) => {
|
|
|
const codeItemHalfWidth = codeItemOffsetWidth/2
|
|
|
const calcNum = menuHalfWidth+menuHalfWidth*2*index - codeItemHalfWidth
|
|
|
//
|
|
|
-
|
|
|
if (calcNum+codeItemOffsetWidth > codeBoxOffsetWidth) { // 超出右侧,取最大
|
|
|
offsetCalc.value = codeBoxOffsetWidth-codeItemOffsetWidth
|
|
|
} else if (calcNum < 0) { // 超出左侧,取最小
|