[Vue warn]: Extraneous non-props attributes (class)

// 最外层多个标签,无法在使用子组件标签上定义 class
  // 会报错:[Vue warn]: Extraneous non-props attributes (class) 
  // were passed to component but could not be automatically inherited 
  // because component renders fragment or text root nodes. 
  // at at
  // 下面把这个问题解决了:绑定父标签的属性值
  app.component('demo3', {
    template: `
       

zibo31

       
zibo32

    `
  });

你可能感兴趣的:(开发DEMO,vue2.0,vue3.2,vue.js,javascript,前端)