New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mini-antui

Package Overview
Dependencies
Maintainers
4
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mini-antui - npm Package Compare versions

Comparing version 0.0.15-alpha.4 to 0.1.0

es/amount-input/index.acss

15

CHANGELOG.md

@@ -0,2 +1,17 @@

## 0.1.0
`2018-06-21`
- **Feature**
- 新增`steps`、`popover`、`amount-input`、`calendar`组件;
- `tabs`组件`tabs`属性新增`badgeType`属性、新增`showPlus`、`onPlusClick`属性
- `modal`组件新增`closeType`属性,以适应不同的背景颜色
- **Bug Fix**
- 修复`grid`、`modal`、`input-item`组件样式问题
## 0.0.13

@@ -3,0 +18,0 @@

@@ -21,2 +21,11 @@ {

},
"amount-input/demo/index": {
"enableWK": "YES",
"enableDSL": "YES",
"enableJSC": "YES",
"defaultTitle": "amount-input",
"backgroundColor": 16119289,
"pullRefresh": false,
"allowsBounceVertical": true
},
"input-item/demo/index": {

@@ -94,2 +103,11 @@ "enableWK": "YES",

},
"popover/demo/index": {
"enableWK": "YES",
"enableDSL": "YES",
"enableJSC": "YES",
"defaultTitle": "Popover气泡",
"backgroundColor": 16119289,
"pullRefresh": false,
"allowsBounceVertical": true
},
"grid/demo/index": {

@@ -96,0 +114,0 @@ "enableWK": "YES",

70

es/calendar/index.js

@@ -32,25 +32,24 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }

// 数字补位 1 -> 01
function prefixNum(num) {
if (num < 10) {
return '0' + num;
} else {
return '' + num;
}
}
Component({
data: {
selectedYear: 0,
selectedMonth: 0,
currentDate: null,
dates: [],
blockType: 1 // 1.没有待办纯数字 2.有待办 用于区分不同类型日期块的样式。
},
props: {
className: '',
tagData: [],
type: 'one'
type: 'single'
},
didUpdate: function didUpdate() {
var dates = this.data.dates;
var blockType = 1;
for (var i = 0; i < dates.length; i++) {
for (var j = 0; j < dates[i].length; j++) {
if (this.hasTag(dates[i][j])) {
blockType = 2;
}
}
}
this.setData({
dates: dates,
blockType: blockType
});
},
didMount: function didMount() {

@@ -73,10 +72,20 @@ this.tapTimes = 0;

},
didUpdate: function didUpdate() {
var dates = this.data.dates;
data: {
selectedYear: 0,
selectedMonth: 0,
currentDate: null,
dates: [],
blockType: 1 // 1.没有代办纯数字 2.有代办
var blockType = 1;
for (var i = 0; i < dates.length; i++) {
for (var j = 0; j < dates[i].length; j++) {
if (this.hasTag(dates[i][j])) {
blockType = 2;
}
}
}
this.setData({
dates: dates,
blockType: blockType
});
},
methods: {

@@ -262,16 +271,9 @@ onPrevMonthTap: function onPrevMonthTap() {

},
prefixNum: function prefixNum(num) {
if (num < 10) {
return '0' + num;
} else {
return '' + num;
}
},
getDateGap: function getDateGap(day1, day2) {
var date1 = +new Date(day1.year, this.prefixNum(day1.month), this.prefixNum(day1.date));
var date2 = +new Date(day2.year, this.prefixNum(day2.month), this.prefixNum(day2.date));
var date1 = +new Date(day1.year, prefixNum(day1.month), prefixNum(day1.date));
var date2 = +new Date(day2.year, prefixNum(day2.month), prefixNum(day2.date));
return (date1 - date2) / (24 * 3600 * 1000);
},
makeDate: function makeDate(dateObj) {
return new Date(dateObj.year + '-' + this.prefixNum(dateObj.month + 1) + '-' + this.prefixNum(dateObj.date));
return new Date(dateObj.year + '-' + prefixNum(dateObj.month + 1) + '-' + prefixNum(dateObj.date));
},

@@ -278,0 +280,0 @@ onDateTap: function onDateTap(event) {

@@ -5,3 +5,4 @@ Component({

topImageSize: 'md',
showClose: true
showClose: true,
closeType: '0'
},

@@ -8,0 +9,0 @@ methods: {

{
"name": "mini-antui",
"version": "0.0.15-alpha.4",
"version": "0.1.0",
"description": "小程序版AntUI",

@@ -5,0 +5,0 @@ "repository": {

@@ -0,3 +1,55 @@

<p align="center">
<a href="http://alipaydesign.com">
<img width="320" src="https://gw.alipayobjects.com/zos/rmsportal/CsCzHzlOkLDKyyRadsdD.png">
</a>
</p>
# mini-antui
## 小程序版antui组件库
## 特性
- 基于[Advance Design](http://alipaydesign.com)设计规范
- 使用[支付宝小程序](https://mini.open.alipay.com/channel/miniIndex.htm)开发
## 预览
用[小程序开发者工具](https://docs.alipay.com/mini/ide/overview)打开项目
## 安装
```bash
$ npm install mini-antui --save
```
## 使用
在页面json中文件中进行注册,如card组件的注册如下所示:
```json
{
"usingComponents": {
"card": "mini-antui/es/card/index",
}
}
```
在axml文件中进行调用:
```html
<card
thumb="{{thumb}}"
title="卡片标题2"
subTitle="副标题非必填2"
onClick="onCardClick"
info="点击了第二个card"
/>
```
## 链接
- [支付宝小程序](https://mini.open.alipay.com/channel/miniIndex.htm)
- [开发工具](https://docs.alipay.com/mini/ide/overview)
- [Advance Design](http://alipaydesign.com)
## 贡献
如果你有好的意见或建议,欢迎给我们提[issue](https://github.com/ant-mini-program/mini-antui/issues)。

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc