vue2-client 1.18.39 → 1.18.40
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/.eslintrc.js +90 -90
- package/Components.md +60 -60
- package/docs/index.md +30 -30
- package/docs//350/257/267/346/261/202/345/267/245/345/205/267/344/275/277/347/224/250/350/257/264/346/230/216.md +353 -0
- package/index.js +31 -31
- package/jest-transform-stub.js +8 -8
- package/jest.setup.js +7 -7
- package/package.json +1 -1
- package/src/assets/img/querySlotDemo.svg +15 -15
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
- package/src/base-client/components/common/CreateQuery/index.js +3 -3
- package/src/base-client/components/common/CreateQuery/index.md +42 -42
- package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
- package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
- package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
- package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
- package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
- package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
- package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
- package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Tree/Tree.vue +149 -149
- package/src/base-client/components/common/Tree/index.js +2 -2
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
- package/src/base-client/components/common/XDataDrawer/index.js +3 -3
- package/src/base-client/components/common/XDataDrawer/index.md +41 -41
- package/src/base-client/components/common/XDescriptions/index.js +3 -3
- package/src/base-client/components/common/XDescriptions/index.md +322 -322
- package/src/base-client/components/common/XForm/index.md +178 -178
- package/src/base-client/components/common/XFormTable/demo.vue +2 -4
- package/src/base-client/components/common/XReport/print.js +186 -186
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +1 -1
- package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
- package/src/base-client/components/common/XStepView/index.js +3 -3
- package/src/base-client/components/common/XStepView/index.md +31 -31
- package/src/base-client/components/common/XTable/XTable.vue +1715 -1715
- package/src/base-client/components/common/XTable/XTableWrapper.vue +786 -769
- package/src/base-client/components/common/XTable/index.md +255 -255
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
- package/src/base-client/plugins/Config.js +19 -19
- package/src/base-client/plugins/tabs-page-plugin.js +39 -39
- package/src/components/Charts/Bar.vue +62 -62
- package/src/components/Charts/ChartCard.vue +134 -134
- package/src/components/Charts/Liquid.vue +67 -67
- package/src/components/Charts/MiniArea.vue +39 -39
- package/src/components/Charts/MiniBar.vue +39 -39
- package/src/components/Charts/MiniProgress.vue +75 -75
- package/src/components/Charts/MiniSmoothArea.vue +40 -40
- package/src/components/Charts/Radar.vue +68 -68
- package/src/components/Charts/RankList.vue +77 -77
- package/src/components/Charts/TagCloud.vue +113 -113
- package/src/components/Charts/TransferBar.vue +64 -64
- package/src/components/Charts/Trend.vue +82 -82
- package/src/components/Charts/chart.less +12 -12
- package/src/components/Charts/smooth.area.less +13 -13
- package/src/components/NumberInfo/NumberInfo.vue +54 -54
- package/src/components/NumberInfo/index.js +3 -3
- package/src/components/NumberInfo/index.less +54 -54
- package/src/components/NumberInfo/index.md +43 -43
- package/src/components/card/ChartCard.vue +79 -79
- package/src/components/chart/Bar.vue +60 -60
- package/src/components/chart/MiniArea.vue +67 -67
- package/src/components/chart/MiniBar.vue +59 -59
- package/src/components/chart/MiniProgress.vue +57 -57
- package/src/components/chart/Radar.vue +80 -80
- package/src/components/chart/RankingList.vue +60 -60
- package/src/components/chart/Trend.vue +79 -79
- package/src/components/chart/index.less +9 -9
- package/src/components/checkbox/ColorCheckbox.vue +157 -157
- package/src/components/input/IInput.vue +66 -66
- package/src/components/menu/SideMenu.vue +75 -75
- package/src/components/menu/menu.js +273 -273
- package/src/components/tool/AStepItem.vue +60 -60
- package/src/composables/demo/UseRequestDemo.vue +175 -0
- package/src/composables/index.js +6 -0
- package/src/composables/useGlobalLoading.js +206 -0
- package/src/composables/usePost.js +221 -0
- package/src/layouts/CommonLayout.vue +56 -56
- package/src/layouts/header/HeaderNotice.vue +177 -177
- package/src/lib.js +1 -1
- package/src/mock/extend/index.js +84 -84
- package/src/mock/goods/index.js +108 -108
- package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
- package/src/pages/system/dictionary/index.vue +44 -44
- package/src/pages/system/monitor/loginInfor/index.vue +37 -37
- package/src/pages/system/monitor/operLog/index.vue +37 -37
- package/src/services/api/cas.js +79 -79
- package/src/services/api/restTools.js +34 -46
- package/src/store/modules/setting.js +119 -119
- package/src/utils/authority-utils.js +85 -85
- package/src/utils/errorCode.js +6 -6
- package/src/utils/map-utils.js +47 -47
- package/src/utils/request.js +103 -0
- package/vue.config.js +9 -4
- package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
.mini-chart{
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 100%;
|
|
4
|
-
.chart-content{
|
|
5
|
-
position: absolute;
|
|
6
|
-
bottom: -28px;
|
|
7
|
-
width: 100%;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
.mini-chart{
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
.chart-content{
|
|
5
|
+
position: absolute;
|
|
6
|
+
bottom: -28px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="theme-color" :style="{backgroundColor: color}" @click="toggle">
|
|
3
|
-
<a-icon v-if="sChecked" type="check" />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
const Group = {
|
|
9
|
-
name: 'ColorCheckboxGroup',
|
|
10
|
-
props: {
|
|
11
|
-
defaultValues: {
|
|
12
|
-
type: Array,
|
|
13
|
-
required: false,
|
|
14
|
-
default: () => []
|
|
15
|
-
},
|
|
16
|
-
multiple: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
required: false,
|
|
19
|
-
default: false
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
data () {
|
|
23
|
-
return {
|
|
24
|
-
values: [],
|
|
25
|
-
options: []
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
computed: {
|
|
29
|
-
colors () {
|
|
30
|
-
const colors = []
|
|
31
|
-
this.options.forEach(item => {
|
|
32
|
-
if (item.sChecked) {
|
|
33
|
-
colors.push(item.color)
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
return colors
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
provide () {
|
|
40
|
-
return {
|
|
41
|
-
groupContext: this
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
watch: {
|
|
45
|
-
values (value) {
|
|
46
|
-
this.$emit('change', value, this.colors)
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
methods: {
|
|
50
|
-
handleChange (option) {
|
|
51
|
-
if (!option.checked) {
|
|
52
|
-
if (this.values.indexOf(option.value) > -1) {
|
|
53
|
-
this.values = this.values.filter(item => item !== option.value)
|
|
54
|
-
}
|
|
55
|
-
} else {
|
|
56
|
-
if (!this.multiple) {
|
|
57
|
-
this.values = [option.value]
|
|
58
|
-
this.options.forEach(item => {
|
|
59
|
-
if (item.value !== option.value) {
|
|
60
|
-
item.sChecked = false
|
|
61
|
-
}
|
|
62
|
-
})
|
|
63
|
-
} else {
|
|
64
|
-
this.values.push(option.value)
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
render (h) {
|
|
70
|
-
const clear = h('div', { attrs: { style: 'clear: both' } })
|
|
71
|
-
return h(
|
|
72
|
-
'div',
|
|
73
|
-
{},
|
|
74
|
-
[this.$slots.default, clear]
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export default {
|
|
80
|
-
name: 'ColorCheckbox',
|
|
81
|
-
Group: Group,
|
|
82
|
-
props: {
|
|
83
|
-
color: {
|
|
84
|
-
type: String,
|
|
85
|
-
required: true
|
|
86
|
-
},
|
|
87
|
-
value: {
|
|
88
|
-
type: [String, Number],
|
|
89
|
-
required: true
|
|
90
|
-
},
|
|
91
|
-
checked: {
|
|
92
|
-
type: Boolean,
|
|
93
|
-
required: false,
|
|
94
|
-
default: false
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
data () {
|
|
98
|
-
return {
|
|
99
|
-
sChecked: this.initChecked()
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
computed: {
|
|
103
|
-
},
|
|
104
|
-
inject: ['groupContext'],
|
|
105
|
-
watch: {
|
|
106
|
-
sChecked: function () {
|
|
107
|
-
const value = {
|
|
108
|
-
value: this.value,
|
|
109
|
-
color: this.color,
|
|
110
|
-
checked: this.sChecked
|
|
111
|
-
}
|
|
112
|
-
this.$emit('change', value)
|
|
113
|
-
const groupContext = this.groupContext
|
|
114
|
-
if (groupContext) {
|
|
115
|
-
groupContext.handleChange(value)
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
created () {
|
|
120
|
-
const groupContext = this.groupContext
|
|
121
|
-
if (groupContext) {
|
|
122
|
-
groupContext.options.push(this)
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
methods: {
|
|
126
|
-
toggle () {
|
|
127
|
-
if (this.groupContext.multiple || !this.sChecked) {
|
|
128
|
-
this.sChecked = !this.sChecked
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
initChecked () {
|
|
132
|
-
const groupContext = this.groupContext
|
|
133
|
-
if (!groupContext) {
|
|
134
|
-
return this.checked
|
|
135
|
-
} else if (groupContext.multiple) {
|
|
136
|
-
return groupContext.defaultValues.indexOf(this.value) > -1
|
|
137
|
-
} else {
|
|
138
|
-
return groupContext.defaultValues[0] === this.value
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
</script>
|
|
144
|
-
|
|
145
|
-
<style lang="less" scoped>
|
|
146
|
-
.theme-color{
|
|
147
|
-
float: left;
|
|
148
|
-
width: 20px;
|
|
149
|
-
height: 20px;
|
|
150
|
-
border-radius: 2px;
|
|
151
|
-
cursor: pointer;
|
|
152
|
-
margin-right: 8px;
|
|
153
|
-
text-align: center;
|
|
154
|
-
color: @base-bg-color;
|
|
155
|
-
font-weight: bold;
|
|
156
|
-
}
|
|
157
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="theme-color" :style="{backgroundColor: color}" @click="toggle">
|
|
3
|
+
<a-icon v-if="sChecked" type="check" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
const Group = {
|
|
9
|
+
name: 'ColorCheckboxGroup',
|
|
10
|
+
props: {
|
|
11
|
+
defaultValues: {
|
|
12
|
+
type: Array,
|
|
13
|
+
required: false,
|
|
14
|
+
default: () => []
|
|
15
|
+
},
|
|
16
|
+
multiple: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
required: false,
|
|
19
|
+
default: false
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
data () {
|
|
23
|
+
return {
|
|
24
|
+
values: [],
|
|
25
|
+
options: []
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
computed: {
|
|
29
|
+
colors () {
|
|
30
|
+
const colors = []
|
|
31
|
+
this.options.forEach(item => {
|
|
32
|
+
if (item.sChecked) {
|
|
33
|
+
colors.push(item.color)
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
return colors
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
provide () {
|
|
40
|
+
return {
|
|
41
|
+
groupContext: this
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
watch: {
|
|
45
|
+
values (value) {
|
|
46
|
+
this.$emit('change', value, this.colors)
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
methods: {
|
|
50
|
+
handleChange (option) {
|
|
51
|
+
if (!option.checked) {
|
|
52
|
+
if (this.values.indexOf(option.value) > -1) {
|
|
53
|
+
this.values = this.values.filter(item => item !== option.value)
|
|
54
|
+
}
|
|
55
|
+
} else {
|
|
56
|
+
if (!this.multiple) {
|
|
57
|
+
this.values = [option.value]
|
|
58
|
+
this.options.forEach(item => {
|
|
59
|
+
if (item.value !== option.value) {
|
|
60
|
+
item.sChecked = false
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
} else {
|
|
64
|
+
this.values.push(option.value)
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
render (h) {
|
|
70
|
+
const clear = h('div', { attrs: { style: 'clear: both' } })
|
|
71
|
+
return h(
|
|
72
|
+
'div',
|
|
73
|
+
{},
|
|
74
|
+
[this.$slots.default, clear]
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export default {
|
|
80
|
+
name: 'ColorCheckbox',
|
|
81
|
+
Group: Group,
|
|
82
|
+
props: {
|
|
83
|
+
color: {
|
|
84
|
+
type: String,
|
|
85
|
+
required: true
|
|
86
|
+
},
|
|
87
|
+
value: {
|
|
88
|
+
type: [String, Number],
|
|
89
|
+
required: true
|
|
90
|
+
},
|
|
91
|
+
checked: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
required: false,
|
|
94
|
+
default: false
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
data () {
|
|
98
|
+
return {
|
|
99
|
+
sChecked: this.initChecked()
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
computed: {
|
|
103
|
+
},
|
|
104
|
+
inject: ['groupContext'],
|
|
105
|
+
watch: {
|
|
106
|
+
sChecked: function () {
|
|
107
|
+
const value = {
|
|
108
|
+
value: this.value,
|
|
109
|
+
color: this.color,
|
|
110
|
+
checked: this.sChecked
|
|
111
|
+
}
|
|
112
|
+
this.$emit('change', value)
|
|
113
|
+
const groupContext = this.groupContext
|
|
114
|
+
if (groupContext) {
|
|
115
|
+
groupContext.handleChange(value)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
created () {
|
|
120
|
+
const groupContext = this.groupContext
|
|
121
|
+
if (groupContext) {
|
|
122
|
+
groupContext.options.push(this)
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
methods: {
|
|
126
|
+
toggle () {
|
|
127
|
+
if (this.groupContext.multiple || !this.sChecked) {
|
|
128
|
+
this.sChecked = !this.sChecked
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
initChecked () {
|
|
132
|
+
const groupContext = this.groupContext
|
|
133
|
+
if (!groupContext) {
|
|
134
|
+
return this.checked
|
|
135
|
+
} else if (groupContext.multiple) {
|
|
136
|
+
return groupContext.defaultValues.indexOf(this.value) > -1
|
|
137
|
+
} else {
|
|
138
|
+
return groupContext.defaultValues[0] === this.value
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<style lang="less" scoped>
|
|
146
|
+
.theme-color{
|
|
147
|
+
float: left;
|
|
148
|
+
width: 20px;
|
|
149
|
+
height: 20px;
|
|
150
|
+
border-radius: 2px;
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
margin-right: 8px;
|
|
153
|
+
text-align: center;
|
|
154
|
+
color: @base-bg-color;
|
|
155
|
+
font-weight: bold;
|
|
156
|
+
}
|
|
157
|
+
</style>
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-input
|
|
3
|
-
:addon-after="addonAfter"
|
|
4
|
-
:addon-before="addonBefore"
|
|
5
|
-
:default-value="defaultValue"
|
|
6
|
-
:disabled="disabled"
|
|
7
|
-
:id="id"
|
|
8
|
-
:max-length="maxLength"
|
|
9
|
-
:prefix="prefix"
|
|
10
|
-
:size="size"
|
|
11
|
-
:suffix="suffix || lenSuffix"
|
|
12
|
-
:type="type"
|
|
13
|
-
:allow-clear="allowClear"
|
|
14
|
-
v-model="sValue"
|
|
15
|
-
:value="value"
|
|
16
|
-
@change="onChange"
|
|
17
|
-
@input="onInput"
|
|
18
|
-
@pressEnter="onPressEnter"
|
|
19
|
-
@keydown="onKeydown"
|
|
20
|
-
>
|
|
21
|
-
<template :slot="slot" v-for="slot in Object.keys($slots)">
|
|
22
|
-
<slot :name="slot"></slot>
|
|
23
|
-
</template>
|
|
24
|
-
</a-input>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script>
|
|
28
|
-
export default {
|
|
29
|
-
name: 'IInput',
|
|
30
|
-
model: {
|
|
31
|
-
prop: 'value',
|
|
32
|
-
event: 'change.value'
|
|
33
|
-
},
|
|
34
|
-
props: ['addonAfter', 'addonBefore', 'defaultValue', 'disabled', 'id', 'maxLength', 'prefix', 'size', 'suffix', 'type', 'value', 'allowClear'],
|
|
35
|
-
data () {
|
|
36
|
-
return {
|
|
37
|
-
sValue: this.value || this.defaultValue || ''
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
watch: {
|
|
41
|
-
value (val) {
|
|
42
|
-
this.sValue = val
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
computed: {
|
|
46
|
-
lenSuffix () {
|
|
47
|
-
return this.maxLength && `${(this.sValue + '').length}/${this.maxLength}`
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
methods: {
|
|
51
|
-
onChange (e) {
|
|
52
|
-
this.$emit('change', e)
|
|
53
|
-
this.$emit('change.value', e.target.value)
|
|
54
|
-
},
|
|
55
|
-
onInput (e) {
|
|
56
|
-
this.$emit('input', e)
|
|
57
|
-
},
|
|
58
|
-
onPressEnter (e) {
|
|
59
|
-
this.$emit('pressEnter', e)
|
|
60
|
-
},
|
|
61
|
-
onKeydown (e) {
|
|
62
|
-
this.$emit('keydown', e)
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<a-input
|
|
3
|
+
:addon-after="addonAfter"
|
|
4
|
+
:addon-before="addonBefore"
|
|
5
|
+
:default-value="defaultValue"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
:id="id"
|
|
8
|
+
:max-length="maxLength"
|
|
9
|
+
:prefix="prefix"
|
|
10
|
+
:size="size"
|
|
11
|
+
:suffix="suffix || lenSuffix"
|
|
12
|
+
:type="type"
|
|
13
|
+
:allow-clear="allowClear"
|
|
14
|
+
v-model="sValue"
|
|
15
|
+
:value="value"
|
|
16
|
+
@change="onChange"
|
|
17
|
+
@input="onInput"
|
|
18
|
+
@pressEnter="onPressEnter"
|
|
19
|
+
@keydown="onKeydown"
|
|
20
|
+
>
|
|
21
|
+
<template :slot="slot" v-for="slot in Object.keys($slots)">
|
|
22
|
+
<slot :name="slot"></slot>
|
|
23
|
+
</template>
|
|
24
|
+
</a-input>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
export default {
|
|
29
|
+
name: 'IInput',
|
|
30
|
+
model: {
|
|
31
|
+
prop: 'value',
|
|
32
|
+
event: 'change.value'
|
|
33
|
+
},
|
|
34
|
+
props: ['addonAfter', 'addonBefore', 'defaultValue', 'disabled', 'id', 'maxLength', 'prefix', 'size', 'suffix', 'type', 'value', 'allowClear'],
|
|
35
|
+
data () {
|
|
36
|
+
return {
|
|
37
|
+
sValue: this.value || this.defaultValue || ''
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
watch: {
|
|
41
|
+
value (val) {
|
|
42
|
+
this.sValue = val
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
lenSuffix () {
|
|
47
|
+
return this.maxLength && `${(this.sValue + '').length}/${this.maxLength}`
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
methods: {
|
|
51
|
+
onChange (e) {
|
|
52
|
+
this.$emit('change', e)
|
|
53
|
+
this.$emit('change.value', e.target.value)
|
|
54
|
+
},
|
|
55
|
+
onInput (e) {
|
|
56
|
+
this.$emit('input', e)
|
|
57
|
+
},
|
|
58
|
+
onPressEnter (e) {
|
|
59
|
+
this.$emit('pressEnter', e)
|
|
60
|
+
},
|
|
61
|
+
onKeydown (e) {
|
|
62
|
+
this.$emit('keydown', e)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-layout-sider
|
|
3
|
-
:theme="sideTheme"
|
|
4
|
-
:class="['side-menu', 'beauty-scroll', isMobile ? null : 'shadow']"
|
|
5
|
-
width="256px"
|
|
6
|
-
:collapsible="collapsible"
|
|
7
|
-
v-model="collapsed"
|
|
8
|
-
:trigger="null">
|
|
9
|
-
<div :class="['logo', theme]">
|
|
10
|
-
<router-link :to="homePage">
|
|
11
|
-
<a-row type="flex" align="middle" style="height: 64px;word-wrap: break-word;word-break:break-all;">
|
|
12
|
-
<a-col :span="4">
|
|
13
|
-
<img :src="logoSrc" alt="logo">
|
|
14
|
-
</a-col>
|
|
15
|
-
<a-col :span="20" style="line-height: 18px;" v-show="!collapsed">
|
|
16
|
-
<span style="vertical-align: middle" :style="{ fontWeight: 'bold', fontSize: systemNameFontSizeMain, color: 'white' }">{{ systemName }}</span>
|
|
17
|
-
</a-col>
|
|
18
|
-
</a-row>
|
|
19
|
-
</router-link>
|
|
20
|
-
</div>
|
|
21
|
-
<i-menu :theme="theme" :collapsed="collapsed" :options="menuData" @select="onSelect" class="menu"/>
|
|
22
|
-
</a-layout-sider>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script>
|
|
26
|
-
import IMenu from './menu'
|
|
27
|
-
import { mapState } from 'vuex'
|
|
28
|
-
export default {
|
|
29
|
-
name: 'SideMenu',
|
|
30
|
-
components: { IMenu },
|
|
31
|
-
props: {
|
|
32
|
-
collapsible: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
required: false,
|
|
35
|
-
default: false
|
|
36
|
-
},
|
|
37
|
-
collapsed: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
required: false,
|
|
40
|
-
default: false
|
|
41
|
-
},
|
|
42
|
-
menuData: {
|
|
43
|
-
type: Array,
|
|
44
|
-
required: true
|
|
45
|
-
},
|
|
46
|
-
theme: {
|
|
47
|
-
type: String,
|
|
48
|
-
required: false,
|
|
49
|
-
default: 'dark'
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
computed: {
|
|
53
|
-
sideTheme () {
|
|
54
|
-
return this.theme === 'light' ? this.theme : 'dark'
|
|
55
|
-
},
|
|
56
|
-
systemNameFontSizeMain () {
|
|
57
|
-
let systemNameFontSize = this.systemNameFontSize
|
|
58
|
-
if (this.systemName.length > 15) {
|
|
59
|
-
systemNameFontSize = '18px'
|
|
60
|
-
}
|
|
61
|
-
return systemNameFontSize
|
|
62
|
-
},
|
|
63
|
-
...mapState('setting', ['isMobile', 'systemName', 'logoSrc', 'systemNameFontSize', 'homePage'])
|
|
64
|
-
},
|
|
65
|
-
methods: {
|
|
66
|
-
onSelect (obj) {
|
|
67
|
-
this.$emit('menuSelect', obj)
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
</script>
|
|
72
|
-
|
|
73
|
-
<style lang="less" scoped>
|
|
74
|
-
@import "index";
|
|
75
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-layout-sider
|
|
3
|
+
:theme="sideTheme"
|
|
4
|
+
:class="['side-menu', 'beauty-scroll', isMobile ? null : 'shadow']"
|
|
5
|
+
width="256px"
|
|
6
|
+
:collapsible="collapsible"
|
|
7
|
+
v-model="collapsed"
|
|
8
|
+
:trigger="null">
|
|
9
|
+
<div :class="['logo', theme]">
|
|
10
|
+
<router-link :to="homePage">
|
|
11
|
+
<a-row type="flex" align="middle" style="height: 64px;word-wrap: break-word;word-break:break-all;">
|
|
12
|
+
<a-col :span="4">
|
|
13
|
+
<img :src="logoSrc" alt="logo">
|
|
14
|
+
</a-col>
|
|
15
|
+
<a-col :span="20" style="line-height: 18px;" v-show="!collapsed">
|
|
16
|
+
<span style="vertical-align: middle" :style="{ fontWeight: 'bold', fontSize: systemNameFontSizeMain, color: 'white' }">{{ systemName }}</span>
|
|
17
|
+
</a-col>
|
|
18
|
+
</a-row>
|
|
19
|
+
</router-link>
|
|
20
|
+
</div>
|
|
21
|
+
<i-menu :theme="theme" :collapsed="collapsed" :options="menuData" @select="onSelect" class="menu"/>
|
|
22
|
+
</a-layout-sider>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import IMenu from './menu'
|
|
27
|
+
import { mapState } from 'vuex'
|
|
28
|
+
export default {
|
|
29
|
+
name: 'SideMenu',
|
|
30
|
+
components: { IMenu },
|
|
31
|
+
props: {
|
|
32
|
+
collapsible: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
required: false,
|
|
35
|
+
default: false
|
|
36
|
+
},
|
|
37
|
+
collapsed: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
required: false,
|
|
40
|
+
default: false
|
|
41
|
+
},
|
|
42
|
+
menuData: {
|
|
43
|
+
type: Array,
|
|
44
|
+
required: true
|
|
45
|
+
},
|
|
46
|
+
theme: {
|
|
47
|
+
type: String,
|
|
48
|
+
required: false,
|
|
49
|
+
default: 'dark'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
computed: {
|
|
53
|
+
sideTheme () {
|
|
54
|
+
return this.theme === 'light' ? this.theme : 'dark'
|
|
55
|
+
},
|
|
56
|
+
systemNameFontSizeMain () {
|
|
57
|
+
let systemNameFontSize = this.systemNameFontSize
|
|
58
|
+
if (this.systemName.length > 15) {
|
|
59
|
+
systemNameFontSize = '18px'
|
|
60
|
+
}
|
|
61
|
+
return systemNameFontSize
|
|
62
|
+
},
|
|
63
|
+
...mapState('setting', ['isMobile', 'systemName', 'logoSrc', 'systemNameFontSize', 'homePage'])
|
|
64
|
+
},
|
|
65
|
+
methods: {
|
|
66
|
+
onSelect (obj) {
|
|
67
|
+
this.$emit('menuSelect', obj)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<style lang="less" scoped>
|
|
74
|
+
@import "index";
|
|
75
|
+
</style>
|