From 309b459034144ada32884c765e185e45bd6dbeeb Mon Sep 17 00:00:00 2001
From: pengda <1111@qq.com>
Date: Fri, 11 Jul 2025 10:55:41 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=AE=BE=E7=BD=AE=20?=
=?UTF-8?q?=E5=9F=9F=E5=90=8D=E7=BB=91=E5=AE=9A=E7=BB=84=E4=BB=B6=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE=E9=BB=98=E8=AE=A4=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/CustomDropdown.vue | 12 ++++++------
src/components/domainBind.vue | 22 ++++++++++++----------
2 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/src/components/CustomDropdown.vue b/src/components/CustomDropdown.vue
index 801884f..5451897 100644
--- a/src/components/CustomDropdown.vue
+++ b/src/components/CustomDropdown.vue
@@ -35,7 +35,7 @@
暂时没有收款账号,我想稍后配置
-

+
@@ -61,8 +61,8 @@ export default {
}
},
options_null: {
- type: Object,
- default: () => {},
+ type: Boolean,
+ default: false,
},
placeholder: {
type: String,
@@ -125,9 +125,9 @@ export default {
},
toggleDropdown(e) {
if(e) e.stopPropagation();
- if (!this.options || !this.options.length) {
- console.warn('Dropdown options are empty');
- return;
+ if ((!this.options || !this.options.length) && !this.options_null) {
+ // console.warn('Dropdown options are empty');
+ // return;
}
// 先通知所有下拉框关闭
EventBus.$emit('close-all-dropdowns')
diff --git a/src/components/domainBind.vue b/src/components/domainBind.vue
index 68b8914..669eb51 100644
--- a/src/components/domainBind.vue
+++ b/src/components/domainBind.vue
@@ -1,9 +1,9 @@
-
+
@@ -85,7 +85,7 @@ import CustomDropdown from "@/components/CustomDropdown.vue";
export default {
name: 'domainBind',
- props:['label'],
+ props:['label','defaultPrefix','defaultDomain'],
components: {
CustomDropdown, GuipFormItem,
GuipButton,
@@ -97,8 +97,6 @@ export default {
// AUTH
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
domainOptions:[],
- prefix: '',
- domain: '',
dialogVisible: false,
data: {
prefix: '',
@@ -142,6 +140,8 @@ export default {
}
},
mounted(){
+ this.data.prefix = this.defaultPrefix
+ this.data.domain = this.defaultDomain
this.getDomainList()
},
methods:{
@@ -153,11 +153,13 @@ export default {
}
}).then(response => {
if(response.status){
- this.data.domain = '.'+response.data[0]
- that.domainOptions = response.data.map(item => ({
- label: '.'+item,
- value: '.'+item
- }));
+ if(response.data.length>0){
+ if(!this.data.domain) this.data.domain = '.'+response.data[0]
+ that.domainOptions = response.data.map(item => ({
+ label: '.'+item,
+ value: '.'+item
+ }));
+ }
return true
}
that.$message.error(response.info);