会员管理页面

This commit is contained in:
fengachen
2021-08-25 18:09:25 +08:00
parent a871898de6
commit 308d77f8b5
13 changed files with 1215 additions and 16 deletions
+1 -1
View File
@@ -2802,7 +2802,7 @@
return
}
// 点击的标签是JPopup的弹出层
if (pClassName.includes('j-popup-modal')) {
if (pClassName.includes('j-popup-modules')) {
return
}
// 点击的标签是日期选择器的弹出层
+1 -1
View File
@@ -72,7 +72,7 @@
}
},
computed: {
// 一些未处理的参数或特殊处理的参数绑定到 a-modal
// 一些未处理的参数或特殊处理的参数绑定到 a-modules
_attrs() {
let attrs = { ...this.$attrs }
// 如果全屏就将宽度设为 100%
+109
View File
@@ -0,0 +1,109 @@
<template>
<a-date-picker
:disabledDate="disabledDate"
:disabled="disabled || readOnly"
:placeholder="placeholder"
@change="handleDateChange"
:value="momVal"
:showTime="showTime"
:format="dateFormat"
mode="year"
:getCalendarContainer="getCalendarContainer"
:open="opent"
@openChange="handleChange"
@panelChange="onPanelChange"
> </a-date-picker>
</template>
<script>
import moment from 'moment'
export default {
name: 'JYearDate',
props: {
placeholder: {
type: String,
default: '',
required: false
},
value: {
type: String,
required: false
},
disabledDate: {
type: Function
},
dateFormat: {
type: String,
default: 'YYYY',
required: false
},
// 此属性可以被废弃了
triggerChange: {
type: Boolean,
required: false,
default: false
},
readOnly: {
type: Boolean,
required: false,
default: false
},
disabled: {
type: Boolean,
required: false,
default: false
},
showTime: {
type: Boolean,
required: false,
default: false
},
getCalendarContainer: {
type: Function,
default: (node) => node.parentNode
}
},
data() {
const dateStr = this.value
return {
decorator: '',
momVal: !dateStr ? null : moment(dateStr, this.dateFormat),
opent: false
}
},
watch: {
value(val) {
if (!val) {
this.momVal = null
} else {
this.momVal = moment(val, this.dateFormat)
}
}
},
methods: {
moment,
handleDateChange(mom, dateStr) {
this.opent = false
this.$emit('change', dateStr)
},
handleChange(open) {
this.opent = open
this.$nextTick(() => {
})
},
onPanelChange(value, mode) {
this.opent = false
// 扩展 年份的时候对点击的年份进行回传
if (this.dateFormat === 'YYYY') {
const year = new Date(value._d).getFullYear()
this.$emit('change', year + '')
}
}
},
// 2.2新增 在组件内定义 指定父组件调用时候的传值属性和事件类型 这个牛逼
model: {
prop: 'value',
event: 'change'
}
}
</script>
+1 -1
View File
@@ -125,7 +125,7 @@
immediate: true,
handler() {
this.searchMenuVisible = false
this.searchMenuComp = this.isMobile() ? 'a-modal' : 'span'
this.searchMenuComp = this.isMobile() ? 'a-modules' : 'span'
},
},
// update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框