From ef307d590b7d27791bce1b594ff16267f9b8f0f4 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 21 三月 2024 17:39:52 +0800
Subject: [PATCH] 调整文件夹路径
---
src/components/search-option/FYOptionScene.vue | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/src/components/search-option/FYOptionScene.vue b/src/components/search-option/FYOptionScene.vue
index 0786b61..6cf9b1b 100644
--- a/src/components/search-option/FYOptionScene.vue
+++ b/src/components/search-option/FYOptionScene.vue
@@ -6,12 +6,7 @@
placeholder="鍦烘櫙绫诲瀷"
style="width: 150px"
>
- <el-option
- v-for="s in sceneTypes"
- :key="s.value"
- :label="s.label"
- :value="s"
- />
+ <el-option v-for="s in sceneTypes" :key="s.value" :label="s.label" :value="s" />
</el-select>
</el-form-item>
</template>
@@ -24,30 +19,45 @@
// 鏄惁鍦ㄩ閫夐」澶勬坊鍔犫�滃叏閮ㄢ�濋�夐」
allOption: {
type: Boolean,
- default: true,
+ default: true
},
// 1:椋炵窘鐜绯荤粺锛�2锛氶缇界洃绠$郴缁燂紱
type: {
type: Number,
- default: 1,
+ default: 1
},
// 杩斿洖缁撴灉
value: Object,
// 鏄惁榛樿杩斿洖鍒濆閫夐」
initValue: {
type: Boolean,
- default: true,
+ default: true
},
+ // form琛ㄥ崟缁戝畾灞炴�у悕
prop: {
type: String,
default: '_scenetype'
+ },
+ // 鍒囨崲 type 鍚庯紝褰撳墠閫夐」鏄惁娓呯┖
+ sourceInit: {
+ type: Boolean,
+ default: true
}
},
emits: ['update:value'],
data() {
return {
- sceneTypes: enumScene(this.type, this.allOption),
+ // sceneTypes: enumScene(this.type, this.allOption),
};
+ },
+ computed: {
+ sceneTypes() {
+ if (this.sourceInit) {
+ // 褰撳洜涓簍ype鎴栬�卆llOption鍙傛暟鍙樺寲寮曡捣閫夐」鍙樻洿鏃讹紝娓呯┖褰撳墠閫夐」
+ this.handleChange();
+ }
+ return enumScene(this.type, this.allOption);
+ }
},
methods: {
handleChange(value) {
@@ -58,6 +68,6 @@
if (this.initValue) {
this.handleChange(this.sceneTypes[0]);
}
- },
+ }
};
</script>
--
Gitblit v1.9.3