Skip to content

Commit

Permalink
✨ 脚本列表页浮动按钮隐藏按钮 #37
Browse files Browse the repository at this point in the history
  • Loading branch information
CodFrm committed Feb 13, 2022
1 parent 85d1d30 commit a16efb0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"file-saver": "^2.0.5",
"jszip": "^3.7.1",
"log4js": "^6.4.1",
"monaco-editor": "^0.31.1",
"monaco-editor": "^0.32.0",
"reflect-metadata": "^0.1.13",
"sortablejs": "^1.14.0",
"uuid": "^8.3.2",
Expand Down
22 changes: 21 additions & 1 deletion src/views/pages/Option/tabs/ScriptList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@

<v-speed-dial
v-model="fab"
v-show="hideFloat"
right
bottom
direction="top"
Expand All @@ -542,6 +543,23 @@
</v-btn>
</template>

<v-tooltip left>
<template v-slot:activator="{ on, attrs }">
<v-btn
v-bind="attrs"
v-on="on"
fab
dark
small
color="#1296db"
@click="() => (hideFloat = false)"
>
<v-icon>{{ icons.mdiEyeOffOutline }}</v-icon>
</v-btn>
</template>
<span>隐藏按钮</span>
</v-tooltip>

<v-tooltip left>
<template v-slot:activator="{ on, attrs }">
<v-btn
Expand Down Expand Up @@ -661,6 +679,7 @@ import {
mdiAlarm,
mdiFileDocumentOutline,
mdiDelete,
mdiEyeOffOutline,
} from '@mdi/js';
import BgCloud from '@Components/BgCloud.vue';
Expand Down Expand Up @@ -688,7 +707,7 @@ export default class ScriptList extends Vue {
scriptController: ScriptController = new ScriptController();
protected scripts: Script[] = [];
selected: Script[] = [];
hideFloat = true;
icons = {
mdiApplication,
mdiRss,
Expand All @@ -710,6 +729,7 @@ export default class ScriptList extends Vue {
mdiAlarm,
mdiFileDocumentOutline,
mdiDelete,
mdiEyeOffOutline,
};
multipleAction: typeof multipleActionTypes[number] = '删除';
Expand Down
2 changes: 1 addition & 1 deletion tests/match.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe('UrlMatch2', () => {
url.add('http://domain2', 'ok3');
url.add('http://domain2*', 'ok4');
expect(url.match('http://domain2/')).toEqual(['ok1', 'ok3', 'ok4']);
expect(url.match('http://domain2.com/')).toEqual(['ok1', 'ok4']);
expect(url.match('http://domain2.com/')).toEqual(['ok1', 'ok4']);
expect(url.match('http://domain2/123')).toEqual(['ok1']);
})
});
Expand Down

0 comments on commit a16efb0

Please sign in to comment.