버튼 수정
This commit is contained in:
parent
7a56ddfaa0
commit
55d9ea0ebe
@ -5,17 +5,28 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, defineProps, defineExpose } from 'vue';
|
import { ref, defineProps, defineExpose, watch } from 'vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
isToggleEnabled: {
|
isToggleEnabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
isActive: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const buttonClass = ref("bx bx-edit");
|
const buttonClass = ref("bx bx-edit");
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.isActive,
|
||||||
|
newVal => {
|
||||||
|
buttonClass.value = newVal ? 'bx bx-x' : 'bx bx-edit';
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
const toggleText = () => {
|
const toggleText = () => {
|
||||||
if (props.isToggleEnabled) {
|
if (props.isToggleEnabled) {
|
||||||
buttonClass.value = buttonClass.value === "bx bx-edit" ? "bx bx-x" : "bx bx-edit";
|
buttonClass.value = buttonClass.value === "bx bx-edit" ? "bx bx-x" : "bx bx-edit";
|
||||||
|
|||||||
@ -11,7 +11,6 @@
|
|||||||
:contentValue="item.WRDDICCON"
|
:contentValue="item.WRDDICCON"
|
||||||
:isDisabled="userStore.user.role !== 'ROLE_ADMIN'"
|
:isDisabled="userStore.user.role !== 'ROLE_ADMIN'"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<input
|
<input
|
||||||
v-if="userStore.user.role == 'ROLE_ADMIN'"
|
v-if="userStore.user.role == 'ROLE_ADMIN'"
|
||||||
|
|||||||
@ -6,9 +6,10 @@
|
|||||||
<SearchBar @update:data="search"/>
|
<SearchBar @update:data="search"/>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<!-- 단어 갯수, 작성하기 -->
|
<!-- 단어 갯수, 작성하기 -->
|
||||||
<!-- 왼쪽 사이드바 -->
|
<!-- 왼쪽 사이드바 -->
|
||||||
<div class="sidebar position-sticky" style="top: 100px; max-width: 250px; min-width: 250px;">
|
<div class="sidebar position-sticky" style="top: 100px; max-width: 250px; min-width: 250px;">
|
||||||
<WriteButton ref="writeButton" @click="writeStore.toggleItem(999999)" :isToggleEnabled="true"/>
|
<WriteButton ref="writeButton" @click="writeStore.toggleItem(999999)" :isToggleEnabled="true"
|
||||||
|
:isActive="writeStore.activeItemId === 999999"/>
|
||||||
<!-- ㄱ ㄴ ㄷ ㄹ -->
|
<!-- ㄱ ㄴ ㄷ ㄹ -->
|
||||||
<DictAlphabetFilter @update:data="handleSelectedAlphabetChange" :indexCategory="indexCategory" :selectedAl="selectedAlphabet" />
|
<DictAlphabetFilter @update:data="handleSelectedAlphabetChange" :indexCategory="indexCategory" :selectedAl="selectedAlphabet" />
|
||||||
<!-- 카테고리 -->
|
<!-- 카테고리 -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user