ftdsy-attr 2.1.17 → 2.1.18

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.
@@ -70199,7 +70199,7 @@ function B(t) {
70199
70199
  }
70200
70200
  }
70201
70201
 
70202
- function A(t, s) {
70202
+ function T(t, s) {
70203
70203
  var e = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "includeOne";
70204
70204
  if ("[object String]" !== Object.prototype.toString.call(t)) throw new Error("text 参数错误有误,只能是String类型");
70205
70205
  if ("[object Array]" !== Object.prototype.toString.call(s)) throw new Error("arr 参数错误有误,只能是Array类型");
@@ -70212,7 +70212,7 @@ function A(t, s) {
70212
70212
  throw new Error("type 参数错误有误,只能是includeOne或includeAll");
70213
70213
  }
70214
70214
 
70215
- function T() {
70215
+ function A() {
70216
70216
  var t = new Date, s = t.getFullYear(), e = t.getMonth() + 1, k = "", d = "";
70217
70217
  return e >= 3 && e <= 5 ? (k = "春季", d = "夏季") : e >= 6 && e <= 8 ? (k = "夏季", d = "秋季") : e >= 9 && e <= 11 ? (k = "秋季",
70218
70218
  d = "冬季") : (k = "冬季", d = "春季"), {
@@ -70337,13 +70337,13 @@ function F(t, s, e) {
70337
70337
  var d = "".concat(e[0]), i = d.match(/(\d{4})[^\d]*/);
70338
70338
  if (i) {
70339
70339
  var b = "".concat(i[1]), p = "";
70340
- if (A(d, [ "春", "夏", "秋", "冬" ]) && (d.includes("秋冬") ? p = "11" : d.includes("春季") ? p = "03" : d.includes("夏季") ? p = "06" : d.includes("秋季") ? p = "09" : d.includes("冬季") && (p = "12")),
70340
+ if (T(d, [ "春", "夏", "秋", "冬" ]) && (d.includes("秋冬") ? p = "11" : d.includes("春季") ? p = "03" : d.includes("夏季") ? p = "06" : d.includes("秋季") ? p = "09" : d.includes("冬季") && (p = "12")),
70341
70341
  "input" == s.property_type) return p ? b + "-" + p : b;
70342
70342
  if ("date" === s.property_type) {
70343
70343
  var o, h = (null == s || null === (o = s.date_format) || void 0 === o ? void 0 : o.toUpperCase()) || "YYYY-MM-DD";
70344
70344
  if ("YYYY" === h) return b;
70345
70345
  if ("YYYY-MM" === h && p) return b + "-" + p;
70346
- var l = T();
70346
+ var l = A();
70347
70347
  if ("YYYY-MM" === h) return b + "-" + l.month;
70348
70348
  if ("YYYY-MM-DD" === h) return b + "-" + l.month + "-" + l.day;
70349
70349
  }
@@ -70581,17 +70581,17 @@ function Z(t, s, e, k) {
70581
70581
  return "秋季" === t.name;
70582
70582
  }) : k.includes("春秋") && (p = e.find(function(t) {
70583
70583
  return "春季" === t.name;
70584
- })) : "袖长" === s.property_name ? A(k, [ "夏季" ]) ? p = e.find(function(t) {
70584
+ })) : "袖长" === s.property_name ? T(k, [ "夏季" ]) ? p = e.find(function(t) {
70585
70585
  return "短袖" === t.name;
70586
- }) : A(k, [ "春季", "秋季", "冬季", "秋冬", "春秋" ]) && (p = e.find(function(t) {
70586
+ }) : T(k, [ "春季", "秋季", "冬季", "秋冬", "春秋" ]) && (p = e.find(function(t) {
70587
70587
  return "长袖" === t.name;
70588
- })) : "厚度" === s.property_name ? A(k, [ "夏季", "秋季", "春季", "春秋" ]) ? p = e.find(function(t) {
70588
+ })) : "厚度" === s.property_name ? T(k, [ "夏季", "秋季", "春季", "春秋" ]) ? p = e.find(function(t) {
70589
70589
  return "薄款" === t.name;
70590
- }) : A(k, [ "冬季", "秋冬" ]) && (p = e.find(function(t) {
70590
+ }) : T(k, [ "冬季", "秋冬" ]) && (p = e.find(function(t) {
70591
70591
  return "厚款" === t.name;
70592
- })) : "上衣款式" === s.property_name ? A(k, [ "polo", "Polo", "POLO" ]) && (p = e.find(function(t) {
70592
+ })) : "上衣款式" === s.property_name ? T(k, [ "polo", "Polo", "POLO" ]) && (p = e.find(function(t) {
70593
70593
  return "POLO衫" === t.name;
70594
- })) : "组合件数" !== s.property_name && "组合形式" !== s.property_name || A(k, [ "套装", "两件套", "三件套" ]) && (p = e.find(function(t) {
70594
+ })) : "组合件数" !== s.property_name && "组合形式" !== s.property_name || T(k, [ "套装", "两件套", "三件套" ]) && (p = e.find(function(t) {
70595
70595
  return "多件" === t.name;
70596
70596
  }))), p) return p;
70597
70597
  } else if ("multiSelect" == s.property_type) {
@@ -70648,7 +70648,7 @@ function Z(t, s, e, k) {
70648
70648
  }
70649
70649
  if ([ "主面料成分的含量", "面料材质成分含量", "面料成分含量", "面料材质成分含量(%)" ].includes(s.property_name) && [ "input", "inputComponent" ].includes(d)) "input" == d ? s.property_value = "81%(含)—90%(含)" : "inputComponent" === d && (s.property_value = "80"); else if (s.property_name.includes("里料成分含量") && s.property_required && [ "input", "inputComponent" ].includes(d)) "input" == d ? s.property_value = "100%" : "inputComponent" == d && (s.property_value = "100"); else {
70650
70650
  if ([ "上市时间", "上市年份季节", "上市时节", "适用季节", "上市年份/季节", "年份季节", "适合季节", "上市年份" ].includes(s.property_name) || "date" == d) {
70651
- var r = T();
70651
+ var r = A();
70652
70652
  if ("date" == d) {
70653
70653
  var U = ((null == s ? void 0 : s.date_format) || "yyyy-MM-dd").toUpperCase(), w = "";
70654
70654
  return w = "YYYY-MM-DD" === U ? "".concat(r.year, "-").concat(r.month, "-").concat(r.day) : "YYYY-MM" === U ? "".concat(r.year, "-").concat(r.month) : "".concat(r.year),
@@ -70657,7 +70657,7 @@ function Z(t, s, e, k) {
70657
70657
  if ("input" == d) return void (s.property_value = (null == r ? void 0 : r.year) || "");
70658
70658
  if ([ "上市年份季节", "上市时节", "上市时间", "上市年份/季节", "年份季节", "上市年份" ].includes(s.property_name) && [ "singleSelect", "multiSelect" ].includes(d)) {
70659
70659
  var j = r.year + "年" + r.season, u = i.find(function(t) {
70660
- return A(t.name, [ "春", "夏", "秋", "冬" ]) ? t.name === j || t.name + "季" === j : t.name.includes(r.year + "年");
70660
+ return T(t.name, [ "春", "夏", "秋", "冬" ]) ? t.name === j || t.name + "季" === j : t.name.includes(r.year + "年");
70661
70661
  });
70662
70662
  if (u) return void ("singleSelect" == d ? s.property_value = u : "multiSelect" == d && (s.property_value = [ u ]));
70663
70663
  }
@@ -71911,7 +71911,8 @@ var yt = {
71911
71911
  createCategoryPropertyTemplate: ft
71912
71912
  };
71913
71913
 
71914
- Object.defineProperty(exports, "getGlobal", {
71914
+ "undefined" != typeof module && module.exports && (module.exports = yt, module.exports.default = yt),
71915
+ "undefined" != typeof globalThis && (globalThis.ftdsyAttr = yt), Object.defineProperty(exports, "getGlobal", {
71915
71916
  enumerable: !0,
71916
71917
  get: function() {
71917
71918
  return s.getGlobal;