|
|
@ -42,8 +42,11 @@ const configFilterRef = ref<any>([]) // 获取排序的值
|
|
|
|
initAsideValueRef.value = cloneDeep(asideMap)
|
|
|
|
initAsideValueRef.value = cloneDeep(asideMap)
|
|
|
|
|
|
|
|
|
|
|
|
onBeforeMount(async () => {
|
|
|
|
onBeforeMount(async () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
finalStore.fetchConfig()
|
|
|
|
finalStore.fetchConfig()
|
|
|
|
finalStore.fetchCustomConfig()
|
|
|
|
finalStore.fetchCustomConfig()
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
Object.keys(asideMap).forEach((key) => {
|
|
|
|
Object.keys(asideMap).forEach((key) => {
|
|
|
@ -74,6 +77,8 @@ const mousetrap = inject('mousetrap') as any
|
|
|
|
mousetrap.bind('[', collapseHandler)
|
|
|
|
mousetrap.bind('[', collapseHandler)
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//console.log(asideMap)
|
|
|
|
nextTick(() => {
|
|
|
|
nextTick(() => {
|
|
|
|
computeSlideHeight()
|
|
|
|
computeSlideHeight()
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -110,9 +115,7 @@ function computeSlideHeight() {
|
|
|
|
|
|
|
|
|
|
|
|
useWindowSizeFn(computeSlideHeight, 280)
|
|
|
|
useWindowSizeFn(computeSlideHeight, 280)
|
|
|
|
|
|
|
|
|
|
|
|
onBeforeMount(async () => {
|
|
|
|
|
|
|
|
finalStore.fetchCustomConfig()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nextTick(() => {
|
|
|
|
nextTick(() => {
|
|
|
|
finalStore.$subscribe(() => {
|
|
|
|
finalStore.$subscribe(() => {
|
|
|
@ -221,7 +224,7 @@ nextTick(() => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
customTempObjRef.value = customObjRef.value
|
|
|
|
customTempObjRef.value = customObjRef.value
|
|
|
|
console.log('asideValue直接处理后的结果', asideValue)
|
|
|
|
console.log('asideValue直接处理后的结果q', asideValue)
|
|
|
|
console.log('customTempObjRef.value', customTempObjRef.value)
|
|
|
|
console.log('customTempObjRef.value', customTempObjRef.value)
|
|
|
|
const tempobj = cloneDeep(asideValue)
|
|
|
|
const tempobj = cloneDeep(asideValue)
|
|
|
|
console.log('tempObj', tempobj)
|
|
|
|
console.log('tempObj', tempobj)
|
|
|
@ -251,12 +254,17 @@ nextTick(() => {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
watch(asideVisible, (newVal) => {
|
|
|
|
watch(asideVisible, (newVal) => {
|
|
|
|
|
|
|
|
|
|
|
|
Object.keys(asideValue).forEach((key) => {
|
|
|
|
Object.keys(asideValue).forEach((key) => {
|
|
|
|
if (newVal[key] === false)
|
|
|
|
if (newVal[key] === false)
|
|
|
|
asideValue[key] = asideMap[key].defaultValue
|
|
|
|
asideValue[key] = asideMap[key].defaultValue
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
watch(asideValue, (newVal) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(newVal)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
const asideEnter = ref(false)
|
|
|
|
const asideEnter = ref(false)
|
|
|
|
|
|
|
|
|
|
|
|
const showCollapse = computed(() => {
|
|
|
|
const showCollapse = computed(() => {
|
|
|
@ -332,10 +340,10 @@ function updateComponent(key, e) {
|
|
|
|
customObjRef.value = tempobj
|
|
|
|
customObjRef.value = tempobj
|
|
|
|
// asideValue = Object.assign({}, asideValue, tempobj);
|
|
|
|
// asideValue = Object.assign({}, asideValue, tempobj);
|
|
|
|
console.log('asideValue跟新值', tempobj)
|
|
|
|
console.log('asideValue跟新值', tempobj)
|
|
|
|
finalStore.setAsideValue(tempobj)
|
|
|
|
finalStore.setAsideValue(tempobj)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
defineExpose({
|
|
|
|
defineExpose({
|
|
|
|
showSearch,
|
|
|
|
showSearch,asideValue
|
|
|
|
})
|
|
|
|
})
|
|
|
|
useKeydown('s', () => setShowSearch(true))
|
|
|
|
useKeydown('s', () => setShowSearch(true))
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|