Skip to content

Commit 1082be1

Browse files
committed
update dist and lib
1 parent e67b4d5 commit 1082be1

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed

dist/datav.map.vue.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23018,7 +23018,8 @@
2301823018
aligns: [],
2301923019
animationIndex: 0,
2302023020
animationHandler: '',
23021-
updater: 0
23021+
updater: 0,
23022+
needCalc: false
2302223023
};
2302323024
},
2302423025

@@ -23208,6 +23209,18 @@
2320823209
},
2320923210

2321023211
async animation(start = false) {
23212+
const {
23213+
needCalc,
23214+
calcHeights,
23215+
calcRowsData
23216+
} = this;
23217+
23218+
if (needCalc) {
23219+
calcRowsData();
23220+
calcHeights();
23221+
this.needCalc = false;
23222+
}
23223+
2321123224
let {
2321223225
avgHeight,
2321323226
animationIndex,
@@ -23270,16 +23283,13 @@
2327023283
updateRows(rows, animationIndex) {
2327123284
const {
2327223285
mergedConfig,
23273-
calcRowsData,
23274-
calcHeights,
2327523286
animationHandler,
2327623287
animation
2327723288
} = this;
2327823289
this.mergedConfig = { ...mergedConfig,
2327923290
data: [...rows]
2328023291
};
23281-
calcRowsData();
23282-
calcHeights();
23292+
this.needCalc = true;
2328323293
if (typeof animationIndex === 'number') this.animationIndex = animationIndex;
2328423294
if (!animationHandler) animation(true);
2328523295
}
@@ -23393,7 +23403,7 @@
2339323403
/* style */
2339423404
const __vue_inject_styles__$z = function (inject) {
2339523405
if (!inject) return
23396-
inject("data-v-58d7aca1_0", { source: ".dv-scroll-board {\n position: relative;\n width: 100%;\n height: 100%;\n color: #fff;\n}\n.dv-scroll-board .text {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.dv-scroll-board .header {\n display: flex;\n flex-direction: row;\n font-size: 15px;\n}\n.dv-scroll-board .header .header-item {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: all 0.3s;\n}\n.dv-scroll-board .rows {\n overflow: hidden;\n}\n.dv-scroll-board .rows .row-item {\n display: flex;\n font-size: 14px;\n transition: all 0.3s;\n}\n.dv-scroll-board .rows .ceil {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.dv-scroll-board .rows .index {\n border-radius: 3px;\n padding: 0px 3px;\n}\n", map: {"version":3,"sources":["main.vue"],"names":[],"mappings":"AAAA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,WAAW;AACb;AACA;EACE,eAAe;EACf,sBAAsB;EACtB,mBAAmB;EACnB,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;AACjB;AACA;EACE,eAAe;EACf,sBAAsB;EACtB,mBAAmB;EACnB,gBAAgB;EAChB,uBAAuB;EACvB,oBAAoB;AACtB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,eAAe;EACf,oBAAoB;AACtB;AACA;EACE,eAAe;EACf,sBAAsB;EACtB,mBAAmB;EACnB,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,kBAAkB;EAClB,gBAAgB;AAClB","file":"main.vue","sourcesContent":[".dv-scroll-board {\n position: relative;\n width: 100%;\n height: 100%;\n color: #fff;\n}\n.dv-scroll-board .text {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.dv-scroll-board .header {\n display: flex;\n flex-direction: row;\n font-size: 15px;\n}\n.dv-scroll-board .header .header-item {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: all 0.3s;\n}\n.dv-scroll-board .rows {\n overflow: hidden;\n}\n.dv-scroll-board .rows .row-item {\n display: flex;\n font-size: 14px;\n transition: all 0.3s;\n}\n.dv-scroll-board .rows .ceil {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.dv-scroll-board .rows .index {\n border-radius: 3px;\n padding: 0px 3px;\n}\n"]}, media: undefined });
23406+
inject("data-v-26e19f4c_0", { source: ".dv-scroll-board {\n position: relative;\n width: 100%;\n height: 100%;\n color: #fff;\n}\n.dv-scroll-board .text {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.dv-scroll-board .header {\n display: flex;\n flex-direction: row;\n font-size: 15px;\n}\n.dv-scroll-board .header .header-item {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: all 0.3s;\n}\n.dv-scroll-board .rows {\n overflow: hidden;\n}\n.dv-scroll-board .rows .row-item {\n display: flex;\n font-size: 14px;\n transition: all 0.3s;\n}\n.dv-scroll-board .rows .ceil {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.dv-scroll-board .rows .index {\n border-radius: 3px;\n padding: 0px 3px;\n}\n", map: {"version":3,"sources":["main.vue"],"names":[],"mappings":"AAAA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,WAAW;AACb;AACA;EACE,eAAe;EACf,sBAAsB;EACtB,mBAAmB;EACnB,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;AACjB;AACA;EACE,eAAe;EACf,sBAAsB;EACtB,mBAAmB;EACnB,gBAAgB;EAChB,uBAAuB;EACvB,oBAAoB;AACtB;AACA;EACE,gBAAgB;AAClB;AACA;EACE,aAAa;EACb,eAAe;EACf,oBAAoB;AACtB;AACA;EACE,eAAe;EACf,sBAAsB;EACtB,mBAAmB;EACnB,gBAAgB;EAChB,uBAAuB;AACzB;AACA;EACE,kBAAkB;EAClB,gBAAgB;AAClB","file":"main.vue","sourcesContent":[".dv-scroll-board {\n position: relative;\n width: 100%;\n height: 100%;\n color: #fff;\n}\n.dv-scroll-board .text {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.dv-scroll-board .header {\n display: flex;\n flex-direction: row;\n font-size: 15px;\n}\n.dv-scroll-board .header .header-item {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: all 0.3s;\n}\n.dv-scroll-board .rows {\n overflow: hidden;\n}\n.dv-scroll-board .rows .row-item {\n display: flex;\n font-size: 14px;\n transition: all 0.3s;\n}\n.dv-scroll-board .rows .ceil {\n padding: 0 10px;\n box-sizing: border-box;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.dv-scroll-board .rows .index {\n border-radius: 3px;\n padding: 0px 3px;\n}\n"]}, media: undefined });
2339723407

2339823408
};
2339923409
/* scoped */

dist/datav.min.vue.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/components/scrollBoard/src/main.vue

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ export default {
178178
179179
animationHandler: '',
180180
181-
updater: 0
181+
updater: 0,
182+
183+
needCalc: false
182184
}
183185
},
184186
watch: {
@@ -335,6 +337,14 @@ export default {
335337
this.aligns = deepMerge(aligns, align)
336338
},
337339
async animation (start = false) {
340+
const { needCalc, calcHeights, calcRowsData } = this
341+
342+
if (needCalc) {
343+
calcRowsData()
344+
calcHeights()
345+
this.needCalc = false
346+
}
347+
338348
let { avgHeight, animationIndex, mergedConfig, rowsData, animation, updater } = this
339349
340350
const { waitTime, carousel, rowNum } = mergedConfig
@@ -389,15 +399,15 @@ export default {
389399
})
390400
},
391401
updateRows(rows, animationIndex) {
392-
const { mergedConfig, calcRowsData, calcHeights, animationHandler, animation } = this
402+
const { mergedConfig, animationHandler, animation } = this
393403
394404
this.mergedConfig = {
395405
...mergedConfig,
396406
data: [...rows]
397407
}
398408
399-
calcRowsData()
400-
calcHeights()
409+
this.needCalc = true
410+
401411
if (typeof animationIndex === 'number') this.animationIndex = animationIndex
402412
if (!animationHandler) animation(true)
403413
}

0 commit comments

Comments
 (0)