From bb9a140aa9153ebf3334bdc5885aef891aa9aa1f Mon Sep 17 00:00:00 2001 From: khj0414 Date: Fri, 4 Apr 2025 14:04:10 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=A0=95=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/wordDict/DictCard.vue | 8 +++- src/components/wordDict/DictWrite.vue | 69 ++++++++++++++------------- src/views/wordDict/wordDict.vue | 4 +- 3 files changed, 44 insertions(+), 37 deletions(-) diff --git a/src/components/wordDict/DictCard.vue b/src/components/wordDict/DictCard.vue index ad7fdba..87c4e44 100644 --- a/src/components/wordDict/DictCard.vue +++ b/src/components/wordDict/DictCard.vue @@ -16,8 +16,9 @@
- {{ item.category }} - {{ item.WRDDICTTL }} + {{ item.category }} + {{ item.WRDDICTTL }}
{ top: -0.5rem; --bs-form-check-bg: #fff; } +.btn.btn-primary { + writing-mode: horizontal-tb; +} diff --git a/src/components/wordDict/DictWrite.vue b/src/components/wordDict/DictWrite.vue index 5e290bf..919edae 100644 --- a/src/components/wordDict/DictWrite.vue +++ b/src/components/wordDict/DictWrite.vue @@ -51,7 +51,7 @@
-
@@ -67,39 +67,6 @@ import FormSelect from '@/components/input/FormSelect.vue'; import PlusBtn from '../button/PlusBtn.vue'; import EditBtn from '../button/EditBtn.vue'; import { useWriteVisibleStore } from '@s/writeVisible'; - -const writeStore = useWriteVisibleStore(); - -const emit = defineEmits(['close','addCategory','addWord', 'toggleEdit']); - -//용어제목 -const wordTitle = ref(''); -const addCategory = ref(''); -const content = ref(''); -const imageUrls = ref([]); - -//용어 Vaildation용 -const wordTitleAlert = ref(false); -const wordContentAlert = ref(false); -const addCategoryAlert = ref(false); - -//선택 카테고리 -const selectCategory = ref(''); - -// 제목 상태 -const computedTitle = computed(() => - wordTitle.value === '' ? props.titleValue : wordTitle.value -); - -// 카테고리 상태 -const selectedCategory = computed(() => - selectCategory.value === '' ? props.formValue : selectCategory.value - -); - -// 카테고리 입력 중복 ref -const categoryInputRef = ref(null); - const props = defineProps({ dataList: { type: Array, @@ -126,6 +93,38 @@ const props = defineProps({ } }); +const writeStore = useWriteVisibleStore(); + +const emit = defineEmits(['close','addCategory','addWord', 'toggleEdit']); + +//용어제목 +const wordTitle = ref(''); +const addCategory = ref(''); +const content = ref(''); +const imageUrls = ref([]); +//용어 Vaildation용 +const wordTitleAlert = ref(false); +const wordContentAlert = ref(false); +const addCategoryAlert = ref(false); +const changed = ref(false); +//선택 카테고리 +const selectCategory = ref(''); + +// 제목 상태 +const computedTitle = computed(() => + wordTitle.value === '' ? props.titleValue : wordTitle.value +); + +// 카테고리 상태 +const selectedCategory = computed(() => + selectCategory.value === '' ? props.formValue : selectCategory.value + +); + +// 카테고리 입력 중복 ref +const categoryInputRef = ref(null); + + // 카테고리 입력 창 const showInput = ref(false); @@ -136,6 +135,7 @@ const toggleInput = () => { const onChange = (newValue) => { selectCategory.value = newValue.target.value; + changed.value = true; }; const ValidHandler = (field) => { @@ -144,6 +144,7 @@ const ValidHandler = (field) => { } if(field == 'content'){ wordContentAlert.value = false; + } } diff --git a/src/views/wordDict/wordDict.vue b/src/views/wordDict/wordDict.vue index d7f3845..65582f3 100644 --- a/src/views/wordDict/wordDict.vue +++ b/src/views/wordDict/wordDict.vue @@ -118,7 +118,9 @@ import { useRoute } from 'vue-router'; const maincategory = route.query.category || ''; selectedAlphabet.value = mainindexKeyword; selectedCategory.value = maincategory; - getwordList('', selectedAlphabet.value, selectedCategory.value ); + if(mainindexKeyword){ + getwordList('', selectedAlphabet.value, selectedCategory.value ); + } }); const refreshWordList = (category) => {