diff --git a/wechatMp/components/UI/g-input/index.js b/wechatMp/components/UI/g-input/index.ts similarity index 87% rename from wechatMp/components/UI/g-input/index.js rename to wechatMp/components/UI/g-input/index.ts index d9525d1cb..906a55ac7 100644 --- a/wechatMp/components/UI/g-input/index.js +++ b/wechatMp/components/UI/g-input/index.ts @@ -35,12 +35,13 @@ Component({ value: false }, maxlength: { - type: Number + type: Number, + value: 140, } }, methods: { - handleInputChange(event) { + handleInputChange(event:any) { const { detail = {} } = event; const { value = '' } = detail; this.setData({ value }); @@ -48,11 +49,11 @@ Component({ this.triggerEvent('change', event); }, - handleInputFocus(event) { + handleInputFocus(event:any) { this.triggerEvent('focus', event); }, - handleInputBlur(event) { + handleInputBlur(event:any) { this.triggerEvent('blur', event); } } diff --git a/wechatMp/pages/examples/g-input/index.ts b/wechatMp/pages/examples/g-input/index.ts index dbc80d81b..de302e87f 100644 --- a/wechatMp/pages/examples/g-input/index.ts +++ b/wechatMp/pages/examples/g-input/index.ts @@ -7,5 +7,8 @@ Page({ value5: '', value6: '', value7: '' + }, + changeValue(e: any) { + console.log(e) } }); \ No newline at end of file diff --git a/wechatMp/pages/examples/g-input/index.wxml b/wechatMp/pages/examples/g-input/index.wxml index 6e88b6dce..b535da065 100644 --- a/wechatMp/pages/examples/g-input/index.wxml +++ b/wechatMp/pages/examples/g-input/index.wxml @@ -1,6 +1,6 @@ - + diff --git a/wechatMp/styles/base.less b/wechatMp/styles/base.less index a15dc5aa0..00b6ec689 100644 --- a/wechatMp/styles/base.less +++ b/wechatMp/styles/base.less @@ -74,10 +74,8 @@ @border-radius-small : 2px; -@btn-circle-size : 40rpx; +@btn-circle-size-large : 96rpx; -@btn-circle-size-mini : 30rpx; +@btn-circle-size : 88rpx; -@btn-circle-size-large : 48rpx; - -@btn-circle-size-small : 36rpx; +@btn-circle-size-small : 80rpx;