提交 873141ba 编写于 作者: D DCloud_LXH

chore: 处理 warning

上级 a4b9d0a6
......@@ -20,18 +20,20 @@
methods: {
// @ts-ignore
_change(e : RadioGroupChangeEvent) {
const selected = this.items.find((item) : boolean => {
return item.name === e.detail.value as string
})
this.current = selected?.value as number
const selected = this.items.find((item: ItemType) : boolean => {
return item.name === e.detail.value
}) as ItemType | null
if (selected !== null) {
this.current = selected.value
this.$emit('change', this.current)
uni.showToast({
icon: 'none',
title: '当前选中:' + selected?.name,
title: '当前选中:' + selected.name,
})
}
}
}
}
</script>
<template>
......
......@@ -48,10 +48,6 @@
this.showClearIcon = false
this.$emit('confirm', this.getValue(this.inputClearValue))
},
// @ts-ignore
confirm(e : InputConfirmEvent) {
// this.$emit('confirm', this.getValue(e.detail.value))
},
blur() {
this.showClearIcon = false
},
......@@ -85,8 +81,7 @@
</view>
</view>
<view class="uni-input-wrapper input-wrapper">
<input class="uni-input" :type="inputType" :value="inputClearValue" :placeholder="title" @input="input"
@confirm="confirm" @blur="blur" @focus="focus" />
<input class="uni-input" :type="inputType" :value="inputClearValue" :placeholder="title" @input="input" @blur="blur" @focus="focus" />
<image class="input-wrapper_image" src="/static/icons/clear.png" v-if="showClearIcon" @click="clearIcon">
</image>
</view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册