From 19c852e7963a75e328aa079424b284e6944ecdc6 Mon Sep 17 00:00:00 2001 From: 1314mxc <1562494673@qq.com> Date: Tue, 13 Oct 2020 10:46:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96calendar=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?alphabet=E7=BB=84=E4=BB=B6=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/alphabet/alphabet.js | 5 +++++ components/alphabet/alphabet.wxml | 2 +- pages/alphabet/alphabet.js | 12 ++++-------- pages/alphabet/alphabet.wxml | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/components/alphabet/alphabet.js b/components/alphabet/alphabet.js index 41a480e..7cafd6f 100644 --- a/components/alphabet/alphabet.js +++ b/components/alphabet/alphabet.js @@ -56,5 +56,10 @@ Component({ } } }, + selector(e){ + this.triggerEvent('selector',{ + city_data:e.currentTarget.dataset.city + }) + } } }) diff --git a/components/alphabet/alphabet.wxml b/components/alphabet/alphabet.wxml index 92544ff..d12764f 100644 --- a/components/alphabet/alphabet.wxml +++ b/components/alphabet/alphabet.wxml @@ -6,7 +6,7 @@ {{item.alphabet}} - + {{cell}} diff --git a/pages/alphabet/alphabet.js b/pages/alphabet/alphabet.js index 24ed3d1..ea0a9b2 100644 --- a/pages/alphabet/alphabet.js +++ b/pages/alphabet/alphabet.js @@ -41,14 +41,10 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - // try{ - // var res=wx.getSystemInfoSync() - // this.apHeight=16 - // this.offsetTop=80 - // this.setData({ - // windowHeight:res.windowHeight+'px' - // }) - // }catch(e){} + }, + + selector(e){ + console.log(e.detail.city_data) }, diff --git a/pages/alphabet/alphabet.wxml b/pages/alphabet/alphabet.wxml index e5fc9c5..79d3126 100644 --- a/pages/alphabet/alphabet.wxml +++ b/pages/alphabet/alphabet.wxml @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file -- GitLab