Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Popup 弹出的内容区域只有设置 width 的一半 #55

Closed
caiyongmin opened this issue Nov 21, 2017 · 9 comments
Closed

Popup 弹出的内容区域只有设置 width 的一半 #55

caiyongmin opened this issue Nov 21, 2017 · 9 comments

Comments

@caiyongmin
Copy link

Before you start writing a issue,Please make sure there have not the same issue.

一、Your development environment(weex、weex-toolkit、system and more.)

  • weex-toolkit
  • Mac OS

二、Expected behavior and actual behavior.

Expected behavior

弹出的内容区域等于设置的 width 值。
image

Actual behavior

弹出的内容区域只有设置 width 值的一半。

三、Steps to reproduce the problem.

使用通用 demo 就可以复现。

@tw93
Copy link
Member

tw93 commented Nov 21, 2017

you can add this in your webpack.config.js weexteam/pack-create-for-Apache-Weex@ee820f3#diff-79e419d0157b98ec6be582b1b394d819

or you can update the weexpack to latest and again create it

Try it. If there is no problem, you can close this issue

erha19 added a commit to weexteam/pack-create-for-Apache-Weex that referenced this issue Nov 21, 2017
@tw93 tw93 closed this as completed Nov 21, 2017
@caiyongmin
Copy link
Author

i already add those code:

{
        test: /\.vue(\?[^?]+)?$/,
        use: [{
          loader: 'vue-loader',
          options: {
            /**
             * important! should use postTransformNode to add $processStyle for
             * inline style normalization.
             */
            compilerModules: [
              {
                postTransformNode: el => {
                  el.staticStyle = `$processStyle(${el.staticStyle})`
                  el.styleBinding = `$processStyle(${el.styleBinding})`
                }
              }
            ]
          }
        }]
      },

@tw93
Copy link
Member

tw93 commented Nov 21, 2017

@caiyongmin Is that all right?

@caiyongmin
Copy link
Author

caiyongmin commented Nov 21, 2017

@tw93 nope, still have the problem.

@tw93 tw93 reopened this Nov 21, 2017
@caiyongmin
Copy link
Author

我觉得问题不是出在这儿,扫仓库首页的二维码查看,也是有这样的问题。
左边弹出来的 popup 的宽度只有设置宽度(500)的一半(250)。

image

@tw93
Copy link
Member

tw93 commented Nov 21, 2017

That should be correct , Because it's based on 750,The number you set should be in this ratio

@caiyongmin
Copy link
Author

image

确实是由于 设备像素比 的问题,transform: translateX(250px) 里面的值是 250px
但是 width: 500px 里面的值是 500px,感觉就有点奇怪,应该是 250px 才对。如果是 500px 的话,左边就有一大片空白需要用 padding-left 填充,不然就看不到设置的内容。

image

@tw93
Copy link
Member

tw93 commented Nov 21, 2017

weex update weexpack

Recreate a project and replace it. do not forget

npm i

npm i babel-preset-stage-0 -D

and you can see it here https://github.com/tw93/weex-ui-with-toolkit

image

@tw93 tw93 closed this as completed Nov 21, 2017
@caiyongmin
Copy link
Author

OK, thx! I'll check the webpack configuration to see what went wrong.

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

No branches or pull requests

2 participants