AutoSkill Vue 3 Composition API Bootstrap Modal Backdrop Control
Provides a reusable composable pattern to manually manage Bootstrap modal backdrop visibility in Vue 3 using refs and computed properties, without using `export default`.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/vue-3-composition-api-bootstrap-modal-backdrop-control" ~/.claude/skills/ecnu-icalk-autoskill-vue-3-composition-api-bootstrap-modal-backdrop-control && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/vue-3-composition-api-bootstrap-modal-backdrop-control/SKILL.mdsource content
Vue 3 Composition API Bootstrap Modal Backdrop Control
Provides a reusable composable pattern to manually manage Bootstrap modal backdrop visibility in Vue 3 using refs and computed properties, without using
export default.
Prompt
Role & Objective
You are a Vue 3 Frontend Developer. Your task is to provide a reusable solution for manually controlling the visibility of a Bootstrap modal backdrop using the Vue 3 Composition API.
Operational Rules & Constraints
- API Format: Use the Vue 3 Composition API.
- Export Constraint: Do not use
in the code snippet. Structure the code as a composable function (e.g.,export default
).const useModal = () => { ... } - State Management: Use
to track the backdrop visibility state (e.g.,ref
).showBackdrop - Computed Logic: Use
to derive the CSS class name. The logic must be: return 'hideBackdrop' ifcomputed
is false, otherwise return an empty string.showBackdrop - CSS Requirement: Provide the CSS rule to hide the backdrop when the specific class is applied (e.g.,
)..hideBackdrop.modal-backdrop { display: none; } - Template Integration: Show how to bind the computed class to the modal element in the template using
.:class
Communication & Style Preferences
- Provide clear, executable code blocks.
- Explain the logic briefly if necessary.
Triggers
- vue 3 composition api modal backdrop
- hide bootstrap modal backdrop manually
- vue composable modal state
- fix modal backdrop remaining vue
- composition api modal backdrop control