From 94e7353eac0eab03f8ef5f979109f0f2befa1438 Mon Sep 17 00:00:00 2001
From: cunjinli <562275936@qq.com>
Date: Thu, 24 Oct 2019 10:02:24 +0800
Subject: [PATCH] =?UTF-8?q?v0.2=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0:=201.?=
=?UTF-8?q?=20fix=20bug=202.=20=E3=80=90=E5=A2=9E=E5=BC=BA=E3=80=91=20?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=84=E4=BB=B6=20form-page=20=E8=A1=A8?=
=?UTF-8?q?=E5=8D=95=E9=A1=B5=203.=20=E3=80=90=E5=A2=9E=E5=BC=BA=E3=80=91?=
=?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=E7=BB=84=E4=BB=B6=20actionsheet=20?=
=?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=8E=9F=E7=94=9Factionsheet=204.=20?=
=?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=20=E4=BC=98=E5=8C=96=20sli?=
=?UTF-8?q?deview=20=E5=8F=B3=E6=BB=91=E6=93=8D=E4=BD=9CUI?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/actionsheet/actionsheet.json | 4 +
src/actionsheet/actionsheet.less | 13 +
src/actionsheet/actionsheet.ts | 71 +++
src/actionsheet/actionsheet.wxml | 50 ++
src/badge/badge.json | 1 +
src/cell/cell.ts | 16 +
src/cell/cell.wxml | 12 +-
src/cells/cells.ts | 19 +-
src/cells/cells.wxml | 8 +-
src/checkbox-group/checkbox-group.ts | 7 +
src/checkbox/checkbox.wxml | 2 +-
src/form-page/form-page.json | 4 +
src/form-page/form-page.less | 3 +
src/form-page/form-page.ts | 32 ++
src/form-page/form-page.wxml | 33 ++
src/form/form-validator.ts | 2 +-
src/form/form.ts | 2 +-
src/form/validator.ts | 4 +
src/gallery/gallery.ts | 2 +-
src/gallery/gallery.wxml | 2 +-
.../half-screen-dialog.less | 25 +
src/half-screen-dialog/half-screen-dialog.ts | 32 +-
.../half-screen-dialog.wxml | 62 ++-
src/icon/base64.ts | 61 +++
src/icon/icon.json | 4 +
src/icon/icon.less | 14 +
src/icon/icon.ts | 52 ++
src/icon/icon.wxml | 14 +
src/icon/icondata.ts | 83 +++
src/index.json | 4 +
src/searchbar/searchbar.ts | 33 +-
src/slideview/slideview.ts | 27 +-
src/slideview/slideview.wxml | 10 +-
src/slideview/slideview.wxs | 98 +++-
src/uploader/uploader.ts | 2 +-
src/uploader/uploader.wxml | 2 +-
tools/demo/app.json | 4 +-
tools/demo/example/actionsheet/actionsheet.js | 24 +-
.../demo/example/actionsheet/actionsheet.json | 7 +-
.../demo/example/actionsheet/actionsheet.wxml | 15 +-
.../demo/example/actionsheet/actionsheet.wxss | 16 +-
tools/demo/example/cell/cell.wxml | 2 +-
tools/demo/example/flex/flex.wxss | 2 +-
tools/demo/example/form-page/form-page.js | 4 +
tools/demo/example/form-page/form-page.json | 6 +
tools/demo/example/form-page/form-page.wxml | 41 ++
tools/demo/example/form-page/form-page.wxss | 2 +
tools/demo/example/form/form.js | 8 +-
tools/demo/example/form/form.json | 1 +
tools/demo/example/form/form.wxml | 204 ++++----
.../half-screen-dialog/half-screen-dialog.js | 39 ++
.../half-screen-dialog.json | 5 +
.../half-screen-dialog.wxml | 39 ++
.../half-screen-dialog.wxss | 21 +
tools/demo/example/icons/icons.js | 493 +++++++++++++++++-
tools/demo/example/icons/icons.json | 4 +-
tools/demo/example/icons/icons.wxml | 55 +-
tools/demo/example/icons/icons.wxss | 41 +-
tools/demo/example/index.js | 4 +-
tools/demo/example/loading/loading.js | 5 +
tools/demo/example/loading/loading.wxml | 1 +
tools/demo/example/searchbar/searchbar.js | 6 +-
tools/demo/example/slideview/slideview.wxml | 4 +-
tools/demo/example/slideview/slideview.wxss | 4 +-
64 files changed, 1603 insertions(+), 264 deletions(-)
create mode 100644 src/actionsheet/actionsheet.json
create mode 100644 src/actionsheet/actionsheet.less
create mode 100644 src/actionsheet/actionsheet.ts
create mode 100644 src/actionsheet/actionsheet.wxml
create mode 100644 src/form-page/form-page.json
create mode 100644 src/form-page/form-page.less
create mode 100644 src/form-page/form-page.ts
create mode 100644 src/form-page/form-page.wxml
create mode 100644 src/icon/base64.ts
create mode 100644 src/icon/icon.json
create mode 100644 src/icon/icon.less
create mode 100644 src/icon/icon.ts
create mode 100644 src/icon/icon.wxml
create mode 100644 src/icon/icondata.ts
create mode 100644 tools/demo/example/form-page/form-page.js
create mode 100644 tools/demo/example/form-page/form-page.json
create mode 100644 tools/demo/example/form-page/form-page.wxml
create mode 100644 tools/demo/example/form-page/form-page.wxss
create mode 100755 tools/demo/example/half-screen-dialog/half-screen-dialog.js
create mode 100644 tools/demo/example/half-screen-dialog/half-screen-dialog.json
create mode 100755 tools/demo/example/half-screen-dialog/half-screen-dialog.wxml
create mode 100755 tools/demo/example/half-screen-dialog/half-screen-dialog.wxss
diff --git a/src/actionsheet/actionsheet.json b/src/actionsheet/actionsheet.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/src/actionsheet/actionsheet.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/src/actionsheet/actionsheet.less b/src/actionsheet/actionsheet.less
new file mode 100644
index 0000000..8ebd2b1
--- /dev/null
+++ b/src/actionsheet/actionsheet.less
@@ -0,0 +1,13 @@
+@import "../weui-wxss/src/style/widget/weui-tips/weui-mask.wxss";
+@import "../weui-wxss/src/style/widget/weui-tips/weui-actionsheet.wxss";
+
+.weui-mask.weui-mask_hidden {
+ opacity: 0;
+ transform: scale3d(1, 1, 0)
+}
+.weui-mask{
+ opacity: 1;
+ transform: scale3d(1, 1, 1);
+ transition: all 0.3s;
+}
+
diff --git a/src/actionsheet/actionsheet.ts b/src/actionsheet/actionsheet.ts
new file mode 100644
index 0000000..eaf4ce9
--- /dev/null
+++ b/src/actionsheet/actionsheet.ts
@@ -0,0 +1,71 @@
+Component({
+ options: {
+ multipleSlots: true, // 在组件定义时的选项中启用多slot支持
+ addGlobalClass: true
+ },
+ properties: {
+ title: { // 标题
+ type: String,
+ value: ''
+ },
+ showCancel: { // 是否显示取消按钮
+ type: Boolean,
+ value: true
+ },
+ cancelText: { // 取消按钮文案
+ type: String,
+ value: '取消'
+ },
+ maskClass: { // 遮罩层class
+ type: String,
+ value: ''
+ },
+ extClass: { // 弹出窗 class
+ type: String,
+ value: ''
+ },
+ maskClosable: { // 点击遮罩 关闭 actionsheet
+ type: Boolean,
+ value: true,
+ },
+ mask: { // 是否需要 遮罩层
+ type: Boolean,
+ value: true
+ },
+ show: { // 是否开启 actionsheet
+ type: Boolean,
+ value: false
+ },
+ actions: { // actions 列表
+ type: Array,
+ value: [], // {text, extClass}
+ observer: '_groupChange'
+ }
+ },
+
+ methods: {
+ _groupChange(e) {
+ // 支持 一维数组 写法
+ if(e.length > 0 && typeof e[0] !== 'string' && !(e[0] instanceof Array)) {
+ this.setData({
+ actions: [this.data.actions]
+ })
+ }
+ },
+ buttonTap(e) {
+ const { value, groupindex, index } = e.currentTarget.dataset
+ this.triggerEvent('actiontap', { value, groupindex, index })
+ },
+ closeActionSheet(e) {
+ const { type } = e.currentTarget.dataset
+ if(this.data.maskClosable || type) {
+ // 点击 action 里面的 取消
+ this.setData({
+ show: false
+ })
+ // 关闭回调事件
+ this.triggerEvent('close')
+ }
+ }
+ }
+})
diff --git a/src/actionsheet/actionsheet.wxml b/src/actionsheet/actionsheet.wxml
new file mode 100644
index 0000000..62d10f7
--- /dev/null
+++ b/src/actionsheet/actionsheet.wxml
@@ -0,0 +1,50 @@
+
+ var join = function(a,b) {
+ return a+b
+ };
+ var isNotSlot = function(v) {
+ return typeof v !== 'string'
+ }
+ module.exports = {
+ join: join,
+ isNotSlot: isNotSlot
+ }
+
+
+
+
+
+
+
+ {{title}}
+
+
+
+
+
+
+ {{cancelText}}
+
+
diff --git a/src/badge/badge.json b/src/badge/badge.json
index 3928faa..7e37c03 100755
--- a/src/badge/badge.json
+++ b/src/badge/badge.json
@@ -1,3 +1,4 @@
{
+ "component": true,
"usingComponents": {}
}
\ No newline at end of file
diff --git a/src/cell/cell.ts b/src/cell/cell.ts
index 27ad2e1..43989a6 100644
--- a/src/cell/cell.ts
+++ b/src/cell/cell.ts
@@ -20,6 +20,10 @@ Component({
type: String,
value: ''
},
+ bodyClass: {
+ type: String,
+ value: ''
+ },
icon: {
type: String,
value: '',
@@ -55,6 +59,18 @@ Component({
inline: { // 左右布局样式还是上下布局
type: Boolean,
value: true
+ },
+ hasHeader: {
+ type: Boolean,
+ value: true
+ },
+ hasFooter: {
+ type: Boolean,
+ value: true
+ },
+ hasBody: {
+ type: Boolean,
+ value: true
}
},
relations: {
diff --git a/src/cell/cell.wxml b/src/cell/cell.wxml
index 5f7ee4a..6d61dbc 100644
--- a/src/cell/cell.wxml
+++ b/src/cell/cell.wxml
@@ -1,6 +1,6 @@
-
+
@@ -20,13 +20,13 @@
-
+
{{value}}
-