Commit 59c04d86 by LJM

add

parent b038ec19
...@@ -97,12 +97,7 @@ ...@@ -97,12 +97,7 @@
<view class="input-wrap column" style="margin-top: 20rpx;"> <view class="input-wrap column" style="margin-top: 20rpx;">
<view class="label-title"><text style="color: red;">*</text>到货时间:</view> <view class="label-title"><text style="color: red;">*</text>到货时间:</view>
<view class="select-box row"> <view class="select-box row">
<picker mode="date" :value="formParams.register_time" @change="bindDateChange($event,1)" style="width: 100%;"> <uni-datetime-picker v-model="formParams.register_time" type="datetime" :clear-icon="false" />
<view class="row verCenter bothSide wrap">
<view class="uni-input">{{ formParams.register_time }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view> </view>
</view> </view>
<view class="input-wrap column" style="margin-top: 20rpx;"> <view class="input-wrap column" style="margin-top: 20rpx;">
...@@ -217,7 +212,7 @@ ...@@ -217,7 +212,7 @@
curr: 0, curr: 0,
formParams: { formParams: {
warehouse_id: '', warehouse_id: '',
register_time: this.getCurrentDate(), register_time: this.getCurrentDateTime(),
register_type: 1, register_type: 1,
logistics_company: '', logistics_company: '',
logistics_sn: '', logistics_sn: '',
...@@ -256,14 +251,18 @@ ...@@ -256,14 +251,18 @@
}, },
methods: { methods: {
/** /**
* 获取日期 * 获取日期 时分秒
*/ */
getCurrentDate() { getCurrentDateTime() {
const today = new Date(); const now = new Date();
const year = today.getFullYear(); const year = now.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, '0'); const month = String(now.getMonth() + 1).padStart(2, '0');
const day = String(today.getDate()).padStart(2, '0'); const day = String(now.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`; const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}, },
bindDateChange(e, type) { bindDateChange(e, type) {
if (type == 1) { if (type == 1) {
...@@ -665,4 +664,17 @@ ...@@ -665,4 +664,17 @@
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/assets/css/arrivalRegister/splitGoods.scss'; @import '@/assets/css/arrivalRegister/splitGoods.scss';
::v-deep {
.uni-date-x .icon-calendar {
display: none !important;
}
.uni-date__x-input {
padding-left: 15rpx;
font-size: 17rpx;
height: 40rpx;
line-height: 40rpx;
}
}
</style> </style>
\ No newline at end of file
## 2.2.34(2024-04-24)
- 新增 日期点击事件,在点击日期时会触发该事件。
## 2.2.33(2024-04-15)
- 修复 抖音小程序事件传递失效bug
## 2.2.32(2024-02-20)
- 修复 日历的close事件触发异常的bug [详情](https://github.com/dcloudio/uni-ui/issues/844)
## 2.2.31(2024-02-20)
- 修复 h5平台 右边日历的月份默认+1的bug [详情](https://github.com/dcloudio/uni-ui/issues/841)
## 2.2.30(2024-01-31)
- 修复 隐藏“秒”时,在IOS15及以下版本时出现 结束时间在开始时间之前 的bug [详情](https://github.com/dcloudio/uni-ui/issues/788)
## 2.2.29(2024-01-20)
- 新增 show事件,弹窗弹出时触发该事件 [详情](https://github.com/dcloudio/uni-app/issues/4694)
## 2.2.28(2024-01-18)
- 去除 noChange事件,当进行日期范围选择时,若只选了一天,则开始结束日期都为同一天 [详情](https://github.com/dcloudio/uni-ui/issues/815)
## 2.2.27(2024-01-10)
- 优化 增加noChange事件,当进行日期范围选择时,若有空值,则触发该事件 [详情](https://github.com/dcloudio/uni-ui/issues/815)
## 2.2.26(2024-01-08)
- 修复 字节小程序时间选择范围器失效问题 [详情](https://github.com/dcloudio/uni-ui/issues/834)
## 2.2.25(2023-10-18)
- 修复 PC端初次修改时间,开始时间未更新的Bug [详情](https://github.com/dcloudio/uni-ui/issues/737)
## 2.2.24(2023-06-02) ## 2.2.24(2023-06-02)
- 修复 部分情况修改时间,开始、结束时间显示异常的Bug [详情](https://ask.dcloud.net.cn/question/171146) - 修复 部分情况修改时间,开始、结束时间显示异常的Bug [详情](https://ask.dcloud.net.cn/question/171146)
- 优化 当前月可以选择上月、下月的日期 - 优化 当前月可以选择上月、下月的日期的Bug
## 2.2.23(2023-05-02) ## 2.2.23(2023-05-02)
- 修复 部分情况修改时间,开始时间未更新 [详情](https://github.com/dcloudio/uni-ui/issues/737) - 修复 部分情况修改时间,开始时间未更新的Bug [详情](https://github.com/dcloudio/uni-ui/issues/737)
- 修复 部分平台及设备第一次点击无法显示弹框 - 修复 部分平台及设备第一次点击无法显示弹框的Bug
- 修复 ios 日期格式未补零显示及使用异常 [详情](https://ask.dcloud.net.cn/question/162979) - 修复 ios 日期格式未补零显示及使用异常的Bug [详情](https://ask.dcloud.net.cn/question/162979)
## 2.2.22(2023-03-30) ## 2.2.22(2023-03-30)
- 修复 日历 picker 修改年月后,自动选中当月1日 [详情](https://ask.dcloud.net.cn/question/165937) - 修复 日历 picker 修改年月后,自动选中当月1日的Bug [详情](https://ask.dcloud.net.cn/question/165937)
- 修复 小程序端 低版本 ios NaN [详情](https://ask.dcloud.net.cn/question/162979) - 修复 小程序端 低版本 ios NaN的Bug [详情](https://ask.dcloud.net.cn/question/162979)
## 2.2.21(2023-02-20) ## 2.2.21(2023-02-20)
- 修复 firefox 浏览器显示区域点击无法拉起日历弹框的Bug [详情](https://ask.dcloud.net.cn/question/163362) - 修复 firefox 浏览器显示区域点击无法拉起日历弹框的Bug [详情](https://ask.dcloud.net.cn/question/163362)
## 2.2.20(2023-02-17) ## 2.2.20(2023-02-17)
- 优化 值为空依然选中当天问题 - 优化 值为空依然选中当天问题
- 优化 提供 default-value 属性支持配置选择器打开时默认显示的时间 - 优化 提供 default-value 属性支持配置选择器打开时默认显示的时间
- 优化 非范围选择未选择日期时间,点击确认按钮选中当前日期时间 - 优化 非范围选择未选择日期时间,点击确认按钮选中当前日期时间
- 优化 字节小程序日期时间范围选择,底部日期换行问题 - 优化 字节小程序日期时间范围选择,底部日期换行的Bug
## 2.2.19(2023-02-09) ## 2.2.19(2023-02-09)
- 修复 2.2.18 引起范围选择配置 end 选择无效的Bug [详情](https://github.com/dcloudio/uni-ui/issues/686) - 修复 2.2.18 引起范围选择配置 end 选择无效的Bug [详情](https://github.com/dcloudio/uni-ui/issues/686)
## 2.2.18(2023-02-08) ## 2.2.18(2023-02-08)
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<view class="uni-calendar__header-btn uni-calendar--right"></view> <view class="uni-calendar__header-btn uni-calendar--right"></view>
</view> </view>
<view v-if="!insert" class="dialog-close" @click="close"> <view v-if="!insert" class="dialog-close" @click="maskClick">
<view class="dialog-close-plus" data-id="close"></view> <view class="dialog-close-plus" data-id="close"></view>
<view class="dialog-close-plus dialog-close-rotate" data-id="close"></view> <view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
</view> </view>
...@@ -58,9 +58,8 @@ ...@@ -58,9 +58,8 @@
<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex"> <view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
<view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex"> <view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
<calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar" <calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar" :selected="selected"
:selected="selected" :checkHover="range" @change="choiceDate" :checkHover="range" @change="choiceDate" @handleMouse="handleMouse">
@handleMouse="handleMouse">
</calendar-item> </calendar-item>
</view> </view>
</view> </view>
...@@ -101,13 +100,21 @@ ...@@ -101,13 +100,21 @@
</template> </template>
<script> <script>
import { Calendar, getDate, getTime } from './util.js'; import {
Calendar,
getDate,
getTime
} from './util.js';
import calendarItem from './calendar-item.vue' import calendarItem from './calendar-item.vue'
import timePicker from './time-picker.vue' import timePicker from './time-picker.vue'
import { initVueI18n } from '@dcloudio/uni-i18n' import {
initVueI18n
} from '@dcloudio/uni-i18n'
import i18nMessages from './i18n/index.js' import i18nMessages from './i18n/index.js'
const { t } = initVueI18n(i18nMessages) const {
t
} = initVueI18n(i18nMessages)
/** /**
* Calendar 日历 * Calendar 日历
...@@ -134,6 +141,15 @@ ...@@ -134,6 +141,15 @@
calendarItem, calendarItem,
timePicker timePicker
}, },
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
props: { props: {
date: { date: {
type: String, type: String,
...@@ -163,8 +179,8 @@ ...@@ -163,8 +179,8 @@
type: String, type: String,
default: '' default: ''
}, },
startPlaceholder: { startPlaceholder: {
type: String, type: String,
default: '' default: ''
}, },
endPlaceholder: { endPlaceholder: {
...@@ -210,10 +226,10 @@ ...@@ -210,10 +226,10 @@
} }
} }
}, },
defaultValue: { defaultValue: {
type: [String, Object, Array], type: [String, Object, Array],
default: '' default: ''
} }
}, },
data() { data() {
return { return {
...@@ -260,7 +276,7 @@ ...@@ -260,7 +276,7 @@
}, },
startDate(val) { startDate(val) {
// 字节小程序 watch 早于 created // 字节小程序 watch 早于 created
if(!this.cale){ if (!this.cale) {
return return
} }
this.cale.setStartDate(val) this.cale.setStartDate(val)
...@@ -269,7 +285,7 @@ ...@@ -269,7 +285,7 @@
}, },
endDate(val) { endDate(val) {
// 字节小程序 watch 早于 created // 字节小程序 watch 早于 created
if(!this.cale){ if (!this.cale) {
return return
} }
this.cale.setEndDate(val) this.cale.setEndDate(val)
...@@ -278,7 +294,7 @@ ...@@ -278,7 +294,7 @@
}, },
selected(newVal) { selected(newVal) {
// 字节小程序 watch 早于 created // 字节小程序 watch 早于 created
if(!this.cale){ if (!this.cale) {
return return
} }
this.cale.setSelectInfo(this.nowDate.fullDate, newVal) this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
...@@ -309,16 +325,16 @@ ...@@ -309,16 +325,16 @@
this.cale.lastHover = false this.cale.lastHover = false
} }
} else { } else {
// 字节小程序 watch 早于 created // 字节小程序 watch 早于 created
if(!this.cale){ if (!this.cale) {
return return
} }
this.cale.setDefaultMultiple(before, after) this.cale.setDefaultMultiple(before, after)
if (which === 'left' && before) { if (which === 'left' && before) {
this.setDate(before) this.setDate(before)
this.weeks = this.cale.weeks this.weeks = this.cale.weeks
} else if(after) { } else if (after) {
this.setDate(after) this.setDate(after)
this.weeks = this.cale.weeks this.weeks = this.cale.weeks
} }
...@@ -423,7 +439,7 @@ ...@@ -423,7 +439,7 @@
}, },
// 蒙版点击事件 // 蒙版点击事件
maskClick() { maskClick() {
this.close() this.close()
this.$emit('maskClose') this.$emit('maskClose')
}, },
...@@ -454,36 +470,38 @@ ...@@ -454,36 +470,38 @@
* @param {Object} date * @param {Object} date
*/ */
init(date) { init(date) {
// 字节小程序 watch 早于 created // 字节小程序 watch 早于 created
if(!this.cale){ if (!this.cale) {
return return
} }
this.cale.setDate(date || new Date()) this.cale.setDate(date || new Date())
this.weeks = this.cale.weeks this.weeks = this.cale.weeks
this.nowDate = this.cale.getInfo(date) this.nowDate = this.cale.getInfo(date)
this.calendar = {...this.nowDate} this.calendar = {
if(!date){ ...this.nowDate
// 优化date为空默认不选中今天 }
this.calendar.fullDate = '' if (!date) {
if(this.defaultValue && !this.range){ // 优化date为空默认不选中今天
// 暂时只支持移动端非范围选择 this.calendar.fullDate = ''
const defaultDate = new Date(this.defaultValue) if (this.defaultValue && !this.range) {
const fullDate = getDate(defaultDate) // 暂时只支持移动端非范围选择
const year = defaultDate.getFullYear() const defaultDate = new Date(this.defaultValue)
const month = defaultDate.getMonth()+1 const fullDate = getDate(defaultDate)
const date = defaultDate.getDate() const year = defaultDate.getFullYear()
const day = defaultDate.getDay() const month = defaultDate.getMonth() + 1
this.calendar = { const date = defaultDate.getDate()
fullDate, const day = defaultDate.getDay()
year, this.calendar = {
month, fullDate,
date, year,
day month,
}, date,
this.tempSingleDate = fullDate day
this.time = getTime(defaultDate, this.hideSecond) },
} this.tempSingleDate = fullDate
} this.time = getTime(defaultDate, this.hideSecond)
}
}
}, },
/** /**
* 打开日历弹窗 * 打开日历弹窗
...@@ -523,8 +541,8 @@ ...@@ -523,8 +541,8 @@
/** /**
* 变化触发 * 变化触发
*/ */
change() { change(isSingleChange) {
if (!this.insert) return if (!this.insert && !isSingleChange) return
this.setEmit('change') this.setEmit('change')
}, },
/** /**
...@@ -545,13 +563,13 @@ ...@@ -545,13 +563,13 @@
* @param {Object} name * @param {Object} name
*/ */
setEmit(name) { setEmit(name) {
if(!this.range){ if (!this.range) {
if(!this.calendar.fullDate){ if (!this.calendar.fullDate) {
this.calendar = this.cale.getInfo(new Date()) this.calendar = this.cale.getInfo(new Date())
this.tempSingleDate = this.calendar.fullDate this.tempSingleDate = this.calendar.fullDate
} }
if(this.hasTime && !this.time) { if (this.hasTime && !this.time) {
this.time = getTime(new Date(), this.hideSecond) this.time = getTime(new Date(), this.hideSecond)
} }
} }
let { let {
...@@ -586,7 +604,6 @@ ...@@ -586,7 +604,6 @@
this.tempSingleDate = this.calendar.fullDate this.tempSingleDate = this.calendar.fullDate
const beforeDate = new Date(this.cale.multipleStatus.before).getTime() const beforeDate = new Date(this.cale.multipleStatus.before).getTime()
const afterDate = new Date(this.cale.multipleStatus.after).getTime() const afterDate = new Date(this.cale.multipleStatus.after).getTime()
// 如果先选择结束日期,后选择开始日期,需要交换
if (beforeDate > afterDate && afterDate) { if (beforeDate > afterDate && afterDate) {
this.tempRange.before = this.cale.multipleStatus.after this.tempRange.before = this.cale.multipleStatus.after
this.tempRange.after = this.cale.multipleStatus.before this.tempRange.after = this.cale.multipleStatus.before
...@@ -594,19 +611,19 @@ ...@@ -594,19 +611,19 @@
this.tempRange.before = this.cale.multipleStatus.before this.tempRange.before = this.cale.multipleStatus.before
this.tempRange.after = this.cale.multipleStatus.after this.tempRange.after = this.cale.multipleStatus.after
} }
this.change() this.change(true)
}, },
changeMonth(type) { changeMonth(type) {
let newDate let newDate
if(type === 'pre') { if (type === 'pre') {
newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate
} else if(type === 'next') { } else if (type === 'next') {
newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate
} }
this.setDate(newDate) this.setDate(newDate)
this.monthSwitch() this.monthSwitch()
}, },
/** /**
* 设置日期 * 设置日期
* @param {Object} date * @param {Object} date
...@@ -620,7 +637,7 @@ ...@@ -620,7 +637,7 @@
} }
</script> </script>
<style lang="scss" > <style lang="scss">
$uni-primary: #007aff !default; $uni-primary: #007aff !default;
.uni-calendar { .uni-calendar {
...@@ -856,17 +873,17 @@ ...@@ -856,17 +873,17 @@
.uni-date-changed--time-end { .uni-date-changed--time-end {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
/* #endif */ /* #endif */
align-items: center; align-items: center;
} }
.uni-date-changed--time-date { .uni-date-changed--time-date {
color: #999; color: #999;
line-height: 50px; line-height: 50px;
/* #ifdef MP-TOUTIAO */ /* #ifdef MP-TOUTIAO */
font-size: 16px; font-size: 16px;
/* #endif */ /* #endif */
margin-right: 5px; margin-right: 5px;
// opacity: 0.6; // opacity: 0.6;
} }
...@@ -925,5 +942,6 @@ ...@@ -925,5 +942,6 @@
.uni-datetime-picker--btn:active { .uni-datetime-picker--btn:active {
opacity: 0.7; opacity: 0.7;
} }
/* #endif */ /* #endif */
</style> </style>
...@@ -81,10 +81,16 @@ ...@@ -81,10 +81,16 @@
</template> </template>
<script> <script>
import { initVueI18n } from '@dcloudio/uni-i18n' import {
initVueI18n
} from '@dcloudio/uni-i18n'
import i18nMessages from './i18n/index.js' import i18nMessages from './i18n/index.js'
const { t } = initVueI18n(i18nMessages) const {
import { fixIosDateFormat } from './util' t
} = initVueI18n(i18nMessages)
import {
fixIosDateFormat
} from './util'
/** /**
* DatetimePicker 时间选择器 * DatetimePicker 时间选择器
...@@ -134,6 +140,14 @@ ...@@ -134,6 +140,14 @@
endSecond: 59, endSecond: 59,
} }
}, },
options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true
// #endif
},
props: { props: {
type: { type: {
type: String, type: String,
...@@ -176,11 +190,11 @@ ...@@ -176,11 +190,11 @@
// #ifndef VUE3 // #ifndef VUE3
value: { value: {
handler(newVal) { handler(newVal) {
if (newVal) { if (newVal) {
this.parseValue(fixIosDateFormat(newVal)) this.parseValue(fixIosDateFormat(newVal))
this.initTime(false) this.initTime(false)
} else { } else {
this.time = '' this.time = ''
this.parseValue(Date.now()) this.parseValue(Date.now())
} }
}, },
...@@ -189,8 +203,8 @@ ...@@ -189,8 +203,8 @@
// #endif // #endif
// #ifdef VUE3 // #ifdef VUE3
modelValue: { modelValue: {
handler(newVal) { handler(newVal) {
if (newVal) { if (newVal) {
this.parseValue(fixIosDateFormat(newVal)) this.parseValue(fixIosDateFormat(newVal))
this.initTime(false) this.initTime(false)
} else { } else {
...@@ -649,14 +663,6 @@ ...@@ -649,14 +663,6 @@
return new Date(year, month, 0).getDate(); return new Date(year, month, 0).getDate();
}, },
//兼容 iOS、safari 日期格式
fixIosDateFormat(value) {
if (typeof value === 'string') {
value = value.replace(/-/g, '/')
}
return value
},
/** /**
* 生成时间戳 * 生成时间戳
* @param {Object} time * @param {Object} time
......
...@@ -2,22 +2,20 @@ ...@@ -2,22 +2,20 @@
<view class="uni-date"> <view class="uni-date">
<view class="uni-date-editor" @click="show"> <view class="uni-date-editor" @click="show">
<slot> <slot>
<view <view class="uni-date-editor--x"
class="uni-date-editor--x" :class="{'uni-date-editor--x__disabled': disabled,'uni-date-x--border': border}">
:class="{'uni-date-editor--x__disabled': disabled,'uni-date-x--border': border}"
>
<view v-if="!isRange" class="uni-date-x uni-date-single"> <view v-if="!isRange" class="uni-date-x uni-date-single">
<uni-icons class="icon-calendar" type="calendar" color="#c0c4cc" size="22"></uni-icons> <uni-icons class="icon-calendar" type="calendar" color="#c0c4cc" size="22"></uni-icons>
<view class="uni-date__x-input">{{ displayValue || singlePlaceholderText }}</view> <view class="uni-date__x-input">{{ displayValue || singlePlaceholderText }}</view>
</view> </view>
<view v-else class="uni-date-x uni-date-range"> <view v-else class="uni-date-x uni-date-range">
<uni-icons class="icon-calendar" type="calendar" color="#c0c4cc" size="22"></uni-icons> <uni-icons class="icon-calendar" type="calendar" color="#c0c4cc" size="22"></uni-icons>
<view class="uni-date__x-input text-center">{{ displayRangeValue.startDate || startPlaceholderText }}</view> <view class="uni-date__x-input text-center">{{ displayRangeValue.startDate || startPlaceholderText }}</view>
<view class="range-separator">{{rangeSeparator}}</view> <view class="range-separator">{{rangeSeparator}}</view>
<view class="uni-date__x-input text-center">{{ displayRangeValue.endDate || endPlaceholderText }}</view> <view class="uni-date__x-input text-center">{{ displayRangeValue.endDate || endPlaceholderText }}</view>
</view> </view>
<view v-if="showClearIcon" class="uni-date__icon-clear" @click.stop="clear"> <view v-if="showClearIcon" class="uni-date__icon-clear" @click.stop="clear">
...@@ -34,8 +32,7 @@ ...@@ -34,8 +32,7 @@
<view class="uni-popper__arrow"></view> <view class="uni-popper__arrow"></view>
<view v-if="hasTime" class="uni-date-changed popup-x-header"> <view v-if="hasTime" class="uni-date-changed popup-x-header">
<input class="uni-date__input text-center" type="text" v-model="inputDate" <input class="uni-date__input text-center" type="text" v-model="inputDate" :placeholder="selectDateText" />
:placeholder="selectDateText" />
<time-picker type="time" v-model="pickerTime" :border="false" :disabled="!inputDate" <time-picker type="time" v-model="pickerTime" :border="false" :disabled="!inputDate"
:start="timepickerStartTime" :end="timepickerEndTime" :hideSecond="hideSecond" style="width: 100%;"> :start="timepickerStartTime" :end="timepickerEndTime" :hideSecond="hideSecond" style="width: 100%;">
...@@ -45,8 +42,7 @@ ...@@ -45,8 +42,7 @@
</view> </view>
<Calendar ref="pcSingle" :showMonth="false" :start-date="calendarRange.startDate" <Calendar ref="pcSingle" :showMonth="false" :start-date="calendarRange.startDate"
:end-date="calendarRange.endDate" :date="calendarDate" @change="singleChange" :end-date="calendarRange.endDate" :date="calendarDate" @change="singleChange" :default-value="defaultValue"
:default-value="defaultValue"
style="padding: 0 8px;" /> style="padding: 0 8px;" />
<view v-if="hasTime" class="popup-x-footer"> <view v-if="hasTime" class="popup-x-footer">
...@@ -58,18 +54,17 @@ ...@@ -58,18 +54,17 @@
<view class="uni-popper__arrow"></view> <view class="uni-popper__arrow"></view>
<view v-if="hasTime" class="popup-x-header uni-date-changed"> <view v-if="hasTime" class="popup-x-header uni-date-changed">
<view class="popup-x-header--datetime"> <view class="popup-x-header--datetime">
<input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.startDate" <input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.startDate"
:placeholder="startDateText" /> :placeholder="startDateText" />
<time-picker type="time" v-model="tempRange.startTime" :start="timepickerStartTime" :border="false" <time-picker type="time" v-model="tempRange.startTime" :start="timepickerStartTime" :border="false"
:disabled="!tempRange.startDate" :hideSecond="hideSecond"> :disabled="!tempRange.startDate" :hideSecond="hideSecond">
<input class="uni-date__input uni-date-range__input" type="text" <input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.startTime"
v-model="tempRange.startTime" :placeholder="startTimeText" :placeholder="startTimeText" :disabled="!tempRange.startDate" />
:disabled="!tempRange.startDate" /> </time-picker>
</time-picker> </view>
</view>
<uni-icons type="arrowthinright" color="#999" style="line-height: 40px;"></uni-icons> <uni-icons type="arrowthinright" color="#999" style="line-height: 40px;"></uni-icons>
<view class="popup-x-header--datetime"> <view class="popup-x-header--datetime">
<input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.endDate" <input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.endDate"
...@@ -85,12 +80,11 @@ ...@@ -85,12 +80,11 @@
<view class="popup-x-body"> <view class="popup-x-body">
<Calendar ref="left" :showMonth="false" :start-date="calendarRange.startDate" <Calendar ref="left" :showMonth="false" :start-date="calendarRange.startDate"
:end-date="calendarRange.endDate" :range="true" :pleStatus="endMultipleStatus" :end-date="calendarRange.endDate" :range="true" :pleStatus="endMultipleStatus" @change="leftChange"
@change="leftChange" @firstEnterCale="updateRightCale" style="padding: 0 8px;" /> @firstEnterCale="updateRightCale" style="padding: 0 8px;"/>
<Calendar ref="right" :showMonth="false" :start-date="calendarRange.startDate" <Calendar ref="right" :showMonth="false" :start-date="calendarRange.startDate"
:end-date="calendarRange.endDate" :range="true" @change="rightChange" :end-date="calendarRange.endDate" :range="true" @change="rightChange" :pleStatus="startMultipleStatus"
:pleStatus="startMultipleStatus" @firstEnterCale="updateLeftCale" @firstEnterCale="updateLeftCale" style="padding: 0 8px;border-left: 1px solid #F1F1F1;" />
style="padding: 0 8px;border-left: 1px solid #F1F1F1;" />
</view> </view>
<view v-if="hasTime" class="popup-x-footer"> <view v-if="hasTime" class="popup-x-footer">
...@@ -102,10 +96,9 @@ ...@@ -102,10 +96,9 @@
<Calendar v-if="isPhone" ref="mobile" :clearDate="false" :date="calendarDate" :defTime="mobileCalendarTime" <Calendar v-if="isPhone" ref="mobile" :clearDate="false" :date="calendarDate" :defTime="mobileCalendarTime"
:start-date="calendarRange.startDate" :end-date="calendarRange.endDate" :selectableTimes="mobSelectableTime" :start-date="calendarRange.startDate" :end-date="calendarRange.endDate" :selectableTimes="mobSelectableTime"
:startPlaceholder="startPlaceholder" :endPlaceholder="endPlaceholder" :startPlaceholder="startPlaceholder" :endPlaceholder="endPlaceholder" :default-value="defaultValue"
:default-value="defaultValue"
:pleStatus="endMultipleStatus" :showMonth="false" :range="isRange" :hasTime="hasTime" :insert="false" :pleStatus="endMultipleStatus" :showMonth="false" :range="isRange" :hasTime="hasTime" :insert="false"
:hideSecond="hideSecond" @confirm="mobileChange" @maskClose="close" /> :hideSecond="hideSecond" @confirm="mobileChange" @maskClose="close" @change="calendarClick"/>
</view> </view>
</template> </template>
<script> <script>
...@@ -133,14 +126,30 @@ ...@@ -133,14 +126,30 @@
**/ **/
import Calendar from './calendar.vue' import Calendar from './calendar.vue'
import TimePicker from './time-picker.vue' import TimePicker from './time-picker.vue'
import { initVueI18n } from '@dcloudio/uni-i18n' import {
initVueI18n
} from '@dcloudio/uni-i18n'
import i18nMessages from './i18n/index.js' import i18nMessages from './i18n/index.js'
import { getDateTime, getDate, getTime, getDefaultSecond, dateCompare, checkDate, fixIosDateFormat } from './util' import {
getDateTime,
getDate,
getTime,
getDefaultSecond,
dateCompare,
checkDate,
fixIosDateFormat
} from './util'
export default { export default {
name: 'UniDatetimePicker', name: 'UniDatetimePicker',
options: { options: {
// #ifdef MP-TOUTIAO
virtualHost: false,
// #endif
// #ifndef MP-TOUTIAO
virtualHost: true virtualHost: true
// #endif
}, },
components: { components: {
Calendar, Calendar,
...@@ -188,7 +197,7 @@ ...@@ -188,7 +197,7 @@
isEmitValue: false, isEmitValue: false,
isPhone: false, isPhone: false,
isFirstShow: true, isFirstShow: true,
i18nT: () => {} i18nT: () => {}
} }
}, },
props: { props: {
...@@ -221,7 +230,7 @@ ...@@ -221,7 +230,7 @@
default: '' default: ''
}, },
startPlaceholder: { startPlaceholder: {
type: String, type: String,
default: '' default: ''
}, },
endPlaceholder: { endPlaceholder: {
...@@ -248,16 +257,16 @@ ...@@ -248,16 +257,16 @@
type: [Boolean], type: [Boolean],
default: false default: false
}, },
defaultValue: { defaultValue: {
type: [String, Object, Array], type: [String, Object, Array],
default: '' default: ''
} }
}, },
watch: { watch: {
type: { type: {
immediate: true, immediate: true,
handler(newVal) { handler(newVal) {
this.hasTime = newVal.indexOf('time') !== -1 this.hasTime = newVal.indexOf('time') !== -1
this.isRange = newVal.indexOf('range') !== -1 this.isRange = newVal.indexOf('range') !== -1
} }
}, },
...@@ -348,9 +357,9 @@ ...@@ -348,9 +357,9 @@
selectDateText() { selectDateText() {
return this.i18nT("uni-datetime-picker.selectDate") return this.i18nT("uni-datetime-picker.selectDate")
}, },
selectDateTimeText() { selectDateTimeText() {
return this.i18nT("uni-datetime-picker.selectDateTime") return this.i18nT("uni-datetime-picker.selectDateTime")
}, },
selectTimeText() { selectTimeText() {
return this.i18nT("uni-datetime-picker.selectTime") return this.i18nT("uni-datetime-picker.selectTime")
}, },
...@@ -373,18 +382,19 @@ ...@@ -373,18 +382,19 @@
return this.i18nT("uni-datetime-picker.clear") return this.i18nT("uni-datetime-picker.clear")
}, },
showClearIcon() { showClearIcon() {
return this.clearIcon && !this.disabled && (this.displayValue || (this.displayRangeValue.startDate && this.displayRangeValue.endDate)) return this.clearIcon && !this.disabled && (this.displayValue || (this.displayRangeValue.startDate && this
.displayRangeValue.endDate))
} }
}, },
created() { created() {
this.initI18nT() this.initI18nT()
this.platform() this.platform()
}, },
methods: { methods: {
initI18nT() { initI18nT() {
const vueI18n = initVueI18n(i18nMessages) const vueI18n = initVueI18n(i18nMessages)
this.i18nT = vueI18n.t this.i18nT = vueI18n.t
}, },
initPicker(newVal) { initPicker(newVal) {
if ((!newVal && !this.defaultValue) || Array.isArray(newVal) && !newVal.length) { if ((!newVal && !this.defaultValue) || Array.isArray(newVal) && !newVal.length) {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -394,26 +404,26 @@ ...@@ -394,26 +404,26 @@
} }
if (!Array.isArray(newVal) && !this.isRange) { if (!Array.isArray(newVal) && !this.isRange) {
if(newVal){ if (newVal) {
this.displayValue = this.inputDate = this.calendarDate = getDate(newVal) this.displayValue = this.inputDate = this.calendarDate = getDate(newVal)
if (this.hasTime) { if (this.hasTime) {
this.pickerTime = getTime(newVal, this.hideSecond) this.pickerTime = getTime(newVal, this.hideSecond)
this.displayValue = `${this.displayValue} ${this.pickerTime}` this.displayValue = `${this.displayValue} ${this.pickerTime}`
} }
}else if(this.defaultValue){ } else if (this.defaultValue) {
this.inputDate = this.calendarDate = getDate(this.defaultValue) this.inputDate = this.calendarDate = getDate(this.defaultValue)
if(this.hasTime){ if (this.hasTime) {
this.pickerTime = getTime(this.defaultValue, this.hideSecond) this.pickerTime = getTime(this.defaultValue, this.hideSecond)
} }
} }
} else { } else {
const [before, after] = newVal const [before, after] = newVal
if (!before && !after) return if (!before && !after) return
const beforeDate = getDate(before) const beforeDate = getDate(before)
const beforeTime = getTime(before, this.hideSecond) const beforeTime = getTime(before, this.hideSecond)
const afterDate = getDate(after) const afterDate = getDate(after)
const afterTime = getTime(after, this.hideSecond) const afterTime = getTime(after, this.hideSecond)
const startDate = beforeDate const startDate = beforeDate
const endDate = afterDate const endDate = afterDate
this.displayRangeValue.startDate = this.tempRange.startDate = startDate this.displayRangeValue.startDate = this.tempRange.startDate = startDate
...@@ -450,23 +460,26 @@ ...@@ -450,23 +460,26 @@
right.setDate(this.$refs.right.nowDate.fullDate) right.setDate(this.$refs.right.nowDate.fullDate)
}, },
platform() { platform() {
if(typeof navigator !== "undefined"){ if (typeof navigator !== "undefined") {
this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1 this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1
return return
} }
const { windowWidth } = uni.getSystemInfoSync() const {
windowWidth
} = uni.getSystemInfoSync()
this.isPhone = windowWidth <= 500 this.isPhone = windowWidth <= 500
this.windowWidth = windowWidth this.windowWidth = windowWidth
}, },
show() { show() {
this.$emit("show")
if (this.disabled) { if (this.disabled) {
return return
} }
this.platform() this.platform()
if (this.isPhone) { if (this.isPhone) {
setTimeout(() => { setTimeout(() => {
this.$refs.mobile.open() this.$refs.mobile.open()
}, 0); }, 0);
return return
} }
this.pickerPositionStyle = { this.pickerPositionStyle = {
...@@ -491,8 +504,10 @@ ...@@ -491,8 +504,10 @@
this.$refs.right.changeMonth('pre') this.$refs.right.changeMonth('pre')
} }
} else { } else {
this.$refs.right.changeMonth('next') // this.$refs.right.changeMonth('next')
this.$refs.right.cale.lastHover = false if (this.isPhone) {
this.$refs.right.cale.lastHover = false;
}
} }
} }
...@@ -544,52 +559,52 @@ ...@@ -544,52 +559,52 @@
this.confirmSingleChange() this.confirmSingleChange()
}, },
confirmSingleChange() { confirmSingleChange() {
if(!checkDate(this.inputDate)){ if (!checkDate(this.inputDate)) {
const now = new Date() const now = new Date()
this.calendarDate = this.inputDate = getDate(now) this.calendarDate = this.inputDate = getDate(now)
this.pickerTime = getTime(now, this.hideSecond) this.pickerTime = getTime(now, this.hideSecond)
} }
let startLaterInputDate = false let startLaterInputDate = false
let startDate, startTime let startDate, startTime
if(this.start) { if (this.start) {
let startString = this.start let startString = this.start
if(typeof this.start === 'number'){ if (typeof this.start === 'number') {
startString = getDateTime(this.start, this.hideSecond) startString = getDateTime(this.start, this.hideSecond)
} }
[startDate, startTime] = startString.split(' ') [startDate, startTime] = startString.split(' ')
if(this.start && !dateCompare(startDate, this.inputDate)) { if (this.start && !dateCompare(startDate, this.inputDate)) {
startLaterInputDate = true startLaterInputDate = true
this.inputDate = startDate this.inputDate = startDate
} }
} }
let endEarlierInputDate = false let endEarlierInputDate = false
let endDate, endTime let endDate, endTime
if(this.end) { if (this.end) {
let endString = this.end let endString = this.end
if(typeof this.end === 'number'){ if (typeof this.end === 'number') {
endString = getDateTime(this.end, this.hideSecond) endString = getDateTime(this.end, this.hideSecond)
} }
[endDate, endTime] = endString.split(' ') [endDate, endTime] = endString.split(' ')
if(this.end && !dateCompare(this.inputDate, endDate)) { if (this.end && !dateCompare(this.inputDate, endDate)) {
endEarlierInputDate = true endEarlierInputDate = true
this.inputDate = endDate this.inputDate = endDate
} }
} }
if (this.hasTime) { if (this.hasTime) {
if(startLaterInputDate){ if (startLaterInputDate) {
this.pickerTime = startTime || getDefaultSecond(this.hideSecond) this.pickerTime = startTime || getDefaultSecond(this.hideSecond)
} }
if(endEarlierInputDate){ if (endEarlierInputDate) {
this.pickerTime = endTime || getDefaultSecond(this.hideSecond) this.pickerTime = endTime || getDefaultSecond(this.hideSecond)
} }
if(!this.pickerTime){ if (!this.pickerTime) {
this.pickerTime = getTime(Date.now(), this.hideSecond) this.pickerTime = getTime(Date.now(), this.hideSecond)
} }
this.displayValue = `${this.inputDate} ${this.pickerTime}` this.displayValue = `${this.inputDate} ${this.pickerTime}`
} else { } else {
this.displayValue = this.inputDate this.displayValue = this.inputDate
} }
this.setEmit(this.displayValue) this.setEmit(this.displayValue)
this.pickerVisible = false this.pickerVisible = false
...@@ -607,6 +622,7 @@ ...@@ -607,6 +622,7 @@
fulldate: e.fulldate fulldate: e.fulldate
} }
this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj) this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj)
this.$emit('calendarClick', e)
}, },
rightChange(e) { rightChange(e) {
const { const {
...@@ -621,14 +637,17 @@ ...@@ -621,14 +637,17 @@
fulldate: e.fulldate fulldate: e.fulldate
} }
this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj) this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj)
this.$emit('calendarClick', e)
}, },
mobileChange(e) { mobileChange(e) {
if (this.isRange) { if (this.isRange) {
const {before, after} = e.range const {
before,
if(!before || !after){ after
return } = e.range
} if (!before) {
return;
}
this.handleStartAndEnd(before, after, true) this.handleStartAndEnd(before, after, true)
if (this.hasTime) { if (this.hasTime) {
...@@ -661,79 +680,79 @@ ...@@ -661,79 +680,79 @@
this.pickerVisible = false this.pickerVisible = false
return return
} }
if(!checkDate(this.tempRange.startDate)){ if (!checkDate(this.tempRange.startDate)) {
this.tempRange.startDate = getDate(Date.now()) this.tempRange.startDate = getDate(Date.now())
} }
if(!checkDate(this.tempRange.endDate)){ if (!checkDate(this.tempRange.endDate)) {
this.tempRange.endDate = getDate(Date.now()) this.tempRange.endDate = getDate(Date.now())
} }
let start, end let start, end
let startDateLaterRangeStartDate = false let startDateLaterRangeStartDate = false
let startDateLaterRangeEndDate = false let startDateLaterRangeEndDate = false
let startDate, startTime let startDate, startTime
if(this.start) { if (this.start) {
let startString = this.start let startString = this.start
if(typeof this.start === 'number'){ if (typeof this.start === 'number') {
startString = getDateTime(this.start, this.hideSecond) startString = getDateTime(this.start, this.hideSecond)
} }
[startDate,startTime] = startString.split(' ') [startDate, startTime] = startString.split(' ')
if(this.start && !dateCompare(this.start, this.tempRange.startDate)) { if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
startDateLaterRangeStartDate = true startDateLaterRangeStartDate = true
this.tempRange.startDate = startDate this.tempRange.startDate = startDate
} }
if(this.start && !dateCompare(this.start, this.tempRange.endDate)) { if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
startDateLaterRangeEndDate = true startDateLaterRangeEndDate = true
this.tempRange.endDate = startDate this.tempRange.endDate = startDate
} }
} }
let endDateEarlierRangeStartDate = false let endDateEarlierRangeStartDate = false
let endDateEarlierRangeEndDate = false let endDateEarlierRangeEndDate = false
let endDate, endTime let endDate, endTime
if(this.end) { if (this.end) {
let endString = this.end let endString = this.end
if(typeof this.end === 'number'){ if (typeof this.end === 'number') {
endString = getDateTime(this.end, this.hideSecond) endString = getDateTime(this.end, this.hideSecond)
} }
[endDate,endTime] = endString.split(' ') [endDate, endTime] = endString.split(' ')
if(this.end && !dateCompare(this.tempRange.startDate, this.end)) { if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
endDateEarlierRangeStartDate = true endDateEarlierRangeStartDate = true
this.tempRange.startDate = endDate this.tempRange.startDate = endDate
} }
if(this.end && !dateCompare(this.tempRange.endDate, this.end)) { if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
endDateEarlierRangeEndDate = true endDateEarlierRangeEndDate = true
this.tempRange.endDate = endDate this.tempRange.endDate = endDate
} }
} }
if (!this.hasTime) { if (!this.hasTime) {
start = this.displayRangeValue.startDate = this.tempRange.startDate start = this.displayRangeValue.startDate = this.tempRange.startDate
end = this.displayRangeValue.endDate = this.tempRange.endDate end = this.displayRangeValue.endDate = this.tempRange.endDate
} else { } else {
if(startDateLaterRangeStartDate){ if (startDateLaterRangeStartDate) {
this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond) this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond)
}else if(endDateEarlierRangeStartDate){ } else if (endDateEarlierRangeStartDate) {
this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond) this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond)
} }
if(!this.tempRange.startTime){ if (!this.tempRange.startTime) {
this.tempRange.startTime = getTime(Date.now(), this.hideSecond) this.tempRange.startTime = getTime(Date.now(), this.hideSecond)
} }
if(startDateLaterRangeEndDate){ if (startDateLaterRangeEndDate) {
this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond) this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond)
}else if(endDateEarlierRangeEndDate){ } else if (endDateEarlierRangeEndDate) {
this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond) this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond)
} }
if(!this.tempRange.endTime){ if (!this.tempRange.endTime) {
this.tempRange.endTime = getTime(Date.now(), this.hideSecond) this.tempRange.endTime = getTime(Date.now(), this.hideSecond)
} }
start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}` start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`
end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}` end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`
} }
if(!dateCompare(start,end)){ if (!dateCompare(start, end)) {
[start, end] = [end, start] [start, end] = [end, start]
} }
this.displayRangeValue.startDate = start this.displayRangeValue.startDate = start
this.displayRangeValue.endDate = end this.displayRangeValue.endDate = end
const displayRange = [start, end] const displayRange = [start, end]
...@@ -741,13 +760,13 @@ ...@@ -741,13 +760,13 @@
this.pickerVisible = false this.pickerVisible = false
}, },
handleStartAndEnd(before, after, temp = false) { handleStartAndEnd(before, after, temp = false) {
if (!(before && after)) return if (!before) return
if (!after) after = before;
const type = temp ? 'tempRange' : 'range' const type = temp ? 'tempRange' : 'range'
const isStartEarlierEnd = dateCompare(before, after) const isStartEarlierEnd = dateCompare(before, after)
this[type].startDate = isStartEarlierEnd ? before : after this[type].startDate = isStartEarlierEnd ? before : after
this[type].endDate = isStartEarlierEnd ? after : before this[type].endDate = isStartEarlierEnd ? after : before
}, },
/** /**
* 比较时间大小 * 比较时间大小
*/ */
...@@ -806,6 +825,10 @@ ...@@ -806,6 +825,10 @@
this.$emit('update:modelValue', []) this.$emit('update:modelValue', [])
} }
} }
},
calendarClick(e) {
this.$emit('calendarClick', e)
} }
} }
} }
...@@ -818,6 +841,7 @@ ...@@ -818,6 +841,7 @@
width: 100%; width: 100%;
flex: 1; flex: 1;
} }
.uni-date-x { .uni-date-x {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -829,16 +853,17 @@ ...@@ -829,16 +853,17 @@
font-size: 14px; font-size: 14px;
flex: 1; flex: 1;
.icon-calendar{ .icon-calendar {
padding-left: 3px; padding-left: 3px;
} }
.range-separator{
height: 35px; .range-separator {
/* #ifndef MP */ height: 35px;
padding: 0 2px; /* #ifndef MP */
/* #endif */ padding: 0 2px;
/* #endif */
line-height: 35px; line-height: 35px;
} }
} }
.uni-date-x--border { .uni-date-x--border {
...@@ -865,9 +890,9 @@ ...@@ -865,9 +890,9 @@
.uni-date__x-input { .uni-date__x-input {
width: auto; width: auto;
height: 35px; height: 35px;
/* #ifndef MP */ /* #ifndef MP */
padding-left: 5px; padding-left: 5px;
/* #endif */ /* #endif */
position: relative; position: relative;
flex: 1; flex: 1;
line-height: 35px; line-height: 35px;
......
...@@ -13,7 +13,7 @@ class Calendar { ...@@ -13,7 +13,7 @@ class Calendar {
this.startDate = startDate this.startDate = startDate
// 终止时间 // 终止时间
this.endDate = endDate this.endDate = endDate
// 是否范围选择 // 是否范围选择
this.range = range this.range = range
// 多选状态 // 多选状态
this.cleanMultipleStatus() this.cleanMultipleStatus()
...@@ -49,44 +49,44 @@ class Calendar { ...@@ -49,44 +49,44 @@ class Calendar {
this.endDate = endDate this.endDate = endDate
} }
getPreMonthObj(date){ getPreMonthObj(date) {
date = fixIosDateFormat(date) date = fixIosDateFormat(date)
date = new Date(date) date = new Date(date)
const oldMonth = date.getMonth() const oldMonth = date.getMonth()
date.setMonth(oldMonth - 1) date.setMonth(oldMonth - 1)
const newMonth = date.getMonth() const newMonth = date.getMonth()
if(oldMonth !== 0 && newMonth - oldMonth === 0){ if (oldMonth !== 0 && newMonth - oldMonth === 0) {
date.setMonth(newMonth - 1) date.setMonth(newMonth - 1)
} }
return this.getDateObj(date) return this.getDateObj(date)
} }
getNextMonthObj(date){ getNextMonthObj(date) {
date = fixIosDateFormat(date) date = fixIosDateFormat(date)
date = new Date(date) date = new Date(date)
const oldMonth = date.getMonth() const oldMonth = date.getMonth()
date.setMonth(oldMonth + 1) date.setMonth(oldMonth + 1)
const newMonth = date.getMonth() const newMonth = date.getMonth()
if(newMonth - oldMonth > 1){ if (newMonth - oldMonth > 1) {
date.setMonth(newMonth - 1) date.setMonth(newMonth - 1)
} }
return this.getDateObj(date) return this.getDateObj(date)
} }
/** /**
* 获取指定格式Date对象 * 获取指定格式Date对象
*/ */
getDateObj(date) { getDateObj(date) {
date = fixIosDateFormat(date) date = fixIosDateFormat(date)
date = new Date(date) date = new Date(date)
return { return {
fullDate: getDate(date), fullDate: getDate(date),
year: date.getFullYear(), year: date.getFullYear(),
month: addZero(date.getMonth() + 1), month: addZero(date.getMonth() + 1),
date: addZero(date.getDate()), date: addZero(date.getDate()),
day: date.getDay() day: date.getDay()
} }
} }
...@@ -96,36 +96,11 @@ class Calendar { ...@@ -96,36 +96,11 @@ class Calendar {
getPreMonthDays(amount, dateObj) { getPreMonthDays(amount, dateObj) {
const result = [] const result = []
for (let i = amount - 1; i >= 0; i--) { for (let i = amount - 1; i >= 0; i--) {
const month = dateObj.month > 1 ? dateObj.month -1 : 12 const month = dateObj.month - 1
const year = month === 12 ? dateObj.year - 1 : dateObj.year
const date = new Date(year,month,-i).getDate()
const fullDate = `${year}-${addZero(month)}-${addZero(date)}`
let multiples = this.multipleStatus.data
let multiplesStatus = -1
if (this.range && multiples) {
multiplesStatus = multiples.findIndex((item) => {
return this.dateEqual(item, fullDate)
})
}
const checked = multiplesStatus !== -1
// 获取打点信息
const extraInfo = this.selected && this.selected.find((item) => {
if (this.dateEqual(fullDate, item.date)) {
return item
}
})
result.push({ result.push({
fullDate, date: new Date(dateObj.year, month, -i).getDate(),
year,
month, month,
date, disable: true
multiple: this.range ? checked : false,
beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
disable: (this.startDate && !dateCompare(this.startDate, fullDate)) || (this.endDate && !dateCompare(fullDate,this.endDate)),
isToday: fullDate === this.date.fullDate,
userChecked: false,
extraInfo
}) })
} }
return result return result
...@@ -140,7 +115,7 @@ class Calendar { ...@@ -140,7 +115,7 @@ class Calendar {
const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}` const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`
const isToday = fullDate === currentDate const isToday = fullDate === currentDate
// 获取打点信息 // 获取打点信息
const extraInfo = this.selected && this.selected.find((item) => { const info = this.selected && this.selected.find((item) => {
if (this.dateEqual(currentDate, item.date)) { if (this.dateEqual(currentDate, item.date)) {
return item return item
} }
...@@ -160,24 +135,25 @@ class Calendar { ...@@ -160,24 +135,25 @@ class Calendar {
let multiples = this.multipleStatus.data let multiples = this.multipleStatus.data
let multiplesStatus = -1 let multiplesStatus = -1
if (this.range && multiples) { if (this.range && multiples) {
multiplesStatus = multiples.findIndex((item) => { multiplesStatus = multiples.findIndex((item) => {
return this.dateEqual(item, currentDate) return this.dateEqual(item, currentDate)
}) })
} }
const checked = multiplesStatus !== -1 const checked = multiplesStatus !== -1
result.push({ result.push({
fullDate: currentDate, fullDate: currentDate,
year: dateObj.year, year: dateObj.year,
month: dateObj.month,
date: i, date: i,
multiple: this.range ? checked : false, multiple: this.range ? checked : false,
beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after), beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after), afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
disable: (this.startDate && !dateCompare(this.startDate, currentDate)) || (this.endDate && !dateCompare(currentDate,this.endDate)), month: dateObj.month,
disable: (this.startDate && !dateCompare(this.startDate, currentDate)) || (this.endDate && !dateCompare(
currentDate, this.endDate)),
isToday, isToday,
userChecked: false, userChecked: false,
extraInfo extraInfo: info
}) })
} }
return result return result
...@@ -187,37 +163,12 @@ class Calendar { ...@@ -187,37 +163,12 @@ class Calendar {
*/ */
_getNextMonthDays(amount, dateObj) { _getNextMonthDays(amount, dateObj) {
const result = [] const result = []
const month = dateObj.month + 1 const month = dateObj.month + 1
for (let i = 1; i <= amount; i++) { for (let i = 1; i <= amount; i++) {
const month = dateObj.month === 12 ? 1 : dateObj.month*1 + 1
const year = month === 1 ? dateObj.year + 1 : dateObj.year
const fullDate = `${year}-${addZero(month)}-${addZero(i)}`
let multiples = this.multipleStatus.data
let multiplesStatus = -1
if (this.range && multiples) {
multiplesStatus = multiples.findIndex((item) => {
return this.dateEqual(item, fullDate)
})
}
const checked = multiplesStatus !== -1
// 获取打点信息
const extraInfo = this.selected && this.selected.find((item) => {
if (this.dateEqual(fullDate, item.date)) {
return item
}
})
result.push({ result.push({
fullDate,
year,
date: i, date: i,
month, month,
multiple: this.range ? checked : false, disable: true
beforeMultiple: this.isLogicBefore(fullDate, this.multipleStatus.before, this.multipleStatus.after),
afterMultiple: this.isLogicAfter(fullDate, this.multipleStatus.before, this.multipleStatus.after),
disable: (this.startDate && !dateCompare(this.startDate, fullDate)) || (this.endDate && !dateCompare(fullDate,this.endDate)),
isToday: fullDate === this.date.fullDate,
userChecked: false,
extraInfo
}) })
} }
return result return result
...@@ -290,7 +241,7 @@ class Calendar { ...@@ -290,7 +241,7 @@ class Calendar {
* 获取多选状态 * 获取多选状态
*/ */
setMultiple(fullDate) { setMultiple(fullDate) {
if (!this.range) return if (!this.range) return
let { let {
before, before,
...@@ -309,6 +260,7 @@ class Calendar { ...@@ -309,6 +260,7 @@ class Calendar {
} else { } else {
if (!before) { if (!before) {
this.multipleStatus.before = fullDate this.multipleStatus.before = fullDate
this.multipleStatus.after = undefined;
this.lastHover = false this.lastHover = false
} else { } else {
this.multipleStatus.after = fullDate this.multipleStatus.after = fullDate
...@@ -329,9 +281,12 @@ class Calendar { ...@@ -329,9 +281,12 @@ class Calendar {
* 鼠标 hover 更新多选状态 * 鼠标 hover 更新多选状态
*/ */
setHoverMultiple(fullDate) { setHoverMultiple(fullDate) {
if (!this.range || this.lastHover) return //抖音小程序点击会触发hover事件,需要避免一下
// #ifndef MP-TOUTIAO
const { before } = this.multipleStatus if (!this.range || this.lastHover) return
const {
before
} = this.multipleStatus
if (!before) { if (!before) {
this.multipleStatus.before = fullDate this.multipleStatus.before = fullDate
...@@ -344,6 +299,8 @@ class Calendar { ...@@ -344,6 +299,8 @@ class Calendar {
} }
} }
this.getWeeks(fullDate) this.getWeeks(fullDate)
// #endif
} }
/** /**
...@@ -374,22 +331,22 @@ class Calendar { ...@@ -374,22 +331,22 @@ class Calendar {
} = this.getDateObj(dateData) } = this.getDateObj(dateData)
const preMonthDayAmount = new Date(year, month - 1, 1).getDay() const preMonthDayAmount = new Date(year, month - 1, 1).getDay()
const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData)) const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData))
const currentMonthDayAmount = new Date(year, month, 0).getDate() const currentMonthDayAmount = new Date(year, month, 0).getDate()
const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData)) const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData))
const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount
const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData)) const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData))
const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays] const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays]
const weeks = new Array(6) const weeks = new Array(6)
for (let i = 0; i < calendarDays.length; i++) { for (let i = 0; i < calendarDays.length; i++) {
const index = Math.floor(i / 7) const index = Math.floor(i / 7)
if(!weeks[index]){ if (!weeks[index]) {
weeks[index] = new Array(7) weeks[index] = new Array(7)
} }
weeks[index][i % 7] = calendarDays[i] weeks[index][i % 7] = calendarDays[i]
} }
...@@ -398,56 +355,67 @@ class Calendar { ...@@ -398,56 +355,67 @@ class Calendar {
} }
} }
function getDateTime(date, hideSecond){ function getDateTime(date, hideSecond) {
return `${getDate(date)} ${getTime(date, hideSecond)}` return `${getDate(date)} ${getTime(date, hideSecond)}`
} }
function getDate(date) { function getDate(date) {
date = fixIosDateFormat(date) date = fixIosDateFormat(date)
date = new Date(date) date = new Date(date)
const year = date.getFullYear() const year = date.getFullYear()
const month = date.getMonth()+1 const month = date.getMonth() + 1
const day = date.getDate() const day = date.getDate()
return `${year}-${addZero(month)}-${addZero(day)}` return `${year}-${addZero(month)}-${addZero(day)}`
} }
function getTime(date, hideSecond){ function getTime(date, hideSecond) {
date = fixIosDateFormat(date) date = fixIosDateFormat(date)
date = new Date(date) date = new Date(date)
const hour = date.getHours() const hour = date.getHours()
const minute = date.getMinutes() const minute = date.getMinutes()
const second = date.getSeconds() const second = date.getSeconds()
return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}` return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`
} }
function addZero(num) { function addZero(num) {
if(num < 10){ if (num < 10) {
num = `0${num}` num = `0${num}`
} }
return num return num
} }
function getDefaultSecond(hideSecond) { function getDefaultSecond(hideSecond) {
return hideSecond ? '00:00' : '00:00:00' return hideSecond ? '00:00' : '00:00:00'
} }
function dateCompare(startDate, endDate) { function dateCompare(startDate, endDate) {
startDate = new Date(fixIosDateFormat(startDate)) startDate = new Date(fixIosDateFormat(startDate))
endDate = new Date(fixIosDateFormat(endDate)) endDate = new Date(fixIosDateFormat(endDate))
return startDate <= endDate return startDate <= endDate
} }
function checkDate(date){ function checkDate(date) {
const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g
return date.match(dateReg) return date.match(dateReg)
} }
//ios低版本15及以下,无法匹配 没有 ’秒‘ 时的情况,所以需要在末尾 秒 加上 问号
const dateTimeReg = /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9](:[0-5]?[0-9])?)?$/;
const dateTimeReg = /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9]:[0-5]?[0-9])?$/
function fixIosDateFormat(value) { function fixIosDateFormat(value) {
if (typeof value === 'string' && dateTimeReg.test(value)) { if (typeof value === 'string' && dateTimeReg.test(value)) {
value = value.replace(/-/g, '/') value = value.replace(/-/g, '/')
} }
return value return value
} }
export {Calendar, getDateTime, getDate, getTime, addZero, getDefaultSecond, dateCompare, checkDate, fixIosDateFormat} export {
\ No newline at end of file Calendar,
getDateTime,
getDate,
getTime,
addZero,
getDefaultSecond,
dateCompare,
checkDate,
fixIosDateFormat
}
{ {
"id": "uni-datetime-picker", "id": "uni-datetime-picker",
"displayName": "uni-datetime-picker 日期选择器", "displayName": "uni-datetime-picker 日期选择器",
"version": "2.2.24", "version": "2.2.34",
"description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择", "description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
"keywords": [ "keywords": [
"uni-datetime-picker", "uni-datetime-picker",
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
"platforms": { "platforms": {
"cloud": { "cloud": {
"tcb": "y", "tcb": "y",
"aliyun": "y" "aliyun": "y",
"alipay": "n"
}, },
"client": { "client": {
"App": { "App": {
......
## 2.0.10(2024-06-07)
- 优化 uni-app x 中,size 属性的类型
## 2.0.9(2024-01-12)
fix: 修复图标大小默认值错误的问题
## 2.0.8(2023-12-14)
- 修复 项目未使用 ts 情况下,打包报错的bug
## 2.0.7(2023-12-14)
- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
## 2.0.6(2023-12-11)
- 优化 兼容老版本icon类型,如 top ,bottom 等
## 2.0.5(2023-12-11)
- 优化 兼容老版本icon类型,如 top ,bottom 等
## 2.0.4(2023-12-06)
- 优化 uni-app x 下示例项目图标排序
## 2.0.3(2023-12-06)
- 修复 nvue下引入组件报错的bug
## 2.0.2(2023-12-05)
-优化 size 属性支持单位
## 2.0.1(2023-12-05)
- 新增 uni-app x 支持定义图标
## 1.3.5(2022-01-24) ## 1.3.5(2022-01-24)
- 优化 size 属性可以传入不带单位的字符串数值 - 优化 size 属性可以传入不带单位的字符串数值
## 1.3.4(2022-01-24) ## 1.3.4(2022-01-24)
......
<template>
<text class="uni-icons" :style="styleObj">
<slot>{{unicode}}</slot>
</text>
</template>
<script>
import { fontData, IconsDataItem } from './uniicons_file'
/**
* Icons 图标
* @description 用于展示 icon 图标
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number,String} size 图标大小
* @property {String} type 图标图案,参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export default {
name: "uni-icons",
props: {
type: {
type: String,
default: ''
},
color: {
type: String,
default: '#333333'
},
size: {
type: [Number, String],
default: 16
},
fontFamily: {
type: String,
default: ''
}
},
data() {
return {};
},
computed: {
unicode() : string {
let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
if (codes !== null) {
return codes.unicode
}
return ''
},
iconSize() : string {
const size = this.size
if (typeof size == 'string') {
const reg = /^[0-9]*$/g
return reg.test(size as string) ? '' + size + 'px' : '' + size;
// return '' + this.size
}
return this.getFontSize(size as number)
},
styleObj() : UTSJSONObject {
if (this.fontFamily !== '') {
return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
}
return { color: this.color, fontSize: this.iconSize }
}
},
created() { },
methods: {
/**
* 字体大小
*/
getFontSize(size : number) : string {
return size + 'px';
},
},
}
</script>
<style scoped>
@font-face {
font-family: UniIconsFontFamily;
src: url('./uniicons.ttf');
}
.uni-icons {
font-family: UniIconsFontFamily;
font-size: 18px;
font-style: normal;
color: #333;
}
</style>
<template> <template>
<!-- #ifdef APP-NVUE --> <!-- #ifdef APP-NVUE -->
<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text> <text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text>
<!-- #endif --> <!-- #endif -->
<!-- #ifndef APP-NVUE --> <!-- #ifndef APP-NVUE -->
<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text> <text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
<slot></slot>
</text>
<!-- #endif --> <!-- #endif -->
</template> </template>
<script> <script>
import icons from './icons.js'; import { fontData } from './uniicons_file_vue.js';
const getVal = (val) => { const getVal = (val) => {
const reg = /^[0-9]*$/g const reg = /^[0-9]*$/g
return (typeof val === 'number' || reg.test(val) )? val + 'px' : val; return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
} }
// #ifdef APP-NVUE // #ifdef APP-NVUE
var domModule = weex.requireModule('dom'); var domModule = weex.requireModule('dom');
import iconUrl from './uniicons.ttf' import iconUrl from './uniicons.ttf'
domModule.addRule('fontFace', { domModule.addRule('fontFace', {
'fontFamily': "uniicons", 'fontFamily': "uniicons",
'src': "url('"+iconUrl+"')" 'src': "url('" + iconUrl + "')"
}); });
// #endif // #endif
...@@ -34,7 +38,7 @@ ...@@ -34,7 +38,7 @@
*/ */
export default { export default {
name: 'UniIcons', name: 'UniIcons',
emits:['click'], emits: ['click'],
props: { props: {
type: { type: {
type: String, type: String,
...@@ -48,26 +52,36 @@ ...@@ -48,26 +52,36 @@
type: [Number, String], type: [Number, String],
default: 16 default: 16
}, },
customPrefix:{ customPrefix: {
type: String,
default: ''
},
fontFamily: {
type: String, type: String,
default: '' default: ''
} }
}, },
data() { data() {
return { return {
icons: icons.glyphs icons: fontData
} }
}, },
computed:{ computed: {
unicode(){ unicode() {
let code = this.icons.find(v=>v.font_class === this.type) let code = this.icons.find(v => v.font_class === this.type)
if(code){ if (code) {
return unescape(`%u${code.unicode}`) return code.unicode
} }
return '' return ''
}, },
iconSize(){ iconSize() {
return getVal(this.size) return getVal(this.size)
},
styleObj() {
if (this.fontFamily !== '') {
return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`
}
return `color: ${this.color}; font-size: ${this.iconSize};`
} }
}, },
methods: { methods: {
...@@ -81,9 +95,10 @@ ...@@ -81,9 +95,10 @@
<style lang="scss"> <style lang="scss">
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
@import './uniicons.css'; @import './uniicons.css';
@font-face { @font-face {
font-family: uniicons; font-family: uniicons;
src: url('./uniicons.ttf') format('truetype'); src: url('./uniicons.ttf');
} }
/* #endif */ /* #endif */
...@@ -92,5 +107,4 @@ ...@@ -92,5 +107,4 @@
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
} }
</style> </style>
.uniui-cart-filled:before {
content: "\e6d0";
}
.uniui-gift-filled:before {
content: "\e6c4";
}
.uniui-color:before { .uniui-color:before {
content: "\e6cf"; content: "\e6cf";
} }
...@@ -58,10 +67,6 @@ ...@@ -58,10 +67,6 @@
content: "\e6c3"; content: "\e6c3";
} }
.uniui-gift-filled:before {
content: "\e6c4";
}
.uniui-fire-filled:before { .uniui-fire-filled:before {
content: "\e6c5"; content: "\e6c5";
} }
...@@ -82,6 +87,18 @@ ...@@ -82,6 +87,18 @@
content: "\e698"; content: "\e698";
} }
.uniui-arrowthinleft:before {
content: "\e6d2";
}
.uniui-arrowthinup:before {
content: "\e6d3";
}
.uniui-arrowthindown:before {
content: "\e6d4";
}
.uniui-back:before { .uniui-back:before {
content: "\e6b9"; content: "\e6b9";
} }
...@@ -94,55 +111,43 @@ ...@@ -94,55 +111,43 @@
content: "\e6bb"; content: "\e6bb";
} }
.uniui-arrowthinright:before {
content: "\e6bb";
}
.uniui-arrow-left:before { .uniui-arrow-left:before {
content: "\e6bc"; content: "\e6bc";
} }
.uniui-arrowthinleft:before {
content: "\e6bc";
}
.uniui-arrow-up:before { .uniui-arrow-up:before {
content: "\e6bd"; content: "\e6bd";
} }
.uniui-arrowthinup:before {
content: "\e6bd";
}
.uniui-arrow-down:before { .uniui-arrow-down:before {
content: "\e6be"; content: "\e6be";
} }
.uniui-arrowthindown:before { .uniui-arrowthinright:before {
content: "\e6be"; content: "\e6d1";
} }
.uniui-bottom:before { .uniui-down:before {
content: "\e6b8"; content: "\e6b8";
} }
.uniui-arrowdown:before { .uniui-bottom:before {
content: "\e6b8"; content: "\e6b8";
} }
.uniui-right:before { .uniui-arrowright:before {
content: "\e6b5"; content: "\e6d5";
} }
.uniui-arrowright:before { .uniui-right:before {
content: "\e6b5"; content: "\e6b5";
} }
.uniui-top:before { .uniui-up:before {
content: "\e6b6"; content: "\e6b6";
} }
.uniui-arrowup:before { .uniui-top:before {
content: "\e6b6"; content: "\e6b6";
} }
...@@ -150,8 +155,8 @@ ...@@ -150,8 +155,8 @@
content: "\e6b7"; content: "\e6b7";
} }
.uniui-arrowleft:before { .uniui-arrowup:before {
content: "\e6b7"; content: "\e6d6";
} }
.uniui-eye:before { .uniui-eye:before {
...@@ -638,10 +643,6 @@ ...@@ -638,10 +643,6 @@
content: "\e627"; content: "\e627";
} }
.uniui-cart-filled:before {
content: "\e629";
}
.uniui-checkbox:before { .uniui-checkbox:before {
content: "\e62b"; content: "\e62b";
} }
......
export type IconsData = {
id : string
name : string
font_family : string
css_prefix_text : string
description : string
glyphs : Array<IconsDataItem>
}
export type IconsDataItem = {
font_class : string
unicode : string
}
export const fontData = [
{
"font_class": "arrow-down",
"unicode": "\ue6be"
},
{
"font_class": "arrow-left",
"unicode": "\ue6bc"
},
{
"font_class": "arrow-right",
"unicode": "\ue6bb"
},
{
"font_class": "arrow-up",
"unicode": "\ue6bd"
},
{
"font_class": "auth",
"unicode": "\ue6ab"
},
{
"font_class": "auth-filled",
"unicode": "\ue6cc"
},
{
"font_class": "back",
"unicode": "\ue6b9"
},
{
"font_class": "bars",
"unicode": "\ue627"
},
{
"font_class": "calendar",
"unicode": "\ue6a0"
},
{
"font_class": "calendar-filled",
"unicode": "\ue6c0"
},
{
"font_class": "camera",
"unicode": "\ue65a"
},
{
"font_class": "camera-filled",
"unicode": "\ue658"
},
{
"font_class": "cart",
"unicode": "\ue631"
},
{
"font_class": "cart-filled",
"unicode": "\ue6d0"
},
{
"font_class": "chat",
"unicode": "\ue65d"
},
{
"font_class": "chat-filled",
"unicode": "\ue659"
},
{
"font_class": "chatboxes",
"unicode": "\ue696"
},
{
"font_class": "chatboxes-filled",
"unicode": "\ue692"
},
{
"font_class": "chatbubble",
"unicode": "\ue697"
},
{
"font_class": "chatbubble-filled",
"unicode": "\ue694"
},
{
"font_class": "checkbox",
"unicode": "\ue62b"
},
{
"font_class": "checkbox-filled",
"unicode": "\ue62c"
},
{
"font_class": "checkmarkempty",
"unicode": "\ue65c"
},
{
"font_class": "circle",
"unicode": "\ue65b"
},
{
"font_class": "circle-filled",
"unicode": "\ue65e"
},
{
"font_class": "clear",
"unicode": "\ue66d"
},
{
"font_class": "close",
"unicode": "\ue673"
},
{
"font_class": "closeempty",
"unicode": "\ue66c"
},
{
"font_class": "cloud-download",
"unicode": "\ue647"
},
{
"font_class": "cloud-download-filled",
"unicode": "\ue646"
},
{
"font_class": "cloud-upload",
"unicode": "\ue645"
},
{
"font_class": "cloud-upload-filled",
"unicode": "\ue648"
},
{
"font_class": "color",
"unicode": "\ue6cf"
},
{
"font_class": "color-filled",
"unicode": "\ue6c9"
},
{
"font_class": "compose",
"unicode": "\ue67f"
},
{
"font_class": "contact",
"unicode": "\ue693"
},
{
"font_class": "contact-filled",
"unicode": "\ue695"
},
{
"font_class": "down",
"unicode": "\ue6b8"
},
{
"font_class": "bottom",
"unicode": "\ue6b8"
},
{
"font_class": "download",
"unicode": "\ue68d"
},
{
"font_class": "download-filled",
"unicode": "\ue681"
},
{
"font_class": "email",
"unicode": "\ue69e"
},
{
"font_class": "email-filled",
"unicode": "\ue69a"
},
{
"font_class": "eye",
"unicode": "\ue651"
},
{
"font_class": "eye-filled",
"unicode": "\ue66a"
},
{
"font_class": "eye-slash",
"unicode": "\ue6b3"
},
{
"font_class": "eye-slash-filled",
"unicode": "\ue6b4"
},
{
"font_class": "fire",
"unicode": "\ue6a1"
},
{
"font_class": "fire-filled",
"unicode": "\ue6c5"
},
{
"font_class": "flag",
"unicode": "\ue65f"
},
{
"font_class": "flag-filled",
"unicode": "\ue660"
},
{
"font_class": "folder-add",
"unicode": "\ue6a9"
},
{
"font_class": "folder-add-filled",
"unicode": "\ue6c8"
},
{
"font_class": "font",
"unicode": "\ue6a3"
},
{
"font_class": "forward",
"unicode": "\ue6ba"
},
{
"font_class": "gear",
"unicode": "\ue664"
},
{
"font_class": "gear-filled",
"unicode": "\ue661"
},
{
"font_class": "gift",
"unicode": "\ue6a4"
},
{
"font_class": "gift-filled",
"unicode": "\ue6c4"
},
{
"font_class": "hand-down",
"unicode": "\ue63d"
},
{
"font_class": "hand-down-filled",
"unicode": "\ue63c"
},
{
"font_class": "hand-up",
"unicode": "\ue63f"
},
{
"font_class": "hand-up-filled",
"unicode": "\ue63e"
},
{
"font_class": "headphones",
"unicode": "\ue630"
},
{
"font_class": "heart",
"unicode": "\ue639"
},
{
"font_class": "heart-filled",
"unicode": "\ue641"
},
{
"font_class": "help",
"unicode": "\ue679"
},
{
"font_class": "help-filled",
"unicode": "\ue674"
},
{
"font_class": "home",
"unicode": "\ue662"
},
{
"font_class": "home-filled",
"unicode": "\ue663"
},
{
"font_class": "image",
"unicode": "\ue670"
},
{
"font_class": "image-filled",
"unicode": "\ue678"
},
{
"font_class": "images",
"unicode": "\ue650"
},
{
"font_class": "images-filled",
"unicode": "\ue64b"
},
{
"font_class": "info",
"unicode": "\ue669"
},
{
"font_class": "info-filled",
"unicode": "\ue649"
},
{
"font_class": "left",
"unicode": "\ue6b7"
},
{
"font_class": "link",
"unicode": "\ue6a5"
},
{
"font_class": "list",
"unicode": "\ue644"
},
{
"font_class": "location",
"unicode": "\ue6ae"
},
{
"font_class": "location-filled",
"unicode": "\ue6af"
},
{
"font_class": "locked",
"unicode": "\ue66b"
},
{
"font_class": "locked-filled",
"unicode": "\ue668"
},
{
"font_class": "loop",
"unicode": "\ue633"
},
{
"font_class": "mail-open",
"unicode": "\ue643"
},
{
"font_class": "mail-open-filled",
"unicode": "\ue63a"
},
{
"font_class": "map",
"unicode": "\ue667"
},
{
"font_class": "map-filled",
"unicode": "\ue666"
},
{
"font_class": "map-pin",
"unicode": "\ue6ad"
},
{
"font_class": "map-pin-ellipse",
"unicode": "\ue6ac"
},
{
"font_class": "medal",
"unicode": "\ue6a2"
},
{
"font_class": "medal-filled",
"unicode": "\ue6c3"
},
{
"font_class": "mic",
"unicode": "\ue671"
},
{
"font_class": "mic-filled",
"unicode": "\ue677"
},
{
"font_class": "micoff",
"unicode": "\ue67e"
},
{
"font_class": "micoff-filled",
"unicode": "\ue6b0"
},
{
"font_class": "minus",
"unicode": "\ue66f"
},
{
"font_class": "minus-filled",
"unicode": "\ue67d"
},
{
"font_class": "more",
"unicode": "\ue64d"
},
{
"font_class": "more-filled",
"unicode": "\ue64e"
},
{
"font_class": "navigate",
"unicode": "\ue66e"
},
{
"font_class": "navigate-filled",
"unicode": "\ue67a"
},
{
"font_class": "notification",
"unicode": "\ue6a6"
},
{
"font_class": "notification-filled",
"unicode": "\ue6c1"
},
{
"font_class": "paperclip",
"unicode": "\ue652"
},
{
"font_class": "paperplane",
"unicode": "\ue672"
},
{
"font_class": "paperplane-filled",
"unicode": "\ue675"
},
{
"font_class": "person",
"unicode": "\ue699"
},
{
"font_class": "person-filled",
"unicode": "\ue69d"
},
{
"font_class": "personadd",
"unicode": "\ue69f"
},
{
"font_class": "personadd-filled",
"unicode": "\ue698"
},
{
"font_class": "personadd-filled-copy",
"unicode": "\ue6d1"
},
{
"font_class": "phone",
"unicode": "\ue69c"
},
{
"font_class": "phone-filled",
"unicode": "\ue69b"
},
{
"font_class": "plus",
"unicode": "\ue676"
},
{
"font_class": "plus-filled",
"unicode": "\ue6c7"
},
{
"font_class": "plusempty",
"unicode": "\ue67b"
},
{
"font_class": "pulldown",
"unicode": "\ue632"
},
{
"font_class": "pyq",
"unicode": "\ue682"
},
{
"font_class": "qq",
"unicode": "\ue680"
},
{
"font_class": "redo",
"unicode": "\ue64a"
},
{
"font_class": "redo-filled",
"unicode": "\ue655"
},
{
"font_class": "refresh",
"unicode": "\ue657"
},
{
"font_class": "refresh-filled",
"unicode": "\ue656"
},
{
"font_class": "refreshempty",
"unicode": "\ue6bf"
},
{
"font_class": "reload",
"unicode": "\ue6b2"
},
{
"font_class": "right",
"unicode": "\ue6b5"
},
{
"font_class": "scan",
"unicode": "\ue62a"
},
{
"font_class": "search",
"unicode": "\ue654"
},
{
"font_class": "settings",
"unicode": "\ue653"
},
{
"font_class": "settings-filled",
"unicode": "\ue6ce"
},
{
"font_class": "shop",
"unicode": "\ue62f"
},
{
"font_class": "shop-filled",
"unicode": "\ue6cd"
},
{
"font_class": "smallcircle",
"unicode": "\ue67c"
},
{
"font_class": "smallcircle-filled",
"unicode": "\ue665"
},
{
"font_class": "sound",
"unicode": "\ue684"
},
{
"font_class": "sound-filled",
"unicode": "\ue686"
},
{
"font_class": "spinner-cycle",
"unicode": "\ue68a"
},
{
"font_class": "staff",
"unicode": "\ue6a7"
},
{
"font_class": "staff-filled",
"unicode": "\ue6cb"
},
{
"font_class": "star",
"unicode": "\ue688"
},
{
"font_class": "star-filled",
"unicode": "\ue68f"
},
{
"font_class": "starhalf",
"unicode": "\ue683"
},
{
"font_class": "trash",
"unicode": "\ue687"
},
{
"font_class": "trash-filled",
"unicode": "\ue685"
},
{
"font_class": "tune",
"unicode": "\ue6aa"
},
{
"font_class": "tune-filled",
"unicode": "\ue6ca"
},
{
"font_class": "undo",
"unicode": "\ue64f"
},
{
"font_class": "undo-filled",
"unicode": "\ue64c"
},
{
"font_class": "up",
"unicode": "\ue6b6"
},
{
"font_class": "top",
"unicode": "\ue6b6"
},
{
"font_class": "upload",
"unicode": "\ue690"
},
{
"font_class": "upload-filled",
"unicode": "\ue68e"
},
{
"font_class": "videocam",
"unicode": "\ue68c"
},
{
"font_class": "videocam-filled",
"unicode": "\ue689"
},
{
"font_class": "vip",
"unicode": "\ue6a8"
},
{
"font_class": "vip-filled",
"unicode": "\ue6c6"
},
{
"font_class": "wallet",
"unicode": "\ue6b1"
},
{
"font_class": "wallet-filled",
"unicode": "\ue6c2"
},
{
"font_class": "weibo",
"unicode": "\ue68b"
},
{
"font_class": "weixin",
"unicode": "\ue691"
}
] as IconsDataItem[]
// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)
export const fontData = [
{
"font_class": "arrow-down",
"unicode": "\ue6be"
},
{
"font_class": "arrow-left",
"unicode": "\ue6bc"
},
{
"font_class": "arrow-right",
"unicode": "\ue6bb"
},
{
"font_class": "arrow-up",
"unicode": "\ue6bd"
},
{
"font_class": "auth",
"unicode": "\ue6ab"
},
{
"font_class": "auth-filled",
"unicode": "\ue6cc"
},
{
"font_class": "back",
"unicode": "\ue6b9"
},
{
"font_class": "bars",
"unicode": "\ue627"
},
{
"font_class": "calendar",
"unicode": "\ue6a0"
},
{
"font_class": "calendar-filled",
"unicode": "\ue6c0"
},
{
"font_class": "camera",
"unicode": "\ue65a"
},
{
"font_class": "camera-filled",
"unicode": "\ue658"
},
{
"font_class": "cart",
"unicode": "\ue631"
},
{
"font_class": "cart-filled",
"unicode": "\ue6d0"
},
{
"font_class": "chat",
"unicode": "\ue65d"
},
{
"font_class": "chat-filled",
"unicode": "\ue659"
},
{
"font_class": "chatboxes",
"unicode": "\ue696"
},
{
"font_class": "chatboxes-filled",
"unicode": "\ue692"
},
{
"font_class": "chatbubble",
"unicode": "\ue697"
},
{
"font_class": "chatbubble-filled",
"unicode": "\ue694"
},
{
"font_class": "checkbox",
"unicode": "\ue62b"
},
{
"font_class": "checkbox-filled",
"unicode": "\ue62c"
},
{
"font_class": "checkmarkempty",
"unicode": "\ue65c"
},
{
"font_class": "circle",
"unicode": "\ue65b"
},
{
"font_class": "circle-filled",
"unicode": "\ue65e"
},
{
"font_class": "clear",
"unicode": "\ue66d"
},
{
"font_class": "close",
"unicode": "\ue673"
},
{
"font_class": "closeempty",
"unicode": "\ue66c"
},
{
"font_class": "cloud-download",
"unicode": "\ue647"
},
{
"font_class": "cloud-download-filled",
"unicode": "\ue646"
},
{
"font_class": "cloud-upload",
"unicode": "\ue645"
},
{
"font_class": "cloud-upload-filled",
"unicode": "\ue648"
},
{
"font_class": "color",
"unicode": "\ue6cf"
},
{
"font_class": "color-filled",
"unicode": "\ue6c9"
},
{
"font_class": "compose",
"unicode": "\ue67f"
},
{
"font_class": "contact",
"unicode": "\ue693"
},
{
"font_class": "contact-filled",
"unicode": "\ue695"
},
{
"font_class": "down",
"unicode": "\ue6b8"
},
{
"font_class": "bottom",
"unicode": "\ue6b8"
},
{
"font_class": "download",
"unicode": "\ue68d"
},
{
"font_class": "download-filled",
"unicode": "\ue681"
},
{
"font_class": "email",
"unicode": "\ue69e"
},
{
"font_class": "email-filled",
"unicode": "\ue69a"
},
{
"font_class": "eye",
"unicode": "\ue651"
},
{
"font_class": "eye-filled",
"unicode": "\ue66a"
},
{
"font_class": "eye-slash",
"unicode": "\ue6b3"
},
{
"font_class": "eye-slash-filled",
"unicode": "\ue6b4"
},
{
"font_class": "fire",
"unicode": "\ue6a1"
},
{
"font_class": "fire-filled",
"unicode": "\ue6c5"
},
{
"font_class": "flag",
"unicode": "\ue65f"
},
{
"font_class": "flag-filled",
"unicode": "\ue660"
},
{
"font_class": "folder-add",
"unicode": "\ue6a9"
},
{
"font_class": "folder-add-filled",
"unicode": "\ue6c8"
},
{
"font_class": "font",
"unicode": "\ue6a3"
},
{
"font_class": "forward",
"unicode": "\ue6ba"
},
{
"font_class": "gear",
"unicode": "\ue664"
},
{
"font_class": "gear-filled",
"unicode": "\ue661"
},
{
"font_class": "gift",
"unicode": "\ue6a4"
},
{
"font_class": "gift-filled",
"unicode": "\ue6c4"
},
{
"font_class": "hand-down",
"unicode": "\ue63d"
},
{
"font_class": "hand-down-filled",
"unicode": "\ue63c"
},
{
"font_class": "hand-up",
"unicode": "\ue63f"
},
{
"font_class": "hand-up-filled",
"unicode": "\ue63e"
},
{
"font_class": "headphones",
"unicode": "\ue630"
},
{
"font_class": "heart",
"unicode": "\ue639"
},
{
"font_class": "heart-filled",
"unicode": "\ue641"
},
{
"font_class": "help",
"unicode": "\ue679"
},
{
"font_class": "help-filled",
"unicode": "\ue674"
},
{
"font_class": "home",
"unicode": "\ue662"
},
{
"font_class": "home-filled",
"unicode": "\ue663"
},
{
"font_class": "image",
"unicode": "\ue670"
},
{
"font_class": "image-filled",
"unicode": "\ue678"
},
{
"font_class": "images",
"unicode": "\ue650"
},
{
"font_class": "images-filled",
"unicode": "\ue64b"
},
{
"font_class": "info",
"unicode": "\ue669"
},
{
"font_class": "info-filled",
"unicode": "\ue649"
},
{
"font_class": "left",
"unicode": "\ue6b7"
},
{
"font_class": "link",
"unicode": "\ue6a5"
},
{
"font_class": "list",
"unicode": "\ue644"
},
{
"font_class": "location",
"unicode": "\ue6ae"
},
{
"font_class": "location-filled",
"unicode": "\ue6af"
},
{
"font_class": "locked",
"unicode": "\ue66b"
},
{
"font_class": "locked-filled",
"unicode": "\ue668"
},
{
"font_class": "loop",
"unicode": "\ue633"
},
{
"font_class": "mail-open",
"unicode": "\ue643"
},
{
"font_class": "mail-open-filled",
"unicode": "\ue63a"
},
{
"font_class": "map",
"unicode": "\ue667"
},
{
"font_class": "map-filled",
"unicode": "\ue666"
},
{
"font_class": "map-pin",
"unicode": "\ue6ad"
},
{
"font_class": "map-pin-ellipse",
"unicode": "\ue6ac"
},
{
"font_class": "medal",
"unicode": "\ue6a2"
},
{
"font_class": "medal-filled",
"unicode": "\ue6c3"
},
{
"font_class": "mic",
"unicode": "\ue671"
},
{
"font_class": "mic-filled",
"unicode": "\ue677"
},
{
"font_class": "micoff",
"unicode": "\ue67e"
},
{
"font_class": "micoff-filled",
"unicode": "\ue6b0"
},
{
"font_class": "minus",
"unicode": "\ue66f"
},
{
"font_class": "minus-filled",
"unicode": "\ue67d"
},
{
"font_class": "more",
"unicode": "\ue64d"
},
{
"font_class": "more-filled",
"unicode": "\ue64e"
},
{
"font_class": "navigate",
"unicode": "\ue66e"
},
{
"font_class": "navigate-filled",
"unicode": "\ue67a"
},
{
"font_class": "notification",
"unicode": "\ue6a6"
},
{
"font_class": "notification-filled",
"unicode": "\ue6c1"
},
{
"font_class": "paperclip",
"unicode": "\ue652"
},
{
"font_class": "paperplane",
"unicode": "\ue672"
},
{
"font_class": "paperplane-filled",
"unicode": "\ue675"
},
{
"font_class": "person",
"unicode": "\ue699"
},
{
"font_class": "person-filled",
"unicode": "\ue69d"
},
{
"font_class": "personadd",
"unicode": "\ue69f"
},
{
"font_class": "personadd-filled",
"unicode": "\ue698"
},
{
"font_class": "personadd-filled-copy",
"unicode": "\ue6d1"
},
{
"font_class": "phone",
"unicode": "\ue69c"
},
{
"font_class": "phone-filled",
"unicode": "\ue69b"
},
{
"font_class": "plus",
"unicode": "\ue676"
},
{
"font_class": "plus-filled",
"unicode": "\ue6c7"
},
{
"font_class": "plusempty",
"unicode": "\ue67b"
},
{
"font_class": "pulldown",
"unicode": "\ue632"
},
{
"font_class": "pyq",
"unicode": "\ue682"
},
{
"font_class": "qq",
"unicode": "\ue680"
},
{
"font_class": "redo",
"unicode": "\ue64a"
},
{
"font_class": "redo-filled",
"unicode": "\ue655"
},
{
"font_class": "refresh",
"unicode": "\ue657"
},
{
"font_class": "refresh-filled",
"unicode": "\ue656"
},
{
"font_class": "refreshempty",
"unicode": "\ue6bf"
},
{
"font_class": "reload",
"unicode": "\ue6b2"
},
{
"font_class": "right",
"unicode": "\ue6b5"
},
{
"font_class": "scan",
"unicode": "\ue62a"
},
{
"font_class": "search",
"unicode": "\ue654"
},
{
"font_class": "settings",
"unicode": "\ue653"
},
{
"font_class": "settings-filled",
"unicode": "\ue6ce"
},
{
"font_class": "shop",
"unicode": "\ue62f"
},
{
"font_class": "shop-filled",
"unicode": "\ue6cd"
},
{
"font_class": "smallcircle",
"unicode": "\ue67c"
},
{
"font_class": "smallcircle-filled",
"unicode": "\ue665"
},
{
"font_class": "sound",
"unicode": "\ue684"
},
{
"font_class": "sound-filled",
"unicode": "\ue686"
},
{
"font_class": "spinner-cycle",
"unicode": "\ue68a"
},
{
"font_class": "staff",
"unicode": "\ue6a7"
},
{
"font_class": "staff-filled",
"unicode": "\ue6cb"
},
{
"font_class": "star",
"unicode": "\ue688"
},
{
"font_class": "star-filled",
"unicode": "\ue68f"
},
{
"font_class": "starhalf",
"unicode": "\ue683"
},
{
"font_class": "trash",
"unicode": "\ue687"
},
{
"font_class": "trash-filled",
"unicode": "\ue685"
},
{
"font_class": "tune",
"unicode": "\ue6aa"
},
{
"font_class": "tune-filled",
"unicode": "\ue6ca"
},
{
"font_class": "undo",
"unicode": "\ue64f"
},
{
"font_class": "undo-filled",
"unicode": "\ue64c"
},
{
"font_class": "up",
"unicode": "\ue6b6"
},
{
"font_class": "top",
"unicode": "\ue6b6"
},
{
"font_class": "upload",
"unicode": "\ue690"
},
{
"font_class": "upload-filled",
"unicode": "\ue68e"
},
{
"font_class": "videocam",
"unicode": "\ue68c"
},
{
"font_class": "videocam-filled",
"unicode": "\ue689"
},
{
"font_class": "vip",
"unicode": "\ue6a8"
},
{
"font_class": "vip-filled",
"unicode": "\ue6c6"
},
{
"font_class": "wallet",
"unicode": "\ue6b1"
},
{
"font_class": "wallet-filled",
"unicode": "\ue6c2"
},
{
"font_class": "weibo",
"unicode": "\ue68b"
},
{
"font_class": "weixin",
"unicode": "\ue691"
}
]
// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)
{ {
"id": "uni-icons", "id": "uni-icons",
"displayName": "uni-icons 图标", "displayName": "uni-icons 图标",
"version": "1.3.5", "version": "2.0.10",
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。", "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
"keywords": [ "keywords": [
"uni-ui", "uni-ui",
...@@ -16,11 +16,7 @@ ...@@ -16,11 +16,7 @@
"directories": { "directories": {
"example": "../../temps/example_temps" "example": "../../temps/example_temps"
}, },
"dcloudext": { "dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": { "sale": {
"regular": { "regular": {
"price": "0.00" "price": "0.00"
...@@ -37,7 +33,8 @@ ...@@ -37,7 +33,8 @@
"data": "无", "data": "无",
"permissions": "无" "permissions": "无"
}, },
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
}, },
"uni_modules": { "uni_modules": {
"dependencies": ["uni-scss"], "dependencies": ["uni-scss"],
...@@ -45,12 +42,14 @@ ...@@ -45,12 +42,14 @@
"platforms": { "platforms": {
"cloud": { "cloud": {
"tcb": "y", "tcb": "y",
"aliyun": "y" "aliyun": "y",
"alipay": "n"
}, },
"client": { "client": {
"App": { "App": {
"app-vue": "y", "app-vue": "y",
"app-nvue": "y" "app-nvue": "y",
"app-uvue": "y"
}, },
"H5-mobile": { "H5-mobile": {
"Safari": "y", "Safari": "y",
...@@ -70,11 +69,15 @@ ...@@ -70,11 +69,15 @@
"阿里": "y", "阿里": "y",
"百度": "y", "百度": "y",
"字节跳动": "y", "字节跳动": "y",
"QQ": "y" "QQ": "y",
"钉钉": "y",
"快手": "y",
"飞书": "y",
"京东": "y"
}, },
"快应用": { "快应用": {
"华为": "u", "华为": "y",
"联盟": "u" "联盟": "y"
}, },
"Vue": { "Vue": {
"vue2": "y", "vue2": "y",
...@@ -83,4 +86,4 @@ ...@@ -83,4 +86,4 @@
} }
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment