Skip to content

Commit d3bbb36

Browse files
committed
build: package
1 parent f9b8b22 commit d3bbb36

File tree

6 files changed

+40
-19
lines changed

6 files changed

+40
-19
lines changed

lib/cube.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/form/form.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/form/index.js

+12-5
Original file line numberDiff line numberDiff line change
@@ -6161,7 +6161,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
61616161
data: function data() {
61626162
return {
61636163
textareaValue: this.value,
6164-
expanded: this.autoExpand ? !!this.value : false,
6164+
expanded: this.forceExpand ? true : this.autoExpand ? !!this.value : false,
61656165
isFocus: false
61666166
};
61676167
},
@@ -6199,6 +6199,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
61996199
autoExpand: {
62006200
type: Boolean,
62016201
default: false
6202+
},
6203+
forceExpand: {
6204+
type: Boolean,
6205+
default: false
62026206
}
62036207
},
62046208
computed: {
@@ -6226,7 +6230,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
62266230
},
62276231
textareaValue: function textareaValue(newValue) {
62286232
this.$emit(EVENT_INPUT, newValue);
6229-
if (!this.isFocus && this.expanded) {
6233+
if (!this.forceExpand && !this.isFocus && this.expanded) {
62306234
this.expanded = false;
62316235
}
62326236
}
@@ -6239,7 +6243,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
62396243
},
62406244
handleBlur: function handleBlur(e) {
62416245
this.$emit('blur', e);
6242-
if (this.textareaValue.length === 0) {
6246+
if (!this.forceExpand && this.textareaValue.length === 0) {
62436247
this.expanded = false;
62446248
}
62456249
this.isFocus = false;
@@ -6285,15 +6289,18 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
62856289
_vm.textareaValue = $event.target.value
62866290
}
62876291
}
6288-
}, 'textarea', _vm.$props, false)), _vm._v(" "), (_vm.indicator) ? _c('span', {
6292+
}, 'textarea', _vm.$props, false)), _vm._v(" "), _vm._t("indicator", [(_vm.indicator) ? _c('span', {
62896293
directives: [{
62906294
name: "show",
62916295
rawName: "v-show",
62926296
value: (_vm.expanded),
62936297
expression: "expanded"
62946298
}],
62956299
staticClass: "cube-textarea-indicator"
6296-
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()])
6300+
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()], {
6301+
remain: _vm.remain,
6302+
count: _vm.count
6303+
})], 2)
62976304
},staticRenderFns: []}
62986305

62996306
/***/ }),

lib/index.js

+13-6
Original file line numberDiff line numberDiff line change
@@ -7295,7 +7295,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
72957295
}
72967296

72977297
var Cube = {
7298-
version: "1.12.52",
7298+
version: "1.12.53",
72997299
install: install,
73007300
BScroll: _module.BetterScroll,
73017301
createAPI: _module.createAPI
@@ -11545,7 +11545,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1154511545
data: function data() {
1154611546
return {
1154711547
textareaValue: this.value,
11548-
expanded: this.autoExpand ? !!this.value : false,
11548+
expanded: this.forceExpand ? true : this.autoExpand ? !!this.value : false,
1154911549
isFocus: false
1155011550
};
1155111551
},
@@ -11583,6 +11583,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1158311583
autoExpand: {
1158411584
type: Boolean,
1158511585
default: false
11586+
},
11587+
forceExpand: {
11588+
type: Boolean,
11589+
default: false
1158611590
}
1158711591
},
1158811592
computed: {
@@ -11610,7 +11614,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1161011614
},
1161111615
textareaValue: function textareaValue(newValue) {
1161211616
this.$emit(EVENT_INPUT, newValue);
11613-
if (!this.isFocus && this.expanded) {
11617+
if (!this.forceExpand && !this.isFocus && this.expanded) {
1161411618
this.expanded = false;
1161511619
}
1161611620
}
@@ -11623,7 +11627,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
1162311627
},
1162411628
handleBlur: function handleBlur(e) {
1162511629
this.$emit('blur', e);
11626-
if (this.textareaValue.length === 0) {
11630+
if (!this.forceExpand && this.textareaValue.length === 0) {
1162711631
this.expanded = false;
1162811632
}
1162911633
this.isFocus = false;
@@ -11669,15 +11673,18 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
1166911673
_vm.textareaValue = $event.target.value
1167011674
}
1167111675
}
11672-
}, 'textarea', _vm.$props, false)), _vm._v(" "), (_vm.indicator) ? _c('span', {
11676+
}, 'textarea', _vm.$props, false)), _vm._v(" "), _vm._t("indicator", [(_vm.indicator) ? _c('span', {
1167311677
directives: [{
1167411678
name: "show",
1167511679
rawName: "v-show",
1167611680
value: (_vm.expanded),
1167711681
expression: "expanded"
1167811682
}],
1167911683
staticClass: "cube-textarea-indicator"
11680-
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()])
11684+
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()], {
11685+
remain: _vm.remain,
11686+
count: _vm.count
11687+
})], 2)
1168111688
},staticRenderFns: []}
1168211689

1168311690
/***/ }),

lib/textarea/index.js

+12-5
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
441441
data: function data() {
442442
return {
443443
textareaValue: this.value,
444-
expanded: this.autoExpand ? !!this.value : false,
444+
expanded: this.forceExpand ? true : this.autoExpand ? !!this.value : false,
445445
isFocus: false
446446
};
447447
},
@@ -479,6 +479,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
479479
autoExpand: {
480480
type: Boolean,
481481
default: false
482+
},
483+
forceExpand: {
484+
type: Boolean,
485+
default: false
482486
}
483487
},
484488
computed: {
@@ -506,7 +510,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
506510
},
507511
textareaValue: function textareaValue(newValue) {
508512
this.$emit(EVENT_INPUT, newValue);
509-
if (!this.isFocus && this.expanded) {
513+
if (!this.forceExpand && !this.isFocus && this.expanded) {
510514
this.expanded = false;
511515
}
512516
}
@@ -519,7 +523,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
519523
},
520524
handleBlur: function handleBlur(e) {
521525
this.$emit('blur', e);
522-
if (this.textareaValue.length === 0) {
526+
if (!this.forceExpand && this.textareaValue.length === 0) {
523527
this.expanded = false;
524528
}
525529
this.isFocus = false;
@@ -566,15 +570,18 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
566570
_vm.textareaValue = $event.target.value
567571
}
568572
}
569-
}, 'textarea', _vm.$props, false)), _vm._v(" "), (_vm.indicator) ? _c('span', {
573+
}, 'textarea', _vm.$props, false)), _vm._v(" "), _vm._t("indicator", [(_vm.indicator) ? _c('span', {
570574
directives: [{
571575
name: "show",
572576
rawName: "v-show",
573577
value: (_vm.expanded),
574578
expression: "expanded"
575579
}],
576580
staticClass: "cube-textarea-indicator"
577-
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()])
581+
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()], {
582+
remain: _vm.remain,
583+
count: _vm.count
584+
})], 2)
578585
},staticRenderFns: []}
579586

580587
/***/ }),

lib/textarea/textarea.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)