You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
601 B
Vue
32 lines
601 B
Vue
2 years ago
|
<template>
|
||
|
<div v-if="active">
|
||
|
<slot />
|
||
|
</div>
|
||
|
<div v-else class="card">
|
||
|
<div class="card-body">
|
||
|
<div>
|
||
|
<slot name="lock">
|
||
|
<p v-if="name">Click to load external content from {{ name }}.</p>
|
||
|
<p v-else>Click to load external content.</p>
|
||
|
</slot>
|
||
|
</div>
|
||
|
<button class="btn btn-primary" @click="active = true">load content</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
name: "ExternalContentWrapper",
|
||
|
props: {
|
||
|
name: String,
|
||
|
},
|
||
|
data: () => ({
|
||
|
active: false,
|
||
|
}),
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
|
|
||
|
</style>
|