mirror of
https://github.com/directus/directus.git
synced 2026-02-17 09:42:19 -05:00
Move updated components to app (#15374)
* Move updated components to app * Make sure storybook is alive
This commit is contained in:
11
app/src/__utils__/focus.ts
Normal file
11
app/src/__utils__/focus.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Directive } from 'vue';
|
||||
|
||||
export const Focus: Directive = {
|
||||
mounted(el, binding) {
|
||||
if (binding.value) {
|
||||
el.focus();
|
||||
} else {
|
||||
el.blur();
|
||||
}
|
||||
},
|
||||
};
|
||||
9
app/src/__utils__/router.ts
Normal file
9
app/src/__utils__/router.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
|
||||
|
||||
export function generateRouter(routes: RouteRecordRaw[]) {
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes,
|
||||
});
|
||||
return router;
|
||||
}
|
||||
7
app/src/__utils__/tooltip.ts
Normal file
7
app/src/__utils__/tooltip.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Directive } from 'vue';
|
||||
|
||||
export const Tooltip: Directive = {
|
||||
mounted() {
|
||||
return undefined;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user