antd-mini
Advanced tools
Comparing version 0.0.6 to 0.0.7-beta.1
@@ -164,3 +164,3 @@ "use strict"; | ||
if (onLeftButtonTap) { | ||
return onLeftButtonTap(index, text, type, extraInfo); | ||
return onLeftButtonTap(index, text, type, extraInfo, this.getDataSet()); | ||
} | ||
@@ -177,3 +177,3 @@ }, | ||
if (onRightButtonTap) { | ||
return onRightButtonTap(index, text, type, extraInfo); | ||
return onRightButtonTap(index, text, type, extraInfo, this.getDataSet()); | ||
} | ||
@@ -192,2 +192,11 @@ }, | ||
}, | ||
getDataSet: function () { | ||
return Object.entries(this.props).reduce(function (prev, cur) { | ||
var key = cur[0], val = cur[1]; | ||
if (key.startsWith('data-')) { | ||
prev[key.replace('data-', '')] = val; | ||
} | ||
return prev; | ||
}, {}); | ||
} | ||
}, | ||
@@ -194,0 +203,0 @@ ref: function () { |
@@ -62,3 +62,3 @@ import { IBaseProps } from '../_base'; | ||
onLeftButtonTap?: | ||
(index: number, text: string, type: string, extraInfo?: unknown) => void; | ||
(index: number, text: string, type: string, extraInfo: unknown, dateSet: Record<string, any>) => void; | ||
/** | ||
@@ -70,3 +70,3 @@ * @description 点击右侧按钮回调,extraInfo是一个对象, | ||
onRightButtonTap?: | ||
(index: number, text: string, type: string, extraInfo?: unknown) => void; | ||
(index: number, text: string, type: string, extraInfo: unknown, dateSet: Record<string, any>) => void; | ||
/** | ||
@@ -73,0 +73,0 @@ * @description 获取组件实例与设置滑动距离 |
{ | ||
"name": "antd-mini", | ||
"version": "0.0.6", | ||
"version": "0.0.7-beta.1", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "dev": "minidev dev --less --typescript --no-source-map", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
352319
6312