feat:添加随机生成和清空功能

This commit is contained in:
2025-06-26 16:32:57 +08:00
parent 9ffa009786
commit 0992d9f2d1
13 changed files with 357 additions and 212 deletions
@@ -5,7 +5,16 @@ Component({
/**
* 组件的属性列表
*/
properties: {},
properties: {
width: {
type: String,
value: '', // 按钮宽度
},
placeholder: {
type: String,
value: '请输入文字',
},
},
/**
* 组件的初始数据
*/
@@ -1,4 +1,6 @@
<view class="word-input-container">
<view
class="word-input-container"
style="{{width ? 'width:' + width + ';' : ''}}">
<van-icon
class-prefix="toy-icon"
name="translate"
@@ -7,6 +9,6 @@
<input
class="word-input"
type="text"
placeholder="请输入小朋友喜欢的文字"
placeholder="{{placeholder}}"
bindconfirm="onConfirm" />
</view>