zoukankan      html  css  js  c++  java
  • vue打印使用插件:vue-print-nb

    一、安装

    npm install vue-print-nb –save

    二、注册

    import Print from 'vue-print-nb'
    Vue.use(Print);

    三、使用

    页面中使用,给需要打印的容器加一个id,打印按钮传入这个id

    <div id="printMe" style="background:red;">
            <p>葫芦娃,葫芦娃</p>
            <p>一根藤上七朵花 </p>
            <p>小小树藤是我家 啦啦啦啦 </p>
            <p>叮当当咚咚当当 浇不大</p>
            <p> 叮当当咚咚当当 是我家</p>
            <p> 啦啦啦啦</p>
            <p>...</p>
            <div class="describle">
              <el-form :model="form" :rules="rules" ref="from" class="demo-ruleForm">
                <el-form-item label="姓名:" prop="name">
                  <el-input v-model="form.name"></el-input>
                </el-form-item>
                <el-form-item label="描述:" prop="describle">
                  <el-input
                    :disabled="detail"
                    type="textarea"
                    :rows="4"
                    :maxlength="2000"
                    placeholder=""
                    v-model="form.describle">
                  </el-input>
                </el-form-item>
              </el-form>
            </div>
        </div>
     
        <button v-print="'#printMe'">Print local range</button>
  • 相关阅读:
    HDU 1847 Good Luck in CET-4 Everybody!(博弈、找规律)
    HDU 1564 Play a game(博弈、找规律)
    HDU 2188 悼念512汶川大地震遇难同胞——选拔志愿者(巴什博弈)
    HDU 2516 取石子游戏(斐波那契博弈)
    HDU 1517 A Multiplication Game(博弈)
    HDU
    POJ-1182 食物链(并查集)
    POJ-1915 Knight Moves (BFS)
    python模块详解 time与date time
    python模块介绍和 import本质
  • 原文地址:https://www.cnblogs.com/zwh0910/p/14984717.html
Copyright © 2011-2022 走看看