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}}
-