Comparing version 1.3.1 to 1.3.2
@@ -93,2 +93,5 @@ "use strict"; | ||
} | ||
if (column.max) { | ||
params.maxLength = column.max; | ||
} | ||
//如果关联到其它字段,则设置联动事件 | ||
@@ -95,0 +98,0 @@ if (_.has(column, 'link')) { |
@@ -34,3 +34,3 @@ "use strict"; | ||
MODE[MODE["COMMON"] = 2] = "COMMON"; | ||
})(MODE || (MODE = {})); | ||
})(MODE = exports.MODE || (exports.MODE = {})); | ||
/** | ||
@@ -37,0 +37,0 @@ * 列表弹框,弹出一个列表。 |
@@ -10,2 +10,3 @@ /// <reference types="react" /> | ||
* precent: 百分比,此时 value 应该为 0-1的数 | ||
* chinese: 中文字 | ||
* duration: 换换时间,默认 2000毫秒 | ||
@@ -15,3 +16,3 @@ */ | ||
value: number; | ||
format?: 'number' | 'decimal' | 'usd' | 'precent'; | ||
format?: 'number' | 'decimal' | 'usd' | 'precent' | 'chinese'; | ||
duration?: number; | ||
@@ -25,2 +26,3 @@ className?: string; | ||
tranNumber(from: any, to: any): void; | ||
tranChinese(from: any, to: any): void; | ||
tranUsd(from: any, to: any): void; | ||
@@ -27,0 +29,0 @@ tranDecimal(from: any, to: any): void; |
@@ -28,2 +28,3 @@ "use strict"; | ||
* precent: 百分比,此时 value 应该为 0-1的数 | ||
* chinese: 中文字 | ||
* duration: 换换时间,默认 2000毫秒 | ||
@@ -61,2 +62,16 @@ */ | ||
}; | ||
default_1.prototype.tranChinese = function (from, to) { | ||
d3.select('#' + this.id) | ||
.text(utils_1.Format.formatNumber(from)) | ||
.transition() | ||
.duration(this.duration) | ||
.on('start', function () { | ||
d3.active(this).tween('text', function () { | ||
var that = d3.select(this); | ||
return function (p) { | ||
that.text(utils_1.Format.formatNumber(from + p * (to - from))); | ||
}; | ||
}); | ||
}); | ||
}; | ||
default_1.prototype.tranUsd = function (from, to) { | ||
@@ -119,2 +134,5 @@ d3.select('#' + this.id) | ||
break; | ||
case 'chinese': | ||
this.tranChinese(from, to); | ||
break; | ||
default: | ||
@@ -132,3 +150,3 @@ this.tranNumber(from, to); | ||
default_1.prototype.render = function () { | ||
return React.createElement("span", { id: this.id, className: this.props.className }, this.last); | ||
return React.createElement("span", { id: this.id, className: "vapfont " + this.props.className }, this.last); | ||
}; | ||
@@ -135,0 +153,0 @@ return default_1; |
{ | ||
"name": "vap", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "vap", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -49,2 +49,3 @@ "use strict"; | ||
var _ = require("lodash"); | ||
var NProgress = require("nprogress"); | ||
/** | ||
@@ -122,2 +123,3 @@ * @private | ||
} | ||
NProgress.start(); | ||
// @ts-ignore | ||
@@ -127,2 +129,3 @@ return fetch(url, newOptions) | ||
.then(function (response) { | ||
NProgress.done(); | ||
return response.json(); | ||
@@ -129,0 +132,0 @@ }); |
export default abstract class { | ||
static mapJson(name: any, json?: any): void; | ||
/** | ||
* 地图下钻,国级不用户传json ,省级或市级需要把上级的ID或者name传入 | ||
* ```javascript | ||
* import {Page} from 'vap/util'; | ||
* Page.mapPath('湖北省') | ||
* ``` | ||
*/ | ||
static mapPath(name: any, json?: any): string; | ||
/** | ||
* 获取当前页面皮肤样式 | ||
@@ -5,0 +12,0 @@ */ |
@@ -43,7 +43,36 @@ "use strict"; | ||
} | ||
default_1.mapJson = function (name, json) { | ||
/** | ||
* 地图下钻,国级不用户传json ,省级或市级需要把上级的ID或者name传入 | ||
* ```javascript | ||
* import {Page} from 'vap/util'; | ||
* Page.mapPath('湖北省') | ||
* ``` | ||
*/ | ||
default_1.mapPath = function (name, json) { | ||
if (json === void 0) { json = null; } | ||
var id = name; | ||
if (json) { | ||
// json. | ||
for (var _i = 0, _a = json.features; _i < _a.length; _i++) { | ||
var feature = _a[_i]; | ||
if (feature.properties.id == name || feature.properties.name == name) { | ||
var p = feature.properties.id + ''; | ||
// console.log(); | ||
if (p.length == 2) { | ||
return '/images/province/' + p + '.json'; | ||
} | ||
else if (p.length == 4) { | ||
return '/images/city/' + p + '00.json'; | ||
} | ||
} | ||
} | ||
} | ||
else { | ||
for (var _b = 0, MAPIDS_1 = MAPIDS; _b < MAPIDS_1.length; _b++) { | ||
var feature = MAPIDS_1[_b]; | ||
if (feature.id == name || feature.name == name) { | ||
return '/images/province/' + feature.id + '.json'; | ||
} | ||
} | ||
} | ||
return ''; | ||
}; | ||
@@ -50,0 +79,0 @@ /** |
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
198565
89
5291