@lambo-design/pro-layout 1.0.0-beta.226 → 1.0.0-beta.229

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/pro-layout",
3
- "version": "1.0.0-beta.226",
3
+ "version": "1.0.0-beta.229",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -10,8 +10,8 @@
10
10
  "registry": "https://registry.npmjs.org/"
11
11
  },
12
12
  "devDependencies": {
13
- "@lambo-design/shared": "^1.0.0-beta.43",
14
- "@lambo-design/core": "^4.7.1-beta.59"
13
+ "@lambo-design/core": "^4.7.1-beta.118",
14
+ "@lambo-design/shared": "^1.0.0-beta.115"
15
15
  },
16
16
  "scripts": {}
17
17
  }
@@ -132,6 +132,6 @@ export default {
132
132
  </script>
133
133
 
134
134
 
135
- <style lang="less">
135
+ <style lang="less" scoped>
136
136
  @import '../styles/other-menu.less';
137
137
  </style>
@@ -1,10 +1,16 @@
1
1
  <template>
2
2
  <Submenu :name="`${parentName}`">
3
3
  <template slot="title">
4
- <ProLayoutSiderIcon :icon-type="parentItem.meta.icon"></ProLayoutSiderIcon>
5
- <div class="menu-title">
6
- <span>{{ showTitle(parentItem)}}</span>
7
- </div>
4
+ <Row type="flex" justify="center" align="top">
5
+ <Col span="3">
6
+ <ProLayoutSiderIcon v-if="systemInfo.menuLogo == '1'" :icon-type="parentItem.meta.icon"></ProLayoutSiderIcon>
7
+ </Col>
8
+ <Col span="21">
9
+ <div class="menu-title">
10
+ <span>{{ showTitle(parentItem)}}</span>
11
+ </div>
12
+ </Col>
13
+ </Row>
8
14
  </template>
9
15
  <template v-for="item in children">
10
16
  <template v-if="item.children && item.children.length === 1">
@@ -13,11 +19,17 @@
13
19
  :collect-map="collectMap">
14
20
  </ProLayoutSiderMenuItem>
15
21
  <menu-item v-else :key="`menu-${item.children[0].name}`" :name="getNameOrHref(item, true)">
16
- <Icon :type="collectMap.hasOwnProperty(item.name) ? 'ios-star' : 'ios-star-outline'"
17
- @click="toggleCollect(item)" :size="16"></Icon>
18
- <div class="menu-title">
19
- <span>{{ showTitle(item.children[0]) }}</span>
20
- </div>
22
+ <Row type="flex" justify="center" align="top">
23
+ <Col span="3">
24
+ <Icon v-if="systemInfo.menuLogo == '1'" :type="collectMap.hasOwnProperty(item.name) ? 'ios-star' : 'ios-star-outline'"
25
+ @click="toggleCollect(item)"></Icon>
26
+ </Col>
27
+ <Col span="21">
28
+ <div class="menu-title">
29
+ <span>{{ showTitle(item.children[0]) }}</span>
30
+ </div>
31
+ </Col>
32
+ </Row>
21
33
  </menu-item>
22
34
  </template>
23
35
  <template v-else>
@@ -26,11 +38,17 @@
26
38
  :collect-map="collectMap">
27
39
  </ProLayoutSiderMenuItem>
28
40
  <menu-item v-else :key="`menu-${item.name}`" :name="getNameOrHref(item)">
29
- <Icon :type="collectMap.hasOwnProperty(item.name) ? 'ios-star' : 'ios-star-outline'"
30
- @click="toggleCollect(item)" :size="16"></Icon>
31
- <div class="menu-title">
32
- <span>{{ showTitle(item)}}</span>
33
- </div>
41
+ <Row type="flex" justify="center" align="top">
42
+ <Col span="3">
43
+ <Icon v-if="systemInfo.menuLogo == '1'" :type="collectMap.hasOwnProperty(item.name) ? 'ios-star' : 'ios-star-outline'"
44
+ @click="toggleCollect(item)"></Icon>
45
+ </Col>
46
+ <Col span="21">
47
+ <div class="menu-title">
48
+ <span>{{ showTitle(item)}}</span>
49
+ </div>
50
+ </Col>
51
+ </Row>
34
52
  </menu-item>
35
53
  </template>
36
54
  </template>
@@ -40,6 +58,7 @@
40
58
  import sider from '../utils/sider'
41
59
  import menuItem from '../utils/menuItem'
42
60
  import Bus from '@lambo-design/shared/utils/bus'
61
+ import {deepCopy} from '@lambo-design/shared/utils/assist'
43
62
 
44
63
  export default {
45
64
  name: 'ProLayoutSiderMenuItem',
@@ -13,10 +13,16 @@
13
13
  </ProLayoutSiderMenuItem>
14
14
  <MenuItem v-else :key="`menu-${item.children[0].name}`"
15
15
  :name="getNameOrHref(item, true)">
16
- <ProLayoutSiderIcon v-if="systemInfo.menuLogo == '1'" :icon-type="item.meta.icon"></ProLayoutSiderIcon>
17
- <div class="menu-title">
18
- <span>{{ showTitle(item.children[0]) }}</span>
19
- </div>
16
+ <Row type="flex" justify="center" align="top">
17
+ <Col span="3">
18
+ <ProLayoutSiderIcon v-if="systemInfo.menuLogo == '1'" :icon-type="item.meta.icon"></ProLayoutSiderIcon>
19
+ </Col>
20
+ <Col span="21">
21
+ <div class="menu-title">
22
+ <span>{{ showTitle(item.children[0]) }}</span>
23
+ </div>
24
+ </Col>
25
+ </Row>
20
26
  </MenuItem>
21
27
  </template>
22
28
  <template v-else>
@@ -27,10 +33,16 @@
27
33
  </ProLayoutSiderMenuItem>
28
34
  <MenuItem v-else :key="`menu-${item.name}`"
29
35
  :name="getNameOrHref(item)">
30
- <ProLayoutSiderIcon v-if="systemInfo.menuLogo == '1'" :icon-type="item.meta.icon"></ProLayoutSiderIcon>
31
- <div class="menu-title">
32
- <span>{{ showTitle(item) }}</span>
33
- </div>
36
+ <Row type="flex" justify="center" align="top">
37
+ <Col span="3">
38
+ <ProLayoutSiderIcon v-if="systemInfo.menuLogo == '1'" :icon-type="item.meta.icon"></ProLayoutSiderIcon>
39
+ </Col>
40
+ <Col span="21">
41
+ <div class="menu-title">
42
+ <span>{{ showTitle(item) }}</span>
43
+ </div>
44
+ </Col>
45
+ </Row>
34
46
  </MenuItem>
35
47
  </template>
36
48
  </template>
@@ -168,5 +168,6 @@
168
168
  }
169
169
  .menu-title{
170
170
  width: 70%;
171
- word-wrap: break-word
171
+ word-wrap: break-word;
172
+ display: inline-block;
172
173
  }