-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在跳转的时候怎么携带参数呢 #166
Comments
To append an additional parameter to the URL in your dict: {
url: 'system/role/list?role_id=1&additionalParam=value', // Append your parameter here
props: { label: 'name', value: 'id' }
}, Just replace
|
url: 'system/role/list?role_id=1&additionalParam=value',这里的role_id后面跟的参数需要动态获取 @dosubot |
To dynamically append a
import { computed } from 'vue';
const roleId = ref(''); // Your reactive role_id
const dynamicUrl = computed(() => {
return `system/role/list?role_id=${roleId.value}&additionalParam=value`;
});
import { ref } from 'vue';
const roleId = ref(''); // Set this based on conditions or user selection
function getDynamicUrl() {
return `system/role/list?role_id=${roleId.value}&additionalParam=value`;
} Replace
|
列如:
{
title: '角色', dataIndex: 'role_ids', width: 120, formType: 'select', multiple: true,
dict: { url: 'system/role/list?role_id=1', props: { label: 'name', value: 'id' } }, hide: true,
commonRules: [{ required: true, message: '角色必选' }],
editDefaultValue: async (record) => {
const response = await admin.read(record.id)
return response.data.roleList.map(item => item.id )
}
},
我想在这个url后面加上一个参数role_id的值
The text was updated successfully, but these errors were encountered: