build: compile 0.5.20

This commit is contained in:
陈嘉涵 2019-08-24 09:37:19 +08:00
parent 6df1bd191b
commit b1cdd7733a
19 changed files with 51 additions and 12 deletions

4
dist/area/index.js vendored
View File

@ -27,8 +27,8 @@ VantComponent({
}, },
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
this.setValues() this.setValues();
}, 0) }, 0);
}, },
methods: { methods: {
getPicker() { getPicker() {

View File

@ -6,6 +6,7 @@ VantComponent({
classes: ['hover-class', 'loading-class'], classes: ['hover-class', 'loading-class'],
props: { props: {
icon: String, icon: String,
color: String,
plain: Boolean, plain: Boolean,
block: Boolean, block: Boolean,
round: Boolean, round: Boolean,

View File

@ -5,6 +5,7 @@
class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}" class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}"
open-type="{{ openType }}" open-type="{{ openType }}"
hover-class="van-button--active hover-class" hover-class="van-button--active hover-class"
style="{{ color ? 'border-color: ' + color + ';' + (plain ? 'color: ' + color : 'color: #fff; background-color: ' + color) : '' }}"
lang="{{ lang }}" lang="{{ lang }}"
business-id="{{ businessId }}" business-id="{{ businessId }}"
session-from="{{ sessionFrom }}" session-from="{{ sessionFrom }}"

8
dist/field/index.js vendored
View File

@ -28,6 +28,14 @@ VantComponent({
placeholder: String, placeholder: String,
placeholderStyle: String, placeholderStyle: String,
errorMessageAlign: String, errorMessageAlign: String,
selectionEnd: {
type: Number,
value: -1
},
selectionStart: {
type: Number,
value: -1
},
showConfirmBar: { showConfirmBar: {
type: Boolean, type: Boolean,
value: true value: true

View File

@ -27,6 +27,8 @@
cursor-spacing="{{ cursorSpacing }}" cursor-spacing="{{ cursorSpacing }}"
adjust-position="{{ adjustPosition }}" adjust-position="{{ adjustPosition }}"
show-confirm-bar="{{ showConfirmBar }}" show-confirm-bar="{{ showConfirmBar }}"
selection-end="{{ selectionEnd }}"
selection-start="{{ selectionStart }}"
bindinput="onInput" bindinput="onInput"
bind:blur="onBlur" bind:blur="onBlur"
bind:focus="onFocus" bind:focus="onFocus"
@ -51,6 +53,8 @@
confirm-hold="{{ confirmHold }}" confirm-hold="{{ confirmHold }}"
cursor-spacing="{{ cursorSpacing }}" cursor-spacing="{{ cursorSpacing }}"
adjust-position="{{ adjustPosition }}" adjust-position="{{ adjustPosition }}"
selection-end="{{ selectionEnd }}"
selection-start="{{ selectionStart }}"
password="{{ password || type === 'password' }}" password="{{ password || type === 'password' }}"
bindinput="onInput" bindinput="onInput"
bind:blur="onBlur" bind:blur="onBlur"

View File

@ -1,5 +1,5 @@
<view <view
wx:if="{{ info !== null }}" wx:if="{{ info !== null && info !== '' }}"
class="custom-class van-info" class="custom-class van-info"
style="{{ customStyle }}" style="{{ customStyle }}"
>{{ info }}</view> >{{ info }}</view>

View File

@ -49,7 +49,7 @@ export const transition = function (showDefaultValue) {
enter() { enter() {
const { duration, name } = this.data; const { duration, name } = this.data;
const classNames = getClassNames(name); const classNames = getClassNames(name);
const currentDuration = isObj(duration) ? duration.leave : duration; const currentDuration = isObj(duration) ? duration.enter : duration;
this.status = 'enter'; this.status = 'enter';
Promise.resolve() Promise.resolve()
.then(nextTick) .then(nextTick)

View File

@ -3,6 +3,7 @@ VantComponent({
field: true, field: true,
classes: ['field-class', 'input-class', 'cancel-class'], classes: ['field-class', 'input-class', 'cancel-class'],
props: { props: {
label: String,
focus: Boolean, focus: Boolean,
error: Boolean, error: Boolean,
disabled: Boolean, disabled: Boolean,
@ -24,7 +25,10 @@ VantComponent({
type: String, type: String,
value: 'square' value: 'square'
}, },
label: String clearable: {
type: Boolean,
value: true
}
}, },
methods: { methods: {
onChange(event) { onChange(event) {

View File

@ -9,7 +9,6 @@
<slot wx:else name="label" /> <slot wx:else name="label" />
<van-field <van-field
clearable
type="search" type="search"
left-icon="search" left-icon="search"
focus="{{ focus }}" focus="{{ focus }}"
@ -20,6 +19,7 @@
value="{{ value }}" value="{{ value }}"
disabled="{{ disabled }}" disabled="{{ disabled }}"
readonly="{{ readonly }}" readonly="{{ readonly }}"
clearable="{{ clearable }}"
maxlength="{{ maxlength }}" maxlength="{{ maxlength }}"
input-align="{{ inputAlign }}" input-align="{{ inputAlign }}"
input-class="input-class" input-class="input-class"

2
dist/wxs/utils.wxs vendored
View File

@ -2,7 +2,7 @@ var bem = require('./bem.wxs').bem;
var memoize = require('./memoize.wxs').memoize; var memoize = require('./memoize.wxs').memoize;
function isSrc(url) { function isSrc(url) {
return url.indexOf(".") === 0 || url.indexOf("/") === 0 || url.indexOf('http') === 0 || url.indexOf('data:image') === 0 || url.indexOf('//') === 0; return url.indexOf('http') === 0 || url.indexOf('data:image') === 0 || url.indexOf('//') === 0;
} }
module.exports = { module.exports = {

View File

@ -39,7 +39,10 @@ component_1.VantComponent({
} }
}, },
mounted: function () { mounted: function () {
this.setValues(); var _this = this;
setTimeout(function () {
_this.setValues();
}, 0);
}, },
methods: { methods: {
getPicker: function () { getPicker: function () {

View File

@ -8,6 +8,7 @@ component_1.VantComponent({
classes: ['hover-class', 'loading-class'], classes: ['hover-class', 'loading-class'],
props: { props: {
icon: String, icon: String,
color: String,
plain: Boolean, plain: Boolean,
block: Boolean, block: Boolean,
round: Boolean, round: Boolean,

View File

@ -5,6 +5,7 @@
class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}" class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}"
open-type="{{ openType }}" open-type="{{ openType }}"
hover-class="van-button--active hover-class" hover-class="van-button--active hover-class"
style="{{ color ? 'border-color: ' + color + ';' + (plain ? 'color: ' + color : 'color: #fff; background-color: ' + color) : '' }}"
lang="{{ lang }}" lang="{{ lang }}"
business-id="{{ businessId }}" business-id="{{ businessId }}"
session-from="{{ sessionFrom }}" session-from="{{ sessionFrom }}"

View File

@ -30,6 +30,14 @@ component_1.VantComponent({
placeholder: String, placeholder: String,
placeholderStyle: String, placeholderStyle: String,
errorMessageAlign: String, errorMessageAlign: String,
selectionEnd: {
type: Number,
value: -1
},
selectionStart: {
type: Number,
value: -1
},
showConfirmBar: { showConfirmBar: {
type: Boolean, type: Boolean,
value: true value: true

View File

@ -27,6 +27,8 @@
cursor-spacing="{{ cursorSpacing }}" cursor-spacing="{{ cursorSpacing }}"
adjust-position="{{ adjustPosition }}" adjust-position="{{ adjustPosition }}"
show-confirm-bar="{{ showConfirmBar }}" show-confirm-bar="{{ showConfirmBar }}"
selection-end="{{ selectionEnd }}"
selection-start="{{ selectionStart }}"
bindinput="onInput" bindinput="onInput"
bind:blur="onBlur" bind:blur="onBlur"
bind:focus="onFocus" bind:focus="onFocus"
@ -51,6 +53,8 @@
confirm-hold="{{ confirmHold }}" confirm-hold="{{ confirmHold }}"
cursor-spacing="{{ cursorSpacing }}" cursor-spacing="{{ cursorSpacing }}"
adjust-position="{{ adjustPosition }}" adjust-position="{{ adjustPosition }}"
selection-end="{{ selectionEnd }}"
selection-start="{{ selectionStart }}"
password="{{ password || type === 'password' }}" password="{{ password || type === 'password' }}"
bindinput="onInput" bindinput="onInput"
bind:blur="onBlur" bind:blur="onBlur"

View File

@ -1,5 +1,5 @@
<view <view
wx:if="{{ info !== null }}" wx:if="{{ info !== null && info !== '' }}"
class="custom-class van-info" class="custom-class van-info"
style="{{ customStyle }}" style="{{ customStyle }}"
>{{ info }}</view> >{{ info }}</view>

View File

@ -52,7 +52,7 @@ exports.transition = function (showDefaultValue) {
var _this = this; var _this = this;
var _a = this.data, duration = _a.duration, name = _a.name; var _a = this.data, duration = _a.duration, name = _a.name;
var classNames = getClassNames(name); var classNames = getClassNames(name);
var currentDuration = utils_1.isObj(duration) ? duration.leave : duration; var currentDuration = utils_1.isObj(duration) ? duration.enter : duration;
this.status = 'enter'; this.status = 'enter';
Promise.resolve() Promise.resolve()
.then(nextTick) .then(nextTick)

View File

@ -5,6 +5,7 @@ component_1.VantComponent({
field: true, field: true,
classes: ['field-class', 'input-class', 'cancel-class'], classes: ['field-class', 'input-class', 'cancel-class'],
props: { props: {
label: String,
focus: Boolean, focus: Boolean,
error: Boolean, error: Boolean,
disabled: Boolean, disabled: Boolean,
@ -26,7 +27,10 @@ component_1.VantComponent({
type: String, type: String,
value: 'square' value: 'square'
}, },
label: String clearable: {
type: Boolean,
value: true
}
}, },
methods: { methods: {
onChange: function (event) { onChange: function (event) {

View File

@ -9,7 +9,6 @@
<slot wx:else name="label" /> <slot wx:else name="label" />
<van-field <van-field
clearable
type="search" type="search"
left-icon="search" left-icon="search"
focus="{{ focus }}" focus="{{ focus }}"
@ -20,6 +19,7 @@
value="{{ value }}" value="{{ value }}"
disabled="{{ disabled }}" disabled="{{ disabled }}"
readonly="{{ readonly }}" readonly="{{ readonly }}"
clearable="{{ clearable }}"
maxlength="{{ maxlength }}" maxlength="{{ maxlength }}"
input-align="{{ inputAlign }}" input-align="{{ inputAlign }}"
input-class="input-class" input-class="input-class"