@yoooloo42/joker 1.0.282 → 1.0.284
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +62 -64
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +62 -64
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -22214,80 +22214,78 @@ var WeChat = {
|
|
|
22214
22214
|
/**
|
|
22215
22215
|
* 将Date对象格式化为指定的字符串格式
|
|
22216
22216
|
*
|
|
22217
|
-
* @param {Date}
|
|
22218
|
-
* @param {string}
|
|
22217
|
+
* @param {Date} d - 要格式化的日期对象
|
|
22218
|
+
* @param {string} f - 目标格式字符串,例如:"yyyy年MM月dd日", "yyyy/MM/dd HH:mm:ss", "MM-dd HH:mm"
|
|
22219
22219
|
* @returns {string} 格式化后的日期字符串
|
|
22220
22220
|
*/
|
|
22221
|
-
function dateFormat$1(
|
|
22222
|
-
|
|
22223
|
-
|
|
22224
|
-
return ''
|
|
22225
|
-
}
|
|
22226
|
-
const format0 = format || 'yyyy/MM/dd HH:mm:ss';
|
|
22227
|
-
|
|
22228
|
-
// 有效的 Date 对象一致性
|
|
22229
|
-
const Date0 = new Date(date);
|
|
22230
|
-
|
|
22231
|
-
const o = {
|
|
22232
|
-
'M+': Date0.getMonth() + 1, // 月份
|
|
22233
|
-
'd+': Date0.getDate(), // 日
|
|
22234
|
-
'h+': Date0.getHours() % 12 === 0 ? 12 : Date0.getHours() % 12, // 12小时制
|
|
22235
|
-
'H+': Date0.getHours(), // 24小时制
|
|
22236
|
-
'm+': Date0.getMinutes(), // 分
|
|
22237
|
-
's+': Date0.getSeconds(), // 秒
|
|
22238
|
-
'q+': Math.floor((Date0.getMonth() + 3) / 3), // 季度
|
|
22239
|
-
'S': Date0.getMilliseconds() // 毫秒
|
|
22240
|
-
};
|
|
22221
|
+
function dateFormat$1(d, f){
|
|
22222
|
+
if(! d){ return "" }
|
|
22223
|
+
let d0 = new Date(d), d1 = "", f0 = f || "";
|
|
22241
22224
|
|
|
22242
|
-
|
|
22243
|
-
|
|
22244
|
-
|
|
22245
|
-
|
|
22246
|
-
|
|
22247
|
-
|
|
22248
|
-
|
|
22249
|
-
|
|
22250
|
-
|
|
22251
|
-
|
|
22225
|
+
let year = d0.getFullYear();
|
|
22226
|
+
let year0 = "" + year;
|
|
22227
|
+
let month = d0.getMonth() + 1;
|
|
22228
|
+
let month0 = "" + month;
|
|
22229
|
+
let month1= month < 10 ? "0" + month0 : month0;
|
|
22230
|
+
let date = d0.getDate();
|
|
22231
|
+
let date0 = "" + date;
|
|
22232
|
+
let date1= date < 10 ? "0" + date0 : date0;
|
|
22233
|
+
let hours = d0.getHours();
|
|
22234
|
+
let hours0 = "" + hours;
|
|
22235
|
+
let hours1= hours < 10 ? "0" + hours0 : hours0;
|
|
22236
|
+
let minutes = d0.getMinutes();
|
|
22237
|
+
let minutes0 = "" + minutes;
|
|
22238
|
+
let minutes1= minutes < 10 ? "0" + minutes0 : minutes0;
|
|
22252
22239
|
|
|
22253
|
-
|
|
22254
|
-
|
|
22255
|
-
|
|
22256
|
-
|
|
22257
|
-
|
|
22258
|
-
|
|
22259
|
-
|
|
22260
|
-
|
|
22240
|
+
switch(f0){
|
|
22241
|
+
case "yyyy年MM月dd日" :
|
|
22242
|
+
d1 = year0 + "年" + month1 + "月" + date1 + "日";
|
|
22243
|
+
break;
|
|
22244
|
+
case "yyyy年M月d日" :
|
|
22245
|
+
d1 = year0 + "年" + month0 + "月" + date0 + "日";
|
|
22246
|
+
break;
|
|
22247
|
+
case "yyyy-MM-dd" :
|
|
22248
|
+
d1 = year0 + "-" + month1 + "-" + date1;
|
|
22249
|
+
break;
|
|
22250
|
+
case "yyyy-M-d" :
|
|
22251
|
+
d1 = year0 + "-" + month0 + "-" + date0;
|
|
22252
|
+
break;
|
|
22253
|
+
case "yyyy/MM/dd" :
|
|
22254
|
+
d1 = year0 + "/" + month1 + "/" + date1;
|
|
22255
|
+
break;
|
|
22256
|
+
case "yyyy/M/d" :
|
|
22257
|
+
d1 = year0 + "/" + month0 + "/" + date0;
|
|
22258
|
+
break;
|
|
22259
|
+
case "yyyy/MM/dd HH:mm" :
|
|
22260
|
+
d1 = year0 + "/" + month1 + "/" + date1
|
|
22261
|
+
+ " " + hours1 + ":" + minutes1;
|
|
22262
|
+
break;
|
|
22263
|
+
case "yyyy/M/d H:m" :
|
|
22264
|
+
d1 = year0 + "/" + month0 + "/" + date0
|
|
22265
|
+
+ " " + hours0 + ":" + minutes0;
|
|
22266
|
+
break;
|
|
22267
|
+
default :
|
|
22268
|
+
d1 = year0 + "/" + month1 + "/" + date1
|
|
22269
|
+
+ " " + hours1 + ":" + minutes1;
|
|
22261
22270
|
}
|
|
22262
22271
|
|
|
22263
|
-
return
|
|
22272
|
+
return d1;
|
|
22264
22273
|
}
|
|
22265
22274
|
|
|
22266
22275
|
/**
|
|
22267
22276
|
* 计算两个日期之间相差的天数
|
|
22268
22277
|
*
|
|
22269
|
-
* @param {Date}
|
|
22270
|
-
* @param {Date}
|
|
22271
|
-
* @returns {number
|
|
22272
|
-
* 结果为正数表示 dateTo 在 dateFrom 之后;负数表示 dateFrom 在 dateTo 之后。
|
|
22278
|
+
* @param {Date} dFrom - 开始日期 (Date 对象)
|
|
22279
|
+
* @param {Date} dTo - 截止日期 (Date 对象)
|
|
22280
|
+
* @returns {number} 相差的天数
|
|
22273
22281
|
*/
|
|
22274
|
-
function days(
|
|
22275
|
-
|
|
22276
|
-
|
|
22277
|
-
|
|
22278
|
-
|
|
22279
|
-
|
|
22280
|
-
|
|
22281
|
-
const timeDifference = DateTo0.getTime() - DateFrom0.getTime();
|
|
22282
|
-
|
|
22283
|
-
// 3. 定义一天对应的毫秒数
|
|
22284
|
-
const msPerDay = 1000 * 60 * 60 * 24;
|
|
22285
|
-
|
|
22286
|
-
// 4. 将毫秒差值转换为天数
|
|
22287
|
-
// Math.floor() 用于向下取整,确保得到完整的经过天数
|
|
22288
|
-
const dayDifference = Math.floor(timeDifference / msPerDay);
|
|
22289
|
-
|
|
22290
|
-
return dayDifference;
|
|
22282
|
+
function days(dFrom, dTo){
|
|
22283
|
+
let dFrom0 = new Date(new Date(dFrom).toDateString ());
|
|
22284
|
+
let dTo0 = new Date(new Date(dTo).toDateString ());
|
|
22285
|
+
if(dFrom0 >= dTo0){
|
|
22286
|
+
return 0
|
|
22287
|
+
}
|
|
22288
|
+
return Math.floor((dTo0 - dFrom0)/(1000 * 60 * 60 * 24)) + 1;
|
|
22291
22289
|
}
|
|
22292
22290
|
var dateFormat = {
|
|
22293
22291
|
dateFormat: dateFormat$1,
|
|
@@ -23894,13 +23892,13 @@ return (_ctx, _cache) => {
|
|
|
23894
23892
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(propsItem_box).items, (item0, index0) => {
|
|
23895
23893
|
return (openBlock(), createBlock(_component_el_radio, {
|
|
23896
23894
|
key: index0,
|
|
23897
|
-
|
|
23895
|
+
value: item0[unref(propsItem_box).item_fieldValue]
|
|
23898
23896
|
}, {
|
|
23899
23897
|
default: withCtx(() => [
|
|
23900
23898
|
createTextVNode(toDisplayString(item0[unref(propsItem_box).item_fieldLabel]), 1 /* TEXT */)
|
|
23901
23899
|
]),
|
|
23902
23900
|
_: 2 /* DYNAMIC */
|
|
23903
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["
|
|
23901
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["value"]))
|
|
23904
23902
|
}), 128 /* KEYED_FRAGMENT */))
|
|
23905
23903
|
]),
|
|
23906
23904
|
_: 1 /* STABLE */
|