@yoooloo42/joker 1.0.280 → 1.0.282
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 +13 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +13 -10
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -22219,6 +22219,12 @@ var WeChat = {
|
|
|
22219
22219
|
* @returns {string} 格式化后的日期字符串
|
|
22220
22220
|
*/
|
|
22221
22221
|
function dateFormat$1(date, format) {
|
|
22222
|
+
let result = '';
|
|
22223
|
+
if(!date){
|
|
22224
|
+
return ''
|
|
22225
|
+
}
|
|
22226
|
+
const format0 = format || 'yyyy/MM/dd HH:mm:ss';
|
|
22227
|
+
|
|
22222
22228
|
// 有效的 Date 对象一致性
|
|
22223
22229
|
const Date0 = new Date(date);
|
|
22224
22230
|
|
|
@@ -22234,27 +22240,27 @@ function dateFormat$1(date, format) {
|
|
|
22234
22240
|
};
|
|
22235
22241
|
|
|
22236
22242
|
// 替换年份 'yyyy'
|
|
22237
|
-
if (/(y+)/.test(
|
|
22238
|
-
|
|
22243
|
+
if (/(y+)/.test(format0)) {
|
|
22244
|
+
result = format0.replace(RegExp.$1, (Date0.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|
22239
22245
|
}
|
|
22240
22246
|
|
|
22241
22247
|
// 替换 'AM/PM'
|
|
22242
|
-
if (/(A|a)/.test(
|
|
22248
|
+
if (/(A|a)/.test(format0)) {
|
|
22243
22249
|
const ampm = Date0.getHours() < 12 ? 'AM' : 'PM';
|
|
22244
|
-
|
|
22250
|
+
result = format0.replace(RegExp.$1, RegExp.$1 === 'a' ? ampm.toLowerCase() : ampm);
|
|
22245
22251
|
}
|
|
22246
22252
|
|
|
22247
22253
|
// 替换其他时间单位 'MM', 'dd', 'HH' 等
|
|
22248
22254
|
for (let k in o) {
|
|
22249
|
-
if (new RegExp("(" + k + ")").test(
|
|
22255
|
+
if (new RegExp("(" + k + ")").test(format0)) {
|
|
22250
22256
|
const value = o[k];
|
|
22251
22257
|
// $1 匹配到的字符串,例如 'MM'
|
|
22252
22258
|
// 如果是毫秒 'S',则不补零
|
|
22253
|
-
|
|
22259
|
+
result = format0.replace(RegExp.$1, (RegExp.$1.length === 1) ? (value) : (("00" + value).substr(("" + value).length)));
|
|
22254
22260
|
}
|
|
22255
22261
|
}
|
|
22256
22262
|
|
|
22257
|
-
return
|
|
22263
|
+
return result;
|
|
22258
22264
|
}
|
|
22259
22265
|
|
|
22260
22266
|
/**
|
|
@@ -43768,9 +43774,6 @@ const popup = reactive({
|
|
|
43768
43774
|
|
|
43769
43775
|
watch(() => props.modelValue,
|
|
43770
43776
|
async (valNew, valOld) => {
|
|
43771
|
-
// 只有当传入的值有效时才进行网络请求
|
|
43772
|
-
if (!valNew) return;
|
|
43773
|
-
|
|
43774
43777
|
const result2 = await request.ly0.storpro({
|
|
43775
43778
|
noSession: true,
|
|
43776
43779
|
storproName: 'ly0d3.gbt2260code2.init',
|