mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-08-07 13:49:48 +08:00
[build] use babel to compile typescript (#657)
This commit is contained in:
parent
27ed2e5657
commit
4714333cd6
@ -4,11 +4,10 @@ module.exports = {
|
||||
'@babel/preset-env',
|
||||
{
|
||||
loose: true,
|
||||
modules: 'commonjs'
|
||||
modules: false
|
||||
}
|
||||
]
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-syntax-dynamic-import'
|
||||
]
|
||||
'@babel/preset-typescript'
|
||||
],
|
||||
plugins: ['@babel/plugin-syntax-dynamic-import']
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
const gulp = require('gulp');
|
||||
const path = require('path');
|
||||
const ts = require('gulp-typescript');
|
||||
const babel = require('gulp-babel');
|
||||
const postcss = require('gulp-postcss');
|
||||
const cssmin = require('gulp-clean-css');
|
||||
const rename = require('gulp-rename');
|
||||
@ -9,7 +9,6 @@ const isProduction = process.env.NODE_ENV === 'production';
|
||||
const src = path.join(__dirname, '../packages');
|
||||
const dist = path.join(__dirname, isProduction ? '../dist' : '../example/dist');
|
||||
const ext = ['js', 'ts', 'pcss', 'json', 'wxml'];
|
||||
const tsProject = ts.createProject('tsconfig.json');
|
||||
|
||||
function copy(ext) {
|
||||
return gulp.src([src + '/**/*.' + ext]).pipe(gulp.dest(dist));
|
||||
@ -32,7 +31,7 @@ gulp.task('compile-js', () => copy('js'));
|
||||
gulp.task('compile-ts', () =>
|
||||
gulp
|
||||
.src([src + '/**/*.ts'])
|
||||
.pipe(tsProject())
|
||||
.pipe(babel())
|
||||
.on('error', (err) => {
|
||||
console.log(err);
|
||||
})
|
||||
|
11
dist/action-sheet/index.js
vendored
11
dist/action-sheet/index.js
vendored
@ -22,17 +22,18 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSelect(event) {
|
||||
const { index } = event.currentTarget.dataset;
|
||||
const item = this.data.actions[index];
|
||||
onSelect: function onSelect(event) {
|
||||
var index = event.currentTarget.dataset.index;
|
||||
var item = this.data.actions[index];
|
||||
|
||||
if (item && !item.disabled && !item.loading) {
|
||||
this.$emit('select', item);
|
||||
}
|
||||
},
|
||||
onCancel() {
|
||||
onCancel: function onCancel() {
|
||||
this.$emit('cancel');
|
||||
},
|
||||
onClose() {
|
||||
onClose: function onClose() {
|
||||
this.$emit('close');
|
||||
}
|
||||
}
|
||||
|
102
dist/area/index.js
vendored
102
dist/area/index.js
vendored
@ -26,103 +26,127 @@ VantComponent({
|
||||
columns: []
|
||||
},
|
||||
computed: {
|
||||
displayColumns() {
|
||||
const { columns = [], columnsNum } = this.data;
|
||||
displayColumns: function displayColumns() {
|
||||
var _this$data = this.data,
|
||||
_this$data$columns = _this$data.columns,
|
||||
columns = _this$data$columns === void 0 ? [] : _this$data$columns,
|
||||
columnsNum = _this$data.columnsNum;
|
||||
return columns.slice(0, +columnsNum);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(value) {
|
||||
this.code = value;
|
||||
value: function value(_value) {
|
||||
this.code = _value;
|
||||
this.setValues();
|
||||
},
|
||||
areaList: 'setValues'
|
||||
},
|
||||
methods: {
|
||||
onCancel() {
|
||||
onCancel: function onCancel() {
|
||||
this.$emit('cancel', {
|
||||
values: this.getValues(),
|
||||
indexs: this.getIndexs()
|
||||
});
|
||||
},
|
||||
onConfirm() {
|
||||
onConfirm: function onConfirm() {
|
||||
this.$emit('confirm', {
|
||||
values: this.getValues(),
|
||||
indexs: this.getIndexs()
|
||||
});
|
||||
},
|
||||
onChange(event) {
|
||||
const { value } = event.detail;
|
||||
const { pickerValue, displayColumns } = this.data;
|
||||
const index = pickerValue.findIndex((item, index) => item !== value[index]);
|
||||
// 没有变更 或 选中项序号小于0 不处理
|
||||
onChange: function onChange(event) {
|
||||
var value = event.detail.value;
|
||||
var _this$data2 = this.data,
|
||||
pickerValue = _this$data2.pickerValue,
|
||||
displayColumns = _this$data2.displayColumns;
|
||||
var index = pickerValue.findIndex(function (item, index) {
|
||||
return item !== value[index];
|
||||
}); // 没有变更 或 选中项序号小于0 不处理
|
||||
|
||||
if (index < 0 || value[index] < 0) {
|
||||
return;
|
||||
}
|
||||
const values = displayColumns[index];
|
||||
|
||||
var values = displayColumns[index];
|
||||
this.code = values[value[index]].code;
|
||||
this.setValues();
|
||||
this.$emit('change', {
|
||||
picker: this,
|
||||
values: this.getValues(),
|
||||
index
|
||||
index: index
|
||||
});
|
||||
},
|
||||
getList(type, code) {
|
||||
let result = [];
|
||||
getList: function getList(type, code) {
|
||||
var result = [];
|
||||
|
||||
if (type !== 'province' && !code) {
|
||||
return result;
|
||||
}
|
||||
const list = this.data.areaList[`${type}_list`] || {};
|
||||
result = Object.keys(list).map(code => ({
|
||||
code,
|
||||
|
||||
var list = this.data.areaList[type + "_list"] || {};
|
||||
result = Object.keys(list).map(function (code) {
|
||||
return {
|
||||
code: code,
|
||||
name: list[code]
|
||||
}));
|
||||
};
|
||||
});
|
||||
|
||||
if (code) {
|
||||
result = result.filter(item => item.code.indexOf(code) === 0);
|
||||
result = result.filter(function (item) {
|
||||
return item.code.indexOf(code) === 0;
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
},
|
||||
getIndex(type, code) {
|
||||
const compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;
|
||||
const list = this.getList(type, code.slice(0, compareNum - 2));
|
||||
getIndex: function getIndex(type, code) {
|
||||
var compareNum = type === 'province' ? 2 : type === 'city' ? 4 : 6;
|
||||
var list = this.getList(type, code.slice(0, compareNum - 2));
|
||||
code = code.slice(0, compareNum);
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
if (list[i].code.slice(0, compareNum) === code) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
},
|
||||
setValues() {
|
||||
let code = this.code || Object.keys(this.data.areaList.county_list)[0] || '';
|
||||
const province = this.getList('province');
|
||||
const city = this.getList('city', code.slice(0, 2));
|
||||
setValues: function setValues() {
|
||||
var code = this.code || Object.keys(this.data.areaList.county_list)[0] || '';
|
||||
var province = this.getList('province');
|
||||
var city = this.getList('city', code.slice(0, 2));
|
||||
this.setData({
|
||||
'columns[0]': province,
|
||||
'columns[1]': city
|
||||
});
|
||||
|
||||
if (city.length && code.slice(2, 4) === '00') {
|
||||
code = city[0].code;
|
||||
}
|
||||
|
||||
this.setData({
|
||||
'columns[2]': this.getList('county', code.slice(0, 4)),
|
||||
pickerValue: [
|
||||
this.getIndex('province', code),
|
||||
this.getIndex('city', code),
|
||||
this.getIndex('county', code)
|
||||
]
|
||||
pickerValue: [this.getIndex('province', code), this.getIndex('city', code), this.getIndex('county', code)]
|
||||
});
|
||||
},
|
||||
getValues() {
|
||||
const { displayColumns = [], pickerValue = [] } = this.data;
|
||||
return displayColumns.map((option, index) => option[pickerValue[index]]);
|
||||
getValues: function getValues() {
|
||||
var _this$data3 = this.data,
|
||||
_this$data3$displayCo = _this$data3.displayColumns,
|
||||
displayColumns = _this$data3$displayCo === void 0 ? [] : _this$data3$displayCo,
|
||||
_this$data3$pickerVal = _this$data3.pickerValue,
|
||||
pickerValue = _this$data3$pickerVal === void 0 ? [] : _this$data3$pickerVal;
|
||||
return displayColumns.map(function (option, index) {
|
||||
return option[pickerValue[index]];
|
||||
});
|
||||
},
|
||||
getIndexs() {
|
||||
const { pickerValue, columnsNum } = this.data;
|
||||
getIndexs: function getIndexs() {
|
||||
var _this$data4 = this.data,
|
||||
pickerValue = _this$data4.pickerValue,
|
||||
columnsNum = _this$data4.columnsNum;
|
||||
return pickerValue.slice(0, columnsNum);
|
||||
},
|
||||
reset() {
|
||||
reset: function reset() {
|
||||
this.code = '';
|
||||
this.setValues();
|
||||
}
|
||||
|
20
dist/badge-group/index.js
vendored
20
dist/badge-group/index.js
vendored
@ -3,12 +3,14 @@ VantComponent({
|
||||
relation: {
|
||||
name: 'badge',
|
||||
type: 'descendant',
|
||||
linked(target) {
|
||||
linked: function linked(target) {
|
||||
this.badges.push(target);
|
||||
this.setActive();
|
||||
},
|
||||
unlinked(target) {
|
||||
this.badges = this.badges.filter(item => item !== target);
|
||||
unlinked: function unlinked(target) {
|
||||
this.badges = this.badges.filter(function (item) {
|
||||
return item !== target;
|
||||
});
|
||||
this.setActive();
|
||||
}
|
||||
},
|
||||
@ -21,24 +23,28 @@ VantComponent({
|
||||
watch: {
|
||||
active: 'setActive'
|
||||
},
|
||||
beforeCreate() {
|
||||
beforeCreate: function beforeCreate() {
|
||||
this.badges = [];
|
||||
this.currentActive = -1;
|
||||
},
|
||||
methods: {
|
||||
setActive(badge) {
|
||||
let { active } = this.data;
|
||||
const { badges } = this;
|
||||
setActive: function setActive(badge) {
|
||||
var active = this.data.active;
|
||||
var badges = this.badges;
|
||||
|
||||
if (badge) {
|
||||
active = badges.indexOf(badge);
|
||||
}
|
||||
|
||||
if (active === this.currentActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.currentActive !== -1 && badges[this.currentActive]) {
|
||||
this.$emit('change', active);
|
||||
badges[this.currentActive].setActive(false);
|
||||
}
|
||||
|
||||
if (badges[active]) {
|
||||
badges[active].setActive(true);
|
||||
this.currentActive = active;
|
||||
|
11
dist/badge/index.js
vendored
11
dist/badge/index.js
vendored
@ -9,14 +9,17 @@ VantComponent({
|
||||
title: String
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
const group = this.getRelationNodes('../badge-group/index')[0];
|
||||
onClick: function onClick() {
|
||||
var group = this.getRelationNodes('../badge-group/index')[0];
|
||||
|
||||
if (group) {
|
||||
group.setActive(this);
|
||||
}
|
||||
},
|
||||
setActive(active) {
|
||||
this.setData({ active });
|
||||
setActive: function setActive(active) {
|
||||
this.setData({
|
||||
active: active
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
15
dist/button/index.js
vendored
15
dist/button/index.js
vendored
@ -19,9 +19,16 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
classes() {
|
||||
const { type, size, plain, disabled, loading, square, block } = this.data;
|
||||
return this.classNames(`van-button--${type}`, `van-button--${size}`, {
|
||||
classes: function classes() {
|
||||
var _this$data = this.data,
|
||||
type = _this$data.type,
|
||||
size = _this$data.size,
|
||||
plain = _this$data.plain,
|
||||
disabled = _this$data.disabled,
|
||||
loading = _this$data.loading,
|
||||
square = _this$data.square,
|
||||
block = _this$data.block;
|
||||
return this.classNames("van-button--" + type, "van-button--" + size, {
|
||||
'van-button--block': block,
|
||||
'van-button--plain': plain,
|
||||
'van-button--square': square,
|
||||
@ -32,7 +39,7 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
onClick: function onClick() {
|
||||
if (!this.data.disabled && !this.data.loading) {
|
||||
this.$emit('click');
|
||||
}
|
||||
|
8
dist/card/index.js
vendored
8
dist/card/index.js
vendored
@ -1,12 +1,6 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
VantComponent({
|
||||
classes: [
|
||||
'thumb-class',
|
||||
'title-class',
|
||||
'price-class',
|
||||
'desc-class',
|
||||
'num-class'
|
||||
],
|
||||
classes: ['thumb-class', 'title-class', 'price-class', 'desc-class', 'num-class'],
|
||||
props: {
|
||||
num: String,
|
||||
desc: String,
|
||||
|
26
dist/cell/index.js
vendored
26
dist/cell/index.js
vendored
@ -1,10 +1,6 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
VantComponent({
|
||||
classes: [
|
||||
'title-class',
|
||||
'label-class',
|
||||
'value-class'
|
||||
],
|
||||
classes: ['title-class', 'label-class', 'value-class'],
|
||||
props: {
|
||||
title: null,
|
||||
value: null,
|
||||
@ -27,8 +23,8 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
cellClass() {
|
||||
const { data } = this;
|
||||
cellClass: function cellClass() {
|
||||
var data = this.data;
|
||||
return this.classNames('custom-class', 'van-cell', {
|
||||
'van-hairline': data.border,
|
||||
'van-cell--center': data.center,
|
||||
@ -36,17 +32,21 @@ VantComponent({
|
||||
'van-cell--clickable': data.isLink || data.clickable
|
||||
});
|
||||
},
|
||||
titleStyle() {
|
||||
const { titleWidth } = this.data;
|
||||
return titleWidth ? `max-width: ${titleWidth};min-width: ${titleWidth}` : '';
|
||||
titleStyle: function titleStyle() {
|
||||
var titleWidth = this.data.titleWidth;
|
||||
return titleWidth ? "max-width: " + titleWidth + ";min-width: " + titleWidth : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
const { url } = this.data;
|
||||
onClick: function onClick() {
|
||||
var url = this.data.url;
|
||||
|
||||
if (url) {
|
||||
wx[this.data.linkType]({ url });
|
||||
wx[this.data.linkType]({
|
||||
url: url
|
||||
});
|
||||
}
|
||||
|
||||
this.$emit('click');
|
||||
}
|
||||
}
|
||||
|
24
dist/col/index.js
vendored
24
dist/col/index.js
vendored
@ -12,20 +12,24 @@ VantComponent({
|
||||
style: ''
|
||||
},
|
||||
computed: {
|
||||
classes() {
|
||||
const { span, offset } = this.data;
|
||||
return this.classNames('custom-class', 'van-col', {
|
||||
[`van-col--${span}`]: span,
|
||||
[`van-col--offset-${offset}`]: offset
|
||||
});
|
||||
classes: function classes() {
|
||||
var _this$classNames;
|
||||
|
||||
var _this$data = this.data,
|
||||
span = _this$data.span,
|
||||
offset = _this$data.offset;
|
||||
return this.classNames('custom-class', 'van-col', (_this$classNames = {}, _this$classNames["van-col--" + span] = span, _this$classNames["van-col--offset-" + offset] = offset, _this$classNames));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setGutter(gutter) {
|
||||
const padding = `${gutter / 2}px`;
|
||||
const style = gutter ? `padding-left: ${padding}; padding-right: ${padding};` : '';
|
||||
setGutter: function setGutter(gutter) {
|
||||
var padding = gutter / 2 + "px";
|
||||
var style = gutter ? "padding-left: " + padding + "; padding-right: " + padding + ";" : '';
|
||||
|
||||
if (style !== this.data.style) {
|
||||
this.setData({ style });
|
||||
this.setData({
|
||||
style: style
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
27
dist/common/class-names.js
vendored
27
dist/common/class-names.js
vendored
@ -1,28 +1,29 @@
|
||||
const hasOwn = {}.hasOwnProperty;
|
||||
var hasOwn = {}.hasOwnProperty;
|
||||
export function classNames() {
|
||||
const classes = [];
|
||||
for (let i = 0; i < arguments.length; i++) {
|
||||
const arg = arguments[i];
|
||||
if (!arg)
|
||||
continue;
|
||||
const argType = typeof arg;
|
||||
var classes = [];
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var arg = arguments[i];
|
||||
if (!arg) continue;
|
||||
var argType = typeof arg;
|
||||
|
||||
if (argType === 'string' || argType === 'number') {
|
||||
classes.push(arg);
|
||||
}
|
||||
else if (Array.isArray(arg) && arg.length) {
|
||||
const inner = classNames.apply(null, arg);
|
||||
} else if (Array.isArray(arg) && arg.length) {
|
||||
var inner = classNames.apply(null, arg);
|
||||
|
||||
if (inner) {
|
||||
classes.push(inner);
|
||||
}
|
||||
}
|
||||
else if (argType === 'object') {
|
||||
for (const key in arg) {
|
||||
} else if (argType === 'object') {
|
||||
for (var key in arg) {
|
||||
if (hasOwn.call(arg, key) && arg[key]) {
|
||||
classes.push(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return classes.join(' ');
|
||||
}
|
||||
;
|
34
dist/common/component.js
vendored
34
dist/common/component.js
vendored
@ -1,14 +1,16 @@
|
||||
import { basic } from '../mixins/basic';
|
||||
import { observe } from '../mixins/observer/index';
|
||||
|
||||
function mapKeys(source, target, map) {
|
||||
Object.keys(map).forEach(key => {
|
||||
Object.keys(map).forEach(function (key) {
|
||||
if (source[key]) {
|
||||
target[map[key]] = source[key];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function VantComponent(vantOptions) {
|
||||
const options = {};
|
||||
var options = {};
|
||||
mapKeys(vantOptions, options, {
|
||||
data: 'data',
|
||||
props: 'properties',
|
||||
@ -21,23 +23,26 @@ function VantComponent(vantOptions) {
|
||||
destroyed: 'detached',
|
||||
classes: 'externalClasses'
|
||||
});
|
||||
const { relation } = vantOptions;
|
||||
var relation = vantOptions.relation;
|
||||
|
||||
if (relation) {
|
||||
options.relations = Object.assign(options.relations || {}, {
|
||||
[`../${relation.name}/index`]: relation
|
||||
});
|
||||
}
|
||||
// add default externalClasses
|
||||
var _Object$assign;
|
||||
|
||||
options.relations = Object.assign(options.relations || {}, (_Object$assign = {}, _Object$assign["../" + relation.name + "/index"] = relation, _Object$assign));
|
||||
} // add default externalClasses
|
||||
|
||||
|
||||
options.externalClasses = options.externalClasses || [];
|
||||
options.externalClasses.push('custom-class');
|
||||
// add default behaviors
|
||||
options.externalClasses.push('custom-class'); // add default behaviors
|
||||
|
||||
options.behaviors = options.behaviors || [];
|
||||
options.behaviors.push(basic);
|
||||
// map field to form-field behavior
|
||||
options.behaviors.push(basic); // map field to form-field behavior
|
||||
|
||||
if (vantOptions.field) {
|
||||
options.behaviors.push('wx://form-field');
|
||||
}
|
||||
// add default options
|
||||
} // add default options
|
||||
|
||||
|
||||
options.options = {
|
||||
multipleSlots: true,
|
||||
addGlobalClass: true
|
||||
@ -45,4 +50,5 @@ function VantComponent(vantOptions) {
|
||||
observe(vantOptions, options);
|
||||
Component(options);
|
||||
}
|
||||
|
||||
export { VantComponent };
|
48
dist/dialog/dialog.js
vendored
48
dist/dialog/dialog.js
vendored
@ -1,16 +1,24 @@
|
||||
let queue = [];
|
||||
const Dialog = options => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const pages = getCurrentPages();
|
||||
const ctx = pages[pages.length - 1];
|
||||
const dialog = ctx.selectComponent(options.selector);
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
|
||||
var queue = [];
|
||||
|
||||
var Dialog = function Dialog(options) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
var pages = getCurrentPages();
|
||||
var ctx = pages[pages.length - 1];
|
||||
var dialog = ctx.selectComponent(options.selector);
|
||||
delete options.selector;
|
||||
|
||||
if (dialog) {
|
||||
dialog.setData(Object.assign({ onCancel: reject, onConfirm: resolve }, options));
|
||||
dialog.setData(_extends({
|
||||
onCancel: reject,
|
||||
onConfirm: resolve
|
||||
}, options));
|
||||
queue.push(dialog);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Dialog.defaultOptions = {
|
||||
show: true,
|
||||
title: '',
|
||||
@ -26,19 +34,31 @@ Dialog.defaultOptions = {
|
||||
closeOnClickOverlay: false,
|
||||
confirmButtonOpenType: ''
|
||||
};
|
||||
Dialog.alert = options => Dialog(Object.assign({}, Dialog.currentOptions, options));
|
||||
Dialog.confirm = options => Dialog(Object.assign({}, Dialog.currentOptions, { showCancelButton: true }, options));
|
||||
Dialog.close = () => {
|
||||
queue.forEach(dialog => {
|
||||
|
||||
Dialog.alert = function (options) {
|
||||
return Dialog(_extends({}, Dialog.currentOptions, options));
|
||||
};
|
||||
|
||||
Dialog.confirm = function (options) {
|
||||
return Dialog(_extends({}, Dialog.currentOptions, {
|
||||
showCancelButton: true
|
||||
}, options));
|
||||
};
|
||||
|
||||
Dialog.close = function () {
|
||||
queue.forEach(function (dialog) {
|
||||
dialog.close();
|
||||
});
|
||||
queue = [];
|
||||
};
|
||||
Dialog.setDefaultOptions = options => {
|
||||
|
||||
Dialog.setDefaultOptions = function (options) {
|
||||
Object.assign(Dialog.currentOptions, options);
|
||||
};
|
||||
Dialog.resetDefaultOptions = () => {
|
||||
Dialog.currentOptions = Object.assign({}, Dialog.defaultOptions);
|
||||
|
||||
Dialog.resetDefaultOptions = function () {
|
||||
Dialog.currentOptions = _extends({}, Dialog.defaultOptions);
|
||||
};
|
||||
|
||||
Dialog.resetDefaultOptions();
|
||||
export default Dialog;
|
27
dist/dialog/index.js
vendored
27
dist/dialog/index.js
vendored
@ -42,8 +42,8 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show(show) {
|
||||
if (!show) {
|
||||
show: function show(_show) {
|
||||
if (!_show) {
|
||||
this.setData({
|
||||
loading: {
|
||||
confirm: false,
|
||||
@ -54,35 +54,38 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onConfirm() {
|
||||
onConfirm: function onConfirm() {
|
||||
this.handleAction('confirm');
|
||||
},
|
||||
onCancel() {
|
||||
onCancel: function onCancel() {
|
||||
this.handleAction('cancel');
|
||||
},
|
||||
onClickOverlay() {
|
||||
onClickOverlay: function onClickOverlay() {
|
||||
this.onClose('overlay');
|
||||
},
|
||||
handleAction(action) {
|
||||
handleAction: function handleAction(action) {
|
||||
if (this.data.asyncClose) {
|
||||
this.setData({
|
||||
[`loading.${action}`]: true
|
||||
});
|
||||
var _this$setData;
|
||||
|
||||
this.setData((_this$setData = {}, _this$setData["loading." + action] = true, _this$setData));
|
||||
}
|
||||
|
||||
this.onClose(action);
|
||||
},
|
||||
close() {
|
||||
close: function close() {
|
||||
this.setData({
|
||||
show: false
|
||||
});
|
||||
},
|
||||
onClose(action) {
|
||||
onClose: function onClose(action) {
|
||||
if (!this.data.asyncClose) {
|
||||
this.close();
|
||||
}
|
||||
|
||||
this.$emit('close', action);
|
||||
this.$emit(action);
|
||||
const callback = this.data[action === 'confirm' ? 'onConfirm' : 'onCancel'];
|
||||
var callback = this.data[action === 'confirm' ? 'onConfirm' : 'onCancel'];
|
||||
|
||||
if (callback) {
|
||||
callback(this);
|
||||
}
|
||||
|
38
dist/field/index.js
vendored
38
dist/field/index.js
vendored
@ -50,51 +50,55 @@ VantComponent({
|
||||
showClear: false
|
||||
},
|
||||
computed: {
|
||||
inputClass() {
|
||||
const { data } = this;
|
||||
return this.classNames('input-class', 'van-field__input', {
|
||||
inputClass: function inputClass() {
|
||||
var _this$classNames;
|
||||
|
||||
var data = this.data;
|
||||
return this.classNames('input-class', 'van-field__input', (_this$classNames = {
|
||||
'van-field--error': data.error,
|
||||
'van-field__textarea': data.type === 'textarea',
|
||||
'van-field__input--disabled': data.disabled,
|
||||
[`van-field--${data.inputAlign}`]: data.inputAlign
|
||||
});
|
||||
'van-field__input--disabled': data.disabled
|
||||
}, _this$classNames["van-field--" + data.inputAlign] = data.inputAlign, _this$classNames));
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
beforeCreate: function beforeCreate() {
|
||||
this.focused = false;
|
||||
},
|
||||
methods: {
|
||||
onInput(event) {
|
||||
const { value = '' } = event.detail || {};
|
||||
onInput: function onInput(event) {
|
||||
var _ref = event.detail || {},
|
||||
_ref$value = _ref.value,
|
||||
value = _ref$value === void 0 ? '' : _ref$value;
|
||||
|
||||
this.$emit('input', value);
|
||||
this.$emit('change', value);
|
||||
this.setData({
|
||||
value,
|
||||
value: value,
|
||||
showClear: this.getShowClear(value)
|
||||
});
|
||||
},
|
||||
onFocus() {
|
||||
onFocus: function onFocus() {
|
||||
this.$emit('focus');
|
||||
this.focused = true;
|
||||
this.setData({
|
||||
showClear: this.getShowClear()
|
||||
});
|
||||
},
|
||||
onBlur() {
|
||||
onBlur: function onBlur() {
|
||||
this.focused = false;
|
||||
this.$emit('blur');
|
||||
this.setData({
|
||||
showClear: this.getShowClear()
|
||||
});
|
||||
},
|
||||
onClickIcon() {
|
||||
onClickIcon: function onClickIcon() {
|
||||
this.$emit('click-icon');
|
||||
},
|
||||
getShowClear(value) {
|
||||
getShowClear: function getShowClear(value) {
|
||||
value = value === undefined ? this.data.value : value;
|
||||
return (this.data.clearable && this.focused && value && !this.data.readonly);
|
||||
return this.data.clearable && this.focused && value && !this.data.readonly;
|
||||
},
|
||||
onClear() {
|
||||
onClear: function onClear() {
|
||||
this.setData({
|
||||
value: '',
|
||||
showClear: this.getShowClear('')
|
||||
@ -102,7 +106,7 @@ VantComponent({
|
||||
this.$emit('input', '');
|
||||
this.$emit('change', '');
|
||||
},
|
||||
onConfirm() {
|
||||
onConfirm: function onConfirm() {
|
||||
this.$emit('confirm', this.data.value);
|
||||
}
|
||||
}
|
||||
|
2
dist/icon/index.js
vendored
2
dist/icon/index.js
vendored
@ -11,7 +11,7 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
onClick: function onClick() {
|
||||
this.$emit('click');
|
||||
}
|
||||
}
|
||||
|
20
dist/mixins/basic.js
vendored
20
dist/mixins/basic.js
vendored
@ -1,23 +1,23 @@
|
||||
import { classNames } from '../common/class-names';
|
||||
export const basic = Behavior({
|
||||
export var basic = Behavior({
|
||||
methods: {
|
||||
classNames,
|
||||
$emit() {
|
||||
classNames: classNames,
|
||||
$emit: function $emit() {
|
||||
this.triggerEvent.apply(this, arguments);
|
||||
},
|
||||
getRect(selector, all) {
|
||||
return new Promise(resolve => {
|
||||
wx.createSelectorQuery()
|
||||
.in(this)[all ? 'selectAll' : 'select'](selector)
|
||||
.boundingClientRect(rect => {
|
||||
getRect: function getRect(selector, all) {
|
||||
var _this = this;
|
||||
|
||||
return new Promise(function (resolve) {
|
||||
wx.createSelectorQuery().in(_this)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) {
|
||||
if (all && Array.isArray(rect) && rect.length) {
|
||||
resolve(rect);
|
||||
}
|
||||
|
||||
if (!all && rect) {
|
||||
resolve(rect);
|
||||
}
|
||||
})
|
||||
.exec();
|
||||
}).exec();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
2
dist/mixins/button.js
vendored
2
dist/mixins/button.js
vendored
@ -1,4 +1,4 @@
|
||||
export const button = Behavior({
|
||||
export var button = Behavior({
|
||||
properties: {
|
||||
id: String,
|
||||
appParameter: String,
|
||||
|
42
dist/mixins/observer/behavior.js
vendored
42
dist/mixins/observer/behavior.js
vendored
@ -1,29 +1,41 @@
|
||||
export const behavior = Behavior({
|
||||
created() {
|
||||
export var behavior = Behavior({
|
||||
created: function created() {
|
||||
var _this = this;
|
||||
|
||||
if (!this.$options) {
|
||||
return;
|
||||
}
|
||||
const cache = {};
|
||||
const { setData } = this;
|
||||
const { computed } = this.$options();
|
||||
const keys = Object.keys(computed);
|
||||
const calcComputed = () => {
|
||||
const needUpdate = {};
|
||||
keys.forEach(key => {
|
||||
const value = computed[key].call(this);
|
||||
|
||||
var cache = {};
|
||||
var setData = this.setData;
|
||||
|
||||
var _this$$options = this.$options(),
|
||||
computed = _this$$options.computed;
|
||||
|
||||
var keys = Object.keys(computed);
|
||||
|
||||
var calcComputed = function calcComputed() {
|
||||
var needUpdate = {};
|
||||
keys.forEach(function (key) {
|
||||
var value = computed[key].call(_this);
|
||||
|
||||
if (cache[key] !== value) {
|
||||
cache[key] = needUpdate[key] = value;
|
||||
}
|
||||
});
|
||||
return needUpdate;
|
||||
};
|
||||
Object.defineProperty(this, 'setData', { writable: true });
|
||||
this.setData = (data, callback) => {
|
||||
data && setData.call(this, data, callback);
|
||||
setData.call(this, calcComputed());
|
||||
|
||||
Object.defineProperty(this, 'setData', {
|
||||
writable: true
|
||||
});
|
||||
|
||||
this.setData = function (data, callback) {
|
||||
data && setData.call(_this, data, callback);
|
||||
setData.call(_this, calcComputed());
|
||||
};
|
||||
},
|
||||
attached() {
|
||||
attached: function attached() {
|
||||
this.setData();
|
||||
}
|
||||
});
|
23
dist/mixins/observer/index.js
vendored
23
dist/mixins/observer/index.js
vendored
@ -1,25 +1,36 @@
|
||||
import { behavior } from './behavior';
|
||||
import { observeProps } from './props';
|
||||
export function observe(vantOptions, options) {
|
||||
const { watch, computed } = vantOptions;
|
||||
var watch = vantOptions.watch,
|
||||
computed = vantOptions.computed;
|
||||
|
||||
if (watch) {
|
||||
const props = options.properties || {};
|
||||
Object.keys(watch).forEach(key => {
|
||||
var props = options.properties || {};
|
||||
Object.keys(watch).forEach(function (key) {
|
||||
if (key in props) {
|
||||
let prop = props[key];
|
||||
var prop = props[key];
|
||||
|
||||
if (prop === null || !prop.type) {
|
||||
prop = { type: prop };
|
||||
prop = {
|
||||
type: prop
|
||||
};
|
||||
}
|
||||
|
||||
prop.observer = watch[key];
|
||||
props[key] = prop;
|
||||
}
|
||||
});
|
||||
options.properties = props;
|
||||
}
|
||||
|
||||
if (computed) {
|
||||
options.behaviors.push(behavior);
|
||||
options.methods = options.methods || {};
|
||||
options.methods.$options = () => vantOptions;
|
||||
|
||||
options.methods.$options = function () {
|
||||
return vantOptions;
|
||||
};
|
||||
|
||||
if (options.properties) {
|
||||
observeProps(options.properties);
|
||||
}
|
||||
|
18
dist/mixins/observer/props.js
vendored
18
dist/mixins/observer/props.js
vendored
@ -2,21 +2,31 @@ export function observeProps(props) {
|
||||
if (!props) {
|
||||
return;
|
||||
}
|
||||
Object.keys(props).forEach(key => {
|
||||
let prop = props[key];
|
||||
|
||||
Object.keys(props).forEach(function (key) {
|
||||
var prop = props[key];
|
||||
|
||||
if (prop === null || !prop.type) {
|
||||
prop = { type: prop };
|
||||
prop = {
|
||||
type: prop
|
||||
};
|
||||
}
|
||||
let { observer } = prop;
|
||||
|
||||
var _prop = prop,
|
||||
observer = _prop.observer;
|
||||
|
||||
prop.observer = function () {
|
||||
if (observer) {
|
||||
if (typeof observer === 'string') {
|
||||
observer = this[observer];
|
||||
}
|
||||
|
||||
observer.apply(this, arguments);
|
||||
}
|
||||
|
||||
this.setData();
|
||||
};
|
||||
|
||||
props[key] = prop;
|
||||
});
|
||||
}
|
12
dist/mixins/open-type.js
vendored
12
dist/mixins/open-type.js
vendored
@ -1,21 +1,21 @@
|
||||
export const openType = Behavior({
|
||||
export var openType = Behavior({
|
||||
properties: {
|
||||
openType: String
|
||||
},
|
||||
methods: {
|
||||
bindGetUserInfo(event) {
|
||||
bindGetUserInfo: function bindGetUserInfo(event) {
|
||||
this.$emit('getuserinfo', event.detail);
|
||||
},
|
||||
bindContact(event) {
|
||||
bindContact: function bindContact(event) {
|
||||
this.$emit('contact', event.detail);
|
||||
},
|
||||
bindGetPhoneNumber(event) {
|
||||
bindGetPhoneNumber: function bindGetPhoneNumber(event) {
|
||||
this.$emit('getphonenumber', event.detail);
|
||||
},
|
||||
bindOpenSetting(event) {
|
||||
bindOpenSetting: function bindOpenSetting(event) {
|
||||
this.$emit('opensetting', event.detail);
|
||||
},
|
||||
bindError(event) {
|
||||
bindError: function bindError(event) {
|
||||
this.$emit('error', event.detail);
|
||||
}
|
||||
}
|
||||
|
8
dist/mixins/touch.js
vendored
8
dist/mixins/touch.js
vendored
@ -1,6 +1,6 @@
|
||||
export const touch = Behavior({
|
||||
export var touch = Behavior({
|
||||
methods: {
|
||||
touchStart(event) {
|
||||
touchStart: function touchStart(event) {
|
||||
this.direction = '';
|
||||
this.deltaX = 0;
|
||||
this.deltaY = 0;
|
||||
@ -9,8 +9,8 @@ export const touch = Behavior({
|
||||
this.startX = event.touches[0].clientX;
|
||||
this.startY = event.touches[0].clientY;
|
||||
},
|
||||
touchMove(event) {
|
||||
const touch = event.touches[0];
|
||||
touchMove: function touchMove(event) {
|
||||
var touch = event.touches[0];
|
||||
this.deltaX = touch.clientX - this.startX;
|
||||
this.deltaY = touch.clientY - this.startY;
|
||||
this.offsetX = Math.abs(this.deltaX);
|
||||
|
13
dist/mixins/transition.js
vendored
13
dist/mixins/transition.js
vendored
@ -1,4 +1,4 @@
|
||||
export const transition = function (showDefaultValue) {
|
||||
export var transition = function transition(showDefaultValue) {
|
||||
return Behavior({
|
||||
properties: {
|
||||
customStyle: String,
|
||||
@ -17,30 +17,29 @@ export const transition = function (showDefaultValue) {
|
||||
inited: false,
|
||||
display: false
|
||||
},
|
||||
attached() {
|
||||
attached: function attached() {
|
||||
if (this.data.show) {
|
||||
this.show();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
observeShow(value) {
|
||||
observeShow: function observeShow(value) {
|
||||
if (value) {
|
||||
this.show();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.setData({
|
||||
type: 'leave'
|
||||
});
|
||||
}
|
||||
},
|
||||
show() {
|
||||
show: function show() {
|
||||
this.setData({
|
||||
inited: true,
|
||||
display: true,
|
||||
type: 'enter'
|
||||
});
|
||||
},
|
||||
onAnimationEnd() {
|
||||
onAnimationEnd: function onAnimationEnd() {
|
||||
if (!this.data.show) {
|
||||
this.setData({
|
||||
display: false
|
||||
|
4
dist/nav-bar/index.js
vendored
4
dist/nav-bar/index.js
vendored
@ -13,10 +13,10 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClickLeft() {
|
||||
onClickLeft: function onClickLeft() {
|
||||
this.$emit('click-left');
|
||||
},
|
||||
onClickRight() {
|
||||
onClickRight: function onClickRight() {
|
||||
this.$emit('click-right');
|
||||
}
|
||||
}
|
||||
|
86
dist/notice-bar/index.js
vendored
86
dist/notice-bar/index.js
vendored
@ -1,6 +1,6 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
const FONT_COLOR = '#f60';
|
||||
const BG_COLOR = '#fff7cc';
|
||||
var FONT_COLOR = '#f60';
|
||||
var BG_COLOR = '#fff7cc';
|
||||
VantComponent({
|
||||
props: {
|
||||
text: {
|
||||
@ -55,87 +55,105 @@ VantComponent({
|
||||
timer: null
|
||||
},
|
||||
watch: {
|
||||
text() {
|
||||
text: function text() {
|
||||
this.setData({}, this.init);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
created: function created() {
|
||||
if (this.data.mode) {
|
||||
this.setData({
|
||||
hasRightIcon: true
|
||||
});
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
const { timer } = this.data;
|
||||
destroyed: function destroyed() {
|
||||
var timer = this.data.timer;
|
||||
timer && clearTimeout(timer);
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getRect('.van-notice-bar__content').then(rect => {
|
||||
init: function init() {
|
||||
var _this = this;
|
||||
|
||||
this.getRect('.van-notice-bar__content').then(function (rect) {
|
||||
if (!rect || !rect.width) {
|
||||
return;
|
||||
}
|
||||
this.setData({
|
||||
|
||||
_this.setData({
|
||||
width: rect.width
|
||||
});
|
||||
this.getRect('.van-notice-bar__content-wrap').then(rect => {
|
||||
|
||||
_this.getRect('.van-notice-bar__content-wrap').then(function (rect) {
|
||||
if (!rect || !rect.width) {
|
||||
return;
|
||||
}
|
||||
const wrapWidth = rect.width;
|
||||
const { width, speed, scrollable, delay } = this.data;
|
||||
|
||||
var wrapWidth = rect.width;
|
||||
var _this$data = _this.data,
|
||||
width = _this$data.width,
|
||||
speed = _this$data.speed,
|
||||
scrollable = _this$data.scrollable,
|
||||
delay = _this$data.delay;
|
||||
|
||||
if (scrollable && wrapWidth < width) {
|
||||
const elapse = width / speed * 1000;
|
||||
const animation = wx.createAnimation({
|
||||
var elapse = width / speed * 1000;
|
||||
var animation = wx.createAnimation({
|
||||
duration: elapse,
|
||||
timeingFunction: 'linear',
|
||||
delay
|
||||
delay: delay
|
||||
});
|
||||
const resetAnimation = wx.createAnimation({
|
||||
var resetAnimation = wx.createAnimation({
|
||||
duration: 0,
|
||||
timeingFunction: 'linear'
|
||||
});
|
||||
this.setData({
|
||||
elapse,
|
||||
wrapWidth,
|
||||
animation,
|
||||
resetAnimation
|
||||
}, () => {
|
||||
this.scroll();
|
||||
|
||||
_this.setData({
|
||||
elapse: elapse,
|
||||
wrapWidth: wrapWidth,
|
||||
animation: animation,
|
||||
resetAnimation: resetAnimation
|
||||
}, function () {
|
||||
_this.scroll();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
scroll() {
|
||||
const { animation, resetAnimation, wrapWidth, elapse, speed } = this.data;
|
||||
scroll: function scroll() {
|
||||
var _this2 = this;
|
||||
|
||||
var _this$data2 = this.data,
|
||||
animation = _this$data2.animation,
|
||||
resetAnimation = _this$data2.resetAnimation,
|
||||
wrapWidth = _this$data2.wrapWidth,
|
||||
elapse = _this$data2.elapse,
|
||||
speed = _this$data2.speed;
|
||||
resetAnimation.translateX(wrapWidth).step();
|
||||
const animationData = animation.translateX(-(elapse * speed) / 1000).step();
|
||||
var animationData = animation.translateX(-(elapse * speed) / 1000).step();
|
||||
this.setData({
|
||||
animationData: resetAnimation.export()
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
setTimeout(function () {
|
||||
_this2.setData({
|
||||
animationData: animationData.export()
|
||||
});
|
||||
}, 100);
|
||||
const timer = setTimeout(() => {
|
||||
this.scroll();
|
||||
var timer = setTimeout(function () {
|
||||
_this2.scroll();
|
||||
}, elapse);
|
||||
this.setData({
|
||||
timer
|
||||
timer: timer
|
||||
});
|
||||
},
|
||||
onClickIcon() {
|
||||
const { timer } = this.data;
|
||||
onClickIcon: function onClickIcon() {
|
||||
var timer = this.data.timer;
|
||||
timer && clearTimeout(timer);
|
||||
this.setData({
|
||||
show: false,
|
||||
timer: null
|
||||
});
|
||||
},
|
||||
onClick(event) {
|
||||
onClick: function onClick(event) {
|
||||
this.$emit('click', event);
|
||||
}
|
||||
}
|
||||
|
13
dist/notify/index.js
vendored
13
dist/notify/index.js
vendored
@ -16,19 +16,22 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
const { duration } = this.data;
|
||||
show: function show() {
|
||||
var _this = this;
|
||||
|
||||
var duration = this.data.duration;
|
||||
clearTimeout(this.timer);
|
||||
this.setData({
|
||||
show: true
|
||||
});
|
||||
|
||||
if (duration > 0 && duration !== Infinity) {
|
||||
this.timer = setTimeout(() => {
|
||||
this.hide();
|
||||
this.timer = setTimeout(function () {
|
||||
_this.hide();
|
||||
}, duration);
|
||||
}
|
||||
},
|
||||
hide() {
|
||||
hide: function hide() {
|
||||
clearTimeout(this.timer);
|
||||
this.setData({
|
||||
show: false
|
||||
|
21
dist/notify/notify.js
vendored
21
dist/notify/notify.js
vendored
@ -1,17 +1,26 @@
|
||||
import { isObj } from '../common/utils';
|
||||
const defaultOptions = {
|
||||
var defaultOptions = {
|
||||
selector: '#van-notify',
|
||||
duration: 3000
|
||||
};
|
||||
|
||||
function parseOptions(text) {
|
||||
return isObj(text) ? text : { text };
|
||||
return isObj(text) ? text : {
|
||||
text: text
|
||||
};
|
||||
}
|
||||
export default function Notify(options = {}) {
|
||||
const pages = getCurrentPages();
|
||||
const ctx = pages[pages.length - 1];
|
||||
|
||||
export default function Notify(options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
var pages = getCurrentPages();
|
||||
var ctx = pages[pages.length - 1];
|
||||
options = Object.assign({}, defaultOptions, parseOptions(options));
|
||||
const el = ctx.selectComponent(options.selector);
|
||||
var el = ctx.selectComponent(options.selector);
|
||||
delete options.selector;
|
||||
|
||||
if (el) {
|
||||
el.setData(options);
|
||||
el.show();
|
||||
|
4
dist/overlay/index.js
vendored
4
dist/overlay/index.js
vendored
@ -10,10 +10,10 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
onClick: function onClick() {
|
||||
this.$emit('click');
|
||||
},
|
||||
// for prevent touchmove
|
||||
noop() { }
|
||||
noop: function noop() {}
|
||||
}
|
||||
});
|
3
dist/popup/index.js
vendored
3
dist/popup/index.js
vendored
@ -24,8 +24,9 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onClickOverlay() {
|
||||
onClickOverlay: function onClickOverlay() {
|
||||
this.$emit('click-overlay');
|
||||
|
||||
if (this.data.closeOnClickOverlay) {
|
||||
this.$emit('close');
|
||||
}
|
||||
|
34
dist/progress/index.js
vendored
34
dist/progress/index.js
vendored
@ -27,35 +27,37 @@ VantComponent({
|
||||
showPivot: 'getWidth'
|
||||
},
|
||||
computed: {
|
||||
portionStyle() {
|
||||
const width = (this.data.progressWidth - this.data.pivotWidth) * this.data.percentage / 100 + 'px';
|
||||
const background = this.getCurrentColor();
|
||||
return `width: ${width}; background: ${background}; `;
|
||||
portionStyle: function portionStyle() {
|
||||
var width = (this.data.progressWidth - this.data.pivotWidth) * this.data.percentage / 100 + 'px';
|
||||
var background = this.getCurrentColor();
|
||||
return "width: " + width + "; background: " + background + "; ";
|
||||
},
|
||||
pivotStyle() {
|
||||
const color = this.data.textColor;
|
||||
const background = this.data.pivotColor || this.getCurrentColor();
|
||||
return `color: ${color}; background: ${background}`;
|
||||
pivotStyle: function pivotStyle() {
|
||||
var color = this.data.textColor;
|
||||
var background = this.data.pivotColor || this.getCurrentColor();
|
||||
return "color: " + color + "; background: " + background;
|
||||
},
|
||||
text() {
|
||||
text: function text() {
|
||||
return this.data.pivotText || this.data.percentage + '%';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
mounted: function mounted() {
|
||||
this.getWidth();
|
||||
},
|
||||
methods: {
|
||||
getCurrentColor() {
|
||||
getCurrentColor: function getCurrentColor() {
|
||||
return this.data.inactive ? '#cacaca' : this.data.color;
|
||||
},
|
||||
getWidth() {
|
||||
this.getRect('.van-progress').then(rect => {
|
||||
this.setData({
|
||||
getWidth: function getWidth() {
|
||||
var _this = this;
|
||||
|
||||
this.getRect('.van-progress').then(function (rect) {
|
||||
_this.setData({
|
||||
progressWidth: rect.width
|
||||
});
|
||||
});
|
||||
this.getRect('.van-progress__pivot').then(rect => {
|
||||
this.setData({
|
||||
this.getRect('.van-progress__pivot').then(function (rect) {
|
||||
_this.setData({
|
||||
pivotWidth: rect.width || 0
|
||||
});
|
||||
});
|
||||
|
26
dist/radio-group/index.js
vendored
26
dist/radio-group/index.js
vendored
@ -3,8 +3,10 @@ VantComponent({
|
||||
relation: {
|
||||
name: 'radio',
|
||||
type: 'descendant',
|
||||
linked(target) {
|
||||
const { value, disabled } = this.data;
|
||||
linked: function linked(target) {
|
||||
var _this$data = this.data,
|
||||
value = _this$data.value,
|
||||
disabled = _this$data.disabled;
|
||||
target.setData({
|
||||
value: value,
|
||||
disabled: disabled || target.data.disabled
|
||||
@ -16,16 +18,20 @@ VantComponent({
|
||||
disabled: Boolean
|
||||
},
|
||||
watch: {
|
||||
value(value) {
|
||||
const children = this.getRelationNodes('../radio/index');
|
||||
children.forEach(child => {
|
||||
child.setData({ value });
|
||||
value: function value(_value) {
|
||||
var children = this.getRelationNodes('../radio/index');
|
||||
children.forEach(function (child) {
|
||||
child.setData({
|
||||
value: _value
|
||||
});
|
||||
});
|
||||
},
|
||||
disabled(disabled) {
|
||||
const children = this.getRelationNodes('../radio/index');
|
||||
children.forEach(child => {
|
||||
child.setData({ disabled: disabled || child.data.disabled });
|
||||
disabled: function disabled(_disabled) {
|
||||
var children = this.getRelationNodes('../radio/index');
|
||||
children.forEach(function (child) {
|
||||
child.setData({
|
||||
disabled: _disabled || child.data.disabled
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
15
dist/radio/index.js
vendored
15
dist/radio/index.js
vendored
@ -13,8 +13,11 @@ VantComponent({
|
||||
labelPosition: String
|
||||
},
|
||||
computed: {
|
||||
iconClass() {
|
||||
const { disabled, name, value } = this.data;
|
||||
iconClass: function iconClass() {
|
||||
var _this$data = this.data,
|
||||
disabled = _this$data.disabled,
|
||||
name = _this$data.name,
|
||||
value = _this$data.value;
|
||||
return this.classNames('van-radio__icon', {
|
||||
'van-radio__icon--disabled': disabled,
|
||||
'van-radio__icon--checked': !disabled && name === value,
|
||||
@ -23,15 +26,15 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
emitChange(value) {
|
||||
const instance = this.getRelationNodes('../radio-group/index')[0] || this;
|
||||
emitChange: function emitChange(value) {
|
||||
var instance = this.getRelationNodes('../radio-group/index')[0] || this;
|
||||
instance.$emit('input', value);
|
||||
instance.$emit('change', value);
|
||||
},
|
||||
onChange(event) {
|
||||
onChange: function onChange(event) {
|
||||
this.emitChange(event.detail.value);
|
||||
},
|
||||
onClickLabel() {
|
||||
onClickLabel: function onClickLabel() {
|
||||
if (!this.data.disabled && !this.data.labelDisabled) {
|
||||
this.emitChange(this.data.name);
|
||||
}
|
||||
|
24
dist/row/index.js
vendored
24
dist/row/index.js
vendored
@ -3,7 +3,7 @@ VantComponent({
|
||||
relation: {
|
||||
name: 'col',
|
||||
type: 'descendant',
|
||||
linked(target) {
|
||||
linked: function linked(target) {
|
||||
if (this.data.gutter) {
|
||||
target.setGutter(this.data.gutter);
|
||||
}
|
||||
@ -15,21 +15,23 @@ VantComponent({
|
||||
watch: {
|
||||
gutter: 'setGutter'
|
||||
},
|
||||
mounted() {
|
||||
mounted: function mounted() {
|
||||
if (this.data.gutter) {
|
||||
this.setGutter();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setGutter() {
|
||||
const { gutter } = this.data;
|
||||
const margin = `-${Number(gutter) / 2}px`;
|
||||
const style = gutter
|
||||
? `margin-right: ${margin}; margin-left: ${margin};`
|
||||
: '';
|
||||
this.setData({ style });
|
||||
this.getRelationNodes('../col/index').forEach(col => {
|
||||
col.setGutter(this.data.gutter);
|
||||
setGutter: function setGutter() {
|
||||
var _this = this;
|
||||
|
||||
var gutter = this.data.gutter;
|
||||
var margin = "-" + Number(gutter) / 2 + "px";
|
||||
var style = gutter ? "margin-right: " + margin + "; margin-left: " + margin + ";" : '';
|
||||
this.setData({
|
||||
style: style
|
||||
});
|
||||
this.getRelationNodes('../col/index').forEach(function (col) {
|
||||
col.setGutter(_this.data.gutter);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
18
dist/search/index.js
vendored
18
dist/search/index.js
vendored
@ -19,22 +19,26 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChange(event) {
|
||||
this.setData({ value: event.detail });
|
||||
onChange: function onChange(event) {
|
||||
this.setData({
|
||||
value: event.detail
|
||||
});
|
||||
this.$emit('change', event.detail);
|
||||
},
|
||||
onCancel() {
|
||||
this.setData({ value: '' });
|
||||
onCancel: function onCancel() {
|
||||
this.setData({
|
||||
value: ''
|
||||
});
|
||||
this.$emit('cancel');
|
||||
this.$emit('change', '');
|
||||
},
|
||||
onSearch() {
|
||||
onSearch: function onSearch() {
|
||||
this.$emit('search', this.data.value);
|
||||
},
|
||||
onFocus() {
|
||||
onFocus: function onFocus() {
|
||||
this.$emit('focus');
|
||||
},
|
||||
onBlur() {
|
||||
onBlur: function onBlur() {
|
||||
this.$emit('blur');
|
||||
}
|
||||
}
|
||||
|
54
dist/slider/index.js
vendored
54
dist/slider/index.js
vendored
@ -25,50 +25,56 @@ VantComponent({
|
||||
value: '2px'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
created: function created() {
|
||||
this.updateValue(this.data.value);
|
||||
},
|
||||
methods: {
|
||||
onTouchStart(event) {
|
||||
if (this.data.disabled)
|
||||
return;
|
||||
onTouchStart: function onTouchStart(event) {
|
||||
if (this.data.disabled) return;
|
||||
this.touchStart(event);
|
||||
this.startValue = this.format(this.data.value);
|
||||
},
|
||||
onTouchMove(event) {
|
||||
if (this.data.disabled)
|
||||
return;
|
||||
onTouchMove: function onTouchMove(event) {
|
||||
var _this = this;
|
||||
|
||||
if (this.data.disabled) return;
|
||||
this.touchMove(event);
|
||||
this.getRect('.van-slider').then(rect => {
|
||||
const diff = this.deltaX / rect.width * 100;
|
||||
this.updateValue(this.startValue + diff);
|
||||
this.getRect('.van-slider').then(function (rect) {
|
||||
var diff = _this.deltaX / rect.width * 100;
|
||||
|
||||
_this.updateValue(_this.startValue + diff);
|
||||
});
|
||||
},
|
||||
onTouchEnd() {
|
||||
if (this.data.disabled)
|
||||
return;
|
||||
onTouchEnd: function onTouchEnd() {
|
||||
if (this.data.disabled) return;
|
||||
this.updateValue(this.data.value, true);
|
||||
},
|
||||
onClick(event) {
|
||||
if (this.data.disabled)
|
||||
return;
|
||||
this.getRect(rect => {
|
||||
const value = (event.detail.x - rect.left) / rect.width * 100;
|
||||
this.updateValue(value, true);
|
||||
onClick: function onClick(event) {
|
||||
var _this2 = this;
|
||||
|
||||
if (this.data.disabled) return;
|
||||
this.getRect(function (rect) {
|
||||
var value = (event.detail.x - rect.left) / rect.width * 100;
|
||||
|
||||
_this2.updateValue(value, true);
|
||||
});
|
||||
},
|
||||
updateValue(value, end) {
|
||||
updateValue: function updateValue(value, end) {
|
||||
value = this.format(value);
|
||||
this.setData({
|
||||
value,
|
||||
barStyle: `width: ${value}%; height: ${this.data.barHeight};`
|
||||
value: value,
|
||||
barStyle: "width: " + value + "%; height: " + this.data.barHeight + ";"
|
||||
});
|
||||
|
||||
if (end) {
|
||||
this.$emit('change', value);
|
||||
}
|
||||
},
|
||||
format(value) {
|
||||
const { max, min, step } = this.data;
|
||||
format: function format(value) {
|
||||
var _this$data = this.data,
|
||||
max = _this$data.max,
|
||||
min = _this$data.min,
|
||||
step = _this$data.step;
|
||||
return Math.round(Math.max(min, Math.min(value, max)) / step) * step;
|
||||
}
|
||||
}
|
||||
|
46
dist/stepper/index.js
vendored
46
dist/stepper/index.js
vendored
@ -1,14 +1,10 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
// Note that the bitwise operators and shift operators operate on 32-bit ints
|
||||
import { VantComponent } from '../common/component'; // Note that the bitwise operators and shift operators operate on 32-bit ints
|
||||
// so in that case, the max safe integer is 2^31-1, or 2147483647
|
||||
const MAX = 2147483647;
|
||||
|
||||
var MAX = 2147483647;
|
||||
VantComponent({
|
||||
field: true,
|
||||
classes: [
|
||||
'input-class',
|
||||
'plus-class',
|
||||
'minus-class'
|
||||
],
|
||||
classes: ['input-class', 'plus-class', 'minus-class'],
|
||||
props: {
|
||||
integer: Boolean,
|
||||
disabled: Boolean,
|
||||
@ -26,43 +22,49 @@ VantComponent({
|
||||
value: 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
created: function created() {
|
||||
this.setData({
|
||||
value: this.range(this.data.value)
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// limit value range
|
||||
range(value) {
|
||||
range: function range(value) {
|
||||
return Math.max(Math.min(this.data.max, value), this.data.min);
|
||||
},
|
||||
onInput(event) {
|
||||
const { value = '' } = event.detail || {};
|
||||
onInput: function onInput(event) {
|
||||
var _ref = event.detail || {},
|
||||
_ref$value = _ref.value,
|
||||
value = _ref$value === void 0 ? '' : _ref$value;
|
||||
|
||||
this.triggerInput(value);
|
||||
},
|
||||
onChange(type) {
|
||||
if (this[`${type}Disabled`]) {
|
||||
onChange: function onChange(type) {
|
||||
if (this[type + "Disabled"]) {
|
||||
this.$emit('overlimit', type);
|
||||
return;
|
||||
}
|
||||
const diff = type === 'minus' ? -this.data.step : +this.data.step;
|
||||
const value = Math.round((this.data.value + diff) * 100) / 100;
|
||||
|
||||
var diff = type === 'minus' ? -this.data.step : +this.data.step;
|
||||
var value = Math.round((this.data.value + diff) * 100) / 100;
|
||||
this.triggerInput(this.range(value));
|
||||
this.$emit(type);
|
||||
},
|
||||
onBlur(event) {
|
||||
const value = this.range(this.data.value);
|
||||
onBlur: function onBlur(event) {
|
||||
var value = this.range(this.data.value);
|
||||
this.triggerInput(value);
|
||||
this.$emit('blur', event);
|
||||
},
|
||||
onMinus() {
|
||||
onMinus: function onMinus() {
|
||||
this.onChange('minus');
|
||||
},
|
||||
onPlus() {
|
||||
onPlus: function onPlus() {
|
||||
this.onChange('plus');
|
||||
},
|
||||
triggerInput(value) {
|
||||
this.setData({ value });
|
||||
triggerInput: function triggerInput(value) {
|
||||
this.setData({
|
||||
value: value
|
||||
});
|
||||
this.$emit('change', value);
|
||||
}
|
||||
}
|
||||
|
25
dist/steps/index.js
vendored
25
dist/steps/index.js
vendored
@ -17,25 +17,30 @@ VantComponent({
|
||||
steps: 'formatSteps',
|
||||
active: 'formatSteps'
|
||||
},
|
||||
created() {
|
||||
created: function created() {
|
||||
this.formatSteps();
|
||||
},
|
||||
methods: {
|
||||
formatSteps() {
|
||||
const { steps } = this.data;
|
||||
steps.forEach((step, index) => {
|
||||
step.status = this.getStatus(index);
|
||||
formatSteps: function formatSteps() {
|
||||
var _this = this;
|
||||
|
||||
var steps = this.data.steps;
|
||||
steps.forEach(function (step, index) {
|
||||
step.status = _this.getStatus(index);
|
||||
});
|
||||
this.setData({
|
||||
steps: steps
|
||||
});
|
||||
this.setData({ steps });
|
||||
},
|
||||
getStatus(index) {
|
||||
const { active } = this.data;
|
||||
getStatus: function getStatus(index) {
|
||||
var active = this.data.active;
|
||||
|
||||
if (index < active) {
|
||||
return 'finish';
|
||||
}
|
||||
else if (index === active) {
|
||||
} else if (index === active) {
|
||||
return 'process';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
16
dist/submit-bar/index.js
vendored
16
dist/submit-bar/index.js
vendored
@ -1,10 +1,6 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
VantComponent({
|
||||
classes: [
|
||||
'bar-class',
|
||||
'price-class',
|
||||
'button-class'
|
||||
],
|
||||
classes: ['bar-class', 'price-class', 'button-class'],
|
||||
props: {
|
||||
tip: [String, Boolean],
|
||||
type: Number,
|
||||
@ -23,19 +19,19 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
hasPrice() {
|
||||
hasPrice: function hasPrice() {
|
||||
return typeof this.data.price === 'number';
|
||||
},
|
||||
priceStr() {
|
||||
priceStr: function priceStr() {
|
||||
return (this.data.price / 100).toFixed(2);
|
||||
},
|
||||
tipStr() {
|
||||
const { tip } = this.data;
|
||||
tipStr: function tipStr() {
|
||||
var tip = this.data.tip;
|
||||
return typeof tip === 'string' ? tip : '';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit(event) {
|
||||
onSubmit: function onSubmit(event) {
|
||||
this.$emit('submit', event.detail);
|
||||
}
|
||||
}
|
||||
|
14
dist/switch-cell/index.js
vendored
14
dist/switch-cell/index.js
vendored
@ -13,15 +13,19 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
checked(value) {
|
||||
this.setData({ value });
|
||||
checked: function checked(value) {
|
||||
this.setData({
|
||||
value: value
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setData({ value: this.data.checked });
|
||||
created: function created() {
|
||||
this.setData({
|
||||
value: this.data.checked
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
onChange(event) {
|
||||
onChange: function onChange(event) {
|
||||
this.$emit('change', event.detail);
|
||||
}
|
||||
}
|
||||
|
16
dist/switch/index.js
vendored
16
dist/switch/index.js
vendored
@ -12,17 +12,21 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
checked(value) {
|
||||
this.setData({ value });
|
||||
checked: function checked(value) {
|
||||
this.setData({
|
||||
value: value
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setData({ value: this.data.checked });
|
||||
created: function created() {
|
||||
this.setData({
|
||||
value: this.data.checked
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
onClick: function onClick() {
|
||||
if (!this.data.disabled && !this.data.loading) {
|
||||
const checked = !this.data.checked;
|
||||
var checked = !this.data.checked;
|
||||
this.$emit('input', checked);
|
||||
this.$emit('change', checked);
|
||||
}
|
||||
|
10
dist/tab/index.js
vendored
10
dist/tab/index.js
vendored
@ -13,14 +13,16 @@ VantComponent({
|
||||
active: false
|
||||
},
|
||||
watch: {
|
||||
disabled() {
|
||||
const parent = this.getRelationNodes('../tabs/index')[0];
|
||||
disabled: function disabled() {
|
||||
var parent = this.getRelationNodes('../tabs/index')[0];
|
||||
|
||||
if (parent) {
|
||||
parent.updateTabs();
|
||||
}
|
||||
},
|
||||
title() {
|
||||
const parent = this.getRelationNodes('../tabs/index')[0];
|
||||
title: function title() {
|
||||
var parent = this.getRelationNodes('../tabs/index')[0];
|
||||
|
||||
if (parent) {
|
||||
parent.setLine();
|
||||
parent.updateTabs();
|
||||
|
13
dist/tabbar-item/index.js
vendored
13
dist/tabbar-item/index.js
vendored
@ -14,15 +14,20 @@ VantComponent({
|
||||
count: 0
|
||||
},
|
||||
methods: {
|
||||
onClick() {
|
||||
const parent = this.getRelationNodes('../tabbar/index')[0];
|
||||
onClick: function onClick() {
|
||||
var parent = this.getRelationNodes('../tabbar/index')[0];
|
||||
|
||||
if (parent) {
|
||||
parent.onChange(this);
|
||||
}
|
||||
|
||||
this.$emit('click');
|
||||
},
|
||||
setActive(data) {
|
||||
const { active, count } = this.data;
|
||||
setActive: function setActive(data) {
|
||||
var _this$data = this.data,
|
||||
active = _this$data.active,
|
||||
count = _this$data.count;
|
||||
|
||||
if (active !== data.active || count !== data.count) {
|
||||
this.setData(data);
|
||||
}
|
||||
|
51
dist/tabbar/index.js
vendored
51
dist/tabbar/index.js
vendored
@ -3,16 +3,22 @@ VantComponent({
|
||||
relation: {
|
||||
name: 'tabbar-item',
|
||||
type: 'descendant',
|
||||
linked(target) {
|
||||
linked: function linked(target) {
|
||||
var _this = this;
|
||||
|
||||
this.data.items.push(target);
|
||||
setTimeout(() => {
|
||||
this.setActiveItem();
|
||||
setTimeout(function () {
|
||||
_this.setActiveItem();
|
||||
});
|
||||
},
|
||||
unlinked(target) {
|
||||
this.data.items = this.data.items.filter(item => item !== target);
|
||||
setTimeout(() => {
|
||||
this.setActiveItem();
|
||||
unlinked: function unlinked(target) {
|
||||
var _this2 = this;
|
||||
|
||||
this.data.items = this.data.items.filter(function (item) {
|
||||
return item !== target;
|
||||
});
|
||||
setTimeout(function () {
|
||||
_this2.setActiveItem();
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -32,28 +38,37 @@ VantComponent({
|
||||
currentActive: -1
|
||||
},
|
||||
watch: {
|
||||
active(active) {
|
||||
this.setData({ currentActive: active });
|
||||
active: function active(_active) {
|
||||
this.setData({
|
||||
currentActive: _active
|
||||
});
|
||||
this.setActiveItem();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setData({ currentActive: this.data.active });
|
||||
created: function created() {
|
||||
this.setData({
|
||||
currentActive: this.data.active
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
setActiveItem() {
|
||||
this.data.items.forEach((item, index) => {
|
||||
setActiveItem: function setActiveItem() {
|
||||
var _this3 = this;
|
||||
|
||||
this.data.items.forEach(function (item, index) {
|
||||
item.setActive({
|
||||
active: index === this.data.currentActive,
|
||||
count: this.data.items.length
|
||||
active: index === _this3.data.currentActive,
|
||||
count: _this3.data.items.length
|
||||
});
|
||||
});
|
||||
},
|
||||
onChange(child) {
|
||||
const active = this.data.items.indexOf(child);
|
||||
onChange: function onChange(child) {
|
||||
var active = this.data.items.indexOf(child);
|
||||
|
||||
if (active !== this.data.currentActive && active !== -1) {
|
||||
this.$emit('change', active);
|
||||
this.setData({ currentActive: active });
|
||||
this.setData({
|
||||
currentActive: active
|
||||
});
|
||||
this.setActiveItem();
|
||||
}
|
||||
}
|
||||
|
102
dist/tabs/index.js
vendored
102
dist/tabs/index.js
vendored
@ -3,17 +3,19 @@ VantComponent({
|
||||
relation: {
|
||||
name: 'tab',
|
||||
type: 'descendant',
|
||||
linked(child) {
|
||||
linked: function linked(child) {
|
||||
this.data.tabs.push({
|
||||
instance: child,
|
||||
data: child.data
|
||||
});
|
||||
this.updateTabs();
|
||||
},
|
||||
unlinked(child) {
|
||||
const tabs = this.data.tabs.filter(item => item.instance !== child);
|
||||
unlinked: function unlinked(child) {
|
||||
var tabs = this.data.tabs.filter(function (item) {
|
||||
return item.instance !== child;
|
||||
});
|
||||
this.setData({
|
||||
tabs,
|
||||
tabs: tabs,
|
||||
scrollable: tabs.length > this.data.swipeThreshold
|
||||
});
|
||||
this.setActiveTab();
|
||||
@ -50,7 +52,7 @@ VantComponent({
|
||||
scrollable: false
|
||||
},
|
||||
watch: {
|
||||
swipeThreshold() {
|
||||
swipeThreshold: function swipeThreshold() {
|
||||
this.setData({
|
||||
scrollable: this.data.tabs.length > this.data.swipeThreshold
|
||||
});
|
||||
@ -59,71 +61,76 @@ VantComponent({
|
||||
lineWidth: 'setLine',
|
||||
active: 'setActiveTab'
|
||||
},
|
||||
mounted() {
|
||||
mounted: function mounted() {
|
||||
this.setLine();
|
||||
this.scrollIntoView();
|
||||
},
|
||||
methods: {
|
||||
updateTabs() {
|
||||
const { tabs } = this.data;
|
||||
updateTabs: function updateTabs() {
|
||||
var tabs = this.data.tabs;
|
||||
this.setData({
|
||||
tabs,
|
||||
tabs: tabs,
|
||||
scrollable: tabs.length > this.data.swipeThreshold
|
||||
});
|
||||
this.setActiveTab();
|
||||
},
|
||||
trigger(eventName, index) {
|
||||
trigger: function trigger(eventName, index) {
|
||||
this.$emit(eventName, {
|
||||
index,
|
||||
index: index,
|
||||
title: this.data.tabs[index].data.title
|
||||
});
|
||||
},
|
||||
onTap(event) {
|
||||
const { index } = event.currentTarget.dataset;
|
||||
onTap: function onTap(event) {
|
||||
var index = event.currentTarget.dataset.index;
|
||||
|
||||
if (this.data.tabs[index].data.disabled) {
|
||||
this.trigger('disabled', index);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.trigger('click', index);
|
||||
this.setActive(index);
|
||||
}
|
||||
},
|
||||
setActive(active) {
|
||||
setActive: function setActive(active) {
|
||||
if (active !== this.data.active) {
|
||||
this.trigger('change', active);
|
||||
this.setData({ active });
|
||||
this.setData({
|
||||
active: active
|
||||
});
|
||||
this.setActiveTab();
|
||||
}
|
||||
},
|
||||
setLine() {
|
||||
setLine: function setLine() {
|
||||
var _this = this;
|
||||
|
||||
if (this.data.type !== 'line') {
|
||||
return;
|
||||
}
|
||||
this.getRect('.van-tab', true).then(rects => {
|
||||
const rect = rects[this.data.active];
|
||||
const width = this.data.lineWidth || rect.width;
|
||||
let left = rects
|
||||
.slice(0, this.data.active)
|
||||
.reduce((prev, curr) => prev + curr.width, 0);
|
||||
|
||||
this.getRect('.van-tab', true).then(function (rects) {
|
||||
var rect = rects[_this.data.active];
|
||||
var width = _this.data.lineWidth || rect.width;
|
||||
var left = rects.slice(0, _this.data.active).reduce(function (prev, curr) {
|
||||
return prev + curr.width;
|
||||
}, 0);
|
||||
left += (rect.width - width) / 2;
|
||||
this.setData({
|
||||
lineStyle: `
|
||||
width: ${width}px;
|
||||
background-color: ${this.data.color};
|
||||
transform: translateX(${left}px);
|
||||
transition-duration: ${this.data.duration}s;
|
||||
`
|
||||
|
||||
_this.setData({
|
||||
lineStyle: "\n width: " + width + "px;\n background-color: " + _this.data.color + ";\n transform: translateX(" + left + "px);\n transition-duration: " + _this.data.duration + "s;\n "
|
||||
});
|
||||
});
|
||||
},
|
||||
setActiveTab() {
|
||||
this.data.tabs.forEach((item, index) => {
|
||||
const data = {
|
||||
active: index === this.data.active
|
||||
setActiveTab: function setActiveTab() {
|
||||
var _this2 = this;
|
||||
|
||||
this.data.tabs.forEach(function (item, index) {
|
||||
var data = {
|
||||
active: index === _this2.data.active
|
||||
};
|
||||
|
||||
if (data.active) {
|
||||
data.inited = true;
|
||||
}
|
||||
|
||||
if (data.active !== item.instance.data.active) {
|
||||
item.instance.setData(data);
|
||||
}
|
||||
@ -132,19 +139,24 @@ VantComponent({
|
||||
this.scrollIntoView();
|
||||
},
|
||||
// scroll active tab into view
|
||||
scrollIntoView(immediate) {
|
||||
scrollIntoView: function scrollIntoView(immediate) {
|
||||
var _this3 = this;
|
||||
|
||||
if (!this.data.scrollable) {
|
||||
return;
|
||||
}
|
||||
this.getRect('.van-tab', true).then(tabRects => {
|
||||
const tabRect = tabRects[this.data.active];
|
||||
const offsetLeft = tabRects
|
||||
.slice(0, this.data.active)
|
||||
.reduce((prev, curr) => prev + curr.width, 0);
|
||||
const tabWidth = tabRect.width;
|
||||
this.getRect('.van-tabs__nav').then(navRect => {
|
||||
const navWidth = navRect.width;
|
||||
this.setData({
|
||||
|
||||
this.getRect('.van-tab', true).then(function (tabRects) {
|
||||
var tabRect = tabRects[_this3.data.active];
|
||||
var offsetLeft = tabRects.slice(0, _this3.data.active).reduce(function (prev, curr) {
|
||||
return prev + curr.width;
|
||||
}, 0);
|
||||
var tabWidth = tabRect.width;
|
||||
|
||||
_this3.getRect('.van-tabs__nav').then(function (navRect) {
|
||||
var navWidth = navRect.width;
|
||||
|
||||
_this3.setData({
|
||||
scrollLeft: offsetLeft - (navWidth - tabWidth) / 2
|
||||
});
|
||||
});
|
||||
|
4
dist/toast/index.js
vendored
4
dist/toast/index.js
vendored
@ -23,12 +23,12 @@ VantComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clear() {
|
||||
clear: function clear() {
|
||||
this.setData({
|
||||
show: false
|
||||
});
|
||||
},
|
||||
// for prevent touchmove
|
||||
noop() { }
|
||||
noop: function noop() {}
|
||||
}
|
||||
});
|
63
dist/toast/toast.js
vendored
63
dist/toast/toast.js
vendored
@ -1,5 +1,7 @@
|
||||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
||||
|
||||
import { isObj } from '../common/utils';
|
||||
const defaultOptions = {
|
||||
var defaultOptions = {
|
||||
type: 'text',
|
||||
mask: false,
|
||||
message: '',
|
||||
@ -11,42 +13,67 @@ const defaultOptions = {
|
||||
loadingType: 'circular',
|
||||
selector: '#van-toast'
|
||||
};
|
||||
let queue = [];
|
||||
let currentOptions = Object.assign({}, defaultOptions);
|
||||
var queue = [];
|
||||
|
||||
var currentOptions = _extends({}, defaultOptions);
|
||||
|
||||
function parseOptions(message) {
|
||||
return isObj(message) ? message : { message };
|
||||
return isObj(message) ? message : {
|
||||
message: message
|
||||
};
|
||||
}
|
||||
const Toast = (options = {}) => {
|
||||
options = Object.assign({}, currentOptions, parseOptions(options));
|
||||
const pages = getCurrentPages();
|
||||
const ctx = pages[pages.length - 1];
|
||||
const toast = ctx.selectComponent(options.selector);
|
||||
|
||||
var Toast = function Toast(options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
options = _extends({}, currentOptions, parseOptions(options));
|
||||
var pages = getCurrentPages();
|
||||
var ctx = pages[pages.length - 1];
|
||||
var toast = ctx.selectComponent(options.selector);
|
||||
delete options.selector;
|
||||
queue.push(toast);
|
||||
toast.setData(options);
|
||||
clearTimeout(toast.timer);
|
||||
|
||||
if (options.duration > 0) {
|
||||
toast.timer = setTimeout(() => {
|
||||
toast.timer = setTimeout(function () {
|
||||
toast.clear();
|
||||
queue = queue.filter(item => item !== toast);
|
||||
queue = queue.filter(function (item) {
|
||||
return item !== toast;
|
||||
});
|
||||
}, options.duration);
|
||||
}
|
||||
|
||||
return toast;
|
||||
};
|
||||
const createMethod = type => options => Toast(Object.assign({ type }, parseOptions(options)));
|
||||
['loading', 'success', 'fail'].forEach(method => {
|
||||
|
||||
var createMethod = function createMethod(type) {
|
||||
return function (options) {
|
||||
return Toast(_extends({
|
||||
type: type
|
||||
}, parseOptions(options)));
|
||||
};
|
||||
};
|
||||
|
||||
['loading', 'success', 'fail'].forEach(function (method) {
|
||||
Toast[method] = createMethod(method);
|
||||
});
|
||||
Toast.clear = () => {
|
||||
queue.forEach(toast => {
|
||||
|
||||
Toast.clear = function () {
|
||||
queue.forEach(function (toast) {
|
||||
toast.clear();
|
||||
});
|
||||
queue = [];
|
||||
};
|
||||
Toast.setDefaultOptions = options => {
|
||||
|
||||
Toast.setDefaultOptions = function (options) {
|
||||
Object.assign(currentOptions, options);
|
||||
};
|
||||
Toast.resetDefaultOptions = () => {
|
||||
currentOptions = Object.assign({}, defaultOptions);
|
||||
|
||||
Toast.resetDefaultOptions = function () {
|
||||
currentOptions = _extends({}, defaultOptions);
|
||||
};
|
||||
|
||||
export default Toast;
|
34
dist/tree-select/index.js
vendored
34
dist/tree-select/index.js
vendored
@ -1,5 +1,5 @@
|
||||
import { VantComponent } from '../common/component';
|
||||
const ITEM_HEIGHT = 44;
|
||||
var ITEM_HEIGHT = 44;
|
||||
VantComponent({
|
||||
props: {
|
||||
items: Array,
|
||||
@ -22,11 +22,11 @@ VantComponent({
|
||||
itemHeight: 0
|
||||
},
|
||||
watch: {
|
||||
items() {
|
||||
items: function items() {
|
||||
this.updateSubItems();
|
||||
this.updateMainHeight();
|
||||
},
|
||||
maxHeight() {
|
||||
maxHeight: function maxHeight() {
|
||||
this.updateItemHeight();
|
||||
this.updateMainHeight();
|
||||
},
|
||||
@ -34,27 +34,33 @@ VantComponent({
|
||||
},
|
||||
methods: {
|
||||
// 当一个子项被选择时
|
||||
onSelectItem(event) {
|
||||
onSelectItem: function onSelectItem(event) {
|
||||
this.$emit('click-item', event.currentTarget.dataset.item);
|
||||
},
|
||||
// 当一个导航被点击时
|
||||
onClickNav(event) {
|
||||
const { index } = event.currentTarget.dataset;
|
||||
this.$emit('click-nav', { index });
|
||||
onClickNav: function onClickNav(event) {
|
||||
var index = event.currentTarget.dataset.index;
|
||||
this.$emit('click-nav', {
|
||||
index: index
|
||||
});
|
||||
},
|
||||
// 更新子项列表
|
||||
updateSubItems() {
|
||||
const selectedItem = this.data.items[this.data.mainActiveIndex] || {};
|
||||
this.setData({ subItems: selectedItem.children || [] });
|
||||
updateSubItems: function updateSubItems() {
|
||||
var selectedItem = this.data.items[this.data.mainActiveIndex] || {};
|
||||
this.setData({
|
||||
subItems: selectedItem.children || []
|
||||
});
|
||||
this.updateItemHeight();
|
||||
},
|
||||
// 更新组件整体高度,根据最大高度和当前组件需要展示的高度来决定
|
||||
updateMainHeight() {
|
||||
const maxHeight = Math.max(this.data.items.length * ITEM_HEIGHT, this.data.subItems.length * ITEM_HEIGHT);
|
||||
this.setData({ mainHeight: Math.min(maxHeight, this.data.maxHeight) });
|
||||
updateMainHeight: function updateMainHeight() {
|
||||
var maxHeight = Math.max(this.data.items.length * ITEM_HEIGHT, this.data.subItems.length * ITEM_HEIGHT);
|
||||
this.setData({
|
||||
mainHeight: Math.min(maxHeight, this.data.maxHeight)
|
||||
});
|
||||
},
|
||||
// 更新子项列表高度,根据可展示的最大高度和当前子项列表的高度决定
|
||||
updateItemHeight() {
|
||||
updateItemHeight: function updateItemHeight() {
|
||||
this.setData({
|
||||
itemHeight: Math.min(this.data.subItems.length * ITEM_HEIGHT, this.data.maxHeight)
|
||||
});
|
||||
|
@ -25,6 +25,7 @@
|
||||
"@babel/core": "^7.1.0",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
|
||||
"@babel/preset-env": "^7.1.0",
|
||||
"@babel/preset-typescript": "^7.1.0",
|
||||
"autoprefixer": "^9.1.5",
|
||||
"babel-loader": "8.0.2",
|
||||
"cross-env": "^5.1.4",
|
||||
@ -34,10 +35,10 @@
|
||||
"fast-vue-md-loader": "^1.0.3",
|
||||
"gh-pages": "^2.0.0",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-babel": "^8.0.0",
|
||||
"gulp-clean-css": "^3.9.0",
|
||||
"gulp-postcss": "^8.0.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-typescript": "^5.0.0-alpha.3",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"postcss-calc": "^6.0.2",
|
||||
"postcss-easy-import": "^3.0.0",
|
||||
|
265
yarn.lock
265
yarn.lock
@ -304,6 +304,12 @@
|
||||
dependencies:
|
||||
"@babel/helper-plugin-utils" "^7.0.0"
|
||||
|
||||
"@babel/plugin-syntax-typescript@^7.0.0":
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.0.0.tgz#90f4fe0a741ae9c0dcdc3017717c05a0cbbd5158"
|
||||
dependencies:
|
||||
"@babel/helper-plugin-utils" "^7.0.0"
|
||||
|
||||
"@babel/plugin-transform-arrow-functions@^7.0.0":
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749"
|
||||
@ -484,6 +490,13 @@
|
||||
dependencies:
|
||||
"@babel/helper-plugin-utils" "^7.0.0"
|
||||
|
||||
"@babel/plugin-transform-typescript@^7.1.0":
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.1.0.tgz#81e7b4be90e7317cbd04bf1163ebf06b2adee60b"
|
||||
dependencies:
|
||||
"@babel/helper-plugin-utils" "^7.0.0"
|
||||
"@babel/plugin-syntax-typescript" "^7.0.0"
|
||||
|
||||
"@babel/plugin-transform-unicode-regex@^7.0.0":
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc"
|
||||
@ -538,6 +551,13 @@
|
||||
js-levenshtein "^1.1.3"
|
||||
semver "^5.3.0"
|
||||
|
||||
"@babel/preset-typescript@^7.1.0":
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.1.0.tgz#49ad6e2084ff0bfb5f1f7fb3b5e76c434d442c7f"
|
||||
dependencies:
|
||||
"@babel/helper-plugin-utils" "^7.0.0"
|
||||
"@babel/plugin-transform-typescript" "^7.1.0"
|
||||
|
||||
"@babel/template@7.0.0-beta.44":
|
||||
version "7.0.0-beta.44"
|
||||
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f"
|
||||
@ -896,10 +916,6 @@ ansi-colors@^1.0.1:
|
||||
dependencies:
|
||||
ansi-wrap "^0.1.0"
|
||||
|
||||
ansi-colors@^2.0.2:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-2.0.5.tgz#5da37825fef3e75f3bda47f760d64bfd10e15e10"
|
||||
|
||||
ansi-escapes@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30"
|
||||
@ -947,12 +963,6 @@ app-root-path@^2.0.1:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.1.0.tgz#98bf6599327ecea199309866e8140368fd2e646a"
|
||||
|
||||
append-buffer@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1"
|
||||
dependencies:
|
||||
buffer-equal "^1.0.0"
|
||||
|
||||
aproba@^1.0.3, aproba@^1.1.1:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
|
||||
@ -1264,10 +1274,6 @@ browserslist@^4.1.0:
|
||||
electron-to-chromium "^1.3.62"
|
||||
node-releases "^1.0.0-alpha.11"
|
||||
|
||||
buffer-equal@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe"
|
||||
|
||||
buffer-from@^1.0.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
|
||||
@ -1517,18 +1523,10 @@ cliui@^4.0.0:
|
||||
strip-ansi "^4.0.0"
|
||||
wrap-ansi "^2.0.0"
|
||||
|
||||
clone-buffer@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
|
||||
|
||||
clone-stats@^0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"
|
||||
|
||||
clone-stats@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
|
||||
|
||||
clone@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f"
|
||||
@ -1537,18 +1535,6 @@ clone@^1.0.0, clone@^1.0.2:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
|
||||
|
||||
clone@^2.1.1:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
|
||||
|
||||
cloneable-readable@^1.0.0:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.2.tgz#d591dee4a8f8bc15da43ce97dceeba13d43e2a65"
|
||||
dependencies:
|
||||
inherits "^2.0.1"
|
||||
process-nextick-args "^2.0.0"
|
||||
readable-stream "^2.3.5"
|
||||
|
||||
co@^4.6.0:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
||||
@ -1678,7 +1664,7 @@ content-type@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
|
||||
|
||||
convert-source-map@^1.1.0, convert-source-map@^1.5.0:
|
||||
convert-source-map@^1.1.0:
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20"
|
||||
dependencies:
|
||||
@ -2587,7 +2573,7 @@ flatten@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
|
||||
|
||||
flush-write-stream@^1.0.0, flush-write-stream@^1.0.2:
|
||||
flush-write-stream@^1.0.0:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd"
|
||||
dependencies:
|
||||
@ -2647,13 +2633,6 @@ fs-minipass@^1.2.5:
|
||||
dependencies:
|
||||
minipass "^2.2.1"
|
||||
|
||||
fs-mkdirp-stream@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb"
|
||||
dependencies:
|
||||
graceful-fs "^4.1.11"
|
||||
through2 "^2.0.3"
|
||||
|
||||
fs-write-stream-atomic@^1.0.8:
|
||||
version "1.0.10"
|
||||
resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9"
|
||||
@ -2748,21 +2727,6 @@ glob-stream@^3.1.5:
|
||||
through2 "^0.6.1"
|
||||
unique-stream "^1.0.0"
|
||||
|
||||
glob-stream@^6.1.0:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4"
|
||||
dependencies:
|
||||
extend "^3.0.0"
|
||||
glob "^7.1.1"
|
||||
glob-parent "^3.1.0"
|
||||
is-negated-glob "^1.0.0"
|
||||
ordered-read-streams "^1.0.0"
|
||||
pumpify "^1.3.5"
|
||||
readable-stream "^2.1.5"
|
||||
remove-trailing-separator "^1.0.1"
|
||||
to-absolute-glob "^2.0.0"
|
||||
unique-stream "^2.0.2"
|
||||
|
||||
glob-watcher@^0.0.6:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b"
|
||||
@ -2795,7 +2759,7 @@ glob@^7.0.0:
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2:
|
||||
glob@^7.0.3, glob@^7.0.5, glob@^7.1.2:
|
||||
version "7.1.2"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
||||
dependencies:
|
||||
@ -2903,7 +2867,7 @@ graceful-fs@^3.0.0:
|
||||
dependencies:
|
||||
natives "^1.1.0"
|
||||
|
||||
graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
|
||||
graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
|
||||
version "4.1.11"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
|
||||
|
||||
@ -2911,6 +2875,15 @@ graceful-fs@~1.2.0:
|
||||
version "1.2.3"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364"
|
||||
|
||||
gulp-babel@^8.0.0:
|
||||
version "8.0.0"
|
||||
resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-8.0.0.tgz#e0da96f4f2ec4a88dd3a3030f476e38ab2126d87"
|
||||
dependencies:
|
||||
plugin-error "^1.0.1"
|
||||
replace-ext "^1.0.0"
|
||||
through2 "^2.0.0"
|
||||
vinyl-sourcemaps-apply "^0.2.0"
|
||||
|
||||
gulp-clean-css@^3.9.0:
|
||||
version "3.10.0"
|
||||
resolved "https://registry.yarnpkg.com/gulp-clean-css/-/gulp-clean-css-3.10.0.tgz#bccd4605eff104bfa4980014cc4b3c24c571736d"
|
||||
@ -2934,17 +2907,6 @@ gulp-rename@^1.2.2:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.4.0.tgz#de1c718e7c4095ae861f7296ef4f3248648240bd"
|
||||
|
||||
gulp-typescript@^5.0.0-alpha.3:
|
||||
version "5.0.0-alpha.3"
|
||||
resolved "https://registry.yarnpkg.com/gulp-typescript/-/gulp-typescript-5.0.0-alpha.3.tgz#c49a306cbbb8c97f5fe8a79208671b6642ef9861"
|
||||
dependencies:
|
||||
ansi-colors "^2.0.2"
|
||||
plugin-error "^1.0.1"
|
||||
source-map "^0.7.3"
|
||||
through2 "^2.0.3"
|
||||
vinyl "^2.1.0"
|
||||
vinyl-fs "^3.0.3"
|
||||
|
||||
gulp-util@^3.0.0:
|
||||
version "3.0.8"
|
||||
resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
|
||||
@ -3455,10 +3417,6 @@ is-installed-globally@^0.1.0:
|
||||
global-dirs "^0.1.0"
|
||||
is-path-inside "^1.0.0"
|
||||
|
||||
is-negated-glob@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2"
|
||||
|
||||
is-npm@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4"
|
||||
@ -3541,14 +3499,10 @@ is-unc-path@^1.0.0:
|
||||
dependencies:
|
||||
unc-path-regex "^0.1.2"
|
||||
|
||||
is-utf8@^0.2.0, is-utf8@^0.2.1:
|
||||
is-utf8@^0.2.0:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
|
||||
|
||||
is-valid-glob@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa"
|
||||
|
||||
is-windows@^1.0.0, is-windows@^1.0.1, is-windows@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
|
||||
@ -3622,12 +3576,6 @@ json-stable-stringify-without-jsonify@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
|
||||
|
||||
json-stable-stringify@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af"
|
||||
dependencies:
|
||||
jsonify "~0.0.0"
|
||||
|
||||
json-stringify-safe@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
||||
@ -3642,10 +3590,6 @@ jsonfile@^4.0.0:
|
||||
optionalDependencies:
|
||||
graceful-fs "^4.1.6"
|
||||
|
||||
jsonify@~0.0.0:
|
||||
version "0.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
|
||||
|
||||
keygrip@~1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.0.2.tgz#ad3297c557069dea8bcfe7a4fa491b75c5ddeb91"
|
||||
@ -3742,24 +3686,12 @@ latest-version@^3.0.0:
|
||||
dependencies:
|
||||
package-json "^4.0.0"
|
||||
|
||||
lazystream@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4"
|
||||
dependencies:
|
||||
readable-stream "^2.0.5"
|
||||
|
||||
lcid@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf"
|
||||
dependencies:
|
||||
invert-kv "^2.0.0"
|
||||
|
||||
lead@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42"
|
||||
dependencies:
|
||||
flush-write-stream "^1.0.2"
|
||||
|
||||
levn@^0.3.0, levn@~0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
|
||||
@ -4477,12 +4409,6 @@ normalize-url@^1.0.0:
|
||||
query-string "^4.1.0"
|
||||
sort-keys "^1.0.0"
|
||||
|
||||
now-and-later@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.0.tgz#bc61cbb456d79cb32207ce47ca05136ff2e7d6ee"
|
||||
dependencies:
|
||||
once "^1.3.2"
|
||||
|
||||
npm-bundled@^1.0.1:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308"
|
||||
@ -4553,7 +4479,7 @@ object-visit@^1.0.0:
|
||||
dependencies:
|
||||
isobject "^3.0.0"
|
||||
|
||||
object.assign@^4.0.1, object.assign@^4.0.4, object.assign@^4.1.0:
|
||||
object.assign@^4.0.1, object.assign@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da"
|
||||
dependencies:
|
||||
@ -4597,7 +4523,7 @@ on-finished@^2.3.0:
|
||||
dependencies:
|
||||
ee-first "1.1.1"
|
||||
|
||||
once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0:
|
||||
once@^1.3.0, once@^1.3.1, once@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
dependencies:
|
||||
@ -4648,12 +4574,6 @@ ordered-read-streams@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126"
|
||||
|
||||
ordered-read-streams@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e"
|
||||
dependencies:
|
||||
readable-stream "^2.0.1"
|
||||
|
||||
os-browserify@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27"
|
||||
@ -5287,7 +5207,7 @@ private@^0.1.6:
|
||||
version "0.1.8"
|
||||
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
|
||||
|
||||
process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
|
||||
process-nextick-args@~2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
|
||||
|
||||
@ -5340,7 +5260,7 @@ pump@^2.0.0, pump@^2.0.1:
|
||||
end-of-stream "^1.1.0"
|
||||
once "^1.3.1"
|
||||
|
||||
pumpify@^1.3.3, pumpify@^1.3.5:
|
||||
pumpify@^1.3.3:
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce"
|
||||
dependencies:
|
||||
@ -5426,7 +5346,7 @@ read-pkg@^3.0.0:
|
||||
normalize-package-data "^2.3.2"
|
||||
path-type "^3.0.0"
|
||||
|
||||
"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6:
|
||||
"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6:
|
||||
version "2.3.6"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
|
||||
dependencies:
|
||||
@ -5576,21 +5496,6 @@ remove-array-items@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/remove-array-items/-/remove-array-items-1.0.0.tgz#07bf42cb332f4cf6e85ead83b5e4e896d2326b21"
|
||||
|
||||
remove-bom-buffer@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53"
|
||||
dependencies:
|
||||
is-buffer "^1.1.5"
|
||||
is-utf8 "^0.2.1"
|
||||
|
||||
remove-bom-stream@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz#05f1a593f16e42e1fb90ebf59de8e569525f9523"
|
||||
dependencies:
|
||||
remove-bom-buffer "^3.0.0"
|
||||
safe-buffer "^5.1.0"
|
||||
through2 "^2.0.3"
|
||||
|
||||
remove-trailing-separator@^1.0.1:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
|
||||
@ -5661,12 +5566,6 @@ resolve-from@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
|
||||
|
||||
resolve-options@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131"
|
||||
dependencies:
|
||||
value-or-function "^3.0.0"
|
||||
|
||||
resolve-path@^1.3.3:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve-path/-/resolve-path-1.4.0.tgz#c4bda9f5efb2fce65247873ab36bb4d834fe16f7"
|
||||
@ -5923,10 +5822,6 @@ source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
|
||||
source-map@^0.7.3:
|
||||
version "0.7.3"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
|
||||
|
||||
sparkles@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c"
|
||||
@ -6172,14 +6067,7 @@ thenify-all@^1.0.0:
|
||||
dependencies:
|
||||
any-promise "^1.0.0"
|
||||
|
||||
through2-filter@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec"
|
||||
dependencies:
|
||||
through2 "~2.0.0"
|
||||
xtend "~4.0.0"
|
||||
|
||||
through2@2.0.3, through2@^2.0.0, through2@^2.0.3, through2@~2.0.0:
|
||||
through2@2.0.3, through2@^2.0.0:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
|
||||
dependencies:
|
||||
@ -6227,13 +6115,6 @@ tmp@^0.0.33:
|
||||
dependencies:
|
||||
os-tmpdir "~1.0.2"
|
||||
|
||||
to-absolute-glob@^2.0.0:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b"
|
||||
dependencies:
|
||||
is-absolute "^1.0.0"
|
||||
is-negated-glob "^1.0.0"
|
||||
|
||||
to-arraybuffer@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
|
||||
@ -6264,12 +6145,6 @@ to-regex@^3.0.1, to-regex@^3.0.2:
|
||||
regex-not "^1.0.2"
|
||||
safe-regex "^1.1.0"
|
||||
|
||||
to-through@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/to-through/-/to-through-2.0.0.tgz#fc92adaba072647bc0b67d6b03664aa195093af6"
|
||||
dependencies:
|
||||
through2 "^2.0.3"
|
||||
|
||||
toidentifier@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
|
||||
@ -6404,13 +6279,6 @@ unique-stream@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b"
|
||||
|
||||
unique-stream@^2.0.2:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369"
|
||||
dependencies:
|
||||
json-stable-stringify "^1.0.0"
|
||||
through2-filter "^2.0.0"
|
||||
|
||||
unique-string@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a"
|
||||
@ -6542,10 +6410,6 @@ validate-npm-package-license@^3.0.1:
|
||||
spdx-correct "^3.0.0"
|
||||
spdx-expression-parse "^3.0.0"
|
||||
|
||||
value-or-function@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813"
|
||||
|
||||
vant-doc@^1.0.17:
|
||||
version "1.0.17"
|
||||
resolved "https://registry.yarnpkg.com/vant-doc/-/vant-doc-1.0.17.tgz#2897598260b6e670f6b1214adcbceccc3f4a919b"
|
||||
@ -6574,41 +6438,7 @@ vinyl-fs@^0.3.0:
|
||||
through2 "^0.6.1"
|
||||
vinyl "^0.4.0"
|
||||
|
||||
vinyl-fs@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7"
|
||||
dependencies:
|
||||
fs-mkdirp-stream "^1.0.0"
|
||||
glob-stream "^6.1.0"
|
||||
graceful-fs "^4.0.0"
|
||||
is-valid-glob "^1.0.0"
|
||||
lazystream "^1.0.0"
|
||||
lead "^1.0.0"
|
||||
object.assign "^4.0.4"
|
||||
pumpify "^1.3.5"
|
||||
readable-stream "^2.3.3"
|
||||
remove-bom-buffer "^3.0.0"
|
||||
remove-bom-stream "^1.2.0"
|
||||
resolve-options "^1.1.0"
|
||||
through2 "^2.0.0"
|
||||
to-through "^2.0.0"
|
||||
value-or-function "^3.0.0"
|
||||
vinyl "^2.0.0"
|
||||
vinyl-sourcemap "^1.1.0"
|
||||
|
||||
vinyl-sourcemap@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz#92a800593a38703a8cdb11d8b300ad4be63b3e16"
|
||||
dependencies:
|
||||
append-buffer "^1.0.2"
|
||||
convert-source-map "^1.5.0"
|
||||
graceful-fs "^4.1.6"
|
||||
normalize-path "^2.1.1"
|
||||
now-and-later "^2.0.0"
|
||||
remove-bom-buffer "^3.0.0"
|
||||
vinyl "^2.0.0"
|
||||
|
||||
vinyl-sourcemaps-apply@0.2.1, vinyl-sourcemaps-apply@^0.2.1:
|
||||
vinyl-sourcemaps-apply@0.2.1, vinyl-sourcemaps-apply@^0.2.0, vinyl-sourcemaps-apply@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705"
|
||||
dependencies:
|
||||
@ -6629,17 +6459,6 @@ vinyl@^0.5.0:
|
||||
clone-stats "^0.0.1"
|
||||
replace-ext "0.0.1"
|
||||
|
||||
vinyl@^2.0.0, vinyl@^2.1.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86"
|
||||
dependencies:
|
||||
clone "^2.1.1"
|
||||
clone-buffer "^1.0.0"
|
||||
clone-stats "^1.0.0"
|
||||
cloneable-readable "^1.0.0"
|
||||
remove-trailing-separator "^1.0.1"
|
||||
replace-ext "^1.0.0"
|
||||
|
||||
vm-browserify@0.0.4:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
|
||||
@ -6905,7 +6724,7 @@ xregexp@4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020"
|
||||
|
||||
"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1:
|
||||
"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user