1 line
17 KiB
Plaintext
1 line
17 KiB
Plaintext
|
{"version":3,"file":"wd-picker.js","sources":["../../../../../../../node_modules/wot-design-uni/components/wd-picker/wd-picker.vue","../../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL25vZGVfbW9kdWxlcy93b3QtZGVzaWduLXVuaS9jb21wb25lbnRzL3dkLXBpY2tlci93ZC1waWNrZXIudnVl"],"sourcesContent":["<template>\n <view\n :class=\"`wd-picker ${disabled ? 'is-disabled' : ''} ${size ? 'is-' + size : ''} ${cell.border.value ? 'is-border' : ''} ${\n alignRight ? 'is-align-right' : ''\n } ${error ? 'is-error' : ''} ${customClass}`\"\n :style=\"customStyle\"\n >\n <view class=\"wd-picker__field\" @click=\"showPopup\">\n <slot v-if=\"useDefaultSlot\"></slot>\n <view v-else class=\"wd-picker__cell\">\n <view\n v-if=\"label || useLabelSlot\"\n :class=\"`wd-picker__label ${customLabelClass} ${isRequired ? 'is-required' : ''}`\"\n :style=\"labelWidth ? 'min-width:' + labelWidth + ';max-width:' + labelWidth + ';' : ''\"\n >\n <template v-if=\"label\">{{ label }}</template>\n <slot v-else name=\"label\"></slot>\n </view>\n <view class=\"wd-picker__body\">\n <view class=\"wd-picker__value-wraper\">\n <view :class=\"`wd-picker__value ${ellipsis && 'is-ellipsis'} ${customValueClass} ${showValue ? '' : 'wd-picker__placeholder'}`\">\n {{ showValue ? showValue : placeholder || translate('placeholder') }}\n </view>\n <wd-icon v-if=\"!disabled && !readonly\" custom-class=\"wd-picker__arrow\" name=\"arrow-right\" />\n </view>\n <view v-if=\"errorMessage\" class=\"wd-picker__error-message\">{{ errorMessage }}</view>\n </view>\n </view>\n </view>\n <wd-popup\n v-model=\"popupShow\"\n position=\"bottom\"\n :hide-when-close=\"false\"\n :close-on-click-modal=\"closeOnClickModal\"\n :z-index=\"zIndex\"\n :safe-area-inset-bottom=\"safeAreaInsetBottom\"\n @close=\"onCancel\"\n custom-class=\"wd-picker__popup\"\n >\n <view class=\"wd-picker__wraper\">\n <view class=\"wd-picker__toolbar\" @touchmove=\"noop\">\n <view class=\"wd-picker__action wd-picker__action--cancel\" @click=\"onCancel\">\n {{ cancelButtonText || translate('cancel') }}\n </view>\n <view v-if=\"title\" class=\"wd-picker__title\">{{ title }}</view>\n <view :class=\"`wd-picker__action ${isLoading ? 'is-loading' : ''}`\" @click=\"onConfirm\">\n {{ confirmButtonText || translate('done') }}\n </view>\n </view>\n <wd-picker-view\n ref=\"pickerViewWd\"\n :custom-class=\"customViewClass\"\n v-model=\"pickerValue\"\n :columns=\"displayColumns\"\n :loading=\"isLoading\"\n :loading-color=\"loadingColor\"\n :columns-height=\"columnsHeight\"\n :value-key=\"valueKey\"\n :label-key=\"labelKey\"\n :immediate-change=\"immediateChange\"\n @change=\"pickerViewChange\"\n @pickstart=\"onPickStart\"\n @pickend=\"onPickEnd\"\n :column-change=\"columnChange\"\n />\n </view>\n </wd-popup>\n </view>\n</template>\n\n<script lang=\"ts\">\nexport default {\n name: 'wd-picker',\n options: {\n virtualHost: true,\n addGlobalClass: true,\n styleIsolation: 'shared'\n }\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport { getCurrentInstance, onBeforeMount, ref, watch, computed, onMounted, nextTick } from 'vue'\nimport { deepClone, defaultDisplayFormat, getType, isArray, isDef, isFunction } from '../common/util'\nimport { useCell } from '../composables/useCell'\nimport { type ColumnItem, formatArray, type PickerViewInstance } from '../wd-picker-view/types'\nimport { FORM_KEY, type FormItemRule } from '../wd-form/types'\nimport { useParent } from '../composables/useParent'\nimport { useTranslate } from '../composables/useTranslate'\nimport { pickerProps, type PickerExpose } from './types'\nconst { translate } = useTranslate('picker')\n\ncon
|