kui-vue 3.2.3-rc3 → 3.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_tool/utils.js +11 -5
- package/components/affix/affix.jsx +20 -7
- package/components/affix/index.md +6 -5
- package/components/alert/styles/index.less +19 -19
- package/components/avatar/avatar.jsx +63 -0
- package/components/avatar/demo/base.md +24 -0
- package/components/avatar/demo/change.md +40 -0
- package/components/avatar/demo/index.vue +20 -0
- package/components/avatar/demo/info.md +7 -0
- package/components/avatar/demo/types.md +23 -0
- package/components/avatar/index.js +2 -0
- package/components/avatar/index.md +7 -0
- package/components/avatar/styles/index.less +61 -0
- package/components/backtop/styles/index.less +2 -2
- package/components/badge/demo/dot.md +1 -1
- package/components/badge/demo/dynamic.md +1 -1
- package/components/badge/demo/max.md +1 -1
- package/components/badge/styles/index.less +21 -21
- package/components/base/input.jsx +16 -10
- package/components/base/pop.jsx +7 -4
- package/components/breadcrumb/styles/index.less +4 -4
- package/components/button/button.jsx +14 -8
- package/components/button/buttonGroup.jsx +6 -6
- package/components/button/demo/base.md +2 -1
- package/components/button/demo/disabled.md +14 -16
- package/components/button/demo/group.md +2 -2
- package/components/button/demo/index.vue +6 -2
- package/components/button/demo/light.md +26 -0
- package/components/button/demo/loading.md +1 -1
- package/components/button/demo/normal.md +25 -0
- package/components/button/demo/size.md +2 -2
- package/components/button/demo/solid.md +16 -0
- package/components/button/demo/with-icon.md +4 -3
- package/components/button/index.md +3 -3
- package/components/button/styles/index.less +113 -51
- package/components/card/demo/base.md +1 -1
- package/components/card/demo/border.md +2 -2
- package/components/card/styles/index.less +6 -6
- package/components/carousel/styles/index.less +1 -1
- package/components/checkbox/demo/group-vertical.md +47 -0
- package/components/checkbox/demo/index.vue +4 -0
- package/components/checkbox/demo/options.md +46 -0
- package/components/checkbox/group.jsx +9 -3
- package/components/checkbox/index.md +8 -7
- package/components/checkbox/styles/index.less +35 -21
- package/components/collapse/styles/index.less +10 -10
- package/components/colorPicker/colorpicker.jsx +27 -15
- package/components/colorPicker/demo/base.md +1 -1
- package/components/colorPicker/demo/index.vue +2 -0
- package/components/colorPicker/demo/shape.md +33 -0
- package/components/colorPicker/index.md +10 -7
- package/components/colorPicker/styles/index.less +42 -25
- package/components/datePicker/datecalendar.jsx +14 -12
- package/components/datePicker/datepicker.jsx +17 -6
- package/components/datePicker/demo/index.vue +2 -0
- package/components/datePicker/demo/theme.md +34 -0
- package/components/datePicker/index.md +4 -1
- package/components/datePicker/styles/calendar.less +39 -38
- package/components/datePicker/styles/datepicker.less +39 -22
- package/components/divider/styles/index.less +6 -6
- package/components/drawer/demo/custom.md +1 -1
- package/components/drawer/demo/form.md +1 -1
- package/components/drawer/drawer.jsx +5 -4
- package/components/drawer/styles/index.less +12 -10
- package/components/dropdown/demo/base.md +4 -4
- package/components/dropdown/demo/cascading.md +3 -3
- package/components/dropdown/demo/divider.md +3 -3
- package/components/dropdown/dropdown.jsx +0 -1
- package/components/dropdown/styles/index.less +4 -4
- package/components/empty/empty.jsx +2 -1
- package/components/empty/styles/index.less +2 -2
- package/components/form/demo/base.md +25 -2
- package/components/form/demo/index.vue +1 -1
- package/components/form/demo/valid.md +9 -0
- package/components/form/form.jsx +3 -1
- package/components/form/formitem.jsx +18 -10
- package/components/form/styles/index.less +17 -13
- package/components/grid/styles/index.less +1 -1
- package/components/icon/demo/base.md +4 -4
- package/components/icon/demo/search.vue +7 -10
- package/components/icon/index.md +1 -1
- package/components/image/styles/index.less +18 -18
- package/components/index.js +19 -3
- package/components/input/demo/index.vue +3 -1
- package/components/input/demo/size.md +3 -3
- package/components/input/demo/theme.md +39 -0
- package/components/input/index.md +9 -6
- package/components/input/input.jsx +10 -3
- package/components/input/styles/index.less +124 -82
- package/components/input/textarea.jsx +1 -0
- package/components/layout/demo/base.md +5 -3
- package/components/layout/demo/index.vue +0 -2
- package/components/layout/demo/info.md +0 -2
- package/components/layout/demo/layout1.md +40 -47
- package/components/layout/demo/layout2.md +42 -49
- package/components/layout/demo/layout3.md +44 -22
- package/components/layout/demo/layout4.md +19 -18
- package/components/layout/demo/layout5.md +47 -44
- package/components/layout/styles/index.less +1 -6
- package/components/loading/styles/index.less +4 -4
- package/components/locale/index.js +74 -0
- package/components/locale/lang/de.js +54 -0
- package/components/locale/lang/el.js +71 -0
- package/components/locale/lang/en.js +54 -0
- package/components/locale/lang/fr.js +71 -0
- package/components/locale/lang/it.js +71 -0
- package/components/locale/lang/ja.js +71 -0
- package/components/locale/lang/ko.js +71 -0
- package/components/locale/lang/ru.js +54 -0
- package/components/locale/lang/th.js +71 -0
- package/components/locale/lang/ua.js +54 -0
- package/components/locale/lang/vi.js +54 -0
- package/components/locale/lang/zh-CN.js +54 -0
- package/components/locale/lang/zh-TW.js +54 -0
- package/components/menu/demo/accrodion.md +2 -2
- package/components/menu/demo/base.md +5 -13
- package/components/menu/demo/collapsed.md +2 -2
- package/components/menu/demo/index.vue +0 -2
- package/components/menu/demo/inline.md +6 -10
- package/components/menu/demo/mode.md +2 -2
- package/components/menu/demo/theme.md +2 -2
- package/components/menu/demo/vertical.md +2 -2
- package/components/menu/index.md +0 -3
- package/components/menu/menu.jsx +4 -4
- package/components/menu/menuitem.jsx +1 -13
- package/components/menu/styles/dropmenu.less +28 -20
- package/components/menu/styles/index.less +148 -251
- package/components/menu/submenu.jsx +4 -64
- package/components/message/group.jsx +1 -1
- package/components/message/styles/index.less +13 -8
- package/components/modal/demo/base.md +15 -2
- package/components/modal/demo/custom.md +3 -3
- package/components/modal/demo/more.md +6 -6
- package/components/modal/index.js +3 -3
- package/components/modal/modal.jsx +17 -10
- package/components/modal/styles/index.less +24 -17
- package/components/notice/styles/index.less +14 -13
- package/components/page/page.jsx +4 -3
- package/components/page/styles/index.less +29 -29
- package/components/popconfirm/popconfirm.jsx +2 -2
- package/components/popconfirm/styles/index.less +6 -6
- package/components/poptip/styles/index.less +10 -9
- package/components/progress/styles/index.less +13 -13
- package/components/radio/button.jsx +2 -2
- package/components/radio/demo/button.md +3 -3
- package/components/radio/demo/group-vertical.md +46 -0
- package/components/radio/demo/index.vue +4 -0
- package/components/radio/demo/options.md +43 -0
- package/components/radio/group.jsx +14 -8
- package/components/radio/index.md +11 -9
- package/components/radio/styles/index.less +37 -23
- package/components/rate/styles/index.less +2 -2
- package/components/select/demo/filterable.md +6 -14
- package/components/select/demo/icon.md +40 -0
- package/components/select/demo/index.vue +4 -0
- package/components/select/demo/search.md +6 -4
- package/components/select/demo/size.md +5 -5
- package/components/select/demo/theme.md +46 -0
- package/components/select/index.md +21 -17
- package/components/select/select.jsx +26 -16
- package/components/select/styles/index.less +125 -51
- package/components/slider/demo/base.md +35 -0
- package/components/slider/demo/index.vue +18 -0
- package/components/slider/demo/info.md +7 -0
- package/components/slider/demo/vertical.md +13 -0
- package/components/slider/index.md +7 -0
- package/components/slider/slider.jsx +65 -0
- package/components/slider/styles/index.less +60 -32
- package/components/space/demo/align.md +46 -0
- package/components/space/demo/base.md +20 -0
- package/components/space/demo/custom-size.md +35 -0
- package/components/space/demo/index.vue +25 -0
- package/components/space/demo/info.md +11 -0
- package/components/space/demo/size.md +35 -0
- package/components/space/demo/vertical.md +19 -0
- package/components/space/index.js +2 -0
- package/components/space/index.md +6 -0
- package/components/space/space.jsx +57 -0
- package/components/space/styles/index.less +23 -0
- package/components/spin/styles/index.less +7 -11
- package/components/steps/styles/index.less +11 -11
- package/components/styles/color.less +158 -0
- package/components/styles/index.less +6 -1
- package/components/styles/sys.less +34 -0
- package/components/styles/var.less +150 -0
- package/components/switch/styles/index.less +11 -11
- package/components/table/index.md +4 -3
- package/components/table/styles/index.less +29 -32
- package/components/table/table.jsx +2 -1
- package/components/tabs/styles/index.less +20 -19
- package/components/tabs/tabs.jsx +1 -1
- package/components/tag/styles/index.less +45 -45
- package/components/timeline/demo/base.md +3 -3
- package/components/timeline/demo/icon.md +5 -5
- package/components/timeline/demo/mode.md +12 -6
- package/components/timeline/index.md +7 -6
- package/components/timeline/styles/index.less +43 -16
- package/components/timeline/timeline.jsx +5 -1
- package/components/timeline/timelineitem.jsx +9 -5
- package/components/tooltip/styles/index.less +19 -18
- package/components/tree/styles/index.less +15 -15
- package/components/treeselect/styles/index.less +5 -5
- package/components/upload/demo/accept.md +68 -0
- package/components/upload/demo/avatar.md +40 -0
- package/components/upload/demo/base.md +40 -0
- package/components/upload/demo/custom.md +47 -0
- package/components/upload/demo/directory.md +36 -0
- package/components/upload/demo/drag.md +0 -0
- package/components/upload/demo/draggable.md +45 -0
- package/components/upload/demo/exceed.md +42 -0
- package/components/upload/demo/file-list.md +42 -0
- package/components/upload/demo/form.md +120 -0
- package/components/upload/demo/index.vue +37 -0
- package/components/upload/demo/info.md +10 -0
- package/components/upload/demo/picture.md +54 -0
- package/components/upload/index.md +26 -0
- package/components/upload/styles/index.less +258 -0
- package/components/upload/upload.jsx +337 -0
- package/dist/k-ui.css +7 -1
- package/dist/k-ui.js +2 -2
- package/package.json +11 -5
- package/components/button/demo/hollow.md +0 -15
- package/components/layout/demo/layout6.md +0 -142
- package/components/menu/demo/vertical-affix.md +0 -69
- package/components/slider/demo/slider.js +0 -5
- package/components/slider/slider.vue +0 -21
- package/components/slider/sliderButton.vue +0 -76
- package/components/styles/dark.less +0 -67
- package/components/styles/global-dark.less +0 -36
- package/components/styles/global.less +0 -44
- package/components/upload/upload.vue +0 -137
- package/dist/k-ui-dark.css +0 -1
|
@@ -8,16 +8,14 @@
|
|
|
8
8
|
<div class="k-demo-layout">
|
|
9
9
|
<Layout class="layout-back">
|
|
10
10
|
<Sider class="demo-sider">
|
|
11
|
-
<div class="logo"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<MenuItem key="
|
|
17
|
-
<MenuItem key="
|
|
18
|
-
<MenuItem key="
|
|
19
|
-
<MenuItem key="t8" icon="cloud">nav7</MenuItem>
|
|
20
|
-
<MenuItem key="t9" icon="color-palette">nav8</MenuItem>
|
|
11
|
+
<div class="logo-box">
|
|
12
|
+
<Icon type="logo-kui" size="30" class="logo"/>
|
|
13
|
+
KUI运营后台
|
|
14
|
+
</div>
|
|
15
|
+
<Menu mode="inline" v-model="top" class="demo-top-menu">
|
|
16
|
+
<MenuItem key="t1" icon="home-outline">首页</MenuItem>
|
|
17
|
+
<MenuItem key="t2" icon="bar-chart">数据统计</MenuItem>
|
|
18
|
+
<MenuItem key="t3" icon="settings">能源管理</MenuItem>
|
|
21
19
|
</Menu>
|
|
22
20
|
</Sider>
|
|
23
21
|
<Content class="k-demo-main">
|
|
@@ -32,23 +30,26 @@
|
|
|
32
30
|
</Layout>
|
|
33
31
|
</div>
|
|
34
32
|
</template>
|
|
35
|
-
<style scoped>
|
|
33
|
+
<style scoped lang="less">
|
|
36
34
|
.k-demo-layout{
|
|
37
35
|
height:360px;
|
|
38
36
|
overflow:hidden;
|
|
39
37
|
}
|
|
40
38
|
.k-demo-layout .demo-sider{
|
|
41
|
-
overflow: auto;
|
|
42
39
|
height: 360px; /*这里是例子,实际中请适当修改*/
|
|
43
40
|
left: 0;
|
|
44
41
|
width:200px;
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
.k-demo-layout .logo{
|
|
48
|
-
height: 32px;
|
|
49
|
-
background:rgb(132 139 156 / 50%);
|
|
50
|
-
margin: 16px;
|
|
42
|
+
border-right:1px solid var(--kui-color-border);
|
|
51
43
|
}
|
|
44
|
+
.k-demo-layout .logo-box {
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
display:flex;
|
|
47
|
+
align-items:center;
|
|
48
|
+
padding:20px 0 20px 20px;
|
|
49
|
+
.logo{
|
|
50
|
+
margin-right:8px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
52
53
|
.k-demo-layout .k-demo-main{
|
|
53
54
|
overflow:auto;
|
|
54
55
|
height:360px;
|
|
@@ -8,31 +8,32 @@
|
|
|
8
8
|
<template>
|
|
9
9
|
<div class="k-demo-layout">
|
|
10
10
|
<Layout class="layout-back">
|
|
11
|
-
<Sider class="demo-sider
|
|
12
|
-
<div class="logo"
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<MenuItem key="0-1">option1</MenuItem>
|
|
23
|
-
<MenuItem key="0-2">option2</MenuItem>
|
|
24
|
-
<MenuItem key="0-3">option3</MenuItem>
|
|
25
|
-
<MenuItem key="0-4">option4</MenuItem>
|
|
26
|
-
</SubMenu>
|
|
11
|
+
<Sider class="demo-sider" :style="{width:collapsed?'60px':'200px'}">
|
|
12
|
+
<div class="logo-box">
|
|
13
|
+
<Icon type="logo-kui" size="30" class="logo"/>
|
|
14
|
+
<transition>
|
|
15
|
+
<span v-show="!collapsed">KUI运营后台</span>
|
|
16
|
+
</transition>
|
|
17
|
+
</div>
|
|
18
|
+
<Menu mode="inline" v-model="left" :inline-collapsed="collapsed" style="border:none;">
|
|
19
|
+
<MenuItem key="1-1" icon="home-outline"><span>首页</span></MenuItem>
|
|
20
|
+
<MenuItem key="1-2" icon="bar-chart"><span>数据统计</span></MenuItem>
|
|
21
|
+
<MenuItem key="1-3" icon="settings"><span>能源管理</span></MenuItem>
|
|
27
22
|
</Menu>
|
|
28
|
-
<
|
|
23
|
+
<Button theme="light" :icon="!collapsed?'chevron-back':'chevron-forward'" @click="toggle" class="btn-expand"/>
|
|
29
24
|
</Sider>
|
|
30
25
|
<Content class="k-demo-main">
|
|
31
|
-
<
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
<Row type="flex" align="middle" class="header-nav">
|
|
27
|
+
<Col flex="1"></Col>
|
|
28
|
+
<Col>
|
|
29
|
+
<Space :size="20">
|
|
30
|
+
<Input icon="search" theme="light" shape="circle" placeholder="搜索" style="width:200px"/>
|
|
31
|
+
<Button icon="notifications-outline" theme="normal"/>
|
|
32
|
+
<Button icon="ellipsis-horizontal-circle-outline" theme="normal"/>
|
|
33
|
+
<Avatar style="background:#3a95ff" :size="40" shape="square">K</Avatar>
|
|
34
|
+
</Space>
|
|
35
|
+
</Col>
|
|
36
|
+
</Row>
|
|
36
37
|
<Breadcrumb class="nav">
|
|
37
38
|
<BreadcrumbItem>Home</BreadcrumbItem>
|
|
38
39
|
<BreadcrumbItem>List</BreadcrumbItem>
|
|
@@ -44,38 +45,42 @@
|
|
|
44
45
|
</Layout>
|
|
45
46
|
</div>
|
|
46
47
|
</template>
|
|
47
|
-
<style scoped>
|
|
48
|
+
<style scoped lang="less">
|
|
48
49
|
.k-demo-layout{
|
|
49
|
-
|
|
50
|
+
.logo-box {
|
|
51
|
+
box-sizing: border-box;
|
|
52
|
+
display:flex;
|
|
53
|
+
align-items:center;
|
|
54
|
+
padding:16px 0 17px 16px;
|
|
55
|
+
/* background:var(--kui-color-gray-90); */
|
|
56
|
+
white-space:nowrap;
|
|
57
|
+
overflow:hidden;
|
|
58
|
+
.logo{
|
|
59
|
+
margin-right:8px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
.header-nav{
|
|
63
|
+
border-bottom:1px solid var(--kui-color-border);
|
|
64
|
+
padding-bottom:10px;
|
|
65
|
+
}
|
|
50
66
|
}
|
|
51
|
-
.
|
|
67
|
+
.btn-expand{
|
|
52
68
|
position:absolute;
|
|
53
|
-
bottom:
|
|
54
|
-
left:
|
|
55
|
-
text-align:center;
|
|
56
|
-
padding:10px 0;
|
|
57
|
-
color:#fff;
|
|
58
|
-
/* background:#4e5965; */
|
|
59
|
-
width:100%;
|
|
60
|
-
cursor:pointer;
|
|
69
|
+
bottom:10px;
|
|
70
|
+
left:12px;
|
|
61
71
|
}
|
|
62
72
|
.k-demo-layout .demo-sider{
|
|
63
|
-
/* background:#22303f; */
|
|
64
73
|
left: 0;
|
|
65
74
|
position:relative;
|
|
75
|
+
border-right:1px solid var(--kui-color-border);
|
|
76
|
+
transition: all 0.3s ease 0s;
|
|
66
77
|
}
|
|
67
78
|
.k-demo-layout .k-demo-main .nav{
|
|
68
79
|
padding:16px 0 0 16px;
|
|
69
80
|
}
|
|
70
81
|
.k-demo-layout .demo-top-menu{
|
|
71
|
-
line-height:
|
|
72
|
-
height:64px;
|
|
82
|
+
line-height:61px;
|
|
73
83
|
}
|
|
74
|
-
.k-demo-layout .logo{
|
|
75
|
-
height: 32px;
|
|
76
|
-
background: rgb(132 139 156 / 50%);
|
|
77
|
-
margin: 16px;
|
|
78
|
-
}
|
|
79
84
|
.k-demo-layout .k-demo-main{
|
|
80
85
|
overflow:auto;
|
|
81
86
|
}
|
|
@@ -88,9 +93,7 @@
|
|
|
88
93
|
export default{
|
|
89
94
|
data(){
|
|
90
95
|
return{
|
|
91
|
-
|
|
92
|
-
left:['0-1'],
|
|
93
|
-
open:['l0'],
|
|
96
|
+
left:['1-1'],
|
|
94
97
|
collapsed:false
|
|
95
98
|
}
|
|
96
99
|
},
|
|
@@ -15,10 +15,6 @@
|
|
|
15
15
|
height: 0;
|
|
16
16
|
}
|
|
17
17
|
.k-layout-header {
|
|
18
|
-
height: 64px;
|
|
19
|
-
line-height: 64px;
|
|
20
|
-
padding: 0 50px;
|
|
21
|
-
background: #22303f;
|
|
22
18
|
box-sizing: border-box;
|
|
23
19
|
}
|
|
24
20
|
.k-layout-content {
|
|
@@ -28,11 +24,10 @@
|
|
|
28
24
|
.k-layout-sider {
|
|
29
25
|
position: relative;
|
|
30
26
|
min-width: 0;
|
|
31
|
-
transition: all 0.2s;
|
|
27
|
+
// transition: all 0.2s;
|
|
32
28
|
// background: #646d82;
|
|
33
29
|
}
|
|
34
30
|
.k-layout-footer {
|
|
35
|
-
// background: @hover-color;
|
|
36
31
|
padding: 24px 50px;
|
|
37
32
|
font-size: 14px;
|
|
38
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '../../styles/
|
|
1
|
+
@import '../../styles/var.less';
|
|
2
2
|
.k-loading-warp {
|
|
3
3
|
position: fixed;
|
|
4
4
|
z-index: 1001;
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
top: 0;
|
|
7
7
|
bottom: 0;
|
|
8
8
|
right: 0;
|
|
9
|
-
background:
|
|
9
|
+
background: var(--kui-color-border);
|
|
10
10
|
height: 2px;
|
|
11
11
|
.k-loading-line {
|
|
12
12
|
height: 100%;
|
|
13
13
|
transition: width .2s ease-in-out;
|
|
14
|
-
background-color:
|
|
14
|
+
background-color: var(--kui-color-main);
|
|
15
15
|
height: 2px;
|
|
16
16
|
}
|
|
17
17
|
.k-loading-line-error {
|
|
18
|
-
background-color:
|
|
18
|
+
background-color: var(--kui-color-danger) !important;
|
|
19
19
|
}
|
|
20
20
|
.k-loading-inner {
|
|
21
21
|
margin: 0 auto;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import defaultLang from 'kui-vue/components/locale/lang/zh-CN';
|
|
2
|
+
import Vue from 'vue';
|
|
3
|
+
import deepmerge from 'deepmerge';
|
|
4
|
+
|
|
5
|
+
const RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
|
|
6
|
+
|
|
7
|
+
function format(string, ...args) {
|
|
8
|
+
if (args.length === 1 && typeof args[0] === 'object') {
|
|
9
|
+
args = args[0];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (!args || !args.hasOwnProperty) {
|
|
13
|
+
args = {};
|
|
14
|
+
}
|
|
15
|
+
if (Array.isArray(string)) return string;
|
|
16
|
+
return string.replace(RE_NARGS, (match, prefix, i, index) => {
|
|
17
|
+
let result;
|
|
18
|
+
|
|
19
|
+
if (string[index - 1] === '{' &&
|
|
20
|
+
string[index + match.length] === '}') {
|
|
21
|
+
return i;
|
|
22
|
+
} else {
|
|
23
|
+
result = hasOwn(args, i) ? args[i] : null;
|
|
24
|
+
if (result === null || result === undefined) {
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let lang = defaultLang;
|
|
34
|
+
let merged = false;
|
|
35
|
+
let i18nHandler = function () {
|
|
36
|
+
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
|
|
37
|
+
if (typeof vuei18n === 'function' && !!Vue.locale) {
|
|
38
|
+
if (!merged) {
|
|
39
|
+
merged = true;
|
|
40
|
+
Vue.locale(
|
|
41
|
+
Vue.config.lang,
|
|
42
|
+
deepmerge(lang, Vue.locale(Vue.config.lang) || {}, { clone: true })
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
return vuei18n.apply(this, arguments);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const t = function (path, options) {
|
|
50
|
+
let value = i18nHandler.apply(this, arguments);
|
|
51
|
+
if (value !== null && value !== undefined) return value;
|
|
52
|
+
|
|
53
|
+
const array = path.split('.');
|
|
54
|
+
let current = lang;
|
|
55
|
+
|
|
56
|
+
for (let i = 0, j = array.length; i < j; i++) {
|
|
57
|
+
const property = array[i];
|
|
58
|
+
value = current[property];
|
|
59
|
+
if (i === j - 1) return format(value, options);
|
|
60
|
+
if (!value) return '';
|
|
61
|
+
current = value;
|
|
62
|
+
}
|
|
63
|
+
return '';
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const use = function (l) {
|
|
67
|
+
lang = l || lang;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const i18n = function (fn) {
|
|
71
|
+
i18nHandler = fn || i18nHandler;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export default { use, t, i18n };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
k: {
|
|
3
|
+
datePicker: {
|
|
4
|
+
startDate: 'Startdatum',
|
|
5
|
+
endDate: 'Enddatum',
|
|
6
|
+
placeholder: 'bitte wählen',
|
|
7
|
+
months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
8
|
+
weeks: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
9
|
+
year: '',
|
|
10
|
+
month: '',
|
|
11
|
+
day: '',
|
|
12
|
+
today: 'Heute',
|
|
13
|
+
now: 'aktuelle Zeit',
|
|
14
|
+
ok: 'Okay',
|
|
15
|
+
selectDate: 'bitte wählen',
|
|
16
|
+
selectTime: 'bitte wählen'
|
|
17
|
+
},
|
|
18
|
+
drawer: {
|
|
19
|
+
ok: 'Okay',
|
|
20
|
+
cancel: 'Abbrechen'
|
|
21
|
+
},
|
|
22
|
+
empty: {
|
|
23
|
+
description: 'noch keine Daten',
|
|
24
|
+
},
|
|
25
|
+
pop: {
|
|
26
|
+
ok: 'Okay',
|
|
27
|
+
cancel: 'Abbrechen'
|
|
28
|
+
},
|
|
29
|
+
modal: {
|
|
30
|
+
ok: 'Okay',
|
|
31
|
+
cancel: 'Abbrechen'
|
|
32
|
+
},
|
|
33
|
+
page: {
|
|
34
|
+
page: 'Seite',
|
|
35
|
+
pageSize: 'item/page',
|
|
36
|
+
goto: 'Spring zu',
|
|
37
|
+
items: 'items',
|
|
38
|
+
total: 'Total'
|
|
39
|
+
},
|
|
40
|
+
select: {
|
|
41
|
+
placeholder: 'bitte wählen',
|
|
42
|
+
loading: 'Laden...',
|
|
43
|
+
emptyText: 'noch keine Daten'
|
|
44
|
+
},
|
|
45
|
+
table: {
|
|
46
|
+
emptyText: 'noch keine Daten'
|
|
47
|
+
},
|
|
48
|
+
upload: {
|
|
49
|
+
successful: 'Erfolg',
|
|
50
|
+
failed: 'gescheitert',
|
|
51
|
+
errorFileSize: 'illegale Dateigröße'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
k: {
|
|
3
|
+
datePicker: {
|
|
4
|
+
startDate: 'Ημερομηνία Έναρξης',
|
|
5
|
+
endDate: 'Ημερομηνία Λήξης',
|
|
6
|
+
placeholder: 'Επιλογή',
|
|
7
|
+
months: ['Ιαν',
|
|
8
|
+
'Φεβ',
|
|
9
|
+
'Μαρ',
|
|
10
|
+
'Απρ',
|
|
11
|
+
'Μαϊ',
|
|
12
|
+
'Ιουν',
|
|
13
|
+
'Ιουλ',
|
|
14
|
+
'Αυγ',
|
|
15
|
+
'Σεπ',
|
|
16
|
+
'Οκτ',
|
|
17
|
+
'Νοε',
|
|
18
|
+
'Δεκ'],
|
|
19
|
+
weeks: ['Κυρ',
|
|
20
|
+
'Δευ',
|
|
21
|
+
'Τρι',
|
|
22
|
+
'Τετ',
|
|
23
|
+
'Πεμ',
|
|
24
|
+
'Παρ',
|
|
25
|
+
'Σαβ'],
|
|
26
|
+
year: '',
|
|
27
|
+
month: '',
|
|
28
|
+
day: '',
|
|
29
|
+
today: 'Σήμερα',
|
|
30
|
+
now: 'Τώρα',
|
|
31
|
+
ok: 'Εντάξει',
|
|
32
|
+
selectDate: 'Επιλέξτε ημέρα',
|
|
33
|
+
selectTime: 'Επιλέξτε ώρα'
|
|
34
|
+
},
|
|
35
|
+
drawer: {
|
|
36
|
+
ok: 'Εντάξει',
|
|
37
|
+
cancel: 'Ακύρωση'
|
|
38
|
+
},
|
|
39
|
+
empty: {
|
|
40
|
+
description: 'Χωρίς δεδομένα',
|
|
41
|
+
},
|
|
42
|
+
pop: {
|
|
43
|
+
ok: 'Εντάξει',
|
|
44
|
+
cancel: 'Ακύρωση'
|
|
45
|
+
},
|
|
46
|
+
modal: {
|
|
47
|
+
ok: 'Εντάξει',
|
|
48
|
+
cancel: 'Ακύρωση'
|
|
49
|
+
},
|
|
50
|
+
page: {
|
|
51
|
+
page: '',
|
|
52
|
+
pageSize: '/σελίδα',
|
|
53
|
+
goto: 'Μετάβαση σε',
|
|
54
|
+
items: '',
|
|
55
|
+
total: 'Σύνολο'
|
|
56
|
+
},
|
|
57
|
+
select: {
|
|
58
|
+
placeholder: 'Επιλογή',
|
|
59
|
+
loading: 'Φόρτωση...',
|
|
60
|
+
emptyText: 'Χωρίς δεδομένα'
|
|
61
|
+
},
|
|
62
|
+
table: {
|
|
63
|
+
emptyText: 'Χωρίς δεδομένα'
|
|
64
|
+
},
|
|
65
|
+
upload: {
|
|
66
|
+
successful: 'επιτυχία',
|
|
67
|
+
failed: 'Αποτυχία',
|
|
68
|
+
errorFileSize: 'Παράνομο μέγεθος αρχείου'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
k: {
|
|
3
|
+
datePicker: {
|
|
4
|
+
startDate: 'Start date',
|
|
5
|
+
endDate: 'End date',
|
|
6
|
+
placeholder: 'Select date',
|
|
7
|
+
months: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
8
|
+
weeks: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
9
|
+
year: '',
|
|
10
|
+
month: '',
|
|
11
|
+
day: '',
|
|
12
|
+
today: 'Today',
|
|
13
|
+
now: 'Now',
|
|
14
|
+
ok: 'Ok',
|
|
15
|
+
selectDate: 'Select date',
|
|
16
|
+
selectTime: 'Select time'
|
|
17
|
+
},
|
|
18
|
+
drawer: {
|
|
19
|
+
ok: 'Ok',
|
|
20
|
+
cancel: 'Cancel'
|
|
21
|
+
},
|
|
22
|
+
empty: {
|
|
23
|
+
description: 'No Data'
|
|
24
|
+
},
|
|
25
|
+
pop: {
|
|
26
|
+
ok: 'Ok',
|
|
27
|
+
cancel: 'Cancel'
|
|
28
|
+
},
|
|
29
|
+
modal: {
|
|
30
|
+
ok: 'Ok',
|
|
31
|
+
cancel: 'Cancel'
|
|
32
|
+
},
|
|
33
|
+
page: {
|
|
34
|
+
page: '',
|
|
35
|
+
pageSize: '/page',
|
|
36
|
+
goto: 'Go to',
|
|
37
|
+
items: 'items',
|
|
38
|
+
total: 'Total'
|
|
39
|
+
},
|
|
40
|
+
select: {
|
|
41
|
+
placeholder: 'Select',
|
|
42
|
+
loading: 'Loading...',
|
|
43
|
+
emptyText: 'No Data'
|
|
44
|
+
},
|
|
45
|
+
table: {
|
|
46
|
+
emptyText: 'No Data'
|
|
47
|
+
},
|
|
48
|
+
upload: {
|
|
49
|
+
successful: 'Successful',
|
|
50
|
+
failed: 'Failed',
|
|
51
|
+
errorFileSize: 'Illegal file size'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
k: {
|
|
3
|
+
datePicker: {
|
|
4
|
+
startDate: 'Horaire début',
|
|
5
|
+
endDate: 'Date fin',
|
|
6
|
+
placeholder: 'Choisir',
|
|
7
|
+
months: ['Jan',
|
|
8
|
+
'Fév',
|
|
9
|
+
'Mar',
|
|
10
|
+
'Avr',
|
|
11
|
+
'Mai',
|
|
12
|
+
'Jun',
|
|
13
|
+
'Jul',
|
|
14
|
+
'Aoû',
|
|
15
|
+
'Sep',
|
|
16
|
+
'Oct',
|
|
17
|
+
'Nov',
|
|
18
|
+
'Déc'],
|
|
19
|
+
weeks: ['Dim',
|
|
20
|
+
'Lun',
|
|
21
|
+
'Mar',
|
|
22
|
+
'Mer',
|
|
23
|
+
'Jeu',
|
|
24
|
+
'Ven',
|
|
25
|
+
'Sam'],
|
|
26
|
+
year: '',
|
|
27
|
+
month: '',
|
|
28
|
+
day: '',
|
|
29
|
+
today: 'Auj',
|
|
30
|
+
now: 'Maintenant',
|
|
31
|
+
ok: 'OK',
|
|
32
|
+
selectDate: 'Choisir date',
|
|
33
|
+
selectTime: 'Choisir horaire'
|
|
34
|
+
},
|
|
35
|
+
drawer: {
|
|
36
|
+
ok: 'OK',
|
|
37
|
+
cancel: 'Annuler'
|
|
38
|
+
},
|
|
39
|
+
empty: {
|
|
40
|
+
description: 'Aucune donnée',
|
|
41
|
+
},
|
|
42
|
+
pop: {
|
|
43
|
+
ok: 'OK',
|
|
44
|
+
cancel: 'Annuler'
|
|
45
|
+
},
|
|
46
|
+
modal: {
|
|
47
|
+
ok: 'OK',
|
|
48
|
+
cancel: 'Annuler'
|
|
49
|
+
},
|
|
50
|
+
page: {
|
|
51
|
+
page: '',
|
|
52
|
+
pageSize: '/page',
|
|
53
|
+
goto: 'Aller à',
|
|
54
|
+
items: '',
|
|
55
|
+
total: 'Total'
|
|
56
|
+
},
|
|
57
|
+
select: {
|
|
58
|
+
placeholder: 'Choisir',
|
|
59
|
+
loading: 'Chargement...',
|
|
60
|
+
emptyText: 'Aucune donnée'
|
|
61
|
+
},
|
|
62
|
+
table: {
|
|
63
|
+
emptyText: 'Aucune donnée'
|
|
64
|
+
},
|
|
65
|
+
upload: {
|
|
66
|
+
successful: 'Succès',
|
|
67
|
+
failed: 'Échec',
|
|
68
|
+
errorFileSize: 'Taille illégale du fichier'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
k: {
|
|
3
|
+
datePicker: {
|
|
4
|
+
startDate: 'Data inizio',
|
|
5
|
+
endDate: 'Data fine',
|
|
6
|
+
placeholder: 'Seleziona',
|
|
7
|
+
months: ['Gen',
|
|
8
|
+
'Feb',
|
|
9
|
+
'Mar',
|
|
10
|
+
'Apr',
|
|
11
|
+
'Mag',
|
|
12
|
+
'Giu',
|
|
13
|
+
'Lug',
|
|
14
|
+
'Ago',
|
|
15
|
+
'Set',
|
|
16
|
+
'Ott',
|
|
17
|
+
'Nov',
|
|
18
|
+
'Dic'],
|
|
19
|
+
weeks: ['Dom',
|
|
20
|
+
'Lun',
|
|
21
|
+
'Mar',
|
|
22
|
+
'Mer',
|
|
23
|
+
'Gio',
|
|
24
|
+
'Ven',
|
|
25
|
+
'Sab'],
|
|
26
|
+
year: '',
|
|
27
|
+
month: '',
|
|
28
|
+
day: '',
|
|
29
|
+
today: 'Oggi',
|
|
30
|
+
now: 'Ora',
|
|
31
|
+
ok: 'OK',
|
|
32
|
+
selectDate: 'Seleziona data',
|
|
33
|
+
selectTime: 'Seleziona ora'
|
|
34
|
+
},
|
|
35
|
+
drawer: {
|
|
36
|
+
ok: 'OK',
|
|
37
|
+
cancel: 'Cancella'
|
|
38
|
+
},
|
|
39
|
+
empty: {
|
|
40
|
+
description: 'Nessun dato',
|
|
41
|
+
},
|
|
42
|
+
pop: {
|
|
43
|
+
ok: 'OK',
|
|
44
|
+
cancel: 'Cancella'
|
|
45
|
+
},
|
|
46
|
+
modal: {
|
|
47
|
+
ok: 'OK',
|
|
48
|
+
cancel: 'Cancella'
|
|
49
|
+
},
|
|
50
|
+
page: {
|
|
51
|
+
page: '',
|
|
52
|
+
pageSize: '/pagina',
|
|
53
|
+
goto: 'Vai a',
|
|
54
|
+
items: '',
|
|
55
|
+
total: 'Totale'
|
|
56
|
+
},
|
|
57
|
+
select: {
|
|
58
|
+
placeholder: 'Seleziona',
|
|
59
|
+
loading: 'Caricamento...',
|
|
60
|
+
emptyText: 'Nessun dato'
|
|
61
|
+
},
|
|
62
|
+
table: {
|
|
63
|
+
emptyText: 'Nessun dato'
|
|
64
|
+
},
|
|
65
|
+
upload: {
|
|
66
|
+
successful: 'successo',
|
|
67
|
+
failed: 'fail',
|
|
68
|
+
errorFileSize: 'Dimensione file illegale'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|