Skip to content

⬅️ Back to Table of Contents

📄 onElementRemoval/demo

📊 Analysis Summary

Metric Count
🔧 Functions 2
📦 Imports 3

📚 Table of Contents

🛠️ File Location:

📂 packages/core/onElementRemoval/demo.vue

📦 Imports

Name Source
onElementRemoval @vueuse/core
shallowRef vue
useTemplateRef vue

Functions

demo1BtnOnClick(): void

Returns: void

Code
function demo1BtnOnClick() {
  demo1State.value = !demo1State.value
}

demo2BtnOnClick(): void

Returns: void

Calls:

  • demo2ParentRef.value?.appendChild
  • demo2Ref.value?.remove
Code
function demo2BtnOnClick() {
  demo2State.value = !demo2State.value
  if (demo2State.value) {
    demo2ParentRef.value?.appendChild(demo2Ref.value!)
  }
  else {
    demo2Ref.value?.remove()
  }
}

Generated by Syntax Scribe