<template>
<uni-shadow-root class="vant-picker-column-index"><view class="van-picker-column custom-class" :style="'height: '+(itemHeight * visibleItemCount)+'px'" @touchstart="onTouchStart" @touchmove.stop.prevent="onTouchMove" @touchend="onTouchEnd" @touchcancel="onTouchEnd">
  <view :style="wrapperStyle">
    <view v-for="(option,index) in (options)" :key="option.index" :data-index="index" :style="'height: '+(itemHeight)+'px'" :class="'van-ellipsis van-picker-column__item '+(option && option.disabled ? 'van-picker-column__item--disabled' : '')+' '+(index === currentIndex ? 'van-picker-column__item--selected active-class' : '')" @click="onClickItem">{{ getOptionText(option, valueKey) }}</view>
  </view>
</view></uni-shadow-root>
</template>
<wxs src="./index.wxs" module="getOptionText"></wxs>
<script>

global['__wxRoute'] = 'vant/picker-column/index'
"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var component_1 = require('./../common/component.js');
var utils_1 = require('./../common/utils.js');
var DEFAULT_DURATION = 200;
component_1.VantComponent({
    classes: ['active-class'],
    props: {
        valueKey: String,
        className: String,
        itemHeight: Number,
        visibleItemCount: Number,
        initialOptions: {
            type: Array,
            value: []
        },
        defaultIndex: {
            type: Number,
            value: 0
        }
    },
    data: {
        startY: 0,
        offset: 0,
        duration: 0,
        startOffset: 0,
        options: [],
        currentIndex: 0
    },
    created: function created() {
        var _this = this;
        var _a = this.data,
            defaultIndex = _a.defaultIndex,
            initialOptions = _a.initialOptions;
        this.set({
            currentIndex: defaultIndex,
            options: initialOptions
        }).then(function () {
            _this.setIndex(defaultIndex);
        });
    },
    computed: {
        count: function count() {
            return this.data.options.length;
        },
        baseOffset: function baseOffset() {
            var data = this.data;
            return data.itemHeight * (data.visibleItemCount - 1) / 2;
        },
        wrapperStyle: function wrapperStyle() {
            var data = this.data;
            return ["transition: " + data.duration + "ms", "transform: translate3d(0, " + (data.offset + data.baseOffset) + "px, 0)", "line-height: " + data.itemHeight + "px"].join('; ');
        }
    },
    watch: {
        defaultIndex: function defaultIndex(value) {
            this.setIndex(value);
        }
    },
    methods: {
        onTouchStart: function onTouchStart(event) {
            this.set({
                startY: event.touches[0].clientY,
                startOffset: this.data.offset,
                duration: 0
            });
        },
        onTouchMove: function onTouchMove(event) {
            var data = this.data;
            var deltaY = event.touches[0].clientY - data.startY;
            this.set({
                offset: utils_1.range(data.startOffset + deltaY, -(data.count * data.itemHeight), data.itemHeight)
            });
        },
        onTouchEnd: function onTouchEnd() {
            var data = this.data;
            if (data.offset !== data.startOffset) {
                this.set({
                    duration: DEFAULT_DURATION
                });
                var index = utils_1.range(Math.round(-data.offset / data.itemHeight), 0, data.count - 1);
                this.setIndex(index, true);
            }
        },
        onClickItem: function onClickItem(event) {
            var index = event.currentTarget.dataset.index;
            this.setIndex(index, true);
        },
        adjustIndex: function adjustIndex(index) {
            var data = this.data;
            index = utils_1.range(index, 0, data.count);
            for (var i = index; i < data.count; i++) {
                if (!this.isDisabled(data.options[i])) return i;
            }
            for (var i = index - 1; i >= 0; i--) {
                if (!this.isDisabled(data.options[i])) return i;
            }
        },
        isDisabled: function isDisabled(option) {
            return utils_1.isObj(option) && option.disabled;
        },
        getOptionText: function getOptionText(option) {
            var data = this.data;
            return utils_1.isObj(option) && data.valueKey in option ? option[data.valueKey] : option;
        },
        setIndex: function setIndex(index, userAction) {
            var _this = this;
            var data = this.data;
            index = this.adjustIndex(index) || 0;
            var offset = -index * data.itemHeight;
            if (index !== data.currentIndex) {
                return this.set({ offset: offset, currentIndex: index }).then(function () {
                    userAction && _this.$emit('change', index);
                });
            }
            return this.set({ offset: offset });
        },
        setValue: function setValue(value) {
            var options = this.data.options;
            for (var i = 0; i < options.length; i++) {
                if (this.getOptionText(options[i]) === value) {
                    return this.setIndex(i);
                }
            }
            return Promise.resolve();
        },
        getValue: function getValue() {
            var data = this.data;
            return data.options[data.currentIndex];
        }
    }
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbIk9iamVjdCIsInZhbHVlIi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udmFyIHV0aWxzXzEgPSByZXF1aXJlKFwiLi4vY29tbW9uL3V0aWxzXCIpO1xudmFyIERFRkFVTFRfRFVSQVRJT04gPSAyMDA7XG5jb21wb25lbnRfMS5WYW50Q29tcG9uZW50KHtcbiAgICBjbGFzc2VzOiBbJ2FjdGl2ZS1jbGFzcyddLFxuICAgIHByb3BzOiB7XG4gICAgICAgIHZhbHVlS2V5OiBTdHJpbmcsXG4gICAgICAgIGNsYXNzTmFtZTogU3RyaW5nLFxuICAgICAgICBpdGVtSGVpZ2h0OiBOdW1iZXIsXG4gICAgICAgIHZpc2libGVJdGVtQ291bnQ6IE51bWJlcixcbiAgICAgICAgaW5pdGlhbE9wdGlvbnM6IHtcbiAgICAgICAgICAgIHR5cGU6IEFycmF5LFxuICAgICAgICAgICAgdmFsdWU6IFtdXG4gICAgICAgIH0sXG4gICAgICAgIGRlZmF1bHRJbmRleDoge1xuICAgICAgICAgICAgdHlwZTogTnVtYmVyLFxuICAgICAgICAgICAgdmFsdWU6IDBcbiAgICAgICAgfVxuICAgIH0sXG4gICAgZGF0YToge1xuICAgICAgICBzdGFydFk6IDAsXG4gICAgICAgIG9mZnNldDogMCxcbiAgICAgICAgZHVyYXRpb246IDAsXG4gICAgICAgIHN0YXJ0T2Zmc2V0OiAwLFxuICAgICAgICBvcHRpb25zOiBbXSxcbiAgICAgICAgY3VycmVudEluZGV4OiAwXG4gICAgfSxcbiAgICBjcmVhdGVkOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHZhciBfYSA9IHRoaXMuZGF0YSwgZGVmYXVsdEluZGV4ID0gX2EuZGVmYXVsdEluZGV4LCBpbml0aWFsT3B0aW9ucyA9IF9hLmluaXRpYWxPcHRpb25zO1xuICAgICAgICB0aGlzLnNldCh7XG4gICAgICAgICAgICBjdXJyZW50SW5kZXg6IGRlZmF1bHRJbmRleCxcbiAgICAgICAgICAgIG9wdGlvbnM6IGluaXRpYWxPcHRpb25zXG4gICAgICAgIH0pLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgX3RoaXMuc2V0SW5kZXgoZGVmYXVsdEluZGV4KTtcbiAgICAgICAgfSk7XG4gICAgfSxcbiAgICBjb21wdXRlZDoge1xuICAgICAgICBjb3VudDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZGF0YS5vcHRpb25zLmxlbmd0aDtcbiAgICAgICAgfSxcbiAgICAgICAgYmFzZU9mZnNldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGRhdGEgPSB0aGlzLmRhdGE7XG4gICAgICAgICAgICByZXR1cm4gKGRhdGEuaXRlbUhlaWdodCAqIChkYXRhLnZpc2libGVJdGVtQ291bnQgLSAxKSkgLyAyO1xuICAgICAgICB9LFxuICAgICAgICB3cmFwcGVyU3R5bGU6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBkYXRhID0gdGhpcy5kYXRhO1xuICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICBcInRyYW5zaXRpb246IFwiICsgZGF0YS5kdXJhdGlvbiArIFwibXNcIixcbiAgICAgICAgICAgICAgICBcInRyYW5zZm9ybTogdHJhbnNsYXRlM2QoMCwgXCIgKyAoZGF0YS5vZmZzZXQgKyBkYXRhLmJhc2VPZmZzZXQpICsgXCJweCwgMClcIixcbiAgICAgICAgICAgICAgICBcImxpbmUtaGVpZ2h0OiBcIiArIGRhdGEuaXRlbUhlaWdodCArIFwicHhcIlxuICAgICAgICAgICAgXS5qb2luKCc7ICcpO1xuICAgICAgICB9XG4gICAgfSxcbiAgICB3YXRjaDoge1xuICAgICAgICBkZWZhdWx0SW5kZXg6IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgdGhpcy5zZXRJbmRleCh2YWx1ZSk7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1ldGhvZHM6IHtcbiAgICAgICAgb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gLSAxKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNldEluZGV4KGluZGV4LCB0cnVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgb25DbGlja0l0ZW06IGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgdmFyIGluZGV4ID0gZXZlbnQuY3VycmVudFRhcmdldC5kYXRhc2V0LmluZGV4O1xuICAgICAgICAgICAgdGhpcy5zZXRJbmRleChpbmRleCwgdHJ1ZSk7XG4gICAgICAgIH0sXG4gICAgICAgIGFkanVzdEluZGV4OiBmdW5jdGlvbiAoaW5kZXgpIHtcbiAgICAgICAgICAgIHZhciBkYXRhID0gdGhpcy5kYXRhO1xuICAgICAgICAgICAgaW5kZXggPSB1dGlsc18xLnJhbmdlKGluZGV4LCAwLCBkYXRhLmNvdW50KTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSBpbmRleDsgaSA8IGRhdGEuY291bnQ7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5pc0Rpc2FibGVkKGRhdGEub3B0aW9uc1tpXSkpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IGluZGV4IC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuaXNEaXNhYmxlZChkYXRhLm9wdGlvbnNbaV0pKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgaXNEaXNhYmxlZDogZnVuY3Rpb24gKG9wdGlvbikge1xuICAgICAgICAgICAgcmV0dXJuIHV0aWxzXzEuaXNPYmoob3B0aW9uKSAmJiBvcHRpb24uZGlzYWJsZWQ7XG4gICAgICAgIH0sXG4gICAgICAgIGdldE9wdGlvblRleHQ6IGZ1bmN0aW9uIChvcHRpb24pIHtcbiAgICAgICAgICAgIHZhciBkYXRhID0gdGhpcy5kYXRhO1xuICAgICAgICAgICAgcmV0dXJuIHV0aWxzXzEuaXNPYmoob3B0aW9uKSAmJiBkYXRhLnZhbHVlS2V5IGluIG9wdGlvblxuICAgICAgICAgICAgICAgID8gb3B0aW9uW2RhdGEudmFsdWVLZXldXG4gICAgICAgICAgICAgICAgOiBvcHRpb247XG4gICAgICAgIH0sXG4gICAgICAgIHNldEluZGV4OiBmdW5jdGlvbiAoaW5kZXgsIHVzZXJBY3Rpb24pIHtcbiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgICAgICB2YXIgZGF0YSA9IHRoaXMuZGF0YTtcbiAgICAgICAgICAgIGluZGV4ID0gdGhpcy5hZGp1c3RJbmRleChpbmRleCkgfHwgMDtcbiAgICAgICAgICAgIHZhciBvZmZzZXQgPSAtaW5kZXggKiBkYXRhLml0ZW1IZWlnaHQ7XG4gICAgICAgICAgICBpZiAoaW5kZXggIT09IGRhdGEuY3VycmVudEluZGV4KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuc2V0KHsgb2Zmc2V0OiBvZmZzZXQsIGN1cnJlbnRJbmRleDogaW5kZXggfSkudGhlbihmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHVzZXJBY3Rpb24gJiYgX3RoaXMuJGVtaXQoJ2NoYW5nZScsIGluZGV4KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0aGlzLnNldCh7IG9mZnNldDogb2Zmc2V0IH0pO1xuICAgICAgICB9LFxuICAgICAgICBzZXRWYWx1ZTogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB2YXIgb3B0aW9ucyA9IHRoaXMuZGF0YS5vcHRpb25zO1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBvcHRpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZ2V0T3B0aW9uVGV4dChvcHRpb25zW2ldKSA9PT0gdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuc2V0SW5kZXgoaSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIFByb21pc2UucmVzb2x2ZSgpO1xuICAgICAgICB9LFxuICAgICAgICBnZXRWYWx1ZTogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGRhdGEgPSB0aGlzLmRhdGE7XG4gICAgICAgICAgICByZXR1cm4gZGF0YS5vcHRpb25zW2RhdGEuY3VycmVudEluZGV4XTtcbiAgICAgICAgfVxuICAgIH1cbn0pO1xuIl0sImZpbGUiOiJpbmRleC5qcyJ9
export default global['__wxComponents']['vant/picker-column/index']
</script>
<style platform="mp-weixin">
@import '../common/index.css';.van-picker-column{overflow:hidden;font-size:16px;color:#999;text-align:center}.van-picker-column__item{padding:0 5px}.van-picker-column__item--selected{font-weight:500;color:#333}.van-picker-column__item--disabled{opacity:.3}
</style>