|
@@ -406,7 +406,16 @@
|
|
|
<div
|
|
|
ref="wordcard"
|
|
|
class="NNPE-wordDetail"
|
|
|
- :style="{ left: left + 'px' }"
|
|
|
+ :style="{
|
|
|
+ marginLeft:
|
|
|
+ word.detail.new_word.length === 1
|
|
|
+ ? '-152px'
|
|
|
+ : windowWidth > word.detail.new_word.length * 128 + 48
|
|
|
+ ? '-' + (word.detail.new_word.length * 64 + 24) + 'px'
|
|
|
+ : '0px',
|
|
|
+ left:
|
|
|
+ windowWidth > word.detail.new_word.length * 128 + 48 ? '' : '0px'
|
|
|
+ }"
|
|
|
>
|
|
|
<Wordcard
|
|
|
:word="word"
|
|
@@ -423,7 +432,10 @@
|
|
|
<div
|
|
|
ref="notecard"
|
|
|
class="NNPE-wordDetail"
|
|
|
- :style="{ top: top + 'px', left: left + 'px' }"
|
|
|
+ :style="{
|
|
|
+ marginLeft: windowWidth > 642 ? '-321px' : '0px',
|
|
|
+ left: windowWidth > 642 ? '' : '0px'
|
|
|
+ }"
|
|
|
>
|
|
|
<Notecard :item="curNoteCon" :changeCard="changeCard" />
|
|
|
</div>
|
|
@@ -534,7 +546,8 @@ export default {
|
|
|
noteNum: "",
|
|
|
oldNoteNum: "",
|
|
|
curNoteCon: null,
|
|
|
- newWordList: []
|
|
|
+ newWordList: [],
|
|
|
+ windowWidth: window.innerWidth
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -1177,6 +1190,9 @@ export default {
|
|
|
z-index: 9999;
|
|
|
top: 50%;
|
|
|
margin-top: -196px;
|
|
|
+ left: 50%;
|
|
|
+ max-width: 100%;
|
|
|
+ overflow: auto;
|
|
|
// width: 260px;
|
|
|
// height: 200px;
|
|
|
// background: #cc0;
|