commit
40a8431896
|
@ -2238,8 +2238,8 @@ export class Get extends Uninstantable {
|
||||||
static cnNumber(num, ordinal) {
|
static cnNumber(num, ordinal) {
|
||||||
if (isNaN(num)) return '';
|
if (isNaN(num)) return '';
|
||||||
let numStr = num.toString();
|
let numStr = num.toString();
|
||||||
if (num === 'Infinity') return '∞';
|
if (numStr === 'Infinity') return '∞';
|
||||||
if (num === '-Infinity') return '-∞';
|
if (numStr === '-Infinity') return '-∞';
|
||||||
if (!/^\d+$/.test(numStr)) return num;
|
if (!/^\d+$/.test(numStr)) return num;
|
||||||
|
|
||||||
const chars = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
const chars = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
||||||
|
@ -2253,7 +2253,7 @@ export class Get extends Uninstantable {
|
||||||
numStr = numStr.replace(/(?=(\d{4})+$)/g, ',').split(',').filter(Boolean);
|
numStr = numStr.replace(/(?=(\d{4})+$)/g, ',').split(',').filter(Boolean);
|
||||||
const handleZero = str => {
|
const handleZero = str => {
|
||||||
let result = str.replace(/零{2,}/g, '零');
|
let result = str.replace(/零{2,}/g, '零');
|
||||||
if (result.length > 1) replace(/零+$/g, '');
|
if (result.length > 1) result = result.replace(/零+$/g, '');
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
const _transform = str => {
|
const _transform = str => {
|
||||||
|
|
|
@ -2949,9 +2949,8 @@ export class Player extends HTMLDivElement {
|
||||||
numh = arguments[0];
|
numh = arguments[0];
|
||||||
}
|
}
|
||||||
if (numh >= 10) {
|
if (numh >= 10) {
|
||||||
numh = numh.toString();
|
|
||||||
this.node.count.dataset.condition = 'low';
|
this.node.count.dataset.condition = 'low';
|
||||||
this.node.count.innerHTML = numh[0] + '<br>' + numh[1];
|
this.node.count.innerHTML = Array.from(numh.toString()).join('<br>');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (numh > 5) {
|
if (numh > 5) {
|
||||||
|
|
Loading…
Reference in New Issue