Comments (5)
我的项目也报错了,之前很正常,没做任何修改。只是换了台电脑,重新 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.
换到之前的电脑,还是出错。呃~
from ngx-weui.
我调试了下源代码,picker.componts.ts 第212行代码报的错:
_onFocus() {
arguments[0].target.blur();
}
arguments[0] 没有被赋值
from ngx-weui.
另外,日期选择弹窗的样式不知为啥都对不上了,难道是因为 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.
我调试了下源代码,picker.componts.ts 第212行代码报的错:
_onFocus() { arguments[0].target.blur(); }
arguments[0] 没有被赋值
请问解决办法有找到吗
from ngx-weui.
Related Issues (20)
- 7.0.0升级7.1.0 rc 1后使用ToptipsService报错 HOT 2
- weui-date-picker type='datetime'中分钟是否能设置只有00和30选择 HOT 2
- weui-infiniteloader HOT 3
- scss
- 项目已经用了scss,如果正确引入这个库 HOT 1
- 请教,8.0.0版本中ng build -prod报错 HOT 1
- Uploader中的index无效 HOT 2
- tab1\tab2\tab3个tab,选中tab2后在tab2中跳转链接后,返回上一页面,却自动选中了tab1,而不是tab2 HOT 1
- 您好,我在使用datePicker和cityPicker的时候选择省之后后面的市不会跟着变化,并且样式也错乱了,麻烦看下 HOT 11
- Bug when building for production
- infiniteloader组件加载完不显示finished内容,持续loading;单页多内容切换,restart方法未重置target.scrollTop,造成重复loading
- 调用支付JSAPI缺少参数:package HOT 1
- select 下拉框 选项和框分离 是缺少了什么样式吗 HOT 1
- How does a Dialog pop-up display a component? HOT 1
- Direct Picker组件的groups属性绑定一个数组后,在其他地方有一个事件,给ngModel绑定的属性赋值,Direct Picker无法显示该值,普通的input可以显示。
- weui-dialog对话框,使用组件Prompt形式,能支持text、radio、textarea等属性框同时在一个对话框显示吗?
- 修改为 custom-webpack 后,样式不见了。 HOT 5
- 如何强制使用亮色主题 HOT 1
- 请问下,有适配最新版Angular(16.x)的计划吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-weui.