bri-components 1.4.65 → 1.4.66

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bri-components",
3
- "version": "1.4.65",
3
+ "version": "1.4.66",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -22,7 +22,7 @@
22
22
  <template v-else>
23
23
  <DatePicker
24
24
  class="DshDate-edit"
25
- :model-value="curVal"
25
+ :value="curVal"
26
26
  :type="subType"
27
27
  :disabled="disabled"
28
28
  :options="options"
@@ -18,7 +18,7 @@
18
18
  <template v-else-if="['date', 'datetime', 'year', 'month'].includes(subType)">
19
19
  <DatePicker
20
20
  class="DshDaterange-left"
21
- :model-value="curVal0"
21
+ :value="curVal0"
22
22
  :type="subType"
23
23
  :disabled="disabled"
24
24
  :options="options0"
@@ -45,7 +45,7 @@
45
45
 
46
46
  <DatePicker
47
47
  class="DshDaterange-right"
48
- :model-value="curVal1"
48
+ :value="curVal1"
49
49
  :type="subType"
50
50
  :disabled="disabled"
51
51
  :options="options1"
@@ -80,26 +80,20 @@ export default {
80
80
 
81
81
  /* -------- 方法 ------- */
82
82
  getVal (val) {
83
- return this.isDynDate(val)
83
+ return this.$isDynDate(val)
84
84
  ? val
85
- : this.$transformToCompatibleDate(val, this.subType);
85
+ : this.$transformToDateObj(val);
86
86
  },
87
87
  transformVal (val) {
88
- return this.isDynDate(val)
88
+ return this.$isDynDate(val)
89
89
  ? val
90
90
  : this.$transformToDateStr(val, "-", this.subType);
91
91
  },
92
92
  getShowVal (val) {
93
- return this.isDynDate(val)
93
+ return this.$isDynDate(val)
94
94
  ? (this.dynDateList.find(dynDateItem => dynDateItem._key === val) || { name: `"${val}"动态时间不存在` }).name
95
95
  : this.$transformToDateStr(val, "-", this.subType);
96
96
  },
97
- isDynDate (val) {
98
- return val && typeof val === "string" && (
99
- this.dynDateList.some(dynDateItem => dynDateItem._key === val) ||
100
- ["dyn", "year", "month", "days", "start", "end"].some(str => val.includes(str))
101
- );
102
- },
103
97
 
104
98
  getShortCuts (index) {
105
99
  return this.useDynDate