This commit is contained in:
ckx6954 2024-12-18 20:58:25 +09:00
parent b26585b225
commit dac352e0cf
3 changed files with 23 additions and 20 deletions

View File

@ -64,7 +64,7 @@ const callApi = (yearArr, monthArr) => {
params: { params: {
solYear: String(yearArr[i]), solYear: String(yearArr[i]),
solMonth: String(monthArr[i]), solMonth: String(monthArr[i]),
serviceKey: key1, serviceKey: key2,
}, },
}) })
.then(data => { .then(data => {

View File

@ -6,16 +6,16 @@
</label> </label>
<div class="col-md-10"> <div class="col-md-10">
<select class="form-select" id="input-ss" v-model="selectData"> <select class="form-select" id="input-ss" v-model="selectData">
<option v-for="(item , i) in data" :key="item" :value="i" :selected = 'value == i' >{{ item }}</option> <option v-for="(item , i) in data" :key="item" :value="i" :selected="value == i">{{ item }}</option>
</select> </select>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, watchEffect } from 'vue'; import { ref, watch } from 'vue';
const prop = defineProps({ const props = defineProps({
title: { title: {
type: String, type: String,
default: '라벨', default: '라벨',
@ -43,14 +43,10 @@ const prop = defineProps({
}, },
}); });
const emit = defineEmits(['update:data']) const emit = defineEmits(['update:data']);
const selectData = ref(prop.value); const selectData = ref(props.value);
watchEffect(() => {
emit('update:data',selectData);
})
watch(selectData, (newValue) => {
emit('update:data', newValue);
});
</script> </script>
<style>
</style>

View File

@ -13,7 +13,14 @@
<FormSelect title="카테고리" name="cate" :is-essential="true" :data="categoryList" @update:data="category = $event" /> <FormSelect title="카테고리" name="cate" :is-essential="true" :data="categoryList" @update:data="category = $event" />
<FormInput title="비밀번호" name="pw" type="password" :is-essential="true" @update:data="password = $event" /> <FormInput
v-show="category == 1"
title="비밀번호"
name="pw"
type="password"
:is-essential="true"
@update:data="password = $event"
/>
<FormFile title="첨부파일" name="files" @update:data="attachFiles = $event" /> <FormFile title="첨부파일" name="files" @update:data="attachFiles = $event" />
@ -22,9 +29,9 @@
내용 내용
<span class="text-red">*</span> <span class="text-red">*</span>
</label> </label>
<div class="col-md-12" > <div class="col-md-12">
<!-- <TEditor @update:data="content = $event"/> --> <!-- <TEditor @update:data="content = $event"/> -->
<QEditor @update:data="content = $event"/> <QEditor @update:data="content = $event" />
</div> </div>
</div> </div>
@ -44,14 +51,14 @@ import TEditor from '@c/editor/TEditor.vue';
import FormInput from '@c/input/FormInput.vue'; import FormInput from '@c/input/FormInput.vue';
import FormSelect from '@c/input/FormSelect.vue'; import FormSelect from '@c/input/FormSelect.vue';
import FormFile from '@c/input/FormFile.vue'; import FormFile from '@c/input/FormFile.vue';
import { ref } from 'vue'; import { ref, watch } from 'vue';
import router from '@/router'; import router from '@/router';
const categoryList = ['자유', '익명', '공지사항']; const categoryList = ['자유', '익명', '공지사항'];
// input
const title = ref(''); const title = ref('');
const password = ref(''); const password = ref('');
const category = ref(''); const category = ref(0);
const content = ref(''); const content = ref('');
const attachFiles = ref(null); const attachFiles = ref(null);
@ -61,7 +68,7 @@ const goList = () => {
}; };
const write = () => { const write = () => {
console.log("작성"); console.log('작성');
}; };
</script> </script>