File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @cherrywind/flexible" ,
3- "version" : " 0.1.6" ,
3+ "version" : " 0.1.6.alpha " ,
44 "private" : false ,
55 "keywords" : [
66 " flexible"
Original file line number Diff line number Diff line change @@ -66,13 +66,9 @@ export interface FlexibleOptions {
6666 */
6767 matchedIndex : number ;
6868 /**
69- * 原始计算得到的 vw 值(未经过任何比例调整) 。
69+ * 转换前计算得到的 vw 值。
7070 */
7171 originalVw : number ;
72- /**
73- * 计算得到的比例因子。
74- */
75- computedRatio : number ;
7672 } ) => number ;
7773
7874 /**
@@ -198,7 +194,6 @@ export const flexible = (options: FlexibleOptions = {}): (() => void) => {
198194 vw = options . onTransform ( {
199195 matchedIndex,
200196 originalVw,
201- computedRatio : ratio ?. [ matchedIndex ] ?? 1 ,
202197 } ) ;
203198 }
204199 if ( scope ) {
@@ -211,8 +206,7 @@ export const flexible = (options: FlexibleOptions = {}): (() => void) => {
211206 scopeVw = options . onTransform ( {
212207 scope : item ,
213208 matchedIndex,
214- originalVw,
215- computedRatio,
209+ originalVw : scopeVw ,
216210 } ) ;
217211 }
218212 element . style . setProperty ( cssVarName , scopeVw + 'px' ) ;
You can’t perform that action at this time.
0 commit comments