mirror of
https://github.com/certd/certd.git
synced 2026-04-03 14:10:54 +08:00
chore: perf remote- select
This commit is contained in:
@@ -79,6 +79,17 @@ const getPluginType: any = inject("get:plugin:type", () => {
|
||||
return "plugin";
|
||||
});
|
||||
|
||||
function getInputFromForm(form: any, pluginType: string) {
|
||||
let input: any = {};
|
||||
if (pluginType === "plugin") {
|
||||
input = form?.input || {};
|
||||
} else if (pluginType === "access") {
|
||||
input = form?.access || {};
|
||||
} else {
|
||||
input = form || {};
|
||||
}
|
||||
return input;
|
||||
}
|
||||
const searchKeyRef = ref("");
|
||||
const optionsRef = ref([]);
|
||||
const message = ref("");
|
||||
@@ -104,7 +115,7 @@ const getOptions = async () => {
|
||||
}
|
||||
const pluginType = getPluginType();
|
||||
const { form } = getScope();
|
||||
const input = (pluginType === "plugin" ? form?.input : form) || {};
|
||||
const input = getInputFromForm(form, pluginType);
|
||||
|
||||
for (let key in define.input) {
|
||||
const inWatches = props.watches?.includes(key);
|
||||
@@ -200,7 +211,7 @@ watch(
|
||||
() => {
|
||||
const pluginType = getPluginType();
|
||||
const { form, key } = getScope();
|
||||
const input = (pluginType === "plugin" ? form?.input : form) || {};
|
||||
const input = getInputFromForm(form, pluginType);
|
||||
const watches: any = {};
|
||||
if (props.watches && props.watches.length > 0) {
|
||||
for (const key of props.watches) {
|
||||
|
||||
Reference in New Issue
Block a user