js_ryl 1.0.32 → 1.0.33

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/README.md CHANGED
@@ -23,6 +23,7 @@
23
23
  13.商品飞入购物车效果 -- flyToCart
24
24
  14.下载excel表格 -- downExcel
25
25
  15.处理字符串中的base64格式的图片为普通连接 -- base64Img
26
+ 16.获取链接或字符串中指定的参数 -- getParamsUtil
26
27
 
27
28
  # 使用方法:
28
29
 
@@ -207,6 +208,19 @@
207
208
  # this.$cookieGet("TOKEN")
208
209
  # );
209
210
 
211
+ # 16 获取链接或字符串中指定的参数
212
+
213
+ # 获取单个参数,第二个参数选填,默认使用当前地址栏URL
214
+ getParamsUtil.getParam('name',url)
215
+ # 获取所有参数,默认使用当前地址栏URL
216
+ getParamsUtil.getParams(url)
217
+ # 把所有的参数,拼接成一个字符串, 如:getParamsUtil.buildQueryString({ name: 'test', age: 20,'sex':1 });
218
+ getParamsUtil.buildQueryString(obj)
219
+ # 把链接和参数合并成新的字符串 ,如:getParamsUtil.joinParams('https://example.com', { name: 'test', age: 20 });
220
+ getParamsUtil.joinParams(url,obj)
221
+ # 移除URL中的指定参数,key可以是string 或者 数组
222
+ getParamsUtil.removeParams(url,key)
223
+
210
224
  # serve with hot reload at localhost:8080
211
225
  # npm run dev
212
226
 
@@ -231,6 +245,7 @@
231
245
  #1.0.29: 拷贝方法优化
232
246
  #1.0.31: 新增下载excel方法
233
247
  #1.0.32: 新增base64Img
248
+ #1.0.33: 新增字符串获取相关方法
234
249
  ```
235
250
 
236
251
  For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).