Advertisement
linuxyamigos

Untitled

Feb 1st, 2020
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <template>
  2.     <div class="container">
  3.       <ingrediente v-for="ing in ingredientes" :key="ing.id"
  4.       :id="ing.id"
  5.       :namae="ing.namae"
  6.       :img="ing.img"
  7.       :description="ing.description"
  8.       ></ingrediente>
  9.     </div>
  10. </template>
  11.  
  12.  
  13. <script>
  14. import ingrediente from '~/components/Ingrediente';
  15.  
  16. export default {
  17.     asyncData() {
  18.         //return axios.get('...').then().catch();
  19.         return new Promise((resolve, reject)=>{
  20.             setTimeout({
  21.                 resolve({
  22.                     ingredientes: [
  23.                         {
  24.                             namae: "huevos!",
  25.                             img: "https://specials-images.forbesimg.com/imageserve/961697160/960x0.jpg",
  26.                             description: "hhhh",
  27.                             id: "1"
  28.                         },
  29.                         {
  30.                             namae: "carne!",
  31.                             img: "https://2rdnmg1qbg403gumla1v9i2h-wpengine.netdna-ssl.com/wp-content/uploads/sites/3/2019/10/redMeat-849360782-770x553-745x490.jpg",
  32.                             description: "cccc",
  33.                             id: "2"
  34.                         },
  35.                         {
  36.                             namae: "aceite!",
  37.                             img: "https://i.ndtvimg.com/i/2017-10/olive-oil_620x350_81507639762.jpg",
  38.                             description: "Aceite de girasol",
  39.                             id: "3"
  40.                         }
  41.                     ]
  42.                 });
  43.             },1500);
  44.         });
  45.     },
  46.     components: {
  47.         ingrediente
  48.     }
  49. }
  50. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement