Skip to content

Commit 07a1184

Browse files
committed
build: package
1 parent ca81be1 commit 07a1184

File tree

6 files changed

+51
-12
lines changed

6 files changed

+51
-12
lines changed

lib/cube.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/index.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7171,7 +7171,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
71717171
}
71727172

71737173
var Cube = {
7174-
version: "1.12.26",
7174+
version: "1.12.27",
71757175
install: install,
71767176
BScroll: _module.BetterScroll,
71777177
createAPI: _module.createAPI
@@ -24026,6 +24026,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2402624026
},
2402724027

2402824028
methods: {
24029+
scrollTo: function scrollTo() {
24030+
this.$refs.scroll && this.$refs.scroll.scrollTo.apply(this.$refs.scroll, arguments);
24031+
},
2402924032
refresh: function refresh() {
2403024033
this.navBar && this.navBar.refresh();
2403124034
this.$refs.sticky.refresh();
@@ -24184,6 +24187,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2418424187
txts: {
2418524188
type: Array,
2418624189
default: function _default() {
24190+
this._defaultTxts = true;
24191+
2418724192
return this.labels;
2418824193
}
2418924194
},
@@ -24194,11 +24199,20 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
2419424199
},
2419524200
data: function data() {
2419624201
return {
24197-
active: this.current
24202+
active: this.current,
24203+
usedTxts: this.txts
2419824204
};
2419924205
},
2420024206

2420124207
watch: {
24208+
labels: function labels(newLabels) {
24209+
if (this._defaultTxts) {
24210+
this.usedTxts = newLabels;
24211+
}
24212+
},
24213+
txts: function txts(newTxts) {
24214+
this.usedTxts = newTxts;
24215+
},
2420224216
current: function current(newVal) {
2420324217
this.active = newVal;
2420424218
},
@@ -24286,7 +24300,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
2428624300
}, [_c('div', {
2428724301
ref: "items",
2428824302
staticClass: "cube-scroll-nav-bar-items"
24289-
}, _vm._l((_vm.txts), function(txt, index) {
24303+
}, _vm._l((_vm.usedTxts), function(txt, index) {
2429024304
return _c('div', {
2429124305
key: index,
2429224306
staticClass: "cube-scroll-nav-bar-item",

lib/scroll-nav-bar/index.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8003,6 +8003,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
80038003
txts: {
80048004
type: Array,
80058005
default: function _default() {
8006+
this._defaultTxts = true;
8007+
80068008
return this.labels;
80078009
}
80088010
},
@@ -8013,11 +8015,20 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
80138015
},
80148016
data: function data() {
80158017
return {
8016-
active: this.current
8018+
active: this.current,
8019+
usedTxts: this.txts
80178020
};
80188021
},
80198022

80208023
watch: {
8024+
labels: function labels(newLabels) {
8025+
if (this._defaultTxts) {
8026+
this.usedTxts = newLabels;
8027+
}
8028+
},
8029+
txts: function txts(newTxts) {
8030+
this.usedTxts = newTxts;
8031+
},
80218032
current: function current(newVal) {
80228033
this.active = newVal;
80238034
},
@@ -8105,7 +8116,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
81058116
}, [_c('div', {
81068117
ref: "items",
81078118
staticClass: "cube-scroll-nav-bar-items"
8108-
}, _vm._l((_vm.txts), function(txt, index) {
8119+
}, _vm._l((_vm.usedTxts), function(txt, index) {
81098120
return _c('div', {
81108121
key: index,
81118122
staticClass: "cube-scroll-nav-bar-item",

lib/scroll-nav-bar/scroll-nav-bar.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/scroll-nav/index.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8360,6 +8360,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
83608360
txts: {
83618361
type: Array,
83628362
default: function _default() {
8363+
this._defaultTxts = true;
8364+
83638365
return this.labels;
83648366
}
83658367
},
@@ -8370,11 +8372,20 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
83708372
},
83718373
data: function data() {
83728374
return {
8373-
active: this.current
8375+
active: this.current,
8376+
usedTxts: this.txts
83748377
};
83758378
},
83768379

83778380
watch: {
8381+
labels: function labels(newLabels) {
8382+
if (this._defaultTxts) {
8383+
this.usedTxts = newLabels;
8384+
}
8385+
},
8386+
txts: function txts(newTxts) {
8387+
this.usedTxts = newTxts;
8388+
},
83788389
current: function current(newVal) {
83798390
this.active = newVal;
83808391
},
@@ -8462,7 +8473,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
84628473
}, [_c('div', {
84638474
ref: "items",
84648475
staticClass: "cube-scroll-nav-bar-items"
8465-
}, _vm._l((_vm.txts), function(txt, index) {
8476+
}, _vm._l((_vm.usedTxts), function(txt, index) {
84668477
return _c('div', {
84678478
key: index,
84688479
staticClass: "cube-scroll-nav-bar-item",
@@ -8791,6 +8802,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
87918802
},
87928803

87938804
methods: {
8805+
scrollTo: function scrollTo() {
8806+
this.$refs.scroll && this.$refs.scroll.scrollTo.apply(this.$refs.scroll, arguments);
8807+
},
87948808
refresh: function refresh() {
87958809
this.navBar && this.navBar.refresh();
87968810
this.$refs.sticky.refresh();

lib/scroll-nav/scroll-nav.min.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.

0 commit comments

Comments
 (0)