|
@@ -16,7 +16,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
-import { ref, onMounted, onBeforeUnmount, computed, inject, watch } from 'vue'
|
|
|
|
|
|
+import { ref, onMounted, onBeforeUnmount, computed, inject, watch, defineExpose } from 'vue'
|
|
|
|
|
|
import TagMsg from './content/TagMsg.vue'
|
|
import TagMsg from './content/TagMsg.vue'
|
|
import Comment from './content/Comment.vue'
|
|
import Comment from './content/Comment.vue'
|
|
@@ -27,6 +27,7 @@ const notify = inject('notify')
|
|
const emits = defineEmits(['action'])
|
|
const emits = defineEmits(['action'])
|
|
const height = ref(0)
|
|
const height = ref(0)
|
|
const canShow = ref(false)
|
|
const canShow = ref(false)
|
|
|
|
+
|
|
const onResize = () => {
|
|
const onResize = () => {
|
|
height.value = window.innerHeight - 90
|
|
height.value = window.innerHeight - 90
|
|
}
|
|
}
|
|
@@ -73,7 +74,7 @@ const goFocusTag = () => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- goFocusTag()
|
|
|
|
|
|
+ goFocusTag()
|
|
onResize()
|
|
onResize()
|
|
window.addEventListener('resize', onResize)
|
|
window.addEventListener('resize', onResize)
|
|
})
|
|
})
|
|
@@ -81,6 +82,9 @@ onMounted(() => {
|
|
onBeforeUnmount(() => {
|
|
onBeforeUnmount(() => {
|
|
window.removeEventListener('resize', onResize)
|
|
window.removeEventListener('resize', onResize)
|
|
})
|
|
})
|
|
|
|
+defineExpose({
|
|
|
|
+ onClose,
|
|
|
|
+})
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.aside-item {
|
|
.aside-item {
|