diff --git a/docs/404.html b/docs/404.html index 0f5fe9e..76d8577 100644 --- a/docs/404.html +++ b/docs/404.html @@ -13,7 +13,7 @@
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
- + \ No newline at end of file diff --git a/docs/api-examples.html b/docs/api-examples.html index 2612830..575b55e 100644 --- a/docs/api-examples.html +++ b/docs/api-examples.html @@ -152,7 +152,7 @@ }

Page Frontmatter

{
   "outline": "deep"
 }

More

Check out the documentation for the full list of runtime APIs.

- + \ No newline at end of file diff --git a/docs/assets/function_html.md.582c9688.js b/docs/assets/function_html.md.582c9688.js new file mode 100644 index 0000000..91c2423 --- /dev/null +++ b/docs/assets/function_html.md.582c9688.js @@ -0,0 +1,9 @@ +import{_ as s,o as a,c as l,R as n}from"./chunks/framework.b4504927.js";const A=JSON.parse('{"title":"html 相关","description":"","frontmatter":{},"headers":[],"relativePath":"function/html.md","filePath":"function/html.md"}'),o={name:"function/html.md"},t=n(`

html 相关

遍历 dom 树

自定 dom 元素,从它开始往上依次遍历,直到根节点

javascript
import { elementForEach } from 'lib-agile'
+
+elementForEach(document.getElementById('app'), (el) => {
+  console.log(el)
+})

html 解析器

把 html 字符串解析成 document 对象

javascript
import { htmlParser } from 'lib-agile'
+
+htmlParser('<div>123</div>') // => #document

html 标签转换成安全字符

javascript
import { escapeHtml } from 'lib-agile'
+
+escapeHtml('<div>123</div>') // => #&lt;div&gt;123&lt;/div&gt;
`,9),p=[t];function e(c,r,i,y,D,F){return a(),l("div",null,p)}const m=s(o,[["render",e]]);export{A as __pageData,m as default}; diff --git a/docs/assets/function_html.md.582c9688.lean.js b/docs/assets/function_html.md.582c9688.lean.js new file mode 100644 index 0000000..f4000b7 --- /dev/null +++ b/docs/assets/function_html.md.582c9688.lean.js @@ -0,0 +1 @@ +import{_ as s,o as a,c as l,R as n}from"./chunks/framework.b4504927.js";const A=JSON.parse('{"title":"html 相关","description":"","frontmatter":{},"headers":[],"relativePath":"function/html.md","filePath":"function/html.md"}'),o={name:"function/html.md"},t=n("",9),p=[t];function e(c,r,i,y,D,F){return a(),l("div",null,p)}const m=s(o,[["render",e]]);export{A as __pageData,m as default}; diff --git a/docs/assets/function_html.md.c776248f.js b/docs/assets/function_html.md.c776248f.js deleted file mode 100644 index 8275f89..0000000 --- a/docs/assets/function_html.md.c776248f.js +++ /dev/null @@ -1,5 +0,0 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.b4504927.js";const C=JSON.parse('{"title":"html 相关","description":"","frontmatter":{},"headers":[],"relativePath":"function/html.md","filePath":"function/html.md"}'),o={name:"function/html.md"},t=l(`

html 相关

遍历 dom 树

自定 dom 元素,从它开始往上依次遍历,直到根节点

javascript
import { elementForEach } from 'lib-agile'
-
-elementForEach(document.getElementById('app'), (el) => {
-  console.log(el)
-})
`,4),e=[t];function p(c,r,D,i,y,F){return a(),n("div",null,e)}const m=s(o,[["render",p]]);export{C as __pageData,m as default}; diff --git a/docs/assets/function_html.md.c776248f.lean.js b/docs/assets/function_html.md.c776248f.lean.js deleted file mode 100644 index 344894e..0000000 --- a/docs/assets/function_html.md.c776248f.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.b4504927.js";const C=JSON.parse('{"title":"html 相关","description":"","frontmatter":{},"headers":[],"relativePath":"function/html.md","filePath":"function/html.md"}'),o={name:"function/html.md"},t=l("",4),e=[t];function p(c,r,D,i,y,F){return a(),n("div",null,e)}const m=s(o,[["render",p]]);export{C as __pageData,m as default}; diff --git a/docs/assets/function_number.md.0177495d.js b/docs/assets/function_number.md.db8cac40.js similarity index 69% rename from docs/assets/function_number.md.0177495d.js rename to docs/assets/function_number.md.db8cac40.js index 3ccfbb6..94a4f1a 100644 --- a/docs/assets/function_number.md.0177495d.js +++ b/docs/assets/function_number.md.db8cac40.js @@ -11,4 +11,8 @@ import{_ as s,o as a,c as n,R as l}from"./chunks/framework.b4504927.js";const F= toCurrency(10000) // => 100,00 -toCurrency(10000.89) // => 100,00.89`,7),t=[p];function e(c,r,i,y,C,A){return a(),n("div",null,t)}const d=s(o,[["render",e]]);export{F as __pageData,d as default}; +toCurrency(10000.89) // => 100,00.89

