mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[build] 0.5.16
This commit is contained in:
parent
a3516bfb5e
commit
f99f121ba8
2
dist/field/index.wxss
vendored
2
dist/field/index.wxss
vendored
@ -1 +1 @@
|
||||
@import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__input{position:relative;display:block;width:100%;height:24px;min-height:24px;padding:0;margin:0;line-height:inherit;color:#333;text-align:left;background-color:initial;border:0;box-sizing:border-box;resize:none}.van-field__input--disabled{color:#999;background-color:initial;opacity:1}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;left:0;color:#999;pointer-events:none}.van-field__placeholder--error{color:#f44}.van-field__icon-root{display:-webkit-flex;display:flex;min-height:24px;-webkit-align-items:center;align-items:center}.van-field__clear-root,.van-field__icon-container{padding:0 10px;margin-right:-10px;line-height:inherit;vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:10px}.van-field__button:empty{display:none}.van-field__error-message{font-size:12px;color:#f44;text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}
|
||||
@import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__input{position:relative;display:block;width:100%;height:24px;min-height:24px;padding:0;margin:0;line-height:inherit;color:#333;text-align:left;background-color:initial;border:0;box-sizing:border-box;resize:none}.van-field__input--disabled{color:#999;background-color:initial;opacity:1}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;right:0;left:0;color:#999;pointer-events:none}.van-field__placeholder--error{color:#f44}.van-field__icon-root{display:-webkit-flex;display:flex;min-height:24px;-webkit-align-items:center;align-items:center}.van-field__clear-root,.van-field__icon-container{padding:0 10px;margin-right:-10px;line-height:inherit;vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:10px}.van-field__button:empty{display:none}.van-field__error-message{font-size:12px;color:#f44;text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}
|
2
dist/icon/index.wxss
vendored
2
dist/icon/index.wxss
vendored
File diff suppressed because one or more lines are too long
17
dist/mixins/transition.js
vendored
17
dist/mixins/transition.js
vendored
@ -22,15 +22,13 @@ export const transition = function (showDefaultValue) {
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
value: 'fade',
|
||||
observer: 'updateClasses'
|
||||
value: 'fade'
|
||||
}
|
||||
},
|
||||
data: {
|
||||
type: '',
|
||||
inited: false,
|
||||
display: false,
|
||||
classNames: getClassNames('fade')
|
||||
display: false
|
||||
},
|
||||
attached() {
|
||||
if (this.data.show) {
|
||||
@ -46,13 +44,9 @@ export const transition = function (showDefaultValue) {
|
||||
this.leave();
|
||||
}
|
||||
},
|
||||
updateClasses(name) {
|
||||
this.set({
|
||||
classNames: getClassNames(name)
|
||||
});
|
||||
},
|
||||
enter() {
|
||||
const { classNames, duration } = this.data;
|
||||
const { duration, name } = this.data;
|
||||
const classNames = getClassNames(name);
|
||||
const currentDuration = isObj(duration) ? duration.leave : duration;
|
||||
this.status = 'enter';
|
||||
Promise.resolve()
|
||||
@ -76,7 +70,8 @@ export const transition = function (showDefaultValue) {
|
||||
.catch(() => { });
|
||||
},
|
||||
leave() {
|
||||
const { classNames, duration } = this.data;
|
||||
const { duration, name } = this.data;
|
||||
const classNames = getClassNames(name);
|
||||
const currentDuration = isObj(duration) ? duration.leave : duration;
|
||||
this.status = 'leave';
|
||||
Promise.resolve()
|
||||
|
7
dist/popup/index.js
vendored
7
dist/popup/index.js
vendored
@ -48,10 +48,13 @@ VantComponent({
|
||||
},
|
||||
observeClass() {
|
||||
const { transition, position } = this.data;
|
||||
this.updateClasses(transition || position);
|
||||
const updateData = {
|
||||
name: transition || position
|
||||
};
|
||||
if (transition === 'none') {
|
||||
this.set({ duration: 0 });
|
||||
updateData.duration = 0;
|
||||
}
|
||||
this.set(updateData);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
5
dist/radio/index.js
vendored
5
dist/radio/index.js
vendored
@ -17,7 +17,10 @@ VantComponent({
|
||||
disabled: Boolean,
|
||||
useIconSlot: Boolean,
|
||||
checkedColor: String,
|
||||
labelPosition: String,
|
||||
labelPosition: {
|
||||
type: String,
|
||||
value: 'right'
|
||||
},
|
||||
labelDisabled: Boolean,
|
||||
shape: {
|
||||
type: String,
|
||||
|
13
dist/radio/index.wxml
vendored
13
dist/radio/index.wxml
vendored
@ -1,6 +1,13 @@
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
|
||||
<view class="van-radio custom-class">
|
||||
<view
|
||||
wx:if="{{ labelPosition === 'left' }}"
|
||||
class="label-class {{ utils.bem('radio__label', [labelPosition, { disabled }]) }}"
|
||||
bindtap="onClickLabel"
|
||||
>
|
||||
<slot />
|
||||
</view>
|
||||
<view class="van-radio__icon-wrap" bindtap="onChange">
|
||||
<slot wx:if="{{ useIconSlot }}" name="icon" />
|
||||
<van-icon
|
||||
@ -12,7 +19,11 @@
|
||||
custom-style="line-height: 20px;"
|
||||
/>
|
||||
</view>
|
||||
<view class="label-class {{ utils.bem('radio__label', [labelPosition, { disabled }]) }}" bindtap="onClickLabel">
|
||||
<view
|
||||
wx:if="{{ labelPosition === 'right' }}"
|
||||
class="label-class {{ utils.bem('radio__label', [labelPosition, { disabled }]) }}"
|
||||
bindtap="onClickLabel"
|
||||
>
|
||||
<slot />
|
||||
</view>
|
||||
</view>
|
||||
|
3
dist/swipe-cell/index.js
vendored
3
dist/swipe-cell/index.js
vendored
@ -16,7 +16,7 @@ VantComponent({
|
||||
},
|
||||
mixins: [touch],
|
||||
data: {
|
||||
catchMove: true
|
||||
catchMove: false
|
||||
},
|
||||
created() {
|
||||
this.offset = 0;
|
||||
@ -57,6 +57,7 @@ VantComponent({
|
||||
else {
|
||||
this.swipeMove(0);
|
||||
}
|
||||
this.set({ catchMove: false });
|
||||
},
|
||||
startDrag(event) {
|
||||
if (this.data.disabled) {
|
||||
|
3
dist/switch-cell/index.js
vendored
3
dist/switch-cell/index.js
vendored
@ -3,13 +3,16 @@ VantComponent({
|
||||
field: true,
|
||||
props: {
|
||||
value: null,
|
||||
icon: String,
|
||||
title: String,
|
||||
label: String,
|
||||
border: Boolean,
|
||||
checked: Boolean,
|
||||
loading: Boolean,
|
||||
disabled: Boolean,
|
||||
activeColor: String,
|
||||
inactiveColor: String,
|
||||
useLabelSlot: Boolean,
|
||||
size: {
|
||||
type: String,
|
||||
value: '24px'
|
||||
|
6
dist/switch-cell/index.wxml
vendored
6
dist/switch-cell/index.wxml
vendored
@ -1,9 +1,15 @@
|
||||
<van-cell
|
||||
center
|
||||
title="{{ title }}"
|
||||
label="{{ label }}"
|
||||
border="{{ border }}"
|
||||
icon="{{ icon }}"
|
||||
custom-class="van-switch-cell"
|
||||
use-label-slot="{{ useLabelSlot }}"
|
||||
>
|
||||
<slot slot="icon" name="icon" />
|
||||
<slot slot="title" name="title" />
|
||||
<slot slot="label" name="label" />
|
||||
<van-switch
|
||||
size="{{ size }}"
|
||||
checked="{{ checked }}"
|
||||
|
@ -1 +1 @@
|
||||
@import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__input{position:relative;display:block;width:100%;height:24px;min-height:24px;padding:0;margin:0;line-height:inherit;color:#333;text-align:left;background-color:initial;border:0;box-sizing:border-box;resize:none}.van-field__input--disabled{color:#999;background-color:initial;opacity:1}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;left:0;color:#999;pointer-events:none}.van-field__placeholder--error{color:#f44}.van-field__icon-root{display:-webkit-flex;display:flex;min-height:24px;-webkit-align-items:center;align-items:center}.van-field__clear-root,.van-field__icon-container{padding:0 10px;margin-right:-10px;line-height:inherit;vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:10px}.van-field__button:empty{display:none}.van-field__error-message{font-size:12px;color:#f44;text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}
|
||||
@import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__input{position:relative;display:block;width:100%;height:24px;min-height:24px;padding:0;margin:0;line-height:inherit;color:#333;text-align:left;background-color:initial;border:0;box-sizing:border-box;resize:none}.van-field__input--disabled{color:#999;background-color:initial;opacity:1}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__placeholder{position:absolute;top:0;right:0;left:0;color:#999;pointer-events:none}.van-field__placeholder--error{color:#f44}.van-field__icon-root{display:-webkit-flex;display:flex;min-height:24px;-webkit-align-items:center;align-items:center}.van-field__clear-root,.van-field__icon-container{padding:0 10px;margin-right:-10px;line-height:inherit;vertical-align:middle}.van-field__button,.van-field__clear-root,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear-root{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon-container:empty{display:none}.van-field__button{padding-left:10px}.van-field__button:empty{display:none}.van-field__error-message{font-size:12px;color:#f44;text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}
|
File diff suppressed because one or more lines are too long
@ -24,15 +24,13 @@ exports.transition = function (showDefaultValue) {
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
value: 'fade',
|
||||
observer: 'updateClasses'
|
||||
value: 'fade'
|
||||
}
|
||||
},
|
||||
data: {
|
||||
type: '',
|
||||
inited: false,
|
||||
display: false,
|
||||
classNames: getClassNames('fade')
|
||||
display: false
|
||||
},
|
||||
attached: function () {
|
||||
if (this.data.show) {
|
||||
@ -48,14 +46,10 @@ exports.transition = function (showDefaultValue) {
|
||||
this.leave();
|
||||
}
|
||||
},
|
||||
updateClasses: function (name) {
|
||||
this.set({
|
||||
classNames: getClassNames(name)
|
||||
});
|
||||
},
|
||||
enter: function () {
|
||||
var _this = this;
|
||||
var _a = this.data, classNames = _a.classNames, duration = _a.duration;
|
||||
var _a = this.data, duration = _a.duration, name = _a.name;
|
||||
var classNames = getClassNames(name);
|
||||
var currentDuration = utils_1.isObj(duration) ? duration.leave : duration;
|
||||
this.status = 'enter';
|
||||
Promise.resolve()
|
||||
@ -80,7 +74,8 @@ exports.transition = function (showDefaultValue) {
|
||||
},
|
||||
leave: function () {
|
||||
var _this = this;
|
||||
var _a = this.data, classNames = _a.classNames, duration = _a.duration;
|
||||
var _a = this.data, duration = _a.duration, name = _a.name;
|
||||
var classNames = getClassNames(name);
|
||||
var currentDuration = utils_1.isObj(duration) ? duration.leave : duration;
|
||||
this.status = 'leave';
|
||||
Promise.resolve()
|
||||
|
@ -50,10 +50,13 @@ component_1.VantComponent({
|
||||
},
|
||||
observeClass: function () {
|
||||
var _a = this.data, transition = _a.transition, position = _a.position;
|
||||
this.updateClasses(transition || position);
|
||||
var updateData = {
|
||||
name: transition || position
|
||||
};
|
||||
if (transition === 'none') {
|
||||
this.set({ duration: 0 });
|
||||
updateData.duration = 0;
|
||||
}
|
||||
this.set(updateData);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -19,7 +19,10 @@ component_1.VantComponent({
|
||||
disabled: Boolean,
|
||||
useIconSlot: Boolean,
|
||||
checkedColor: String,
|
||||
labelPosition: String,
|
||||
labelPosition: {
|
||||
type: String,
|
||||
value: 'right'
|
||||
},
|
||||
labelDisabled: Boolean,
|
||||
shape: {
|
||||
type: String,
|
||||
|
@ -1,6 +1,13 @@
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
|
||||
<view class="van-radio custom-class">
|
||||
<view
|
||||
wx:if="{{ labelPosition === 'left' }}"
|
||||
class="label-class {{ utils.bem('radio__label', [labelPosition, { disabled }]) }}"
|
||||
bindtap="onClickLabel"
|
||||
>
|
||||
<slot />
|
||||
</view>
|
||||
<view class="van-radio__icon-wrap" bindtap="onChange">
|
||||
<slot wx:if="{{ useIconSlot }}" name="icon" />
|
||||
<van-icon
|
||||
@ -12,7 +19,11 @@
|
||||
custom-style="line-height: 20px;"
|
||||
/>
|
||||
</view>
|
||||
<view class="label-class {{ utils.bem('radio__label', [labelPosition, { disabled }]) }}" bindtap="onClickLabel">
|
||||
<view
|
||||
wx:if="{{ labelPosition === 'right' }}"
|
||||
class="label-class {{ utils.bem('radio__label', [labelPosition, { disabled }]) }}"
|
||||
bindtap="onClickLabel"
|
||||
>
|
||||
<slot />
|
||||
</view>
|
||||
</view>
|
||||
|
@ -18,7 +18,7 @@ component_1.VantComponent({
|
||||
},
|
||||
mixins: [touch_1.touch],
|
||||
data: {
|
||||
catchMove: true
|
||||
catchMove: false
|
||||
},
|
||||
created: function () {
|
||||
this.offset = 0;
|
||||
@ -55,6 +55,7 @@ component_1.VantComponent({
|
||||
else {
|
||||
this.swipeMove(0);
|
||||
}
|
||||
this.set({ catchMove: false });
|
||||
},
|
||||
startDrag: function (event) {
|
||||
if (this.data.disabled) {
|
||||
|
@ -5,13 +5,16 @@ component_1.VantComponent({
|
||||
field: true,
|
||||
props: {
|
||||
value: null,
|
||||
icon: String,
|
||||
title: String,
|
||||
label: String,
|
||||
border: Boolean,
|
||||
checked: Boolean,
|
||||
loading: Boolean,
|
||||
disabled: Boolean,
|
||||
activeColor: String,
|
||||
inactiveColor: String,
|
||||
useLabelSlot: Boolean,
|
||||
size: {
|
||||
type: String,
|
||||
value: '24px'
|
||||
|
@ -1,9 +1,15 @@
|
||||
<van-cell
|
||||
center
|
||||
title="{{ title }}"
|
||||
label="{{ label }}"
|
||||
border="{{ border }}"
|
||||
icon="{{ icon }}"
|
||||
custom-class="van-switch-cell"
|
||||
use-label-slot="{{ useLabelSlot }}"
|
||||
>
|
||||
<slot slot="icon" name="icon" />
|
||||
<slot slot="title" name="title" />
|
||||
<slot slot="label" name="label" />
|
||||
<van-switch
|
||||
size="{{ size }}"
|
||||
checked="{{ checked }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user