Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你好, 请问多个页面应该怎么配置呢? #18

Open
weiyi01 opened this issue Jan 3, 2020 · 8 comments
Open

你好, 请问多个页面应该怎么配置呢? #18

weiyi01 opened this issue Jan 3, 2020 · 8 comments

Comments

@weiyi01
Copy link

weiyi01 commented Jan 3, 2020

你好, 请问多个页面应该怎么配置呢?

@weiyi01
Copy link
Author

weiyi01 commented Jan 3, 2020

调用 evalDOM 提示找不到这个方法 怎么回事呢?

@weiyi01
Copy link
Author

weiyi01 commented Jan 3, 2020

const createSkeletonHTML = require('draw-page-structure/evalDOM')

createSkeletonHTML({
// ...
background: 'red',
animation: 'opacity 1s linear infinite;'
}).then(skeletonHTML => {
console.log(skeletonHTML)
}).catch(e => {
console.error(e)
})
这一步是怎么使用的哦?

@famanoder
Copy link
Owner

现在只支持对单个页面生成骨架屏,没打算支持多个页面的配置,你可以对每个需要的页面修改配置,执行一次命令;

@weiyi01
Copy link
Author

weiyi01 commented Jan 3, 2020

现在只支持对分区页面生成骨架屏,没打算支持多个页面的配置,你可以对每个需要的页面修改配置,执行一次命令;

那是只能手动 添加路径然后生成文件吗?
const createSkeletonHTML = require('draw-page-structure / evalDOM')
这个方法是 怎么调用的哦?是什么意思哦?

@famanoder
Copy link
Owner

famanoder commented Jan 3, 2020

  1. 通过 dps init 会生成一个 dps.config.js 的配置文件,修改里面的 output 字段;
  2. npm i draw-page-structure 后就可以在项目里调用 require('draw-page-structure/evalDOM');

@weiyi01
Copy link
Author

weiyi01 commented Jan 3, 2020

  1. 通过 dps init 会生成一个 dps.config.js 的配置文件,修改里面的 output 字段;
  2. npm i draw-page-structure 后就可以在项目里调用 require('draw-page-structure/evalDOM');

调用出骨架屏之后 但是骨架是白色的 查看元素 background: 为 undefined , 设置了background 颜色 重新 install 也没有效果

@weiyi01
Copy link
Author

weiyi01 commented Jan 3, 2020

其他js文件有用吗? 我看还有pp.js , index.js 这些,?

@weiyi01
Copy link
Author

weiyi01 commented Jan 3, 2020

h5页面会先出现 页面部分内容 骨架才会出来 是什么原因哦?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants