存档
This commit is contained in:
parent
e8c0fa869e
commit
b34af3da0b
@ -53,10 +53,13 @@ export default defineComponent({
|
|||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
isActiveRoute(routename) {
|
isActiveRoute:function(routename) {
|
||||||
// Example: Apply style if route name starts with 'user-'
|
// Example: Apply style if route name starts with 'user-'
|
||||||
console.log('Current route name:', this.$route.name, 'Comparing with:', routename);
|
console.log('Current route name:', this.$route.name, 'Comparing with:', routename);
|
||||||
return this.$route.name === routename;
|
return this.$route.name === routename;
|
||||||
|
},
|
||||||
|
toExamples:function(){
|
||||||
|
window.location.href='/Examples';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -84,6 +87,15 @@ export default defineComponent({
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="normalcontenttext" style="width: 100%;"
|
||||||
|
v-if="isActiveRoute('/Examples')">
|
||||||
|
</span>
|
||||||
|
<span class="normalcontenttext" style="width: 100%;" v-else>
|
||||||
|
<button type="button" class="btn btn-primary"
|
||||||
|
@click="toExamples" style="width: 100%;">
|
||||||
|
查看更多
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user