From 7775a88a74b1db7c11d7164ef3155497a65e46bf Mon Sep 17 00:00:00 2001 From: 刘嘉威 <daidaibg@163.com> Date: 星期三, 26 十月 2022 16:58:14 +0800 Subject: [PATCH] docs: update README --- README.md | 126 +++++++++++++++++++++++++++++++++++++---- 1 files changed, 113 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index f05b52c..60e4ece 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,14 @@ + ## 寮�鍙戜腑...鍙互鎻恜r瀹屽杽 锛屾鏋跺凡缁忔惌寤哄ソ +## 寮�鍙戜腑...鍙互鎻恜r瀹屽杽 锛屾鏋跺凡缁忔惌寤哄ソ + ## 寮�鍙戜腑...鍙互鎻恜r瀹屽杽 锛屾鏋跺凡缁忔惌寤哄ソ +## 寮�鍙戜腑...鍙互鎻恜r瀹屽杽 锛屾鏋跺凡缁忔惌寤哄ソ +## 寮�鍙戜腑...鍙互鎻恜r瀹屽杽 锛屾鏋跺凡缁忔惌寤哄ソ +## 寮�鍙戜腑...鍙互鎻恜r瀹屽杽 锛屾鏋跺凡缁忔惌寤哄ソ +## 寮�鍙戜腑...鍙互鎻恜r瀹屽杽 锛屾鏋跺凡缁忔惌寤哄ソ +## 寮�鍙戜腑...鍙互鎻恜r瀹屽杽 锛屾鏋跺凡缁忔惌寤哄ソ +## 寮�鍙戜腑...鍙互鎻恜r瀹屽杽 锛屾鏋跺凡缁忔惌寤哄ソ + ## 椤圭洰鎻忚堪 @@ -30,19 +40,17 @@ ### 椤圭洰棰勮鍦板潃 -[https://www.daidaibg.com/bigscreen-vue3 - -[](https://www.daidaibg.com/bigscreen) +[https://www.daidaibg.com/bigscreen](https://www.daidaibg.com/bigscreen) ### 椤圭洰浠撳簱鍦板潃 **github鍦板潃** -[https://github.com/daidaibg/IofTV-Screen-Vue3](https://github.com/daidaibg/IofTV-Screen) +[https://github.com/daidaibg/IofTV-Screen-Vue3](https://github.com/daidaibg/IofTV-Screen-Vue3) **Gitee鍦板潃** -[https://gitee.com/daidaibg/IofTV-Screen-Vue3](https://gitee.com/daidaibg/IofTV-Screen) +[https://gitee.com/daidaibg/IofTV-Screen-Vue3](https://gitee.com/daidaibg/IofTV-Screen-Vue3) ### 閲囩敤鑷�傚簲缁勪欢鏂瑰紡锛� @@ -102,13 +110,19 @@ mockXHR() ``` -## 鑷�傚簲缂╂斁缁勪欢 +## -### 娉ㄦ剰 +## 鍏敤缁勪欢 + +灏佽浜嗛櫎闈㈡潯澶栦釜鍒敤鍒扮殑缁勪欢 + +### 鑷�傚簲缂╂斁缁勪欢 + +#### 娉ㄦ剰 閲囩敤Scale鏂瑰紡锛屼細鑷姩缁欑粍浠剁埗鍏冪礌娣诲姞overflow:hidden -### 浣跨敤 +#### 浣跨敤 ```vue <template> @@ -130,7 +144,9 @@ } </script> ``` -### API + +#### API + | 灞炴�� | 璇存槑 | 绫诲瀷 | 榛樿鍊� | | ------------ | ------------------------------------------------------------ | -------------------------------- | ------ | | selfAdaption | 鏄惁杩涜鑷�傚簲 | Boolean | true | @@ -141,10 +157,6 @@ | fullScreen | 鍏ㄥ睆鑷�傚簲锛屽惎鐢ㄦ閰嶇疆椤规椂浼氬瓨鍦ㄦ媺浼告晥鏋滐紝鍚屾椂autoScale澶辨晥锛岄潪蹇呰鎯呭喌涓嬩笉寤鸿寮�鍚� | Boolean | false | | boxStyle | 淇敼瀹瑰櫒鏍峰紡锛屽灞呬腑灞曠ず鏃朵晶杈硅儗鏅壊锛岀鍚圴ue鍙屽悜缁戝畾style鏍囧噯鏍煎紡 | Object | null | | wrapperStyle | 淇敼鑷�傚簲鍖哄煙鏍峰紡锛岀鍚圴ue鍙屽悜缁戝畾style鏍囧噯鏍煎紡 | Object | null | - -## 鍏敤缁勪欢 - -灏佽浜嗛櫎闈㈡潯澶栦釜鍒敤鍒扮殑缁勪欢 ### 澶栬竟妗� @@ -165,6 +177,94 @@ | :---: | :--: | :----: | :----: | :----: | | title | 鏍囧ご | - | string | - | +### CountUp 鏁板瓧婊氬姩 + +浠ヤ笅灞炴�у悓 coutup.js 閰嶇疆椤癸紙same as countup.js properties锛� + +#### Props + +| Name | Type | Default | Description | +| -------- | ---------------- | ------- | ------------------------------------------------------------ | +| endVal | Number \| String | - | 缁撴潫鍊� | +| startVal | Number \| String | 0 | 璧峰鍊� | +| duration | Number | 2.5 | 鍔ㄧ敾鏃堕暱锛屽崟浣嶏細绉� | +| options | Object | - | [countUp.js](https://github.com/inorganik/countUp.js) options 閰嶇疆椤� | + +浠ヤ笅涓虹粍浠剁壒鏈夊睘鎬э紙extension properties锛� + +| Name | Type | Default | Description | +| -------- | ----------------- | ------- | ----------------------------- | +| autoplay | Boolean | true | 鏄惁鑷姩璁℃暟 | +| loop | Boolean \| Number | false | 寰幆娆℃暟锛屾湁闄愭鏁� / 鏃犻檺寰幆 | +| delay | Number | 0 | loop 寰幆鐨勯棿闅旀椂闂达紝鍗曚綅锛氱 | + +#### 鎻掓Ы锛坰lots锛� + +| Name | Description | +| ------ | ----------- | +| prefix | 鍓嶇紑 | +| suffix | 鍚庣紑 | + +#### 浜嬩欢锛圗vents锛� + +| Name | Description | return | +| --------- | -------------------------- | ------------ | +| @init | CountUp 瀹炰緥鍒濆鍖栧畬鎴愯Е鍙� | CountUp 瀹炰緥 | +| @finished | 璁℃暟缁撴潫鏃惰Е鍙� | - | + +#### countup.js 閰嶇疆椤硅鏄� +```ts +interface CountUpOptions { + startVal?: number // number to start at (0) 寮�濮嬫暟鍊硷紝榛樿 0 + decimalPlaces?: number // number of decimal places (0) 灏忔暟鐐� 浣嶆暟 + duration?: number // animation duration in seconds (2) 鍔ㄧ敾鏃堕暱 + useGrouping?: boolean // example: 1,000 vs 1000 (true) 鏄惁浣跨敤鍗冨垎浣� + useEasing?: boolean // ease animation (true) 鏄惁寮�鍚姩鐢昏繃娓★紝榛樿鍔ㄧ敾鍑芥暟涓篹aseOutExpo + smartEasingThreshold?: number // smooth easing for large numbers above this if useEasing (999) + smartEasingAmount?: number // amount to be eased for numbers above threshold (333) + separator?: string // grouping separator (',') 鍗冨垎浣嶅垎闅旂 + decimal?: string // decimal ('.') 灏忔暟鐐瑰垎闅旂 + // easingFn: easing function for animation (easeOutExpo) 鍔ㄧ敾鍑芥暟 + easingFn?: (t: number, b: number, c: number, d: number) => number + formattingFn?: (n: number) => string // this function formats result 鏍煎紡鍖栫粨鏋� + prefix?: string // text prepended to result 鏁板�煎墠缂� + suffix?: string // text appended to result 鏁板�煎悗缂� + numerals?: string[] // numeral glyph substitution 鏁板瓧绗﹀彿鏇挎崲 0 - 9锛屼緥濡傛浛鎹负 [a,b,c,d,e,f,g,h,i,j] + enableScrollSpy?: boolean // start animation when target is in view 鍦ㄥ彲瑙嗚寖鍥村唴鎵嶅紑濮嬪姩鐢� + scrollSpyDelay?: number // delay (ms) after target comes into view 鐩爣杩涘叆鍙鑼冨洿鍐呭悗鐨勫欢杩熸椂闂�(姣) +} +``` + +### 鑳跺泭鏌卞浘 + +#### Props + +| 灞炴�� | 璇存槑 | 绫诲瀷 | 鍙�夊�� | 榛樿鍊� | +| :----: | :------: | :-------------: | :-----------------------: | :-----: | +| data | 鏌辨暟鎹� | `Array<Object>` | [data灞炴�(#data灞炴��) | `[]` | +| config | 鍩虹閰嶇疆 | Object | [config灞炴�(#config灞炴��) | `false` | + +#### config灞炴�� + +| 灞炴�� | 璇存槑 | 绫诲瀷 | 鍙�夊�� | 榛樿鍊� | +| :-------: | :------: | :-------------: | :----: | :-----: | +| unit | 鍗曚綅 | `String` | --- | `''` | +| colors | 鐜鑹� | `Array<String>` | [1] | [2] | +| showValue | 鏄剧ず鏁板�� | `Boolean` | --- | `false` | + +#### 娉ㄩ噴config娉ㄩ噴 + +[1] 棰滆壊鏀寔`hex|rgb|rgba|棰滆壊鍏抽敭瀛梎绛夊洓绉嶇被鍨嬨�� + +[2] 榛樿閰嶈壊涓篳['#37a2da', '#32c5e9', '#67e0e3', '#9fe6b8', '#ffdb5c', '#ff9f7f', '#fb7293']`銆� + +#### data灞炴�� + +| 灞炴�� | 璇存槑 | 绫诲瀷 | 鍙�夊�� | 榛樿鍊� | +| :---: | :------: | :------: | :----: | :----: | +| name | 鏌卞悕绉� | `String` | --- | --- | +| value | 鏌卞搴斿�� | `Number` | --- | --- | + ## 涓棿鍦板浘 ### 鍗楁捣鏄鹃殣鎺у埗 -- Gitblit v1.8.0