diff --git a/App.vue b/App.vue
index 011e88d..8ff1850 100644
--- a/App.vue
+++ b/App.vue
@@ -21,9 +21,7 @@ export default {
go2('error')
}
}
- },
- onShow: function () {},
- onHide: function () {}
+ }
}
diff --git a/components/qn-datetime-picker/calendar.vue b/components/qn-datetime-picker/calendar.vue
index c48a096..1d7472e 100644
--- a/components/qn-datetime-picker/calendar.vue
+++ b/components/qn-datetime-picker/calendar.vue
@@ -1,898 +1,871 @@
-
-
-
-
-
-
- {{nowDate.month}}
-
-
-
- {{SUNText}}
-
-
- {{monText}}
-
-
- {{TUEText}}
-
-
- {{WEDText}}
-
-
- {{THUText}}
-
-
- {{FRIText}}
-
-
- {{SATText}}
-
-
-
-
-
-
-
-
-
-
- {{tempSingleDate ? tempSingleDate : selectDateText}}
-
-
-
-
-
-
- {{tempRange.before ? tempRange.before : startDateText}}
-
-
-
-
-
-
- {{tempRange.after ? tempRange.after : endDateText}}
-
-
-
-
-
-
- 确认
-
-
-
+
+
+
+
+
+
+ {{ nowDate.month }}
+
+
+
+ {{ SUNText }}
+
+
+ {{ monText }}
+
+
+ {{ TUEText }}
+
+
+ {{ WEDText }}
+
+
+ {{ THUText }}
+
+
+ {{ FRIText }}
+
+
+ {{ SATText }}
+
+
+
+
+
+
+
+
+
+ {{ tempSingleDate ? tempSingleDate : selectDateText }}
+
+
+
+
+
+ {{ tempRange.before ? tempRange.before : startDateText }}
+
+
+
+
+ {{ tempRange.after ? tempRange.after : endDateText }}
+
+
+
+
+ 确认
+
+
+
diff --git a/components/qn-datetime-picker/keypress.js b/components/qn-datetime-picker/keypress.js
index 9601aba..44bd3a7 100644
--- a/components/qn-datetime-picker/keypress.js
+++ b/components/qn-datetime-picker/keypress.js
@@ -7,7 +7,7 @@ export default {
default: false
}
},
- mounted () {
+ mounted() {
const keyNames = {
esc: ['Esc', 'Escape'],
tab: 'Tab',
@@ -23,10 +23,10 @@ export default {
if (this.disable) {
return
}
- const keyName = Object.keys(keyNames).find(key => {
- const keyName = $event.key
+ const keyName = Object.keys(keyNames).find((key) => {
+ const name = $event.key
const value = keyNames[key]
- return value === keyName || (Array.isArray(value) && value.includes(keyName))
+ return value === name || (Array.isArray(value) && value.includes(name))
})
if (keyName) {
// 避免和其他按键事件冲突
@@ -39,7 +39,6 @@ export default {
this.$once('hook:beforeDestroy', () => {
document.removeEventListener('keyup', listener)
})
- },
- render: () => {}
+ }
}
-// #endif
\ No newline at end of file
+// #endif
diff --git a/components/qn-datetime-picker/qn-datetime-picker.vue b/components/qn-datetime-picker/qn-datetime-picker.vue
index 4ea79cf..e92c151 100644
--- a/components/qn-datetime-picker/qn-datetime-picker.vue
+++ b/components/qn-datetime-picker/qn-datetime-picker.vue
@@ -21,9 +21,6 @@
-
@@ -57,7 +54,6 @@
style="padding: 0 8px"
/>
@@ -294,7 +290,7 @@ export default {
watch: {
type: {
immediate: true,
- handler(newVal, oldVal) {
+ handler(newVal) {
if (newVal.indexOf('time') !== -1) {
this.hasTime = true
} else {
@@ -309,7 +305,7 @@ export default {
},
value: {
immediate: true,
- handler(newVal, oldVal) {
+ handler(newVal) {
if (this.isEmitValue) {
this.isEmitValue = false
return
@@ -320,7 +316,7 @@ export default {
start: {
immediate: true,
- handler(newVal, oldVal) {
+ handler(newVal) {
if (!newVal) return
const { defDate, defTime } = this.parseDate(newVal)
this.caleRange.startDate = defDate
@@ -332,7 +328,7 @@ export default {
end: {
immediate: true,
- handler(newVal, oldVal) {
+ handler(newVal) {
if (!newVal) return
const { defDate, defTime } = this.parseDate(newVal)
this.caleRange.endDate = defDate
@@ -345,13 +341,11 @@ export default {
computed: {
reactStartTime() {
const activeDate = this.isRange ? this.tempRange.startDate : this.tempSingleDate
- const res = activeDate === this.caleRange.startDate ? this.caleRange.startTime : ''
- return res
+ return activeDate === this.caleRange.startDate ? this.caleRange.startTime : ''
},
reactEndTime() {
const activeDate = this.isRange ? this.tempRange.endDate : this.tempSingleDate
- const res = activeDate === this.caleRange.endDate ? this.caleRange.endTime : ''
- return res
+ return activeDate === this.caleRange.endDate ? this.caleRange.endTime : ''
},
reactMobDefTime() {
const times = {
@@ -367,7 +361,6 @@ export default {
}
},
datePopupWidth() {
- // todo
return this.isRange ? 653 : 301
},
@@ -409,20 +402,12 @@ export default {
},
showClearIcon() {
const { clearIcon, disabled, singleVal, range } = this
- const bool = clearIcon && !disabled && (singleVal || (range.startDate && range.endDate))
- return bool
+ return clearIcon && !disabled && (singleVal || (range.startDate && range.endDate))
}
},
created() {
this.form = this.getForm('uniForms')
this.formItem = this.getForm('uniFormsItem')
-
- // if (this.formItem) {
- // if (this.formItem.name) {
- // this.rename = this.formItem.name
- // this.form.inputChildrens.push(this)
- // }
- // }
},
mounted() {
this.platform()
@@ -688,11 +673,7 @@ export default {
startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
// 计算详细项的截止时间
endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
- if (startDate <= endDate) {
- return true
- } else {
- return false
- }
+ return startDate <= endDate
},
/**
diff --git a/components/qn-datetime-picker/time-picker.vue b/components/qn-datetime-picker/time-picker.vue
index 1c711fd..e29515a 100644
--- a/components/qn-datetime-picker/time-picker.vue
+++ b/components/qn-datetime-picker/time-picker.vue
@@ -79,9 +79,6 @@
-
-
-
diff --git a/components/qn-datetime-picker/util.js b/components/qn-datetime-picker/util.js
index 0f3ea9e..d23d54e 100644
--- a/components/qn-datetime-picker/util.js
+++ b/components/qn-datetime-picker/util.js
@@ -8,7 +8,7 @@ class Calendar {
// multipleStatus
} = {}) {
// 当前日期
- this.date = this.getDate(new Date()) // 当前初入日期
+ this.date = this.getDate(new Date())
// 打点信息
this.selected = selected || []
// 范围开始
@@ -20,8 +20,6 @@ class Calendar {
this.cleanMultipleStatus()
// 每周日期
this.weeks = {}
- // this._getWeek(this.date.fullDate)
- // this.multipleStatus = multipleStatus
this.lastHover = false
}
/**
@@ -355,7 +353,7 @@ class Calendar {
* @param {Object} dateData
*/
_getWeek(dateData) {
- const { fullDate, year, month, date, day } = this.getDate(dateData)
+ const { year, month } = this.getDate(dateData)
let firstDay = new Date(year, month - 1, 1).getDay()
let currentDay = new Date(year, month, 0).getDate()
let dates = {
@@ -379,14 +377,6 @@ class Calendar {
this.canlender = canlender
this.weeks = weeks
}
-
- //静态方法
- // static init(date) {
- // if (!this.instance) {
- // this.instance = new Calendar(date);
- // }
- // return this.instance;
- // }
}
export default Calendar
diff --git a/components/qn-input-number/qn-input-number.vue b/components/qn-input-number/qn-input-number.vue
index 54dca3a..1dc103f 100644
--- a/components/qn-input-number/qn-input-number.vue
+++ b/components/qn-input-number/qn-input-number.vue
@@ -2,7 +2,6 @@
-
职务
-
点击选择职务
{{ form.title }}
@@ -56,13 +55,12 @@
-
+