diff options
author | pacien | 2020-05-02 04:11:24 +0200 |
---|---|---|
committer | pacien | 2020-05-02 04:11:24 +0200 |
commit | 8e3ac8fe44bebb38e1882ca7f06b8100078ad88d (patch) | |
tree | a748fa1e639cb3b5e1f24a8150e89dbb28c980cb /viewer/src/components/index.ts | |
parent | 7042ffc06326fa8ffe70f5a59747709250166c16 (diff) | |
parent | 0e0b5b0ae44da7c1d67983dedd8f8d8d3516236f (diff) | |
download | ldgallery-8e3ac8fe44bebb38e1882ca7f06b8100078ad88d.tar.gz |
Merge branch 'develop': release v1.0v1.0
Diffstat (limited to 'viewer/src/components/index.ts')
-rw-r--r-- | viewer/src/components/index.ts | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/viewer/src/components/index.ts b/viewer/src/components/index.ts index 8e73274..559000e 100644 --- a/viewer/src/components/index.ts +++ b/viewer/src/components/index.ts | |||
@@ -17,25 +17,25 @@ | |||
17 | -- along with this program. If not, see <https://www.gnu.org/licenses/>. | 17 | -- along with this program. If not, see <https://www.gnu.org/licenses/>. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | import Vue from 'vue' | 20 | import Vue from "vue" |
21 | 21 | ||
22 | const requireComponent = require.context( | 22 | const requireComponent = require.context( |
23 | '@/components', | 23 | "@/components", |
24 | false, // Whether or not to look in subfolders | 24 | false, // Whether or not to look in subfolders |
25 | // The regular expression used to match base component filenames | 25 | // The regular expression used to match base component filenames |
26 | /Ld[A-Z]\w+\.vue$/ | 26 | /Ld[A-Z]\w+\.vue$/ |
27 | ) | 27 | ) |
28 | 28 | ||
29 | requireComponent.keys().forEach(fileName => { | 29 | requireComponent.keys().forEach(fileName => { |
30 | const componentConfig = requireComponent(fileName) | 30 | const componentConfig = requireComponent(fileName) |
31 | const componentName = fileName.split('/').pop()!.replace(/\.vue$/, ''); | 31 | const componentName = fileName.split("/").pop()!.replace(/\.vue$/, ""); |
32 | 32 | ||
33 | // Register component globally | 33 | // Register component globally |
34 | Vue.component( | 34 | Vue.component( |
35 | componentName, | 35 | componentName, |
36 | // Look for the component options on `.default`, which will | 36 | // Look for the component options on `.default`, which will |
37 | // exist if the component was exported with `export default`, | 37 | // exist if the component was exported with `export default`, |
38 | // otherwise fall back to module's root. | 38 | // otherwise fall back to module's root. |
39 | componentConfig.default ?? componentConfig | 39 | componentConfig.default ?? componentConfig |
40 | ) | 40 | ) |
41 | }) \ No newline at end of file | 41 | }) |