This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * "foo<bar>baz</bar>qux" => ['foo', ['bar', 'baz'], 'qux'] | |
| * "<bar/>" => [['bar', '']] | |
| * */ | |
| function parseStringIntoChunks(string) { | |
| const chunks = []; | |
| let buffer = ''; | |
| let currentTag = ''; | |
| let currentTagContent = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Usage: | |
| // bem('class-name', { foo: 'bar', baz: true }) → ['class-name--foo-bar', 'class-name--baz'] | |
| export const bem = (baseClass, mods) => { | |
| const keys = Object.keys(mods); | |
| const res = []; | |
| keys.forEach(key => { | |
| const param = mods[key]; | |
| if (!param) return; | |
| if (Array.isArray(param)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="outer-click" ref="root"> | |
| <slot /> | |
| </div> | |
| </template> | |
| <script> | |
| export default { | |
| name: 'OuterClick', | |
| props: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div | |
| class="transition-expand" | |
| ref="container" | |
| :style="style" | |
| > | |
| <transition | |
| name="transition-fade" | |
| @enter="enter" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Vue from 'vue'; | |
| import getScrollbarWidth from "@modules/utils/getScrollbarWidth.js"; | |
| import { getDocument, getWindow } from "@modules/utils/dom.js"; | |
| const window = getWindow(); | |
| const document = getDocument(); | |
| const mobileWidth = parseInt( | |
| window | |
| .getComputedStyle(document.documentElement) |