Skip to content

Commit 52b9665

Browse files
committed
Merge branch 'master' of https://github.com/linlinjava/litemall
2 parents b97de93 + c286138 commit 52b9665

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3055
-960
lines changed

litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/vo/CategoryVo.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public class CategoryVo {
1010
private String iconUrl;
1111
private String picUrl;
1212
private String level;
13+
private Integer pid;
1314
private List<CategoryVo> children;
1415

1516
public List<CategoryVo> getChildren() {
@@ -75,4 +76,12 @@ public String getLevel() {
7576
public void setLevel(String level) {
7677
this.level = level;
7778
}
79+
80+
public Integer getPid() {
81+
return pid;
82+
}
83+
84+
public void setPid(Integer pid) {
85+
this.pid = pid;
86+
}
7887
}

litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminCategoryController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public Object list() {
5656
subCategoryVo.setKeywords(subCategory.getKeywords());
5757
subCategoryVo.setName(subCategory.getName());
5858
subCategoryVo.setLevel(subCategory.getLevel());
59+
subCategoryVo.setPid(subCategory.getPid());
5960

6061
children.add(subCategoryVo);
6162
}

litemall-admin/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@
5555
"lodash": "^4.17.11",
5656
"normalize.css": "7.0.0",
5757
"nprogress": "0.2.0",
58-
"path-to-regexp": "2.4.0",
58+
"path-to-regexp": "3.3.0",
5959
"screenfull": "4.2.0",
6060
"script-loader": "0.7.2",
6161
"v-charts": "1.19.0",
6262
"vue": "2.6.10",
6363
"vue-count-to": "1.0.13",
64+
"vue-i18n": "^8.28.2",
6465
"vue-router": "3.0.2",
6566
"vuex": "3.1.0",
6667
"xlsx": ">=0.17.0"
@@ -88,7 +89,7 @@
8889
"sass": "1.26.2",
8990
"sass-loader": "8.0.2",
9091
"script-ext-html-webpack-plugin": "2.1.3",
91-
"serve-static": "1.13.2",
92+
"serve-static": "1.16.0",
9293
"svg-sprite-loader": "4.1.3",
9394
"svgo": "1.2.0",
9495
"vue-template-compiler": "2.6.10"

litemall-admin/src/components/BackToTop/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<transition :name="transitionName">
33
<div v-show="visible" :style="customStyle" class="back-to-ceiling" @click="backToTop">
44
<svg width="16" height="16" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg" class="Icon Icon--backToTopArrow" aria-hidden="true" style="height: 16px; width: 16px;">
5-
<title>回到顶部</title>
5+
<title>{{ $t('app.button.back_to_top') }}</title>
66
<g>
77
<path d="M12.036 15.59c0 .55-.453.995-.997.995H5.032c-.55 0-.997-.445-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29c.39-.39 1.026-.385 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z" fill-rule="evenodd"/>
88
</g>

litemall-admin/src/components/Breadcrumb/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<el-breadcrumb class="app-breadcrumb" separator="/">
33
<transition-group name="breadcrumb">
44
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
5-
<span v-if="item.redirect === 'noredirect' || index == levelList.length - 1" class="no-redirect">{{ item.meta.title }}</span>
6-
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
5+
<span v-if="item.redirect === 'noredirect' || index == levelList.length - 1" class="no-redirect">{{ $t(item.meta.title) }}</span>
6+
<a v-else @click.prevent="handleLink(item)">{{ $t(item.meta.title) }}</a>
77
</el-breadcrumb-item>
88
</transition-group>
99
</el-breadcrumb>
@@ -38,7 +38,7 @@ export default {
3838
)
3939
const first = matched[0]
4040
if (!this.isDashboard(first)) {
41-
matched = [{ path: '/dashboard', meta: { title: '首页' }}].concat(matched)
41+
matched = [{ path: '/dashboard', meta: { title: 'app.menu.dashboard' }}].concat(matched)
4242
}
4343
this.levelList = matched.filter(
4444
item => item.meta && item.meta.title && item.meta.breadcrumb !== false
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- https://kazupon.github.io/vue-i18n/guide/locale.html -->
2+
<template>
3+
<el-select v-model="$i18n.locale" size="mini" placeholder="lang" class="select">
4+
<el-option v-for="(lang, i) in langs" :key="`Lang${i}`" :label="lang.label" :value="lang.value" />
5+
</el-select>
6+
</template>
7+
8+
<script>
9+
export default {
10+
name: 'LocaleChanger',
11+
data() {
12+
return {
13+
langs: Object.entries(this.$i18n.messages)
14+
.map(([key, messages]) => ({
15+
label: messages.lang ?? key,
16+
value: key
17+
}))
18+
}
19+
}
20+
}
21+
</script>
22+
23+
<style>
24+
.select {
25+
width: 180px;
26+
}
27+
</style>

0 commit comments

Comments
 (0)