Browse Source

无jira fix:pixFormat

es6
Treecat 2 years ago
parent
commit
4a434809e2
  1. 2
      packages/fineui/package.json
  2. 12
      packages/fineui/src/core/constant/var.js
  3. 3
      packages/fineui/typescript/core/var.ts

2
packages/fineui/package.json

@ -1,6 +1,6 @@
{ {
"name": "@fui/core", "name": "@fui/core",
"version": "3.0.20230511185107", "version": "3.0.20230511193354",
"description": "fineui", "description": "fineui",
"main": "dist/fineui.min.js", "main": "dist/fineui.min.js",
"module": "dist/lib/index.js", "module": "dist/lib/index.js",

12
packages/fineui/src/core/constant/var.js

@ -142,7 +142,7 @@ export const StartOfWeek = 1;
export const BlankSplitChar = "\u200b \u200b"; export const BlankSplitChar = "\u200b \u200b";
// 一定返回最终的单位 // 一定返回最终的单位
export function pixFormat(pix, border) { export let pixFormat = (pix, border) => {
if (!isNumber(pix)) { if (!isNumber(pix)) {
return pix; return pix;
} }
@ -157,7 +157,11 @@ export function pixFormat(pix, border) {
return length; return length;
} }
export function toPix(pix, border) { export function setPixFormat(func) {
pixFormat = func;
}
export let toPix = (pix, border) => {
if (!isNumber(pix)) { if (!isNumber(pix)) {
return pix; return pix;
} }
@ -171,4 +175,8 @@ export function toPix(pix, border) {
return pix; return pix;
} }
export function setToPix(func) {
toPix = func;
}
export function emptyFn() {} export function emptyFn() {}

3
packages/fineui/typescript/core/var.ts

@ -129,3 +129,6 @@ export declare const VerticalAlign: {
}; };
export declare const StartOfWeek: number; export declare const StartOfWeek: number;
export declare const BlankSplitChar: string; export declare const BlankSplitChar: string;
export declare const setToPix: Function;
export declare const setPixFormat: Function;
Loading…
Cancel
Save