rename: client -> frontend
This commit is contained in:
parent
db6fff6f26
commit
9384f5399d
592 changed files with 111 additions and 111 deletions
18
packages/frontend/src/directives/ripple.ts
Normal file
18
packages/frontend/src/directives/ripple.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import Ripple from '@/components/MkRipple.vue';
|
||||
import { popup } from '@/os';
|
||||
|
||||
export default {
|
||||
mounted(el, binding, vn) {
|
||||
// 明示的に false であればバインドしない
|
||||
if (binding.value === false) return;
|
||||
|
||||
el.addEventListener('click', () => {
|
||||
const rect = el.getBoundingClientRect();
|
||||
|
||||
const x = rect.left + (el.offsetWidth / 2);
|
||||
const y = rect.top + (el.offsetHeight / 2);
|
||||
|
||||
popup(Ripple, { x, y }, {}, 'end');
|
||||
});
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue