Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

slot vuetify js

<button type="submit">
  <slot>Envoyer</slot>
</button>
Comment

use of slot in vue

/*first component*/
<template>
  <header>
    <h2>{{ msg }}</h2>
  </header>
  <div>
    <the-card cardTitle="About Me">
       <p>Hi,Iam Mamunur Rashid Rimon, blah blah</p>
    </the-card>
    <the-card cardTitle="Apple iPhone 12 Pro">
      <img
        src="https://fdn2.gsmarena.com/vv/bigpic"
        alt=""
      />
      <p>
        Versions: A2407 (International); A2341 (USA)
        A2408 (China, Hong Kong)
      </p>
    </the-card>
    <the-card cardTitle="Services">I
      <ul>
       <li>Web Development</li>
      </ul>
    </the-card>
  </div>
</template>
<script>
import TheCard from "./TheCard.vue";
export default{
  data(){
    return{
      msg: "Vue3 Bangla Tutorial"
    };
  },
  components:{
    TheCard
};
</script>


/*first component*/






/*second component*/
<template>
  <div class="the-card">
    <div class="the-card_title">
     {{ cardTitle }}
    </div>
    <div class="the-card_body">
    <slot>default value if slot is empty</slot>
    </div>
  </div>
</template>
<script>
export default{
 props: ["cardTitle"]
};
</script>

/*second component*/
Comment

what is slot in vue.js

// app.vue
<template>
  <current-user>
    <template v-slot:default="slotProps">{{ slotProps.user.firstName }}</template>    
  </current-user>
</template>
Comment

PREVIOUS NEXT
Code Example
Javascript :: js set to array 
Javascript :: how to install javascript 
Javascript :: work with query string javascript 
Javascript :: example custom theme material ui 
Javascript :: js sort array 
Javascript :: Sort by month name javascript 
Javascript :: for pug 
Javascript :: delete icon 
Javascript :: react native charts 
Javascript :: jq append value to array 
Javascript :: js filter array 
Javascript :: array max 
Javascript :: JavaScript ForEach This Argument 
Javascript :: promise in js 
Javascript :: how to get data from multiple tables mongoose 
Javascript :: node.js Readable Streams 
Javascript :: pm2 change log timestamp 
Javascript :: react-native-image-viewing 
Javascript :: how to use axios filter 
Javascript :: jquery OR operation 
Javascript :: discord bot not responding to commands 
Javascript :: AJAX - XMLHttpRequest 
Javascript :: vue create component 
Javascript :: arrow function in javascript 
Javascript :: !! javascript 
Javascript :: passing ref to child component 
Javascript :: javascript two dimensional array 
Javascript :: replace() in javascript 
Javascript :: react native how to pass id from list to function 
Javascript :: how to display ä in js 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =