Compare commits
2 Commits
16ff0d1c4a
...
dcec3cf154
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dcec3cf154 | ||
|
|
2d5aca569a |
@@ -125,7 +125,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onBeforeMount } from 'vue';
|
||||
import { ref, reactive, onBeforeMount, watch } from 'vue';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
const { getTransformChildren } = useDictStore();
|
||||
|
||||
@@ -174,12 +174,24 @@ const jobTypeOptions = ref([]);
|
||||
const areaOptions = ref([]);
|
||||
|
||||
// 初始化获取数据
|
||||
onBeforeMount(() => {
|
||||
const initData = () => {
|
||||
educationOptions.value = getTransformChildren('education', '学历要求').options || [];
|
||||
experienceOptions.value = getTransformChildren('experience', '工作经验').options || [];
|
||||
scaleOptions.value = getTransformChildren('scale', '公司规模').options || [];
|
||||
jobTypeOptions.value = getJobTypeData();
|
||||
areaOptions.value = getTransformChildren('area', '地区').options || [];
|
||||
};
|
||||
|
||||
// 组件挂载时初始化数据
|
||||
onBeforeMount(() => {
|
||||
initData();
|
||||
});
|
||||
|
||||
// 监听组件显示状态,当显示时重新初始化数据
|
||||
watch(() => props.show, (newVal) => {
|
||||
if (newVal) {
|
||||
initData();
|
||||
}
|
||||
});
|
||||
|
||||
// 处理选项选择
|
||||
@@ -313,6 +325,7 @@ const handleClose = () => {
|
||||
.content-section {
|
||||
padding: 0 4%;
|
||||
overflow-y: auto;
|
||||
flex: 12;
|
||||
.radio-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user