feat:修复翻牌器控制台报错

main
liu.shiyi 2 years ago
parent d20c2b071e
commit a4a56da0a3

@ -59,6 +59,8 @@ export default {
}, },
computed: { computed: {
option () { option () {
let str=this.config.option.data
if (!this.config.option.data) return { ...this.config.customize, data: [] }
if ( if (
this.config.option.data.toString().split('').length < this.config.option.data.toString().split('').length <
this.config.customize.numberDigits this.config.customize.numberDigits
@ -68,16 +70,16 @@ export default {
this.config.option.data.toString().split('').length this.config.option.data.toString().split('').length
for (let i = 0; i < len; i++) { for (let i = 0; i < len; i++) {
// eslint-disable-next-line vue/no-side-effects-in-computed-properties // eslint-disable-next-line vue/no-side-effects-in-computed-properties
this.config.option.data = str =
(this.config.customize.placeHolder (this.config.customize.placeHolder
? this.config.customize.placeHolder ? this.config.customize.placeHolder
: ' ') + this.config.option.data : ' ') + str
} }
} }
const a = const a =
this.config.customize.formatter === 0 this.config.customize.formatter === 0
? this.config.option.data ? str
: formatter(this.config.option.data, this.config.customize.formatter) : formatter(str, this.config.customize.formatter)
const arr = a.toString().split('') const arr = a.toString().split('')
if (this.config.customize.slotRight !== '') { if (this.config.customize.slotRight !== '') {

Loading…
Cancel
Save