数字差值

计算两个数的差值

javascript
import { diffCount } from 'lib-agile'
+
+diffCount(1000, 900) // => 100
+
+diffCount(900, 1000) // => 100
`,10),t=[p];function e(c,r,i,y,C,D){return a(),n("div",null,t)}const d=s(o,[["render",e]]);export{F as __pageData,d as default}; diff --git a/docs/assets/function_number.md.0177495d.lean.js b/docs/assets/function_number.md.db8cac40.lean.js similarity index 64% rename from docs/assets/function_number.md.0177495d.lean.js rename to docs/assets/function_number.md.db8cac40.lean.js index 579740f..b89bb37 100644 --- a/docs/assets/function_number.md.0177495d.lean.js +++ b/docs/assets/function_number.md.db8cac40.lean.js @@ -1 +1 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.b4504927.js";const F=JSON.parse('{"title":"数字篇","description":"","frontmatter":{},"headers":[],"relativePath":"function/number.md","filePath":"function/number.md"}'),o={name:"function/number.md"},p=l("",7),t=[p];function e(c,r,i,y,C,A){return a(),n("div",null,t)}const d=s(o,[["render",e]]);export{F as __pageData,d as default}; +import{_ as s,o as a,c as n,R as l}from"./chunks/framework.b4504927.js";const F=JSON.parse('{"title":"数字篇","description":"","frontmatter":{},"headers":[],"relativePath":"function/number.md","filePath":"function/number.md"}'),o={name:"function/number.md"},p=l("",10),t=[p];function e(c,r,i,y,C,D){return a(),n("div",null,t)}const d=s(o,[["render",e]]);export{F as __pageData,d as default}; diff --git a/docs/assets/function_object.md.deb7217e.js b/docs/assets/function_object.md.488ac1e9.js similarity index 66% rename from docs/assets/function_object.md.deb7217e.js rename to docs/assets/function_object.md.488ac1e9.js index edcb4af..2c650da 100644 --- a/docs/assets/function_object.md.deb7217e.js +++ b/docs/assets/function_object.md.488ac1e9.js @@ -1,4 +1,4 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.b4504927.js";const A=JSON.parse('{"title":"对象篇","description":"","frontmatter":{},"headers":[],"relativePath":"function/object.md","filePath":"function/object.md"}'),o={name:"function/object.md"},p=l(`

对象篇

合并源对象与目标对象的交集

合并源对象与目标对象的交集属性,并返回源对象

