165、dir-input组件思路



以下内容仅供作者自己观看

dir-input

1、事件(focus、blur、change)

2、情形处理(是否为空、是否符合正则、两次输入是否一致)

3、状态改变

4、属性传参(初次数据、再次数据、label文字、规则提示文字、正误提示文字、选择正则匹配规则、输入内容的类型、密码图标在尾部是否出现)

5、密码图标切换逻辑

<input type="{{ thisType ? thisType : 'text' }}">

<img src="yincang.png" ng-click="isShowInner=true; thisType='text'" ng-show=" !isShowInner && isShowOuter">

<img src="xianshi.png" ng-click="isShowInner=false; thisType='password'" ng-show=" isShowInner && isShowOuter">






猜你喜欢

转载自www.cnblogs.com/gushixianqiancheng/p/12031193.html