Skip to content

Commit

Permalink
feat: remove check
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Jun 30, 2024
1 parent f7c5c3d commit a25b31a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/views/DevicePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import { toValidURL } from '@/utils/check';
import { message } from '@/utils/discrete';
import { errorWrap } from '@/utils/error';
import { delay } from '@/utils/others';
import { checkSelector } from '@/utils/selector';
import { screenshotStorage, snapshotStorage } from '@/utils/storage';
import { useSnapshotColumns } from '@/utils/table';
import { useBatchTask, useTask } from '@/utils/task';
import type { Device, Snapshot } from '@/utils/types';
import { useDebounceFn, useStorage, useTitle } from '@vueuse/core';
import { useStorage, useTitle } from '@vueuse/core';
import JSON5 from 'json5';
import {
NButton,
Expand Down Expand Up @@ -257,14 +256,9 @@ const actionOptions: {
];
const clickAction = shallowReactive({
selector: ``,
selectorValid: false,
action: 'click',
quickFind: false,
});
const checkSelectorValid = useDebounceFn(() => {
clickAction.selectorValid = checkSelector(clickAction.selector);
}, 500);
watch(() => clickAction.selector.trim(), checkSelectorValid);
const execSelector = useTask(async () => {
const result = await api.execSelector({ ...clickAction });
if (result.message) {
Expand Down Expand Up @@ -361,7 +355,6 @@ const placeholder = `
positive-text="确认"
:positiveButtonProps="{
loading: execSelector.loading,
disabled: !clickAction.selectorValid,
onClick() {
execSelector.invoke();
},
Expand Down

0 comments on commit a25b31a

Please sign in to comment.