Skip to content

Commit

Permalink
build: package
Browse files Browse the repository at this point in the history
  • Loading branch information
dolymood committed Mar 6, 2024
1 parent f9b8b22 commit d3bbb36
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/cube.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/form/form.min.js

Large diffs are not rendered by default.

17 changes: 12 additions & 5 deletions lib/form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6161,7 +6161,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
data: function data() {
return {
textareaValue: this.value,
expanded: this.autoExpand ? !!this.value : false,
expanded: this.forceExpand ? true : this.autoExpand ? !!this.value : false,
isFocus: false
};
},
Expand Down Expand Up @@ -6199,6 +6199,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
autoExpand: {
type: Boolean,
default: false
},
forceExpand: {
type: Boolean,
default: false
}
},
computed: {
Expand Down Expand Up @@ -6226,7 +6230,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
},
textareaValue: function textareaValue(newValue) {
this.$emit(EVENT_INPUT, newValue);
if (!this.isFocus && this.expanded) {
if (!this.forceExpand && !this.isFocus && this.expanded) {
this.expanded = false;
}
}
Expand All @@ -6239,7 +6243,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
},
handleBlur: function handleBlur(e) {
this.$emit('blur', e);
if (this.textareaValue.length === 0) {
if (!this.forceExpand && this.textareaValue.length === 0) {
this.expanded = false;
}
this.isFocus = false;
Expand Down Expand Up @@ -6285,15 +6289,18 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
_vm.textareaValue = $event.target.value
}
}
}, 'textarea', _vm.$props, false)), _vm._v(" "), (_vm.indicator) ? _c('span', {
}, 'textarea', _vm.$props, false)), _vm._v(" "), _vm._t("indicator", [(_vm.indicator) ? _c('span', {
directives: [{
name: "show",
rawName: "v-show",
value: (_vm.expanded),
expression: "expanded"
}],
staticClass: "cube-textarea-indicator"
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()])
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()], {
remain: _vm.remain,
count: _vm.count
})], 2)
},staticRenderFns: []}

/***/ }),
Expand Down
19 changes: 13 additions & 6 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7295,7 +7295,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}

var Cube = {
version: "1.12.52",
version: "1.12.53",
install: install,
BScroll: _module.BetterScroll,
createAPI: _module.createAPI
Expand Down Expand Up @@ -11545,7 +11545,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
data: function data() {
return {
textareaValue: this.value,
expanded: this.autoExpand ? !!this.value : false,
expanded: this.forceExpand ? true : this.autoExpand ? !!this.value : false,
isFocus: false
};
},
Expand Down Expand Up @@ -11583,6 +11583,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
autoExpand: {
type: Boolean,
default: false
},
forceExpand: {
type: Boolean,
default: false
}
},
computed: {
Expand Down Expand Up @@ -11610,7 +11614,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
},
textareaValue: function textareaValue(newValue) {
this.$emit(EVENT_INPUT, newValue);
if (!this.isFocus && this.expanded) {
if (!this.forceExpand && !this.isFocus && this.expanded) {
this.expanded = false;
}
}
Expand All @@ -11623,7 +11627,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
},
handleBlur: function handleBlur(e) {
this.$emit('blur', e);
if (this.textareaValue.length === 0) {
if (!this.forceExpand && this.textareaValue.length === 0) {
this.expanded = false;
}
this.isFocus = false;
Expand Down Expand Up @@ -11669,15 +11673,18 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
_vm.textareaValue = $event.target.value
}
}
}, 'textarea', _vm.$props, false)), _vm._v(" "), (_vm.indicator) ? _c('span', {
}, 'textarea', _vm.$props, false)), _vm._v(" "), _vm._t("indicator", [(_vm.indicator) ? _c('span', {
directives: [{
name: "show",
rawName: "v-show",
value: (_vm.expanded),
expression: "expanded"
}],
staticClass: "cube-textarea-indicator"
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()])
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()], {
remain: _vm.remain,
count: _vm.count
})], 2)
},staticRenderFns: []}

/***/ }),
Expand Down
17 changes: 12 additions & 5 deletions lib/textarea/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
data: function data() {
return {
textareaValue: this.value,
expanded: this.autoExpand ? !!this.value : false,
expanded: this.forceExpand ? true : this.autoExpand ? !!this.value : false,
isFocus: false
};
},
Expand Down Expand Up @@ -479,6 +479,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
autoExpand: {
type: Boolean,
default: false
},
forceExpand: {
type: Boolean,
default: false
}
},
computed: {
Expand Down Expand Up @@ -506,7 +510,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
},
textareaValue: function textareaValue(newValue) {
this.$emit(EVENT_INPUT, newValue);
if (!this.isFocus && this.expanded) {
if (!this.forceExpand && !this.isFocus && this.expanded) {
this.expanded = false;
}
}
Expand All @@ -519,7 +523,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
},
handleBlur: function handleBlur(e) {
this.$emit('blur', e);
if (this.textareaValue.length === 0) {
if (!this.forceExpand && this.textareaValue.length === 0) {
this.expanded = false;
}
this.isFocus = false;
Expand Down Expand Up @@ -566,15 +570,18 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
_vm.textareaValue = $event.target.value
}
}
}, 'textarea', _vm.$props, false)), _vm._v(" "), (_vm.indicator) ? _c('span', {
}, 'textarea', _vm.$props, false)), _vm._v(" "), _vm._t("indicator", [(_vm.indicator) ? _c('span', {
directives: [{
name: "show",
rawName: "v-show",
value: (_vm.expanded),
expression: "expanded"
}],
staticClass: "cube-textarea-indicator"
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()])
}, [_vm._v(_vm._s(_vm.indicatorConf.remain ? _vm.remain : _vm.count))]) : _vm._e()], {
remain: _vm.remain,
count: _vm.count
})], 2)
},staticRenderFns: []}

/***/ }),
Expand Down
2 changes: 1 addition & 1 deletion lib/textarea/textarea.min.js

Large diffs are not rendered by default.

0 comments on commit d3bbb36

Please sign in to comment.