haiwei-ui 1.2.5 → 1.2.6

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": "haiwei-ui",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "HaiWei前端组件库",
5
5
  "author": "Eric",
6
6
  "license": "ISC",
@@ -56,13 +56,6 @@ export default {
56
56
  | emptyText | 值为空时显示的文本 | String | '-' | 否 |
57
57
  | cacheable | 是否启用缓存 | Boolean | true | 否 |
58
58
 
59
- ### 静态方法
60
-
61
- ```javascript
62
- // 清除所有缓存
63
- NmSelectText.clearCache()
64
- ```
65
-
66
59
  ## 缓存机制(页面级别)
67
60
 
68
61
  ### 为什么需要缓存?
@@ -90,14 +83,11 @@ NmSelectText.clearCache()
90
83
  />
91
84
  ```
92
85
 
93
- ### 清除缓存
94
- ```javascript
95
- // 当选项数据更新时,可以清除缓存
96
- import NmSelectText from 'haiwei-ui/packages/components/select-text'
97
-
98
- // 清除所有缓存
99
- NmSelectText.clearCache()
100
- ```
86
+ ### 缓存管理
87
+ 缓存是页面级别的,页面刷新时会自动清空。如果需要重新加载数据,可以:
88
+ 1. 改变 `method` 属性(组件会自动重新加载)
89
+ 2. 禁用缓存:设置 `:cacheable="false"`
90
+ 3. 刷新页面:完全清空缓存
101
91
 
102
92
  ## 组件行为
103
93
 
@@ -77,10 +77,6 @@ export default {
77
77
  this.options = []
78
78
  }
79
79
  },
80
- // 清除缓存(静态方法)
81
- static clearCache() {
82
- cache.clear()
83
- }
84
80
  },
85
81
 
86
82
  created() {