66 lines
1.2 KiB
JavaScript
66 lines
1.2 KiB
JavaScript
"use strict";
|
|
|
|
var _component = require('./../common/component.js');
|
|
|
|
var _button = require('./../mixins/button.js');
|
|
|
|
var _openType = require('./../mixins/open-type.js');
|
|
|
|
var _version = require('./../common/version.js');
|
|
|
|
var mixins = [_button.button, _openType.openType];
|
|
|
|
if ((0, _version.canIUseFormFieldButton)()) {
|
|
mixins.push('wx://form-field-button');
|
|
}
|
|
|
|
(0, _component.VantComponent)({
|
|
mixins: mixins,
|
|
classes: ['hover-class', 'loading-class'],
|
|
data: {
|
|
baseStyle: ''
|
|
},
|
|
props: {
|
|
formType: String,
|
|
icon: String,
|
|
classPrefix: {
|
|
type: String,
|
|
value: 'van-icon'
|
|
},
|
|
plain: Boolean,
|
|
block: Boolean,
|
|
round: Boolean,
|
|
square: Boolean,
|
|
loading: Boolean,
|
|
hairline: Boolean,
|
|
disabled: Boolean,
|
|
loadingText: String,
|
|
customStyle: String,
|
|
loadingType: {
|
|
type: String,
|
|
value: 'circular'
|
|
},
|
|
type: {
|
|
type: String,
|
|
value: 'default'
|
|
},
|
|
dataset: null,
|
|
size: {
|
|
type: String,
|
|
value: 'normal'
|
|
},
|
|
loadingSize: {
|
|
type: String,
|
|
value: '20px'
|
|
},
|
|
color: String
|
|
},
|
|
methods: {
|
|
onClick: function onClick() {
|
|
if (!this.data.loading) {
|
|
this.$emit('click');
|
|
}
|
|
},
|
|
noop: function noop() {}
|
|
}
|
|
}); |