Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (this.hoverClass && this.hoverClass !== 'none') {
mergeAfter = {
listeners: {
touchstart: this.handleTouchstart,
touchend: this.handleTouchend
},
force: true
}
}
const attrs = {
name: this.name
}
const data = {
class: ['mpx-button', this.className],
attrs,
on: getInnerListeners(this, {
mergeAfter,
// 由于当前机制下tap事件只有存在tap监听才会触发,为了确保该组件能够触发tap,传递一个包含tap的defaultListeners用于模拟存在tap监听
defaultListeners: {
tap () {
}
}
})
}
return createElement('div', data, this.$slots.default)
},
methods: {
const props = {}
const attrs = {}
if (this.openType === 'navigate' || this.openType === 'redirect') {
tagName = 'router-link'
props.to = this.url
if (this.openType === 'redirect') {
props.replace = true
}
} else {
attrs.href = 'javascript:void(0);'
}
const data = {
class: ['mpx-navigator', this.className],
props,
attrs,
on: getInnerListeners(this, {
mergeAfter,
// 由于当前机制下tap事件只有存在tap监听才会触发,为了确保该组件能够触发tap,传递一个包含tap的defaultListeners用于模拟存在tap监听
defaultListeners: {
tap () {
}
}
})
}
return createElement(tagName, data, this.$slots.default)
},
computed: {
}
},
force: true
}
const attrs = {
value: this.value,
type: 'checkbox',
checked: this.checked,
disabled: this.disabled
}
const data = {
class: 'mpx-checkbox',
on: getInnerListeners(this, { mergeAfter }),
attrs
}
return createElement('input', data, this.$slots.default)
}
}
render (createElement) {
const data = {
class: 'mpx-form',
on: getInnerListeners(this),
}
return createElement('div', data, this.$slots.default)
},
mounted () {
render (createElement) {
let mergeAfter
if (this.hoverClass && this.hoverClass !== 'none') {
mergeAfter = {
listeners: {
touchstart: this.handleTouchstart,
touchend: this.handleTouchend
},
force: true
}
}
const data = {
class: ['mpx-view', this.className],
on: getInnerListeners(this, { mergeAfter })
}
return createElement('div', data, this.$slots.default)
},
computed: {
render (createElement) {
const data = {
class: 'mpx-checkbox-group',
on: getInnerListeners(this),
}
return createElement('div', data, this.$slots.default)
},
mounted () {
classNames.push('selectable')
}
switch (this.space) {
case 'ensp':
case 'emsp':
case 'nbsp':
decode = true
text = text.replace(/ /g, `&${this.space};`)
break
}
if (this.decode) {
decode = true
}
const data = {
class: classNames,
on: getInnerListeners(this)
}
if (decode) {
data.domProps = {
innerHTML: text
}
}
return createElement('span', data, slots)
}
}
const attrs = {
name: this.name,
value: this.value,
type: this.password ? 'password' : this.type,
placeholder: this.placeholder,
disabled: this.disabled,
autofocus: this.focus || this.autoFocus
}
if (this.maxlength !== -1) {
attrs.maxlength = this.maxlength
}
const data = {
class: 'mpx-input',
on: getInnerListeners(this, { mergeBefore }),
attrs,
ref: 'input'
}
return createElement('input', data, this.$slots.default)
},
methods: {
placeholder: this.placeholder,
disabled: this.disabled,
autofocus: this.focus || this.autoFocus
}
if (this.maxlength !== -1) {
attrs.maxlength = this.maxlength
}
const slots = this.$slots.default || []
const children = slots.concat(this.value)
const data = {
class: 'mpx-textarea',
on: getInnerListeners(this, { mergeBefore }),
attrs,
ref: 'textarea'
}
return createElement('textarea', data, children)
},
methods: {
case 'bottom right':
backgroundPosition = this.mode
break
}
if (backgroundSize) {
style.backgroundSize = backgroundSize
}
if (backgroundPosition) {
style.backgroundPosition = backgroundPosition
}
return createElement('div', {
style,
class: ['mpx-image'],
on: getInnerListeners(this)
})
}
}