Skip to content

Commit

Permalink
build: compile 1.11.3-beta.0
Browse files Browse the repository at this point in the history
  • Loading branch information
landluck committed Jan 16, 2024
1 parent ff8fe1c commit 7c0c9e4
Show file tree
Hide file tree
Showing 30 changed files with 146 additions and 78 deletions.
4 changes: 4 additions & 0 deletions dist/action-sheet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ VantComponent({
type: Boolean,
value: true,
},
rootPortal: {
type: Boolean,
value: false,
},
},
methods: {
onSelect(event) {
Expand Down
1 change: 1 addition & 0 deletions dist/action-sheet/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
custom-class="van-action-sheet custom-class"
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
root-portal="{{ rootPortal }}"
bind:close="onClickOverlay"
>
<view wx:if="{{ title }}" class="van-action-sheet__header">
Expand Down
4 changes: 4 additions & 0 deletions dist/calendar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ VantComponent({
value: 0,
},
readonly: Boolean,
rootPortal: {
type: Boolean,
value: false,
},
},
data: {
subtitle: '',
Expand Down
1 change: 1 addition & 0 deletions dist/calendar/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
closeable="{{ showTitle || showSubtitle }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
root-portal="{{ rootPortal }}"
bind:enter="onOpen"
bind:close="onClose"
bind:after-enter="onOpened"
Expand Down
1 change: 1 addition & 0 deletions dist/cascader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ VantComponent({
value: defaultFieldNames,
observer: 'updateFieldNames',
},
useTitleSlot: Boolean,
},
data: {
tabs: [],
Expand Down
3 changes: 2 additions & 1 deletion dist/cascader/index.wxml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<wxs src="./index.wxs" module="utils" />

<view wx:if="{{ showHeader }}" class="van-cascader__header">
<text class="van-cascader__title"><slot name="title"></slot>{{ title }}</text>
<slot name="title" wx:if="{{ useTitleSlot }}"></slot>
<text class="van-cascader__title" wx:else>{{ title }}</text>
<van-icon
wx:if="{{ closeable }}"
name="{{ closeIcon }}"
Expand Down
4 changes: 4 additions & 0 deletions dist/dialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ VantComponent({
type: String,
value: 'scale',
},
rootPortal: {
type: Boolean,
value: false,
},
},
data: {
loading: {
Expand Down
1 change: 1 addition & 0 deletions dist/dialog/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
custom-style="width: {{ utils.addUnit(width) }};{{ customStyle }}"
overlay-style="{{ overlayStyle }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
root-portal="{{ rootPortal }}"
bind:close="onClickOverlay"
>
<view
Expand Down
4 changes: 4 additions & 0 deletions dist/goods-action-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ VantComponent({
type: String,
value: 'danger',
},
customStyle: {
type: String,
value: '',
},
},
methods: {
onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions dist/goods-action-button/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
open-type="{{ openType }}"
class="{{ utils.bem('goods-action-button', [type, { first: isFirst, last: isLast, plain: plain }])}}"
custom-class="van-goods-action-button__inner custom-class"
custom-style="{{customStyle}}"
business-id="{{ businessId }}"
session-from="{{ sessionFrom }}"
app-parameter="{{ appParameter }}"
Expand Down
79 changes: 43 additions & 36 deletions dist/mixins/transition.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,59 +46,66 @@ export function transition(showDefaultValue) {
value ? this.enter() : this.leave();
},
enter() {
const { duration, name } = this.data;
const classNames = getClassNames(name);
const currentDuration = isObj(duration) ? duration.enter : duration;
if (this.status === 'enter') {
return;
}
this.status = 'enter';
this.$emit('before-enter');
requestAnimationFrame(() => {
if (this.status !== 'enter') {
this.waitEnterEndPromise = new Promise((resolve) => {
const { duration, name } = this.data;
const classNames = getClassNames(name);
const currentDuration = isObj(duration) ? duration.enter : duration;
if (this.status === 'enter') {
return;
}
this.$emit('enter');
this.setData({
inited: true,
display: true,
classes: classNames.enter,
currentDuration,
});
this.status = 'enter';
this.$emit('before-enter');
requestAnimationFrame(() => {
if (this.status !== 'enter') {
return;
}
this.transitionEnded = false;
this.setData({ classes: classNames['enter-to'] });
this.$emit('enter');
this.setData({
inited: true,
display: true,
classes: classNames.enter,
currentDuration,
});
requestAnimationFrame(() => {
if (this.status !== 'enter') {
return;
}
this.transitionEnded = false;
this.setData({ classes: classNames['enter-to'] });
resolve();
});
});
});
},
leave() {
if (!this.data.display) {
if (!this.waitEnterEndPromise)
return;
}
const { duration, name } = this.data;
const classNames = getClassNames(name);
const currentDuration = isObj(duration) ? duration.leave : duration;
this.status = 'leave';
this.$emit('before-leave');
requestAnimationFrame(() => {
if (this.status !== 'leave') {
this.waitEnterEndPromise.then(() => {
if (!this.data.display) {
return;
}
this.$emit('leave');
this.setData({
classes: classNames.leave,
currentDuration,
});
const { duration, name } = this.data;
const classNames = getClassNames(name);
const currentDuration = isObj(duration) ? duration.leave : duration;
this.status = 'leave';
this.$emit('before-leave');
requestAnimationFrame(() => {
if (this.status !== 'leave') {
return;
}
this.transitionEnded = false;
setTimeout(() => this.onTransitionEnd(), currentDuration);
this.setData({ classes: classNames['leave-to'] });
this.$emit('leave');
this.setData({
classes: classNames.leave,
currentDuration,
});
requestAnimationFrame(() => {
if (this.status !== 'leave') {
return;
}
this.transitionEnded = false;
setTimeout(() => this.onTransitionEnd(), currentDuration);
this.setData({ classes: classNames['leave-to'] });
});
});
});
},
Expand Down
4 changes: 4 additions & 0 deletions dist/share-sheet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ VantComponent({
type: null,
value: 300,
},
rootPortal: {
type: Boolean,
value: false,
},
},
methods: {
onClickOverlay() {
Expand Down
1 change: 1 addition & 0 deletions dist/share-sheet/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
overlay-style="{{ overlayStyle }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
root-portal="{{ rootPortal }}"
bind:close="onClose"
bind:click-overlay="onClickOverlay"
>
Expand Down
2 changes: 1 addition & 1 deletion dist/uploader/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const mediaProps = {
},
mediaType: {
type: Array,
value: ['image', 'video'],
value: ['image', 'video', 'mix'],
},
maxDuration: {
type: Number,
Expand Down
2 changes: 1 addition & 1 deletion dist/uploader/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function formatVideo(res) {
];
}
function formatMedia(res) {
return res.tempFiles.map((item) => (Object.assign(Object.assign({}, pickExclude(item, ['fileType', 'thumbTempFilePath', 'tempFilePath'])), { type: res.type, url: item.tempFilePath, thumb: res.type === 'video' ? item.thumbTempFilePath : item.tempFilePath })));
return res.tempFiles.map((item) => (Object.assign(Object.assign({}, pickExclude(item, ['fileType', 'thumbTempFilePath', 'tempFilePath'])), { type: item.fileType, url: item.tempFilePath, thumb: item.fileType === 'video' ? item.thumbTempFilePath : item.tempFilePath })));
}
function formatFile(res) {
return res.tempFiles.map((item) => (Object.assign(Object.assign({}, pickExclude(item, ['path'])), { url: item.path })));
Expand Down
4 changes: 4 additions & 0 deletions lib/action-sheet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ var button_1 = require("../mixins/button");
type: Boolean,
value: true,
},
rootPortal: {
type: Boolean,
value: false,
},
},
methods: {
onSelect: function (event) {
Expand Down
1 change: 1 addition & 0 deletions lib/action-sheet/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
custom-class="van-action-sheet custom-class"
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
root-portal="{{ rootPortal }}"
bind:close="onClickOverlay"
>
<view wx:if="{{ title }}" class="van-action-sheet__header">
Expand Down
4 changes: 4 additions & 0 deletions lib/calendar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ var getTime = function (date) {
value: 0,
},
readonly: Boolean,
rootPortal: {
type: Boolean,
value: false,
},
},
data: {
subtitle: '',
Expand Down
1 change: 1 addition & 0 deletions lib/calendar/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
closeable="{{ showTitle || showSubtitle }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
root-portal="{{ rootPortal }}"
bind:enter="onOpen"
bind:close="onClose"
bind:after-enter="onOpened"
Expand Down
1 change: 1 addition & 0 deletions lib/cascader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ var defaultFieldNames = {
value: defaultFieldNames,
observer: 'updateFieldNames',
},
useTitleSlot: Boolean,
},
data: {
tabs: [],
Expand Down
3 changes: 2 additions & 1 deletion lib/cascader/index.wxml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<wxs src="./index.wxs" module="utils" />

<view wx:if="{{ showHeader }}" class="van-cascader__header">
<text class="van-cascader__title"><slot name="title"></slot>{{ title }}</text>
<slot name="title" wx:if="{{ useTitleSlot }}"></slot>
<text class="van-cascader__title" wx:else>{{ title }}</text>
<van-icon
wx:if="{{ closeable }}"
name="{{ closeIcon }}"
Expand Down
4 changes: 4 additions & 0 deletions lib/dialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ var utils_1 = require("../common/utils");
type: String,
value: 'scale',
},
rootPortal: {
type: Boolean,
value: false,
},
},
data: {
loading: {
Expand Down
1 change: 1 addition & 0 deletions lib/dialog/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
custom-style="width: {{ utils.addUnit(width) }};{{ customStyle }}"
overlay-style="{{ overlayStyle }}"
close-on-click-overlay="{{ closeOnClickOverlay }}"
root-portal="{{ rootPortal }}"
bind:close="onClickOverlay"
>
<view
Expand Down
4 changes: 4 additions & 0 deletions lib/goods-action-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ var link_1 = require("../mixins/link");
type: String,
value: 'danger',
},
customStyle: {
type: String,
value: '',
},
},
methods: {
onClick: function (event) {
Expand Down
1 change: 1 addition & 0 deletions lib/goods-action-button/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
open-type="{{ openType }}"
class="{{ utils.bem('goods-action-button', [type, { first: isFirst, last: isLast, plain: plain }])}}"
custom-class="van-goods-action-button__inner custom-class"
custom-style="{{customStyle}}"
business-id="{{ businessId }}"
session-from="{{ sessionFrom }}"
app-parameter="{{ appParameter }}"
Expand Down
Loading

0 comments on commit 7c0c9e4

Please sign in to comment.