javascript
import { mergeIntersect } from 'lib-agile'
+import{_ as s,o as a,c as n,R as l}from"./chunks/framework.b4504927.js";const A=JSON.parse('{"title":"对象篇","description":"","frontmatter":{},"headers":[],"relativePath":"function/object.md","filePath":"function/object.md"}'),o={name:"function/object.md"},p=l(`

对象篇

合并对象交集属性

合并源对象与目标对象的交集属性,并返回源对象

javascript
import { mergeIntersect } from 'lib-agile'
 
 const source = {
   a: 1,
diff --git a/docs/assets/function_object.md.deb7217e.lean.js b/docs/assets/function_object.md.488ac1e9.lean.js
similarity index 100%
rename from docs/assets/function_object.md.deb7217e.lean.js
rename to docs/assets/function_object.md.488ac1e9.lean.js
diff --git a/docs/assets/function_string.md.04ff1f39.js b/docs/assets/function_string.md.04ff1f39.js
new file mode 100644
index 0000000..5265219
--- /dev/null
+++ b/docs/assets/function_string.md.04ff1f39.js
@@ -0,0 +1,9 @@
+import{_ as s,o as a,c as n,R as l}from"./chunks/framework.b4504927.js";const d=JSON.parse('{"title":"字符串篇","description":"","frontmatter":{},"headers":[],"relativePath":"function/string.md","filePath":"function/string.md"}'),o={name:"function/string.md"},p=l(`

字符串篇

随机字符串

随机生成指定长度的字符串,随机包含大写字母、小写字母、数字

javascript
import { randomStr } from 'lib-agile'
+
+randomStr(5) // => D2d4t

随机颜色

随机生成颜色值,支持 rgb, rgba, hsl, hsla, hex

javascript
import { randomColor } from 'lib-agile'
+
+randomColor()

随机 ip

随机生成 ip 地址,支持 ipv4 ipv6

javascript
import { randomIp } from 'lib-agile'
+
+randomIp() //ipv4
+
+randomIp(1) //ipv6
`,10),t=[p];function e(c,r,i,y,D,C){return a(),n("div",null,t)}const A=s(o,[["render",e]]);export{d as __pageData,A as default}; diff --git a/docs/assets/function_string.md.04ff1f39.lean.js b/docs/assets/function_string.md.04ff1f39.lean.js new file mode 100644 index 0000000..bd4b153 --- /dev/null +++ b/docs/assets/function_string.md.04ff1f39.lean.js @@ -0,0 +1 @@ +import{_ as s,o as a,c as n,R as l}from"./chunks/framework.b4504927.js";const d=JSON.parse('{"title":"字符串篇","description":"","frontmatter":{},"headers":[],"relativePath":"function/string.md","filePath":"function/string.md"}'),o={name:"function/string.md"},p=l("",10),t=[p];function e(c,r,i,y,D,C){return a(),n("div",null,t)}const A=s(o,[["render",e]]);export{d as __pageData,A as default}; diff --git a/docs/assets/function_string.md.5c2b2ccf.js b/docs/assets/function_string.md.5c2b2ccf.js deleted file mode 100644 index 85bcd3d..0000000 --- a/docs/assets/function_string.md.5c2b2ccf.js +++ /dev/null @@ -1,3 +0,0 @@ -import{_ as s,o as a,c as n,R as t}from"./chunks/framework.b4504927.js";const h=JSON.parse('{"title":"字符串篇","description":"","frontmatter":{},"headers":[],"relativePath":"function/string.md","filePath":"function/string.md"}'),o={name:"function/string.md"},e=t(`

字符串篇

随机字符串

随机生成指定长度的字符串,随机包含大写字母、小写字母、数字

javascript
import { randomStr } from 'lib-agile'
-
-randomStr(5) // => D2d4t
`,4),l=[e];function p(r,c,i,d,_,y){return a(),n("div",null,l)}const C=s(o,[["render",p]]);export{h as __pageData,C as default}; diff --git a/docs/assets/function_string.md.5c2b2ccf.lean.js b/docs/assets/function_string.md.5c2b2ccf.lean.js deleted file mode 100644 index abbbbfe..0000000 --- a/docs/assets/function_string.md.5c2b2ccf.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as a,c as n,R as t}from"./chunks/framework.b4504927.js";const h=JSON.parse('{"title":"字符串篇","description":"","frontmatter":{},"headers":[],"relativePath":"function/string.md","filePath":"function/string.md"}'),o={name:"function/string.md"},e=t("",4),l=[e];function p(r,c,i,d,_,y){return a(),n("div",null,l)}const C=s(o,[["render",p]]);export{h as __pageData,C as default}; diff --git a/docs/assets/index.md.3c3c07ca.js b/docs/assets/index.md.3c3c07ca.js new file mode 100644 index 0000000..43eaded --- /dev/null +++ b/docs/assets/index.md.3c3c07ca.js @@ -0,0 +1 @@ +import{_ as e,o as t,c as i}from"./chunks/framework.b4504927.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"libAgile","text":"简单 方便 快捷","tagline":"让写代码更快,让bug更少","actions":[{"theme":"brand","text":"立即体验","link":"/function/algorithm"}]},"features":[{"title":"工具类","details":"开箱即用的工具类,包含算法、数据结构、数字、数组、字符串等相关实用函数"},{"title":"组件","details":"开箱即用的好用精品组件,按需引入,与其他ui组件库形成优势互补"},{"title":"使用 TypeScript","details":"全量使用 TypeScript 编写,和你的 TypeScript 项目无缝衔接。"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),a={name:"index.md"};function n(r,o,s,c,l,d){return t(),i("div")}const _=e(a,[["render",n]]);export{m as __pageData,_ as default}; diff --git a/docs/assets/index.md.3c3c07ca.lean.js b/docs/assets/index.md.3c3c07ca.lean.js new file mode 100644 index 0000000..43eaded --- /dev/null +++ b/docs/assets/index.md.3c3c07ca.lean.js @@ -0,0 +1 @@ +import{_ as e,o as t,c as i}from"./chunks/framework.b4504927.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"libAgile","text":"简单 方便 快捷","tagline":"让写代码更快,让bug更少","actions":[{"theme":"brand","text":"立即体验","link":"/function/algorithm"}]},"features":[{"title":"工具类","details":"开箱即用的工具类,包含算法、数据结构、数字、数组、字符串等相关实用函数"},{"title":"组件","details":"开箱即用的好用精品组件,按需引入,与其他ui组件库形成优势互补"},{"title":"使用 TypeScript","details":"全量使用 TypeScript 编写,和你的 TypeScript 项目无缝衔接。"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),a={name:"index.md"};function n(r,o,s,c,l,d){return t(),i("div")}const _=e(a,[["render",n]]);export{m as __pageData,_ as default}; diff --git a/docs/assets/index.md.4101f715.js b/docs/assets/index.md.4101f715.js deleted file mode 100644 index 58ee2b6..0000000 --- a/docs/assets/index.md.4101f715.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.b4504927.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"libAgile","text":"简单 方便 快捷","tagline":"让写代码更快一点,让bug更少一点","actions":[{"theme":"brand","text":"立即体验","link":"/function/algorithm"}]},"features":[{"title":"工具类","details":"开箱即用的工具类,包含算法、数据结构、数字、数组、字符串等相关实用函数"},{"title":"组件","details":"开箱即用的好用精品组件,按需引入,与其他ui组件库形成优势互补"},{"title":"样式","details":"敬请期待..."}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),i={name:"index.md"};function n(o,r,s,l,d,c){return t(),a("div")}const _=e(i,[["render",n]]);export{p as __pageData,_ as default}; diff --git a/docs/assets/index.md.4101f715.lean.js b/docs/assets/index.md.4101f715.lean.js deleted file mode 100644 index 58ee2b6..0000000 --- a/docs/assets/index.md.4101f715.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.b4504927.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"libAgile","text":"简单 方便 快捷","tagline":"让写代码更快一点,让bug更少一点","actions":[{"theme":"brand","text":"立即体验","link":"/function/algorithm"}]},"features":[{"title":"工具类","details":"开箱即用的工具类,包含算法、数据结构、数字、数组、字符串等相关实用函数"},{"title":"组件","details":"开箱即用的好用精品组件,按需引入,与其他ui组件库形成优势互补"},{"title":"样式","details":"敬请期待..."}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),i={name:"index.md"};function n(o,r,s,l,d,c){return t(),a("div")}const _=e(i,[["render",n]]);export{p as __pageData,_ as default}; diff --git a/docs/components/react/scrollBar.html b/docs/components/react/scrollBar.html index 4599a2b..5857ccd 100644 --- a/docs/components/react/scrollBar.html +++ b/docs/components/react/scrollBar.html @@ -55,7 +55,7 @@ ) } export default App;

api

props

参数说明类型默认值
type滚动类型。可选值为:show hover hidestringhover
minBarSize滚动条最小尺寸,x 轴滚动时宽度不小于这个值,y 轴滚动时高度不小于这个值number50
offsetLeftx 轴滚动条左边偏移量number0
offsetRightx 轴滚动条右边偏移量number10
offsetTopy 轴滚动条上边偏移量number0
offsetBottomy 轴滚动条下边偏移量number10

事件

事件名称说明回调参数
scroll滚动后触发function(scrollData, e)

方法

方法名称说明参数
updated默认情况下会监听子节点变动,但手动更改 dom 后导致的容器内容变更需要手动触发滚动组件更新updated()
setScrollLeft手动设置 x 轴滚动位置setScrollLeft(num: number)
setScrollTop手动设置 y 轴滚动位置setScrollTop(num: number)
- + \ No newline at end of file diff --git a/docs/components/vue/avGrid.html b/docs/components/vue/avGrid.html index ba878dc..cb537b8 100644 --- a/docs/components/vue/avGrid.html +++ b/docs/components/vue/avGrid.html @@ -16,7 +16,7 @@
Skip to content
On this page

均分网格

把容器平均分成 n 份,凡是需要平均排列的布局都可以用它来实现。

基本使用

- + \ No newline at end of file diff --git a/docs/components/vue/column.html b/docs/components/vue/column.html index 8583b09..c9d735f 100644 --- a/docs/components/vue/column.html +++ b/docs/components/vue/column.html @@ -16,7 +16,7 @@
Skip to content
On this page

三栏布局

大部分布局其实都可以拆分成左中右、上中下或者左右、左中、上下、上中等等方式,该组件能很好的满足这些场景。

左中右布局

左边固定宽度,右边自适应宽度,中间余下宽度

固定宽度
自适应宽度

左右布局

左边固定宽度,右边自适应宽度

固定宽度
自适应宽度
- + \ No newline at end of file diff --git a/docs/components/vue/scrollBar.html b/docs/components/vue/scrollBar.html index 93384fc..e507ed2 100644 --- a/docs/components/vue/scrollBar.html +++ b/docs/components/vue/scrollBar.html @@ -47,7 +47,7 @@ import scrollBar from 'lib-agile/es/components/scrollBar/index.vue.js' import 'lib-agile/es/components/scrollBar/index.css' </script>

api

props

参数说明类型默认值
type滚动类型。可选值为:show hover hidestringhover
minBarSize滚动条最小尺寸,x 轴滚动时宽度不小于这个值,y 轴滚动时高度不小于这个值number50
offsetLeftx 轴滚动条左边偏移量number0
offsetRightx 轴滚动条右边偏移量number10
offsetTopy 轴滚动条上边偏移量number0
offsetBottomy 轴滚动条下边偏移量number10
isAutoUpdate容器内内容变更是否自动更新滚动条Booleantrue

事件

事件名称说明回调参数
scroll滚动后触发function(scrollData, e)

方法

方法名称说明参数
updatedisAutoUpdate 等于 false 时,容器内容变更后可以手动触发滚动组件更新updated()
setScrollLeft手动设置 x 轴滚动位置setScrollLeft(num: number)
setScrollTop手动设置 y 轴滚动位置setScrollTop(num: number)
- + \ No newline at end of file diff --git a/docs/function/algorithm.html b/docs/function/algorithm.html index 2c65435..895ee76 100644 --- a/docs/function/algorithm.html +++ b/docs/function/algorithm.html @@ -139,7 +139,7 @@ shuffle(arr) // 随机排列该数组 console.log(arr) - + \ No newline at end of file diff --git a/docs/function/array.html b/docs/function/array.html index e5bf23d..bb10b8f 100644 --- a/docs/function/array.html +++ b/docs/function/array.html @@ -85,7 +85,7 @@ delArrItem(arr, { id: 1, name: 'a' }) // => [{id: 1, name: 'b'},{id: 1, name: 'c'},{id: 2, name: 'd'}] delArrItem([1, 2, 2, 4, 5], 2) // => [1, 4, 5] - + \ No newline at end of file diff --git a/docs/function/browser.html b/docs/function/browser.html index 2753c28..cc48725 100644 --- a/docs/function/browser.html +++ b/docs/function/browser.html @@ -31,7 +31,7 @@ // 如果没执行完成就要离开了,可以清除任务 scheduling.clear() - + \ No newline at end of file diff --git a/docs/function/dataStructure.html b/docs/function/dataStructure.html index 1b8694c..b540273 100644 --- a/docs/function/dataStructure.html +++ b/docs/function/dataStructure.html @@ -171,7 +171,7 @@ ] arrToMap(arr, 'id') // => {1: {id: 1, name: a}, 2: {id: 2}} - + \ No newline at end of file diff --git a/docs/function/date.html b/docs/function/date.html index f6b1112..0b10dce 100644 --- a/docs/function/date.html +++ b/docs/function/date.html @@ -16,7 +16,7 @@
Skip to content
On this page
- + \ No newline at end of file diff --git a/docs/function/html.html b/docs/function/html.html index e90a01e..6ff8ebb 100644 --- a/docs/function/html.html +++ b/docs/function/html.html @@ -11,7 +11,7 @@ - + @@ -19,8 +19,12 @@ elementForEach(document.getElementById('app'), (el) => { console.log(el) -}) - +})

html 解析器

把 html 字符串解析成 document 对象

javascript
import { htmlParser } from 'lib-agile'
+
+htmlParser('<div>123</div>') // => #document

html 标签转换成安全字符

javascript
import { escapeHtml } from 'lib-agile'
+
+escapeHtml('<div>123</div>') // => #&lt;div&gt;123&lt;/div&gt;
+ \ No newline at end of file diff --git a/docs/function/number.html b/docs/function/number.html index b6ed178..398e7ff 100644 --- a/docs/function/number.html +++ b/docs/function/number.html @@ -11,7 +11,7 @@ - + @@ -28,8 +28,12 @@ toCurrency(10000) // => 100,00 -toCurrency(10000.89) // => 100,00.89 - +toCurrency(10000.89) // => 100,00.89

数字差值

计算两个数的差值

javascript
import { diffCount } from 'lib-agile'
+
+diffCount(1000, 900) // => 100
+
+diffCount(900, 1000) // => 100
+ \ No newline at end of file diff --git a/docs/function/object.html b/docs/function/object.html index 911b77b..7a71c76 100644 --- a/docs/function/object.html +++ b/docs/function/object.html @@ -11,11 +11,11 @@ - + -
Skip to content
On this page

对象篇

合并源对象与目标对象的交集

合并源对象与目标对象的交集属性,并返回源对象

javascript
import { mergeIntersect } from 'lib-agile'
+    
Skip to content
On this page

对象篇

合并对象交集属性

合并源对象与目标对象的交集属性,并返回源对象

javascript
import { mergeIntersect } from 'lib-agile'
 
 const source = {
   a: 1,
@@ -27,7 +27,7 @@
 }
 
 mergeIntersect(source, target) // => {a: 2}
- + \ No newline at end of file diff --git a/docs/function/other.html b/docs/function/other.html index 7962262..860b4d6 100644 --- a/docs/function/other.html +++ b/docs/function/other.html @@ -22,7 +22,7 @@ blocked(5000) // 阻塞程序5秒 console.log('我会在5秒后输出')
- + \ No newline at end of file diff --git a/docs/function/platform.html b/docs/function/platform.html index 252763f..242b423 100644 --- a/docs/function/platform.html +++ b/docs/function/platform.html @@ -16,7 +16,7 @@
Skip to content
On this page
- + \ No newline at end of file diff --git a/docs/function/regex.html b/docs/function/regex.html index a1f292f..54add5a 100644 --- a/docs/function/regex.html +++ b/docs/function/regex.html @@ -16,7 +16,7 @@
Skip to content
On this page
- + \ No newline at end of file diff --git a/docs/function/string.html b/docs/function/string.html index 347a6c8..d4a6885 100644 --- a/docs/function/string.html +++ b/docs/function/string.html @@ -11,14 +11,20 @@ - +
Skip to content
On this page

字符串篇

随机字符串

随机生成指定长度的字符串,随机包含大写字母、小写字母、数字

javascript
import { randomStr } from 'lib-agile'
 
-randomStr(5) // => D2d4t
- +randomStr(5) // => D2d4t

随机颜色

随机生成颜色值,支持 rgb, rgba, hsl, hsla, hex

javascript
import { randomColor } from 'lib-agile'
+
+randomColor()

随机 ip

随机生成 ip 地址,支持 ipv4 ipv6

javascript
import { randomIp } from 'lib-agile'
+
+randomIp() //ipv4
+
+randomIp(1) //ipv6
+ \ No newline at end of file diff --git a/docs/function/type.html b/docs/function/type.html index c7f5708..65095a9 100644 --- a/docs/function/type.html +++ b/docs/function/type.html @@ -28,7 +28,7 @@ isPromise(5) // => false isPromise(new Promise(() => {})) // => true - + \ No newline at end of file diff --git a/docs/hashmap.json b/docs/hashmap.json index 7b65acf..0fbd4d1 100644 --- a/docs/hashmap.json +++ b/docs/hashmap.json @@ -1 +1 @@ -{"function_platform.md":"ecb83a3e","function_regex.md":"b8fc2d30","api-examples.md":"a7a4ac0d","components_vue_avgrid.md":"756bec7d","function_date.md":"e0704192","function_number.md":"0177495d","function_html.md":"c776248f","function_browser.md":"5c52cceb","components_vue_scrollbar.md":"655a6dc1","function_object.md":"deb7217e","function_other.md":"3411fe67","function_string.md":"5c2b2ccf","function_datastructure.md":"bfce568f","index.md":"4101f715","markdown-examples.md":"051d8b49","function_array.md":"b1fb4c82","components_react_scrollbar.md":"0ab54dc4","function_type.md":"ec8d5fbe","function_algorithm.md":"bef1175b","components_vue_column.md":"66b502c6"} +{"function_platform.md":"ecb83a3e","function_object.md":"488ac1e9","markdown-examples.md":"051d8b49","index.md":"3c3c07ca","function_html.md":"582c9688","components_vue_column.md":"66b502c6","function_other.md":"3411fe67","function_browser.md":"5c52cceb","components_vue_avgrid.md":"756bec7d","function_regex.md":"b8fc2d30","function_array.md":"b1fb4c82","function_algorithm.md":"bef1175b","function_datastructure.md":"bfce568f","function_string.md":"04ff1f39","function_number.md":"db8cac40","components_vue_scrollbar.md":"655a6dc1","function_date.md":"e0704192","function_type.md":"ec8d5fbe","api-examples.md":"a7a4ac0d","components_react_scrollbar.md":"0ab54dc4"} diff --git a/docs/index.html b/docs/index.html index cadc1b5..9f1d583 100644 --- a/docs/index.html +++ b/docs/index.html @@ -11,12 +11,12 @@ - + -
Skip to content

libAgile

简单 方便 快捷

让写代码更快一点,让bug更少一点

- +
Skip to content

libAgile

简单 方便 快捷

让写代码更快,让bug更少

+ \ No newline at end of file diff --git a/docs/markdown-examples.html b/docs/markdown-examples.html index 281daf3..dab615a 100644 --- a/docs/markdown-examples.html +++ b/docs/markdown-examples.html @@ -48,7 +48,7 @@ ::: details This is a details block. :::

Output

INFO

This is an info box.

TIP

This is a tip.

WARNING

This is a warning.

DANGER

This is a dangerous warning.

Details

This is a details block.

More

Check out the documentation for the full list of markdown extensions.

- + \ No newline at end of file diff --git a/index.html b/index.html index 0f40fc2..079117f 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,6 @@
- + diff --git a/package.json b/package.json index 78a4a69..8d8d495 100644 --- a/package.json +++ b/package.json @@ -1,23 +1,24 @@ { "name": "lib-agile", - "version": "1.0.0-beta.6", + "version": "1.0.0-beta.11", "description": "简单方便快捷的综合库,包含工具函数、组件、样式,与第三方组件库形式优势互补。", "type": "module", - "author": { - "name": "huangriya", - "url": "https://github.com/huangriya", - "email": "huangriya@163.com" - }, - "repository": "https://github.com/huangriya/lib-agile.git", + "main": "./dist/lib-agile.umd.js", + "module": "./dist/lib-agile.js", + "style": "./dist/style.css", + "types": "./es/index.d.ts", "files": [ "dist", "es", "lib" ], - "main": "./dist/lib-agile.umd.js", - "module": "./dist/lib-agile.js", - "style": "./dist/style.css", "license": "MIT", + "author": { + "name": "huangriya", + "url": "https://github.com/huangriya", + "email": "huangriya@163.com" + }, + "repository": "https://github.com/huangriya/lib-agile.git", "scripts": { "clean": "rimraf lib es dist", "dev": "vite", @@ -32,7 +33,7 @@ "@vitejs/plugin-react": "^4.0.4", "ant-design-vue": "^3.2.17", "dayjs": "^1.11.9", - "lib-agile": "^1.0.0-beta.3", + "lib-agile": "^1.0.0-beta.10", "react": "^18.2.0", "react-dom": "^18.2.0", "vue-router": "^4.2.4" @@ -50,7 +51,7 @@ "prettier": "^2.5.1", "rimraf": "^3.0.2", "typescript": "^4.6.4", - "vite": "~4.0.1", + "vite": "~4.0.3", "vite-plugin-build": "^0.10.0", "vitepress": "^1.0.0-rc.2", "vue": "~3.2.45", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9d0351..e42ee25 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,13 +13,13 @@ specifiers: eslint-plugin-prettier: ^4.0.0 eslint-plugin-vue: ^9.11.0 less: ^4.1.2 - lib-agile: ^1.0.0-beta.2 + lib-agile: ^1.0.0-beta.10 prettier: ^2.5.1 react: ^18.2.0 react-dom: ^18.2.0 rimraf: ^3.0.2 typescript: ^4.6.4 - vite: ~4.0.1 + vite: ~4.0.3 vite-plugin-build: ^0.10.0 vitepress: ^1.0.0-rc.2 vue: ~3.2.45 @@ -30,7 +30,7 @@ dependencies: '@vitejs/plugin-react': 4.0.4_vite@4.0.5 ant-design-vue: 3.2.20_vue@3.2.47 dayjs: 1.11.9 - lib-agile: 1.0.0-beta.2_vite@4.0.5+vue@3.2.47 + lib-agile: 1.0.0-beta.10_vite@4.0.5+vue@3.2.47 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 vue-router: 4.2.4_vue@3.2.47 @@ -2493,8 +2493,8 @@ packages: type-check: 0.4.0 dev: true - /lib-agile/1.0.0-beta.2_vite@4.0.5+vue@3.2.47: - resolution: {integrity: sha512-1nTa79JC72lsKgQG+zesP2VxBtA9uoik7toXrvrISzHhUSg+0kbRmqlAka7NX3SjS6sVkqZr3/cod5OEsW5iDw==} + /lib-agile/1.0.0-beta.10_vite@4.0.5+vue@3.2.47: + resolution: {integrity: sha512-/wA1YtTgwaWFsoYEdYnibyPVaq8JaaHV1I9sE6gJ0sQrbZJrzJUDsFkG+4wOmnB7VUh7ThuKUKNk7ToTVItPqA==} engines: {node: '>=14', npm: '>=6.10'} dependencies: '@vitejs/plugin-react': 4.0.4_vite@4.0.5 @@ -2882,14 +2882,6 @@ packages: glob: 7.2.3 dev: true - /rollup/3.26.3: - resolution: {integrity: sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==} - engines: {node: '>=14.18.0', npm: '>=8.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.2 - dev: true - /rollup/3.27.2: resolution: {integrity: sha512-YGwmHf7h2oUHkVBT248x0yt6vZkYQ3/rvE5iQuVBh3WO8GcJ6BNeOkpoX1yMHIiBm18EMLjBPIoUDkhgnyxGOQ==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} @@ -3200,9 +3192,9 @@ packages: dependencies: esbuild: 0.16.17 less: 4.1.3 - postcss: 8.4.26 + postcss: 8.4.27 resolve: 1.22.2 - rollup: 3.26.3 + rollup: 3.27.2 optionalDependencies: fsevents: 2.3.2 dev: true diff --git a/tsconfig.json b/tsconfig.json index f78fc24..ebc50f3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,6 @@ "esModuleInterop": true, "lib": ["ESNext", "DOM"], "skipLibCheck": true, - "noEmit": true, "paths": { "@/*": ["src/*"] }, diff --git a/vite.config.js b/vite.config.ts similarity index 100% rename from vite.config.js rename to vite.config.ts diff --git a/vitepress/.vitepress/cache/deps/_metadata.json b/vitepress/.vitepress/cache/deps/_metadata.json index 75c0f2c..f931721 100644 --- a/vitepress/.vitepress/cache/deps/_metadata.json +++ b/vitepress/.vitepress/cache/deps/_metadata.json @@ -1,23 +1,23 @@ { - "hash": "a1bcf515", - "browserHash": "8d09fb54", + "hash": "aee543ee", + "browserHash": "625440ea", "optimized": { "vue": { "src": "../../../../node_modules/.pnpm/vue@3.2.47/node_modules/vue/dist/vue.runtime.esm-bundler.js", "file": "vue.js", - "fileHash": "a1dab69d", + "fileHash": "e5459586", "needsInterop": false }, "vitepress > @vue/devtools-api": { "src": "../../../../node_modules/.pnpm/@vue+devtools-api@6.5.0/node_modules/@vue/devtools-api/lib/esm/index.js", "file": "vitepress___@vue_devtools-api.js", - "fileHash": "7f72e30a", + "fileHash": "2c23eee7", "needsInterop": false }, "@theme/index": { "src": "../../../../node_modules/.pnpm/vitepress@1.0.0-rc.2_fdb7e3c9f57c3e321aecf58f42f13727/node_modules/vitepress/dist/client/theme-default/index.js", "file": "@theme_index.js", - "fileHash": "7a2119bb", + "fileHash": "952a0d0a", "needsInterop": false } }, diff --git a/vitepress/function/html.md b/vitepress/function/html.md index 83084eb..55e51f4 100644 --- a/vitepress/function/html.md +++ b/vitepress/function/html.md @@ -11,3 +11,21 @@ elementForEach(document.getElementById('app'), (el) => { console.log(el) }) ``` + +## html 解析器 + +把 html 字符串解析成 document 对象 + +```javascript +import { htmlParser } from 'lib-agile' + +htmlParser('
123
') // => #document +``` + +## html 标签转换成安全字符 + +```javascript +import { escapeHtml } from 'lib-agile' + +escapeHtml('
123
') // => #<div>123</div> +``` diff --git a/vitepress/function/number.md b/vitepress/function/number.md index 2e1faed..4728931 100644 --- a/vitepress/function/number.md +++ b/vitepress/function/number.md @@ -28,3 +28,15 @@ toCurrency(10000) // => 100,00 toCurrency(10000.89) // => 100,00.89 ``` + +## 数字差值 + +计算两个数的差值 + +```javascript +import { diffCount } from 'lib-agile' + +diffCount(1000, 900) // => 100 + +diffCount(900, 1000) // => 100 +``` diff --git a/vitepress/function/object.md b/vitepress/function/object.md index 0ba1cd4..4b6f2ad 100644 --- a/vitepress/function/object.md +++ b/vitepress/function/object.md @@ -1,6 +1,6 @@ # 对象篇 -## 合并源对象与目标对象的交集 +## 合并对象交集属性 合并源对象与目标对象的交集属性,并返回源对象 diff --git a/vitepress/function/string.md b/vitepress/function/string.md index 69eb30e..1cfe05b 100644 --- a/vitepress/function/string.md +++ b/vitepress/function/string.md @@ -9,3 +9,25 @@ import { randomStr } from 'lib-agile' randomStr(5) // => D2d4t ``` + +## 随机颜色 + +随机生成颜色值,支持 rgb, rgba, hsl, hsla, hex + +```javascript +import { randomColor } from 'lib-agile' + +randomColor() +``` + +## 随机 ip + +随机生成 ip 地址,支持 ipv4 ipv6 + +```javascript +import { randomIp } from 'lib-agile' + +randomIp() //ipv4 + +randomIp(1) //ipv6 +``` diff --git a/vitepress/index.md b/vitepress/index.md index 3b3eb50..c8c2854 100644 --- a/vitepress/index.md +++ b/vitepress/index.md @@ -5,7 +5,7 @@ layout: home hero: name: 'libAgile' text: '简单 方便 快捷' - tagline: 让写代码更快一点,让bug更少一点 + tagline: 让写代码更快,让bug更少 actions: - theme: brand text: 立即体验 @@ -16,6 +16,8 @@ features: details: 开箱即用的工具类,包含算法、数据结构、数字、数组、字符串等相关实用函数 - title: 组件 details: 开箱即用的好用精品组件,按需引入,与其他ui组件库形成优势互补 - - title: 样式 - details: 敬请期待... + - title: 使用 TypeScript + details: 全量使用 TypeScript 编写,和你的 TypeScript 项目无缝衔接。 + # - title: 样式 + # details: 敬请期待... ---