From 3219e5817add205c21bb2ce6414a51af3364384a Mon Sep 17 00:00:00 2001 From: wanganxp Date: Thu, 12 Sep 2019 04:19:24 +0800 Subject: [PATCH] Update form.md --- docs/component/form.md | 74 ++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/docs/component/form.md b/docs/component/form.md index 71bcee3788..1d60bf3aa3 100644 --- a/docs/component/form.md +++ b/docs/component/form.md @@ -16,7 +16,7 @@ ```html + + + + ``` -```javascript -export default { - data() { - return { - pickerHidden: true, - chosen: '' - } - }, - methods: { - pickerConfirm: function(e) { - this.pickerHidden = true - this.chosen = e.target.value - }, - pickerCancel: function(e) { - this.pickerHidden = true - }, - pickerShow: function(e) { - this.pickerHidden = false - }, - formSubmit: function(e) { - console.log('form发生了submit事件,携带数据为:' + JSON.stringify(e.detail.value)) - }, - formReset: function(e) { - console.log('清空数据') - this.chosen = '' - } - } -} -``` - ![uniapp](https://img-cdn-qiniu.dcloud.net.cn/uniapp/doc/img/form.png?t=201857) **tips** -- [插件市场](http://ext.dcloud.net.cn/search?q=%E8%A1%A8%E5%8D%95%E6%A0%A1%E9%AA%8C)有表单校验插件 \ No newline at end of file +- [插件市场](http://ext.dcloud.net.cn/search?q=%E8%A1%A8%E5%8D%95%E6%A0%A1%E9%AA%8C)有表单校验插件 -- GitLab