zoukankan      html  css  js  c++  java
  • Mixin result declared without body

    1、错误描述

    F:dojoabcdabccviewsmainmain.pug:10:1 8| include header.pug 9| div(id='main') > 10| mixin result --------^ 11| ui 12| li #{result.user_name} 13| include left.pug Mixin result declared without body
    Error: F:dojoabcdabccviewsmainmain.pug:10:1
        8| include header.pug
        9| div(id='main')
      > 10| mixin result
    --------^
        11| ui
        12| li #{result.user_name}
        13| include left.pug
    
    Mixin result declared without body
        at makeError (F:dojoabcdabcc
    ode_modulespug-errorindex.js:32:13)
        at Parser.error (F:dojoabcdabcc
    ode_modulespug-parserindex.js:53:15)
        at Parser.parseMixin (F:dojoabcdabcc
    ode_modulespug-parserindex.js:871:12)
        at Parser.parseExpr (F:dojoabcdabcc
    ode_modulespug-parserindex.js:204:21)
        at Parser.parse (F:dojoabcdabcc
    ode_modulespug-parserindex.js:112:25)
        at parse (F:dojoabcdabcc
    ode_modulespug-parserindex.js:12:20)
        at Object.parse (F:dojoabcdabcc
    ode_modulespuglibindex.js:126:22)
        at Function.loadString [as string] (F:dojoabcdabcc
    ode_modulespug-loadindex.js:45:21)
        at compileBody (F:dojoabcdabcc
    ode_modulespuglibindex.js:86:18)
        at Object.exports.compile (F:dojoabcdabcc
    ode_modulespuglibindex.js:243:16)

    2、错误原因

    doctype html
    html
    head 
    style
    link(rel='stylesheet', href='../../stylesheets/main.css')
    body
    block content
    include header.pug
    div(id='main')
    mixin result
    ui
    li #{result.user_name}
    include left.pug
    router.get('/main',function(req,res){
      var conn = mysql.createConnection({
        host: 'localhost',
        user: 'root',
        password: 'root',
        database: 'cdm'
      });
    
      conn.connect();
      conn.query('select * from b_user',function(error,results,fields){
        if(error) throw error;
        console.log(results);
        res.render('main/main',{result:results});
      });
      
    });

    3、解决办法

  • 相关阅读:
    html+php超大视频切片上传
    html+php超大视频分片上传
    html+php超大视频上传前端
    html+php超大视频上传讨论
    html+php超大视频上传分享
    MATLAB的设置视点函数view
    matlab 绘制三维图并标注每个点的坐标
    Spring Boot 五种热部署方式,极速开发就是生产力!
    如何提高服务器的并发处理能力?硬核!
    WEB攻击手段及防御第3篇-CSRF
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13313737.html
Copyright © 2011-2022 走看看