Coder Social home page Coder Social logo

vue中设置font-size不生效 about print.js HOT 3 OPEN

java6688 avatar java6688 commented on June 2, 2024
vue中设置font-size不生效

from print.js.

Comments (3)

GGqianmo avatar GGqianmo commented on June 2, 2024

如果你想所有字体都统一的话,直接在params了添加一个配置项“font_size”:
params

如果想每个文本显示不同字体大小,我是直接把“node_modules”>“print-js”>“src”下的所有文件copy到项目代码里,然后删掉“function.js”文件里面的一节代码就能用了。
collectStyles
这个插件无法实现不同字体尺寸的原因就在这里,它给打印节点内的所有子节点都进行遍历,然后又加了“font-size: ' + params.font_size + ' !important;”限制了字体大小只能统一一个尺寸,所以我就把这块删了。
原本是这样的:
init

from print.js.

qiushuanglin avatar qiushuanglin commented on June 2, 2024

好像也没有效果也

from print.js.

Luochao0511 avatar Luochao0511 commented on June 2, 2024

好像也没有效果也
需要修改的是node-model里面,然后需要重启项目

from print.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.