【代码优化】移除无用的,优化代码排版
This commit is contained in:
@@ -74,18 +74,12 @@ export const useApiSelect = (option: ApiSelectProps) => {
|
||||
case 'GET':
|
||||
let url: string = props.url
|
||||
if (props.remote) {
|
||||
if(queryParam.value!=undefined)
|
||||
{
|
||||
if(checkUrl(url))
|
||||
{
|
||||
if (queryParam.value != undefined) {
|
||||
if (url.includes('?')) {
|
||||
url = `${url}&${props.remoteField}=${queryParam.value}`
|
||||
}else
|
||||
{
|
||||
} else {
|
||||
url = `${url}?${props.remoteField}=${queryParam.value}`
|
||||
}
|
||||
}else
|
||||
{
|
||||
url = `${url}`
|
||||
}
|
||||
}
|
||||
parseOptions(await request.get({ url: url }))
|
||||
@@ -100,11 +94,6 @@ export const useApiSelect = (option: ApiSelectProps) => {
|
||||
}
|
||||
}
|
||||
|
||||
function checkUrl(url)
|
||||
{
|
||||
return url.includes('?')
|
||||
}
|
||||
|
||||
function parseOptions(data: any) {
|
||||
// 情况一:如果有自定义解析函数优先使用自定义解析
|
||||
if (!isEmpty(props.parseFunc)) {
|
||||
|
||||
@@ -64,7 +64,7 @@ export const useFormCreateDesigner = async (designer: Ref) => {
|
||||
label: '接口选择器',
|
||||
icon: 'icon-server',
|
||||
props: [...apiSelectRule],
|
||||
event:['click','change','visibleChange','clear','blur','focus']
|
||||
event: ['click', 'change', 'visibleChange', 'clear', 'blur', 'focus']
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
@@ -370,7 +370,6 @@ const removeListenerField = (index) => {
|
||||
}
|
||||
// 移除监听器
|
||||
const removeListener = (index) => {
|
||||
debugger
|
||||
ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
|
||||
confirmButtonText: '确 认',
|
||||
cancelButtonText: '取 消'
|
||||
|
||||
@@ -2,7 +2,6 @@ import { toRaw } from 'vue'
|
||||
const bpmnInstances = () => (window as any)?.bpmnInstances
|
||||
// 创建监听器实例
|
||||
export function createListenerObject(options, isTask, prefix) {
|
||||
debugger
|
||||
const listenerObj = Object.create(null)
|
||||
listenerObj.event = options.event
|
||||
isTask && (listenerObj.id = options.id) // 任务监听器特有的 id 字段
|
||||
|
||||
Reference in New Issue
Block a user