| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857 |
- <template>
- <view class="uni-stat__select" :class="{ 'uni-stat__select_disabled': disabled }">
- <view class="uni-stat-box">
- <view class="uni-select">
- <view class="uni-select__input-box" :style="{ height: multiple ? '100%' : '25px' }" @click="toggleSelector">
- <!-- 多选不搜索 -->
- <view class="" style="display: flex; flex-wrap: wrap; width: 100%" v-if="multiple && current.length > 0">
- <view class="tag-calss" v-for="(item, index) in collapseTags ? current.slice(0, collapseTagsNum) : current" :key="item[map.value]">
- <span class="text">{{ item[map.text] }}</span>
- <view class="" @click.stop="delItem(item)">
- <uni-icons type="clear" style="margin-left: 4px" color="#c0c4cc" />
- </view>
- </view>
- <view v-if="current.length > collapseTagsNum && collapseTags" class="tag-calss">
- <span class="text">+{{ current.length - collapseTagsNum }}</span>
- </view>
- <input
- v-if="filterable && !disabled"
- @input="inputChange"
- class="uni-select__input-text"
- type="text"
- style="font-size: 12px; height: 52rpx; margin-left: 6px; width: auto"
- confirm-type="search"
- placeholder="请输入"
- @confirm="confirm"
- v-model="filterInput"
- />
- </view>
- <view v-else-if="current && current.length > 0 && !showSelector" class="uni-select__input-text">
- {{ current }}
- </view>
- <input
- v-else-if="filterable"
- :focus="isFocus"
- @input="inputChange"
- :disabled="disabled"
- confirm-type="search"
- @confirm="confirm"
- class="uni-select__input-text"
- type="text"
- style="font-size: 12px; position: absolute; z-index: 1"
- :placeholder="placeholderOld"
- v-model="filterInput"
- />
- <view v-else class="uni-select__input-text uni-select__input-placeholder">{{ placeholderOld }}</view>
- <uni-icons
- v-if="(current.length > 0 && clear && !disabled) || (currentArr.length > 0 && clear && !disabled)"
- type="clear"
- color="#c0c4cc"
- size="24"
- style="position: absolute; right: 0"
- @click="clearVal"
- />
- <uni-icons
- style="right: 0; position: absolute; top: 50%; transform: translate(0, -50%)"
- v-else
- :type="showSelector ? 'top' : 'bottom'"
- size="14"
- color="#999"
- />
- </view>
- </view>
- </view>
- <view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
- <view class="uni-select__selector" :class="isDown ? 'uni-select__selector__down' : 'uni-select__selector__upwards'" v-if="showSelector">
- <view class="uni-popper__arrow"></view>
- <view class="popup__selector-scroll">
- <view class="popup-scroll-view">
- <scroll-view scroll-y="true" class="uni-select__selector-scroll" @scrolltolower="scrolltolower">
- <view class="uni-select__selector-empty" style="margin: auto" v-if="filterMixinDatacomResData.length === 0">
- <span style="display: inline-block; width: 100%; text-align: center">{{ emptyTips }}</span>
- </view>
- <view
- v-else
- :style="{ fontWeight: multiple && currentArr.includes(item[map.value]) ? 'bold' : '' }"
- class="scroll_item"
- :class="{ scroll_item_disable: item.disable }"
- v-for="(item, index) in filterMixinDatacomResData"
- :key="index"
- @click="change(item)"
- >
- <span class="scroll_item_text" :style="{ color: multiple && currentArr.includes(item[map.value]) ? '#007aff' : '' }">{{ formatItemName(item) }}</span>
- <view class="scroll_item_right">
- <span v-if="rightTextShow" :style="{ color: multiple && currentArr.includes(item[map.value]) ? 'rgb(204, 204, 204)' : '' }">
- {{ formatItemRightName(item) }}
- </span>
- <!-- <uni-icons type="checkmarkempty" color="#007aff" /> -->
- <uni-icons v-if="multiple && currentArr.includes(item[map.value])" type="checkmarkempty" color="#007aff" />
- </view>
- </view>
- <!-- <uni-load-more v-if="filterMixinDatacomResData.length !== 0 && dropDownLoading" :status="loadStatus"></uni-load-more> -->
- <view class="loading_box" v-if="filterMixinDatacomResData.length !== 0 && dropDownLoading">
- <view class="wave-loading" v-if="loadStatus == 'loading'">
- <span style="--time: 1">l</span>
- <span style="--time: 2">o</span>
- <span style="--time: 3">a</span>
- <span style="--time: 4">d</span>
- <span style="--time: 5">i</span>
- <span style="--time: 6">n</span>
- <span style="--time: 7">g</span>
- <span style="--time: 8">.</span>
- <span style="--time: 9">.</span>
- <span style="--time: 10">.</span>
- </view>
- <span v-else-if="loadStatus == 'more'">下拉加载更多</span>
- <span v-else style="color: #999">无更多数据了</span>
- </view>
- </scroll-view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- /**
- * DataChecklist 数据选择器
- * @description 通过数据渲染的下拉框组件
- * @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
- * @property {String} collapseTagsNum 多选时选中值按文字的形式展示的数量
- * @property {String} collapseTags 多选时是否将选中值按文字的形式展示
- * @property {String} rightSideText 作为 value 唯一标识的键名
- * @property {Array} multiple 是否多选
- * @property {Array} filterable 是否开启搜索
- * @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
- * @property {Array} map 本地数据 ,格式 {text: 'text', value: 'value', rightText: 'rightText', disable: 'disable'}
- * @property {Boolean} clear 是否可以清空已选项
- * @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
- * @property {String} placeholder 输入框的提示文字
- * @property {Boolean} disabled 是否禁用
- * @property {Boolean} dropDownLoading 是否开启下拉加载
- * @property {Boolean} rightTextShow 是否显示右侧文字
- * @property {String} loadStatus 加载更多状态
- * @event {Function} change 选中发生变化触发
- * @event {Function} lower 触底事件
- */
- export default {
- name: 'lfj-uni-data-select',
- props: {
- // #ifndef VUE3
- value: {
- type: [String, Number, Array],
- default: ''
- },
- // #endif
- // #ifdef VUE3
- modelValue: {
- type: [String, Number, Array],
- default: ''
- },
- // #endif
- dropDownLoading: {
- type: Boolean,
- default: false
- },
- localdata: {
- type: Array,
- default() {
- return [];
- }
- },
- emptyTips: {
- type: String,
- default: '无选项'
- },
- placeholder: {
- type: String,
- default: '请选择'
- },
- collapseTagsNum: {
- type: Number,
- default: 1
- },
- collapseTags: {
- type: Boolean,
- default: false
- },
- disabled: {
- type: Boolean,
- default: false
- },
- clear: {
- type: Boolean,
- default: true
- },
- filterable: {
- type: Boolean,
- default: false
- },
- multiple: {
- type: Boolean,
- default: false
- },
- rightTextShow: {
- type: Boolean,
- default: false
- },
- map: {
- type: Object,
- default() {
- return { text: 'text', value: 'value', rightText: 'rightText', disabled: 'disabled' };
- }
- },
- loadStatus: {
- type: String,
- default: 'more'
- },
- // 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
- format: {
- type: String,
- default: ''
- }
- },
- data() {
- return {
- windowHeight: 0,
- showSelector: false,
- mixinDatacomResData: [],
- isFocus: false,
- placeholderOld: '',
- filterInput: '',
- // 单选
- current: [],
- // 多选数据
- currentArr: [],
- isDown: true //下拉框是否朝下
- };
- },
- watch: {
- localdata: {
- immediate: true,
- handler(val, old) {
- if (Array.isArray(val) && old !== val) {
- console.log('新数据');
- this.mixinDatacomResData = val || [];
- }
- }
- },
- valueCom: {
- handler(newVal, oldVal) {
- this.initDefVal();
- },
- deep: true,
- immediate: true
- },
- mixinDatacomResData: {
- immediate: true,
- handler(val) {
- if (val.length) {
- this.initDefVal();
- }
- }
- }
- },
- created() {
- this.windowHeight = uni.getSystemInfoSync().windowHeight;
- this.placeholderOld = this.placeholder;
- if (this.multiple) {
- // #ifndef VUE3
- this.currentArr = this.value || [];
- // #endif
- // #ifdef VUE3
- this.currentArr = this.modelValue || [];
- // #endif
- if (this.current.length > 0) {
- this.current = [];
- }
- // #ifndef VUE3
- if (this.value && this.value.length > 0 && this.filterMixinDatacomResData.length > 0) {
- this.current = this.value.map((item) => {
- let current = this.mixinDatacomResData.find((e) => e[this.map.value] == item);
- return {
- ...current
- };
- });
- }
- // #endif
- // #ifdef VUE3
- if (this.modelValue && this.modelValue.length > 0 && this.filterMixinDatacomResData.length > 0) {
- this.current = this.modelValue.map((item) => {
- let current = this.mixinDatacomResData.find((e) => e[this.map.value] == item);
- return {
- ...current
- };
- });
- }
- // #endif
- } else {
- // #ifndef VUE3
- if (this.value || this.value == 0) {
- this.current = this.formatItemName(this.filterMixinDatacomResData.find((e) => e[this.map.value] == this.value));
- }
- // #endif
- // #ifdef VUE3
- if (this.modelValue || this.value == 0) {
- this.current = this.formatItemName(this.filterMixinDatacomResData.find((e) => e[this.map.value] == this.modelValue));
- }
- // #endif
- }
- this.debounceGet = this.debounce(() => {
- this.query();
- }, 300);
- if (this.collection && !this.localdata.length) {
- this.debounceGet();
- }
- },
- computed: {
- filterMixinDatacomResData() {
- if (this.filterable && this.filterInput) {
- return this.mixinDatacomResData.filter((e) => e[this.map.text].includes(this.filterInput));
- } else {
- return this.mixinDatacomResData;
- }
- },
- typePlaceholder() {
- const text = {
- 'opendb-stat-app-versions': '版本',
- 'opendb-app-channels': '渠道',
- 'opendb-app-list': '应用'
- };
- const common = this.placeholder;
- const placeholder = text[this.collection];
- return placeholder ? common + placeholder : common;
- },
- valueCom() {
- // #ifdef VUE3
- return this.modelValue;
- // #endif
- // #ifndef VUE3
- return this.value;
- // #endif
- }
- },
- methods: {
- getIsDown() {
- const query = uni.createSelectorQuery().in(this);
- const _this = this;
- query
- .select('.uni-stat-box')
- .boundingClientRect((data) => {
- if (_this.windowHeight - data.top - data.height > 220) {
- _this.isDown = true;
- } else {
- _this.isDown = false;
- }
- })
- .exec();
- },
- // 执行数据库查询
- query() {
- this.mixinDatacomEasyGet();
- },
- // 监听查询条件变更事件
- onMixinDatacomPropsChange() {
- if (this.collection) {
- this.debounceGet();
- }
- },
- debounce(fn, time = 100) {
- let timer = null;
- return function (...args) {
- if (timer) clearTimeout(timer);
- timer = setTimeout(() => {
- fn.apply(this, args);
- }, time);
- };
- },
- confirm(e) {
- this.$emit('confirm', e);
- },
- toggleSelector() {
- if (this.disabled) {
- return;
- }
- this.getIsDown();
- this.showSelector = !this.showSelector;
- this.isFocus = this.showSelector;
- if (this.filterable && this.current && this.showSelector) {
- if (!this.multiple) {
- this.placeholderOld = this.current;
- // this.filterInput = ""
- }
- } else if (this.filterable && !this.current && !this.showSelector) {
- if (this.placeholderOld != this.placeholder) {
- if (!this.multiple) {
- this.current = this.placeholderOld;
- }
- }
- }
- this.filterInput = '';
- },
- initDefVal() {
- let defValue = '';
- if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
- defValue = this.valueCom;
- } else {
- let strogeValue;
- if (this.collection) {
- strogeValue = this.getCache();
- }
- if (strogeValue || strogeValue === 0) {
- defValue = strogeValue;
- } else {
- let defItem = '';
- if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
- defItem = this.mixinDatacomResData[this.defItem - 1][this.dataValue];
- }
- defValue = defItem;
- }
- if (defValue || defValue === 0) {
- this.emit(defValue);
- }
- }
- if (this.multiple) {
- const mixinDatacomResData = this.mixinDatacomResData || [];
- if (!defValue) defValue = [];
- this.current = defValue.map((item) => {
- const current = mixinDatacomResData.find((e) => {
- return e[this.map.value] == item;
- });
- return {
- ...current
- };
- });
- this.currentArr = this.current.map((e) => e[this.map.value]);
- if (defValue.length < 1) {
- this.currentArr = [];
- }
- } else {
- const def = this.mixinDatacomResData.find((item) => item[this.map.value] === defValue);
- this.current = def ? this.formatItemName(def) : '';
- }
- },
- /**
- * @param {[String, Number]} value
- * 判断用户给的 value 是否同时为禁用状态
- */
- isDisabled(value) {
- let isDisabled = false;
- this.mixinDatacomResData.forEach((item) => {
- if (item[this.dataValue] === value) {
- isDisabled = item.disable;
- }
- });
- return isDisabled;
- },
- inputChange(e) {
- this.$emit('inputChange', e.detail.value);
- },
- scrolltolower(e) {
- if (e) {
- this.$emit('lower', this.scrolltolower());
- }
- },
- delItem(item) {
- if (this.disabled) {
- return;
- }
- if (this.currentArr.includes(item[this.map.value])) {
- let index = this.current.findIndex((e) => {
- return e[this.map.value] == item[this.map.value];
- });
- this.current.splice(index, 1);
- this.currentArr.splice(index, 1);
- this.emit(this.current);
- }
- },
- clearVal() {
- if (this.disabled) {
- return;
- }
- if (this.multiple) {
- this.current = [];
- this.currentArr = [];
- this.emit([]);
- } else {
- this.current = '';
- this.currentArr = [];
- this.emit('');
- }
- if (this.collection) {
- this.removeCache();
- }
- this.placeholderOld = this.placeholder;
- this.filterInput = '';
- },
- change(item) {
- // 是否禁用
- if (!item.disabled) {
- // 是否多选
- if (this.multiple) {
- if (!this.current) {
- this.current = [];
- }
- if (!this.currentArr) {
- this.currentArr = [];
- }
- if (this.currentArr.includes(item[this.map.value])) {
- let index = this.current.findIndex((e) => {
- return e[this.map.value] == item[this.map.value];
- });
- this.current.splice(index, 1);
- this.currentArr.splice(index, 1);
- this.emit(this.current);
- } else {
- this.current.push(item);
- this.currentArr.push(item[this.map.value]);
- this.emit(this.current);
- }
- this.filterInput = '';
- } else {
- // 单选
- this.showSelector = false;
- this.current = this.formatItemName(item);
- if (this.filterable) {
- this.filterInput = item[this.map.text];
- }
- this.emit(item[this.map.value]);
- }
- }
- },
- emit(val) {
- // 是否多选
- if (this.multiple) {
- this.$emit('input', this.currentArr);
- this.$emit('update:modelValue', this.currentArr);
- const currentArr = this.mixinDatacomResData.filter((item) => this.currentArr.includes(item[this.map.value]));
- // console.log(currentArr, '多选数据');
- this.$emit('change', currentArr);
- } else {
- this.$emit('input', val);
- this.$emit('update:modelValue', val);
- const current = this.mixinDatacomResData.find((item) => val == item[this.map.value]);
- // console.log(current, '单选数据');
- this.$emit('change', current);
- }
- if (this.collection) {
- this.setCache(val);
- }
- },
- formatItemRightName(item) {
- if (!item) {
- return ' ';
- }
- let text = item[this.map.rightText];
- let value = item[this.map.value];
- let { channel_code } = item;
- channel_code = channel_code ? `(${channel_code})` : '';
- if (this.format) {
- // 格式化输出
- let str = '';
- str = this.format;
- for (let key in item) {
- str = str.replace(new RegExp(`{${key}}`, 'g'), item[key]);
- }
- return str;
- } else {
- return text ? text : `${channel_code}`;
- }
- },
- formatItemName(item) {
- if (!item) {
- return '';
- }
- let text = item[this.map.text];
- let value = item[this.map.value];
- let { channel_code } = item;
- channel_code = channel_code ? `(${channel_code})` : '';
- if (this.format) {
- // 格式化输出
- let str = '';
- str = this.format;
- for (let key in item) {
- str = str.replace(new RegExp(`{${key}}`, 'g'), item[key]);
- }
- return str;
- } else {
- return text ? text : `未命名${channel_code}`;
- }
- },
- // 获取当前加载的数据
- getLoadData() {
- return this.mixinDatacomResData;
- },
- // 获取当前缓存key
- getCurrentCacheKey() {
- return this.collection;
- },
- selClick() {
- this.showSelector = !this.showSelector;
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- $uni-box-shadow: 0 1rpx 8rpx 1rpx rgba(32, 34, 36, 0.2);
- $uni-base-color: #6a6a6a !default;
- $uni-main-color: #333 !default;
- $uni-secondary-color: #909399 !default;
- $uni-border-3: #e5e5e5;
- .uni-stat__select_disabled {
- background-color: #f5f7fa;
- cursor: not-allowed;
- }
- .uni-stat__select {
- position: relative;
- .uni-stat-box {
- border: 1px solid rgb(229, 229, 229);
- border-radius: 4px;
- padding: 10rpx;
- min-height: 25px;
- display: flex;
- align-items: center;
- background-color: transparent;
- .uni-select {
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- font-size: 12px;
- position: relative;
- .uni-select__input-text {
- // width: 280px;
- width: 90%;
- color: $uni-main-color;
- white-space: nowrap;
- text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
- overflow: hidden;
- }
- .uni-select__input-box {
- width: 100%;
- height: 100%;
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex: 1;
- flex-direction: row;
- align-items: center;
- .tag-calss {
- font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
- font-weight: 400;
- -webkit-font-smoothing: antialiased;
- -webkit-tap-highlight-color: transparent;
- font-size: 12px;
- border: 1px solid #d9ecff;
- border-radius: 4px;
- white-space: nowrap;
- height: 24px;
- padding: 0 4px 0px 8px;
- line-height: 22px;
- box-sizing: border-box;
- margin: 2px 0 2px 6px;
- display: flex;
- max-width: 100%;
- align-items: center;
- background-color: #f4f4f5;
- border-color: #e9e9eb;
- color: #909399;
- .text {
- font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
- font-weight: 400;
- -webkit-font-smoothing: antialiased;
- -webkit-tap-highlight-color: transparent;
- font-size: 12px;
- white-space: nowrap;
- line-height: 22px;
- color: #909399;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- .uni-select__input-placeholder {
- color: $uni-base-color;
- font-size: 12px;
- }
- }
- }
- }
- .uni-select__selector {
- /* #ifndef APP-NVUE */
- box-sizing: border-box;
- /* #endif */
- position: absolute;
- left: 0;
- width: 100%;
- border-radius: 6px;
- z-index: 3;
- .popup__selector-scroll {
- width: 100%;
- // height: 200px;
- display: block;
- max-height: 208px;
- background-color: #ffffff;
- box-shadow: $uni-box-shadow;
- box-sizing: border-box;
- border-radius: 6px;
- overflow: hidden;
- padding: 4px 0;
- .popup-scroll-view {
- width: 100%;
- .uni-select__selector-scroll {
- /* #ifndef APP-NVUE */
- max-height: 200px;
- box-sizing: border-box;
- /* #endif */
- }
- .scroll_item_disable {
- opacity: 0.3;
- pointer-events: none;
- }
- .scroll_item {
- padding: 0px 10px;
- line-height: 35px;
- font-size: 14px;
- text-align: center;
- display: flex;
- justify-content: space-between;
- align-items: center;
- &:hover {
- background-color: #f9f9f9;
- }
- .scroll_item_right {
- color: #ccc;
- }
- .scroll_item_text {
- display: inline-block;
- max-width: 50%;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- }
- }
- }
- }
- .uni-select__selector__down {
- top: calc(100% + 12px);
- .uni-popper__arrow {
- transform: rotateX(0deg);
- top: -6px;
- }
- }
- .uni-select__selector__upwards {
- bottom: calc(100% + 12px);
- .uni-popper__arrow {
- transform: rotateX(180deg);
- bottom: -6px;
- }
- }
- /* picker 弹出层通用的指示小三角 */
- .uni-popper__arrow,
- .uni-popper__arrow::after {
- position: absolute;
- display: block;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
- border-width: 6px;
- }
- .uni-popper__arrow {
- filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
- left: 10%;
- margin-right: 3px;
- border-top-width: 0;
- border-bottom-color: #ebeef5;
- }
- .uni-popper__arrow::after {
- content: ' ';
- top: 1px;
- margin-left: -6px;
- border-top-width: 0;
- border-bottom-color: #fff;
- }
- // .uni-select__selector {
- // /* #ifndef APP-NVUE */
- // box-sizing: border-box;
- // /* #endif */
- // position: absolute;
- // left: 0;
- // width: 100%;
- // background-color: #ffffff;
- // border: 1px solid #ebeef5;
- // border-radius: 6px;
- // box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- // z-index: 3;
- // padding: 4px 0;
- // }
- .loading_box {
- display: flex;
- justify-content: center;
- padding: 20rpx 0;
- color: #999;
- .wave-loading {
- span {
- display: inline-block;
- font-size: 30rpx;
- font-weight: bold;
- font-family: 'Courier New', Courier, monospace;
- animation: wave-loading 1s ease-in-out infinite;
- animation-delay: calc(0.1s * var(--time));
- }
- }
- @keyframes wave-loading {
- 0% {
- transform: translateY(0rpx);
- }
- 25% {
- transform: translateY(-20rpx);
- }
- 50%,
- 100% {
- transform: translateY(0rpx);
- }
- }
- }
- .uni-select--mask {
- position: fixed;
- top: 0;
- bottom: 0;
- right: 0;
- left: 0;
- z-index: 2;
- }
- </style>
|