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