component_ryl_v3 1.1.6 → 1.1.7
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/README.md
CHANGED
|
@@ -4,7 +4,28 @@ This template should help get you started developing with Vue 3 in Vite. The tem
|
|
|
4
4
|
|
|
5
5
|
Learn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# 组件介绍
|
|
8
|
+
|
|
9
|
+
# 头部组件
|
|
10
|
+
# 使用方法
|
|
11
|
+
<hand-header
|
|
12
|
+
:userInfo="userInfo"
|
|
13
|
+
collapse
|
|
14
|
+
:defaultActive="menuActive"
|
|
15
|
+
:menuList="menuList"
|
|
16
|
+
ref="menuRef"
|
|
17
|
+
>
|
|
18
|
+
|
|
19
|
+
* 组件属性定义
|
|
20
|
+
{Object} userInfo - 用户信息
|
|
21
|
+
{Object} menuList - 导航列表(包含name系统名称和list菜单列表)
|
|
22
|
+
{Object} menuColor - 菜单栏颜色配置(color/activeColor/backgroundColor)
|
|
23
|
+
{string} defaultActive - 默认选中的菜单路径
|
|
24
|
+
{boolean} collapse - 是否启用折叠功能
|
|
25
|
+
{number} width - 侧边栏宽度
|
|
26
|
+
{number} contentWidth - 内容模块宽度
|
|
27
|
+
{boolean} showDefaltOpen - 是否默认展开所有菜单项
|
|
28
|
+
|
|
8
29
|
|
|
9
30
|
# 询问窗口组件
|
|
10
31
|
# 使用方法
|
package/dist/component_ryl_v3.js
CHANGED
|
@@ -382,6 +382,10 @@ const _sfc_main$4 = {
|
|
|
382
382
|
type: Number,
|
|
383
383
|
default: 180
|
|
384
384
|
},
|
|
385
|
+
contentWidth: {
|
|
386
|
+
type: Number,
|
|
387
|
+
default: 1200
|
|
388
|
+
},
|
|
385
389
|
userInfo: {
|
|
386
390
|
type: Object,
|
|
387
391
|
default: () => ({})
|
|
@@ -402,7 +406,7 @@ const _sfc_main$4 = {
|
|
|
402
406
|
const isIE = ref(false);
|
|
403
407
|
const hideMenu = ref(false);
|
|
404
408
|
const showFooter = ref(false);
|
|
405
|
-
const minWidth = ref(
|
|
409
|
+
const minWidth = ref(props.contentWidth);
|
|
406
410
|
const localDefaultActive = ref(props.defaultActive);
|
|
407
411
|
const mainRef = ref(null);
|
|
408
412
|
const completeWidth = computed(() => {
|
|
@@ -540,7 +544,7 @@ const _sfc_main$4 = {
|
|
|
540
544
|
};
|
|
541
545
|
onMounted(() => {
|
|
542
546
|
const windowWidth = window.screen.availWidth;
|
|
543
|
-
minWidth.value = windowWidth >
|
|
547
|
+
minWidth.value = windowWidth > minWidth.value ? minWidth.value - props.width : windowWidth - props.width;
|
|
544
548
|
browser();
|
|
545
549
|
nextTick(() => {
|
|
546
550
|
getMenu();
|
package/package.json
CHANGED
|
@@ -94,6 +94,7 @@ import sidebarItem from './sidebarItem.vue'
|
|
|
94
94
|
* @property {string} defaultActive - 默认选中的菜单路径
|
|
95
95
|
* @property {boolean} collapse - 是否启用折叠功能
|
|
96
96
|
* @property {number} width - 侧边栏宽度
|
|
97
|
+
* @property {number} contentWidth - 内容模块宽度
|
|
97
98
|
* @property {Object} userInfo - 用户信息
|
|
98
99
|
* @property {boolean} showDefaltOpen - 是否默认展开所有菜单项
|
|
99
100
|
*/
|
|
@@ -122,6 +123,10 @@ const props = defineProps({
|
|
|
122
123
|
type: Number,
|
|
123
124
|
default: 180
|
|
124
125
|
},
|
|
126
|
+
contentWidth: {
|
|
127
|
+
type: Number,
|
|
128
|
+
default: 1200
|
|
129
|
+
},
|
|
125
130
|
userInfo: {
|
|
126
131
|
type: Object,
|
|
127
132
|
default: () => ({})
|
|
@@ -147,7 +152,7 @@ const defaultOpen = ref([]) // 默认打开的菜单
|
|
|
147
152
|
const isIE = ref(false) // 是否是ie浏览器
|
|
148
153
|
const hideMenu = ref(false) // 是否隐藏菜单
|
|
149
154
|
const showFooter = ref(false) // 效果展示优化
|
|
150
|
-
const minWidth = ref(
|
|
155
|
+
const minWidth = ref(props.contentWidth) // 内容模块的默认最小宽度
|
|
151
156
|
const localDefaultActive = ref(props.defaultActive) // 本地默认选中菜单
|
|
152
157
|
const mainRef = ref(null) // main容器引用
|
|
153
158
|
|
|
@@ -366,7 +371,7 @@ const closeIETips = () => {
|
|
|
366
371
|
*/
|
|
367
372
|
onMounted(() => {
|
|
368
373
|
const windowWidth = window.screen.availWidth
|
|
369
|
-
minWidth.value = windowWidth >
|
|
374
|
+
minWidth.value = windowWidth > minWidth.value ? (minWidth.value - props.width) : (windowWidth - props.width)
|
|
370
375
|
|
|
371
376
|
browser()
|
|
372
377
|
|