Giter Club home page Giter Club logo

Comments (5)

dusdong avatar dusdong commented on August 16, 2024

我的项目也报错了,之前很正常,没做任何修改。只是换了台电脑,重新 npm i,就报错了。

错误信息:

PickerComponent.html:1 ERROR TypeError: Cannot read property 'target' of undefined
    at PickerComponent._onFocus (ngx-weui-picker.js:501)
    at Object.eval [as handleEvent] (PickerComponent.html:7)
    at handleEvent (core.js:43993)
    at callWithDebugContext (core.js:45632)
    at Object.debugHandleEvent [as handleEvent] (core.js:45247)
    at dispatchEvent (core.js:29804)
    at core.js:42925
    at HTMLInputElement.<anonymous> (platform-browser.js:2668)
    at ZoneDelegate.invokeTask (zone-evergreen.js:391)
    at Object.onInvokeTask (core.js:39680)

from ngx-weui.

dusdong avatar dusdong commented on August 16, 2024

换到之前的电脑,还是出错。呃~

from ngx-weui.

dusdong avatar dusdong commented on August 16, 2024

我调试了下源代码,picker.componts.ts 第212行代码报的错:

  _onFocus() {
    arguments[0].target.blur();
  }

arguments[0] 没有被赋值

from ngx-weui.

dusdong avatar dusdong commented on August 16, 2024

另外,日期选择弹窗的样式不知为啥都对不上了,难道是因为 weui 新版本不包含这部分样式?手动添加后,恢复正常

.weui-picker {
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 0;
  z-index: 5000;
  background-color: #fff;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translate(0, 100%);
  transform: translate(0, 100%);
  transition: -webkit-transform .3s;
  transition: transform .3s;
  transition: transform .3s, -webkit-transform .3s
}

.weui-picker__hd {
  display: flex;
  padding: 16px;
  padding: 16px calc(16px + env(safe-area-inset-right)) 16px calc(16px + env(safe-area-inset-left));
  position: relative;
  text-align: center;
  font-size: 17px;
  line-height: 1.4
}

.weui-picker__hd:after {
  content: " ";
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 1px;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  color: rgba(0, 0, 0, .1);
  -webkit-transform-origin: 0 100%;
  transform-origin: 0 100%;
  -webkit-transform: scaleY(.5);
  transform: scaleY(.5)
}

.weui-picker__action {
  display: block;
  flex: 1;
  color: #576b95
}

.weui-picker__action:first-child {
  text-align: left;
  color: rgba(0, 0, 0, .9)
}

.weui-picker__action:last-child {
  text-align: right
}

.weui-picker__bd {
  display: flex;
  position: relative;
  background-color: #fff;
  height: 240px;
  overflow: hidden
}

.weui-picker__group {
  flex: 1;
  position: relative;
  height: 100%
}

.weui-picker__group:first-child .weui-picker__item {
  padding-left: env(safe-area-inset-left)
}

.weui-picker__group:last-child .weui-picker__item {
  padding-right: env(safe-area-inset-right)
}

.weui-picker__mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  z-index: 3;
  background: linear-gradient(180deg, hsla(0, 0%, 100%, .95), hsla(0, 0%, 100%, .6)), linear-gradient(0deg, hsla(0, 0%, 100%, .95), hsla(0, 0%, 100%, .6));
  background-position: top, bottom;
  background-size: 100% 102px;
  background-repeat: no-repeat;
  -webkit-transform: translateZ(0);
  transform: translateZ(0)
}

.weui-picker__indicator {
  width: 100%;
  height: 34px;
  position: absolute;
  left: 0;
  top: 102px;
  z-index: 3
}

.weui-picker__indicator:before {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 1px;
  border-top: 1px solid rgba(0, 0, 0, .1);
  color: rgba(0, 0, 0, .1);
  -webkit-transform-origin: 0 0;
  transform-origin: 0 0;
  -webkit-transform: scaleY(.5);
  transform: scaleY(.5)
}

.weui-picker__indicator:after {
  content: " ";
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 1px;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  color: rgba(0, 0, 0, .1);
  -webkit-transform-origin: 0 100%;
  transform-origin: 0 100%;
  -webkit-transform: scaleY(.5);
  transform: scaleY(.5)
}

.weui-picker__content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%
}

.weui-picker__item {
  height: 34px;
  line-height: 34px;
  text-align: center;
  color: rgba(0, 0, 0, .9);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden
}

.weui-picker__item_disabled {
  color: rgba(0, 0, 0, .5)
}```

from ngx-weui.

Leiloloaa avatar Leiloloaa commented on August 16, 2024

我调试了下源代码,picker.componts.ts 第212行代码报的错:

  _onFocus() {
    arguments[0].target.blur();
  }

arguments[0] 没有被赋值

请问解决办法有找到吗

from ngx-weui.

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.