Giter Site home page Giter Site logo

Comments (6)

hui-fly avatar hui-fly commented on August 22, 2024

或者除了background可配置,可不可以增加一些配置项呢

from dps.

hui-fly avatar hui-fly commented on August 22, 2024

研究了以下,通过includeElement可以解决

from dps.

hui-fly avatar hui-fly commented on August 22, 2024

觉得drawBlock方法的width, height, top, left等参数值默认赋值为node节点的相应值更好

from dps.

famanoder avatar famanoder commented on August 22, 2024

看看 evalDOM.js 的41行,有对 border-radius 做处理;

from dps.

hui-fly avatar hui-fly commented on August 22, 2024

@famanoder 是的大佬,但其实我的意思是有些节点本身没有border-radius,我希望在生成的骨架屏中给这个节点加上border-radius,这个可以通过includeElement解决,但是稍微有点麻烦,如果能drawBlock方法的width, height, top, left等参数值默认赋值为该node节点的相应值更好

from dps.

famanoder avatar famanoder commented on August 22, 2024
  1. 可以加个参数支持 border-radius,我找时间加上或者你有时间提个 pr 也行呀;

如果能drawBlock方法的width, height, top, left等参数值默认赋值为该node节点的相应值更好

  1. 这里的骨架屏是零碎的 div 拼接的,也就是都是 fixed 定位的,节点数非常少;你说的赋值为节点相应的值,需要复用页面所有的节点和相关的样式,之前考虑过这个方案,生成的节点量一般大小的页面也有几十 K,还不包括抽取样式,最终想到一个“走捷径”的方案,就是节点的位置取绝对值,换算成百分比,虽然还会有差异,但是整体来说我觉得更优,具体细节可以看看代码;

from dps.

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.