33 <el-scrollbar style =" height : 93vh ;" wrap-style =" overflow-x:hidden;" >
44 <div class =" image-panel" >
55 <div class =" prev" @click =" onClickPrev" ></div >
6- <!-- <div class="viewer">
7- <img :src="candidates[index].path">
8- </div> -->
9- <div style =" height : 100% " v-html =" html" id =" _cv_content_view" ></div >
6+ <!-- <div v-if="!isParsed">
7+ <div class="_cv_content_loading">
8+ <svg class="_cv_circular" viewBox="25 25 50 50">
9+ <circle class="_cv_path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>
10+ </svg>
11+ </div>
12+ </div>
13+ <div v-else style="height: 100%"> -->
14+ <div style =" height : 100% " v-html =" html" id =" _cv_content_view" ></div >
15+ <!-- </div> -->
1016 <div class =" next" @click =" onClickNext" ></div >
1117 </div >
1218 </el-scrollbar >
@@ -31,16 +37,14 @@ export default {
3137 viewer: null ,
3238 html: ' ' ,
3339 script: ' ' ,
34- isUpdated: true
40+ isUpdated: false ,
41+ isParsed: false
3542 }
3643 },
3744 computed: mapState ({
3845 candidates : state => state .Cache .viewItems
3946 }),
4047 mounted () {
41- this .html = ' <div class="_cv_content_loading"><svg class="_cv_circular" viewBox="25 25 50 50">' +
42- ' <circle class="_cv_path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>' +
43- ' </svg></div>'
4448 this .resource = this .$route .params
4549 console .info (' content panel mounted:' , this .resource , this .candidates )
4650 if (this .resource .type ) {
@@ -71,8 +75,8 @@ export default {
7175 this .isUpdated = true
7276 return
7377 }
74- // console.debug('viewname: ', contentView )
75- events .emit (' ContentView:' + contentView, ' load' , this .resource ._path )
78+ const path = require ( ' path ' )
79+ events .emit (' ContentView:' + contentView, ' load' , path . normalize ( this .resource ._path ) )
7680 this .isUpdated = true
7781 },
7882 methods: {
@@ -103,6 +107,7 @@ export default {
103107 this .html = HtmlLoader .load (value .body )
104108 this .script = value .script
105109 this .isUpdated = false
110+ this .isParsed = true
106111 }
107112 }
108113}
@@ -173,5 +178,8 @@ export default {
173178 left : 16px ;
174179 position : absolute ;
175180 content : " \E604 " ;
181+ }
182+ .__cv_transition_content {
183+
176184}
177185 </style >
0 commit comments