From 0379cef6b482ab41fb11899c727ee5b755269840 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 6 Nov 2025 10:38:56 +0800 Subject: [PATCH] =?UTF-8?q?add:=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E5=9C=B0=E6=AD=A5=E6=8C=89=E9=92=AE=E7=BB=84=E4=BB=B6=E5=92=8C?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=EF=BC=8C=E6=9B=BF=E4=BB=A3=E5=B9=B6=E7=AE=80?= =?UTF-8?q?=E5=8C=96=E5=8E=9F=E6=9C=89=E6=8C=89=E9=92=AE=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E9=99=8D=E4=BD=8E=E9=A1=B5=E9=9D=A2=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9A=84=E5=A4=8D=E6=9D=82=E5=BA=A6=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 67 ++++++ components/bottomBtn/bottomBtnGroup.vue | 299 ++++++++++++++++++++++++ 2 files changed, 366 insertions(+) create mode 100644 components/bottomBtn/bottomBtnGroup.vue diff --git a/README.md b/README.md index 3818156..b3277f0 100644 --- a/README.md +++ b/README.md @@ -55,4 +55,71 @@ config.header['platform'] = 'APP' +``` + +# 以下为复杂页面的完整配置参数 + +```json + { + "path": "pages/index/index", // 首页 + "style": { + "navigationBarTitleText": "首页", // 页面标题 + "enablePullDownRefresh": true, // 开启下拉刷新 + "backgroundColor": "#F8F8F8", // 导航栏背景颜色 + "onReachBottomDistance": 100, // 设置页面上拉触底事件触发时距离页面底部的距离,默认是50px + "app-plus": { // 以下是App平台特有配置 + "titleNView": { + "titleSize": "16px" // App端原生导航栏标题字体大小 + "titleColor": "#fff", + "buttons": [{ // 导航栏右侧按钮,下面是使用icon展示的示例 + "text": "\ue60f", + "fontSize": "30px", + "fontSrc": "/static/iconfont.ttf" + }] + } + } + } +} +``` + +## 以下为底部按钮列表的使用方式 +```js +//按钮列表的引入 +import bottomBtnGroup from '@/components/bottomBtn/bottomBtnGroup.vue' +//注册组件 +components: { + bottomBtnGroup +}, +//UI 引用 + +// vue Data定义 + data() { + return { + //form 底部按钮栏配置 + bottomBtnList: [{ + label: "新增", + type: "primary", + event: (done) => { // 接收 done 回调 // ✅ 箭头函数,this 指向组件 + setTimeout(() => { + // // 在这里执行你想要延迟执行的函数或代码 + console.log("延时5秒") // 调用你的函数 + this.containCallMethods(done);//你需要执行的方法 + }, 5000); + //this.containCallMethods(done); + }, + }, + { + label: "取消", + type: "primary", + event: function() { + //方式2: + return new Promise(resolve => { + console.log("取消方法完成") + setTimeout(resolve, 5000); + }); + } + }, + ], + } +} ``` \ No newline at end of file diff --git a/components/bottomBtn/bottomBtnGroup.vue b/components/bottomBtn/bottomBtnGroup.vue new file mode 100644 index 0000000..7e1f780 --- /dev/null +++ b/components/bottomBtn/bottomBtnGroup.vue @@ -0,0 +1,299 @@ + + + + + + \ No newline at end of file