mirror of
https://gitee.com/TSpecific/tuniao-ui.git
synced 2026-03-12 18:44:01 +08:00
Compare commits
4 Commits
0d09b34409
...
b44bb802ed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b44bb802ed | ||
|
|
9dd0ea76b5 | ||
|
|
125866d0e1 | ||
|
|
c6bbf0a829 |
@@ -12,6 +12,12 @@
|
||||
}"
|
||||
@tap.stop="inputClick"
|
||||
>
|
||||
<view
|
||||
v-if="showLeftIcon"
|
||||
class="tn-input__left-icon__item tn-input__left-icon__clear"
|
||||
>
|
||||
<tn-button shape="icon" :scene="scene" :block-time="blockTime" @click="leftIconClick"><view class="icon" :class="[`tn-icon-${leftIcon}`]"></view></tn-button>
|
||||
</view>
|
||||
<textarea
|
||||
v-if="type === 'textarea'"
|
||||
class="tn-input__input tn-input__textarea"
|
||||
@@ -240,6 +246,16 @@
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// 是否在输入框内最左边显示图标
|
||||
showLeftIcon: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 最左边图标的名称
|
||||
leftIcon: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
//场景:debounce :防抖模式 throttle:节流模式
|
||||
scene:{
|
||||
type: String,
|
||||
@@ -309,6 +325,9 @@
|
||||
this.$on("on-form-item-error", this.onFormItemError)
|
||||
},
|
||||
methods: {
|
||||
leftIconClick(){
|
||||
this.$emit('leftClick', this.defaultValue)
|
||||
},
|
||||
rightIconClick(){
|
||||
this.$emit('rightClick', this.defaultValue)
|
||||
},
|
||||
@@ -428,7 +447,8 @@
|
||||
&--error {
|
||||
border-color: $tn-color-red !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
&__right-icon {
|
||||
line-height: 1;
|
||||
.icon {
|
||||
@@ -457,5 +477,32 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__left-icon {
|
||||
line-height: 1;
|
||||
&__item {
|
||||
margin-left: 0rpx;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
&__clear {
|
||||
.icon {
|
||||
font-size: 32rpx;
|
||||
color: $tn-font-sub-color;
|
||||
}
|
||||
}
|
||||
|
||||
&__select {
|
||||
transition: transform .4s;
|
||||
|
||||
.icon {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
&--reverse {
|
||||
transform: rotate(-180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -20,7 +20,6 @@ export function throttleFun(func, delay=500) {
|
||||
timer = setTimeout(() => {
|
||||
//执行前清空
|
||||
timer = null;
|
||||
console.log("执行了")
|
||||
func.apply(this, args);
|
||||
}, delay);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user