bri-components 1.1.4 → 1.1.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/lib/0.bri-components.min.js +1 -1
- package/lib/1.bri-components.min.js +1 -1
- package/lib/2.bri-components.min.js +1 -1
- package/lib/4.bri-components.min.js +1 -1
- package/lib/5.bri-components.min.js +1 -1
- package/lib/6.bri-components.min.js +1 -1
- package/lib/7.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +5 -5
- package/package.json +1 -1
- package/src/components/controls/base/DshCascader/DshCascader.vue +202 -160
- package/src/components/controls/base/DshCascader/InfoCascader.vue +11 -9
- package/src/components/controls/base/DshCoordinates.vue +118 -115
- package/src/components/controls/base/DshSelect.vue +8 -6
- package/src/components/controls/base/DshSwitch.vue +45 -87
- package/src/components/controls/controlMixin.js +26 -6
- package/src/components/form/DshDefaultSearch.vue +1 -1
- package/src/components/form/DshForm.vue +4 -0
- package/src/components/list/BriTable.vue +0 -1
- package/src/components/other/BriSvg.vue +28 -0
- package/src/components/other/DshEditPanel.vue +33 -11
- package/src/components/other/ZLoading.vue +24 -12
- package/src/components/small/BriButton.vue +2 -2
- package/src/components/small/DshButtons.vue +28 -2
- package/src/components/small/DshIcons.vue +1 -1
- package/src/components/unit/DshFormItem.vue +2 -2
- package/src/index.js +6 -5
- package/src/styles/common/control.less +11 -7
- package/src/styles/components/controls/base/DshCascader.less +110 -0
- package/src/styles/components/controls/base/DshSwitch.less +37 -0
- package/src/styles/components/form/DshDefaultSearch.less +41 -9
- package/src/styles/components/index.less +19 -19
- package/src/styles/components/other/ZLoading.less +5 -7
- package/src/styles/components/small/BriButton.less +34 -2
- package/src/styles/components/small/DshDropdown.less +1 -7
- package/src/styles/components/unit/DshFormItem.less +1 -2
- package/src/components/small/DshControlDefine.vue +0 -115
- package/src/styles/components/controls/DshCascader.less +0 -79
- package/src/styles/components/small/DshControlDefine.less +0 -40
- /package/src/styles/components/controls/{BriInputs.less → base/BriInputs.less} +0 -0
- /package/src/styles/components/controls/{BriUpload.less → base/BriUpload.less} +0 -0
- /package/src/styles/components/controls/{DshCheckbox.less → base/DshCheckbox.less} +0 -0
- /package/src/styles/components/controls/{DshCoordinates.less → base/DshCoordinates.less} +0 -0
- /package/src/styles/components/controls/{DshDate.less → base/DshDate.less} +0 -0
- /package/src/styles/components/controls/{DshDaterange.less → base/DshDaterange.less} +0 -0
- /package/src/styles/components/controls/{DshDivider.less → base/DshDivider.less} +0 -0
- /package/src/styles/components/controls/{DshEditor.less → base/DshEditor.less} +0 -0
- /package/src/styles/components/controls/{DshInput.less → base/DshInput.less} +0 -0
- /package/src/styles/components/controls/{DshNumber.less → base/DshNumber.less} +0 -0
- /package/src/styles/components/controls/{DshNumberange.less → base/DshNumberange.less} +0 -0
- /package/src/styles/components/controls/{DshSelect.less → base/DshSelect.less} +0 -0
- /package/src/styles/components/controls/{InfoCascader.less → base/InfoCascader.less} +0 -0
- /package/src/styles/components/controls/{BriLabels.less → senior/BriLabels.less} +0 -0
- /package/src/styles/components/controls/{DshPackage.less → senior/DshPackage.less} +0 -0
- /package/src/styles/components/controls/{cascaderTable.less → senior/cascaderTable.less} +0 -0
- /package/src/styles/components/controls/{flatTable.less → senior/flatTable.less} +0 -0
|
@@ -3,145 +3,148 @@
|
|
|
3
3
|
<Ctooltip
|
|
4
4
|
:content="curValName"
|
|
5
5
|
placement="top"
|
|
6
|
-
:transfer="true"
|
|
7
6
|
maxWidth="200"
|
|
7
|
+
:transfer="true"
|
|
8
8
|
>
|
|
9
9
|
<!-- 编辑 -->
|
|
10
|
-
<
|
|
11
|
-
v-if="canEdit"
|
|
12
|
-
:class="{
|
|
13
|
-
...commonClass,
|
|
14
|
-
'DshCoordinates-edit': true
|
|
15
|
-
}"
|
|
16
|
-
@click="clickOpenModal"
|
|
17
|
-
>
|
|
18
|
-
<div
|
|
19
|
-
v-if="!$isEmptyData(curVal)"
|
|
20
|
-
class="value"
|
|
21
|
-
>
|
|
22
|
-
<span class="value-name">
|
|
23
|
-
{{ curValName }}
|
|
24
|
-
</span>
|
|
25
|
-
<Icon
|
|
26
|
-
v-if="selfPropsObj._clearable"
|
|
27
|
-
class="value-icon"
|
|
28
|
-
type="md-close"
|
|
29
|
-
@click.stop="clickDelete"
|
|
30
|
-
/>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
10
|
+
<template v-if="canEdit">
|
|
33
11
|
<div
|
|
34
|
-
|
|
35
|
-
|
|
12
|
+
:class="{
|
|
13
|
+
...commonClass,
|
|
14
|
+
'DshCoordinates-edit': true
|
|
15
|
+
}"
|
|
16
|
+
@click="clickOpenModal"
|
|
36
17
|
>
|
|
37
|
-
|
|
38
|
-
<
|
|
39
|
-
|
|
18
|
+
<!-- 有值 -->
|
|
19
|
+
<div
|
|
20
|
+
v-if="!$isEmptyData(curVal)"
|
|
21
|
+
class="value"
|
|
22
|
+
>
|
|
23
|
+
<span class="value-name">
|
|
24
|
+
{{ curValName }}
|
|
25
|
+
</span>
|
|
26
|
+
<Icon
|
|
27
|
+
v-if="selfPropsObj._clearable"
|
|
28
|
+
class="value-icon"
|
|
29
|
+
type="md-close"
|
|
30
|
+
@click.stop="clickDelete"
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
<Modal
|
|
43
|
-
class="DshCoordinates-modal"
|
|
44
|
-
v-model="showModal"
|
|
45
|
-
title="选择位置"
|
|
46
|
-
:footer-hide="true"
|
|
47
|
-
:styles="modalStyles"
|
|
48
|
-
@on-cancel="clickCancel"
|
|
49
|
-
>
|
|
34
|
+
<!-- 无值 -->
|
|
50
35
|
<div
|
|
51
|
-
|
|
52
|
-
class="
|
|
36
|
+
v-else
|
|
37
|
+
class="nodata"
|
|
38
|
+
>
|
|
39
|
+
点击获取当前位置
|
|
40
|
+
<i class="nodata-icon bico-font bico-zuobiao"></i>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<!-- 模态框 -->
|
|
44
|
+
<Modal
|
|
45
|
+
class="DshCoordinates-modal"
|
|
46
|
+
v-model="showModal"
|
|
47
|
+
title="选择位置"
|
|
48
|
+
:footer-hide="true"
|
|
49
|
+
:styles="modalStyles"
|
|
50
|
+
@on-cancel="clickCancel"
|
|
53
51
|
>
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
class="
|
|
57
|
-
type="flex"
|
|
58
|
-
justify="center"
|
|
59
|
-
align="bottom"
|
|
52
|
+
<div
|
|
53
|
+
slot="header"
|
|
54
|
+
class="DshCoordinates-modal-header"
|
|
60
55
|
>
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
56
|
+
<Row
|
|
57
|
+
v-if="finalCanEdit"
|
|
58
|
+
class="edit"
|
|
59
|
+
type="flex"
|
|
60
|
+
justify="center"
|
|
61
|
+
align="bottom"
|
|
62
|
+
>
|
|
63
|
+
<Col span="8">
|
|
64
|
+
<div>
|
|
65
|
+
<RadioGroup v-model="formData.kind">
|
|
66
|
+
<Radio label="keyword">按关键字搜索</Radio>
|
|
67
|
+
<Radio label="coordinate">按坐标搜索</Radio>
|
|
68
|
+
</RadioGroup>
|
|
69
|
+
</div>
|
|
70
|
+
<Row class="dsh-margin-top5">
|
|
71
|
+
<Col span="16">
|
|
72
|
+
<Input
|
|
73
|
+
v-model="formData.searchText"
|
|
74
|
+
placeholder="请输入..."
|
|
75
|
+
:clearable="true"
|
|
76
|
+
@on-enter="clickSearch"
|
|
77
|
+
/>
|
|
78
|
+
<span class="edit-message">{{ searchMessage }}</span>
|
|
79
|
+
</Col>
|
|
80
|
+
<Col span="8">
|
|
81
|
+
<Button
|
|
82
|
+
type="primary"
|
|
83
|
+
@click="clickSearch"
|
|
84
|
+
>搜索</Button>
|
|
85
|
+
</Col>
|
|
86
|
+
</Row>
|
|
77
87
|
</Col>
|
|
78
|
-
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
|
|
89
|
+
<Col span="8">
|
|
90
|
+
<div class="edit-text">坐标获取结果</div>
|
|
91
|
+
<Row class="dsh-margin-top5">
|
|
92
|
+
<Col span="16">
|
|
93
|
+
<Input
|
|
94
|
+
:value="curVal.name"
|
|
95
|
+
:readonly="true"
|
|
96
|
+
:clearable="true"
|
|
97
|
+
@on-clear="clickClear"
|
|
98
|
+
@click.native="clickMapFitView"
|
|
99
|
+
/>
|
|
100
|
+
</Col>
|
|
101
|
+
<Col span="8">
|
|
102
|
+
<Button
|
|
103
|
+
type="primary"
|
|
104
|
+
@click="clickConfirm"
|
|
105
|
+
>确认</Button>
|
|
106
|
+
</Col>
|
|
107
|
+
</Row>
|
|
83
108
|
</Col>
|
|
84
109
|
</Row>
|
|
85
|
-
</Col>
|
|
86
110
|
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
111
|
+
<Row
|
|
112
|
+
v-else
|
|
113
|
+
class="show"
|
|
114
|
+
>
|
|
115
|
+
<Col
|
|
116
|
+
span="6"
|
|
117
|
+
class="show-name"
|
|
118
|
+
>
|
|
119
|
+
当前位置:
|
|
120
|
+
</Col>
|
|
121
|
+
<Col span="12">
|
|
91
122
|
<Input
|
|
92
123
|
:value="curVal.name"
|
|
93
124
|
:readonly="true"
|
|
94
|
-
:clearable="true"
|
|
95
|
-
@on-clear="clickClear"
|
|
96
125
|
@click.native="clickMapFitView"
|
|
97
126
|
/>
|
|
98
127
|
</Col>
|
|
99
|
-
<Col span="
|
|
100
|
-
<Button
|
|
101
|
-
type="primary"
|
|
102
|
-
@click="clickConfirm"
|
|
103
|
-
>确认</Button>
|
|
128
|
+
<Col span="6">
|
|
104
129
|
</Col>
|
|
105
130
|
</Row>
|
|
106
|
-
|
|
107
|
-
</Row>
|
|
131
|
+
</div>
|
|
108
132
|
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
>
|
|
117
|
-
当前位置:
|
|
118
|
-
</Col>
|
|
119
|
-
<Col span="12">
|
|
120
|
-
<Input
|
|
121
|
-
:value="curVal.name"
|
|
122
|
-
:readonly="true"
|
|
123
|
-
@click.native="clickMapFitView"
|
|
124
|
-
/>
|
|
125
|
-
</Col>
|
|
126
|
-
<Col span="6">
|
|
127
|
-
</Col>
|
|
128
|
-
</Row>
|
|
129
|
-
</div>
|
|
133
|
+
<transition>
|
|
134
|
+
<div
|
|
135
|
+
v-if="showModal"
|
|
136
|
+
id="mapContain"
|
|
137
|
+
class="DshCoordinates-modal-map"
|
|
138
|
+
></div>
|
|
139
|
+
</transition>
|
|
130
140
|
|
|
131
|
-
<transition>
|
|
132
141
|
<div
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
class="DshCoordinates-modal-map"
|
|
142
|
+
ref="divCoordinate"
|
|
143
|
+
style="display: none; position:absolute;background:#fff;padding: 5px 10px"
|
|
136
144
|
></div>
|
|
137
|
-
</
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
ref="divCoordinate"
|
|
141
|
-
style="display: none; position:absolute;background:#fff;padding: 5px 10px"
|
|
142
|
-
></div>
|
|
143
|
-
</Modal>
|
|
144
|
-
</div>
|
|
145
|
+
</Modal>
|
|
146
|
+
</div>
|
|
147
|
+
</template>
|
|
145
148
|
|
|
146
149
|
<!-- 查看 -->
|
|
147
150
|
<template v-else>
|
|
@@ -149,7 +152,7 @@
|
|
|
149
152
|
...commonClass,
|
|
150
153
|
'DshCoordinates-show': true
|
|
151
154
|
}">
|
|
152
|
-
{{
|
|
155
|
+
{{ curValName || emptyShowVal }}
|
|
153
156
|
</span>
|
|
154
157
|
</template>
|
|
155
158
|
</Ctooltip>
|
|
@@ -203,12 +203,14 @@
|
|
|
203
203
|
..._customData.params
|
|
204
204
|
},
|
|
205
205
|
callback: data => {
|
|
206
|
-
this.initListData.push(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
206
|
+
this.initListData.push(
|
|
207
|
+
...data.list.map(item => (
|
|
208
|
+
{
|
|
209
|
+
_key: item[_customData._key || "_key"],
|
|
210
|
+
name: item[_customData._name || "name"]
|
|
211
|
+
}
|
|
212
|
+
))
|
|
213
|
+
);
|
|
212
214
|
}
|
|
213
215
|
});
|
|
214
216
|
},
|
|
@@ -1,48 +1,44 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
:disabled="!finalCanEdit"
|
|
12
|
-
@on-change="change"
|
|
13
|
-
>
|
|
14
|
-
<span
|
|
15
|
-
slot="open"
|
|
16
|
-
style="font-size: 12px;"
|
|
17
|
-
>{{ propsObj._openText }}</span>
|
|
18
|
-
<span slot="close">{{ propsObj._closeText }}</span>
|
|
19
|
-
</i-switch>
|
|
20
|
-
<!-- 查看 和 编辑下无编辑权限 -->
|
|
21
|
-
<Ctooltip
|
|
22
|
-
v-else
|
|
23
|
-
placement="top"
|
|
24
|
-
:transfer="true"
|
|
25
|
-
maxWidth="200"
|
|
26
|
-
:content="showVal"
|
|
27
|
-
>
|
|
28
|
-
<div
|
|
29
|
-
class="DshCheckbox-value-wrapper"
|
|
30
|
-
:style="{
|
|
31
|
-
textAlign: propsObj._textAlign,
|
|
32
|
-
flexGrow: 1,
|
|
33
|
-
display: 'flex',
|
|
34
|
-
justifyContent: getFlexLayout(propsObj._textAlign)
|
|
35
|
-
}"
|
|
2
|
+
<!-- 该组件无clearable -->
|
|
3
|
+
<div class="DshSwitch">
|
|
4
|
+
<!-- 编辑 -->
|
|
5
|
+
<template v-if="canEdit">
|
|
6
|
+
<i-switch
|
|
7
|
+
v-model="curVal"
|
|
8
|
+
:disabled="!finalCanEdit"
|
|
9
|
+
:size="propsObj._size"
|
|
10
|
+
@on-change="change"
|
|
36
11
|
>
|
|
37
|
-
<span
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
12
|
+
<span slot="open">
|
|
13
|
+
{{ propsObj._openText }}
|
|
14
|
+
</span>
|
|
15
|
+
<span slot="close">
|
|
16
|
+
{{ propsObj._closeText }}
|
|
17
|
+
</span>
|
|
18
|
+
</i-switch>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<!-- 查看 -->
|
|
22
|
+
<template v-else>
|
|
23
|
+
<Ctooltip
|
|
24
|
+
:content="showText"
|
|
25
|
+
placement="top"
|
|
26
|
+
:transfer="true"
|
|
27
|
+
maxWidth="200"
|
|
28
|
+
>
|
|
29
|
+
<div class="DshSwitch-show">
|
|
30
|
+
<span
|
|
31
|
+
class="DshSwitch-show-name"
|
|
32
|
+
:style="{
|
|
33
|
+
background: curVal ? '#ECF3FD' : '#FEF6EB',
|
|
34
|
+
color: curVal ? '#3D84EE' : '#F4A135'
|
|
35
|
+
}"
|
|
36
|
+
>
|
|
37
|
+
{{ showText }}
|
|
38
|
+
</span>
|
|
39
|
+
</div>
|
|
40
|
+
</Ctooltip>
|
|
41
|
+
</template>
|
|
46
42
|
</div>
|
|
47
43
|
</template>
|
|
48
44
|
|
|
@@ -51,58 +47,20 @@
|
|
|
51
47
|
|
|
52
48
|
export default {
|
|
53
49
|
name: "DshSwitch",
|
|
54
|
-
mixins: [
|
|
50
|
+
mixins: [
|
|
51
|
+
controlMixin
|
|
52
|
+
],
|
|
55
53
|
data () {
|
|
56
54
|
return {};
|
|
57
55
|
},
|
|
58
56
|
computed: {
|
|
59
|
-
|
|
57
|
+
showText () {
|
|
60
58
|
return this.value[this.controlKey]
|
|
61
59
|
? this.propsObj._openText
|
|
62
60
|
: this.propsObj._closeText;
|
|
63
61
|
}
|
|
64
62
|
},
|
|
65
|
-
created () {
|
|
66
|
-
}
|
|
67
|
-
methods: {
|
|
68
|
-
getFlexLayout (align) {
|
|
69
|
-
let map = {
|
|
70
|
-
left: "flex-start",
|
|
71
|
-
center: "center",
|
|
72
|
-
right: "flex-end"
|
|
73
|
-
};
|
|
74
|
-
if (align) {
|
|
75
|
-
return map[align];
|
|
76
|
-
} else {
|
|
77
|
-
return "flex-start";
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
63
|
+
created () {},
|
|
64
|
+
methods: {}
|
|
81
65
|
};
|
|
82
66
|
</script>
|
|
83
|
-
|
|
84
|
-
<style lang="less" scoped>
|
|
85
|
-
.DshSwitch {
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
</style>
|
|
89
|
-
<style lang="less">
|
|
90
|
-
.DshSwitch {
|
|
91
|
-
.ivu-switch {
|
|
92
|
-
width: 50px;
|
|
93
|
-
}
|
|
94
|
-
.ivu-switch-checked:after {
|
|
95
|
-
left: 29px;
|
|
96
|
-
}
|
|
97
|
-
.ivu-switch-inner {
|
|
98
|
-
color: #fff;
|
|
99
|
-
font-size: 12px;
|
|
100
|
-
position: absolute;
|
|
101
|
-
left: auto;
|
|
102
|
-
right: 4px;
|
|
103
|
-
}
|
|
104
|
-
.ivu-switch-checked .ivu-switch-inner {
|
|
105
|
-
left: 3px;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
</style>
|
|
@@ -45,14 +45,34 @@ export default {
|
|
|
45
45
|
controlKey () {
|
|
46
46
|
return this.propsObj._key;
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
// 值为不是[]类型用的
|
|
49
|
+
curVal: {
|
|
50
|
+
get () {
|
|
51
|
+
return this.value[this.controlKey];
|
|
52
|
+
},
|
|
53
|
+
set (val) {
|
|
54
|
+
this.value[this.controlKey] = val;
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
// 值为[]类型用的
|
|
58
|
+
curValList: {
|
|
59
|
+
get () {
|
|
60
|
+
return this.value[this.controlKey] || [];
|
|
61
|
+
},
|
|
62
|
+
set (val) {
|
|
63
|
+
this.value[this.controlKey] = val;
|
|
64
|
+
this.change();
|
|
65
|
+
}
|
|
50
66
|
},
|
|
51
67
|
emptyShowVal () {
|
|
52
|
-
return this.
|
|
68
|
+
return this.canEdit
|
|
69
|
+
? this.commonDealPropsObj._placeholder
|
|
70
|
+
: this.isUnitShow
|
|
71
|
+
? "--"
|
|
72
|
+
: "暂无内容";
|
|
53
73
|
},
|
|
54
74
|
showText () {
|
|
55
|
-
return this.curVal
|
|
75
|
+
return this.$isEmptyData(this.curVal) ? this.curVal : this.emptyShowVal;
|
|
56
76
|
},
|
|
57
77
|
|
|
58
78
|
isUnitShow () {
|
|
@@ -101,10 +121,10 @@ export default {
|
|
|
101
121
|
},
|
|
102
122
|
methods: {
|
|
103
123
|
change (...params) {
|
|
104
|
-
this.$emit("change", this.
|
|
124
|
+
this.$emit("change", this.value[this.controlKey]);
|
|
105
125
|
},
|
|
106
126
|
refChange (...params) {
|
|
107
|
-
this.$emit("refChange", this.
|
|
127
|
+
this.$emit("refChange", this.value[this.controlKey]);
|
|
108
128
|
}
|
|
109
129
|
}
|
|
110
130
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg class="bri" aria-hidden="true">
|
|
3
|
+
<use :href="href"></use>
|
|
4
|
+
</svg>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
name: "imgscg",
|
|
11
|
+
components: {},
|
|
12
|
+
props: {
|
|
13
|
+
src: String
|
|
14
|
+
},
|
|
15
|
+
computed: {
|
|
16
|
+
// 这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法
|
|
17
|
+
// 浏览器渲染 SVG 的性能一般,还不如 png。
|
|
18
|
+
href () {
|
|
19
|
+
return `#bri-${this.src}`;
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
data () {
|
|
23
|
+
return {};
|
|
24
|
+
},
|
|
25
|
+
created () {},
|
|
26
|
+
methods: {}
|
|
27
|
+
};
|
|
28
|
+
</script>
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="DshEditPanel">
|
|
3
|
-
<Form
|
|
3
|
+
<Form
|
|
4
|
+
class="DshEditPanel-form"
|
|
5
|
+
:model="value"
|
|
6
|
+
:label-width="80"
|
|
7
|
+
label-position="left"
|
|
8
|
+
>
|
|
4
9
|
<FormItem label="应用名称">
|
|
5
|
-
<Input
|
|
10
|
+
<Input
|
|
11
|
+
v-model="value.name"
|
|
12
|
+
placeholder="请输入应用名称"
|
|
13
|
+
autofocus
|
|
14
|
+
@on-blur="onBlur(value)"
|
|
15
|
+
/>
|
|
6
16
|
</FormItem>
|
|
7
17
|
|
|
8
18
|
<FormItem label="主题颜色">
|
|
@@ -13,7 +23,12 @@
|
|
|
13
23
|
class="DshEditPanel-colors-item"
|
|
14
24
|
@click="$dispatchEvent(operationMap.updateColor, colorItem.color, colorKey, value)"
|
|
15
25
|
>
|
|
16
|
-
<div
|
|
26
|
+
<div
|
|
27
|
+
class="DshEditPanel-colors-item-content"
|
|
28
|
+
:style="{
|
|
29
|
+
backgroundColor: colorItem.color
|
|
30
|
+
}"
|
|
31
|
+
></div>
|
|
17
32
|
<Icon
|
|
18
33
|
v-if="colorItem.color === value.color"
|
|
19
34
|
class="DshEditPanel-colors-item-icon"
|
|
@@ -36,7 +51,12 @@
|
|
|
36
51
|
}"
|
|
37
52
|
@click="$dispatchEvent(operationMap.updateIcon, iconItem, iconIndex, value)"
|
|
38
53
|
>
|
|
39
|
-
<div
|
|
54
|
+
<div
|
|
55
|
+
class="DshEditPanel-icons-item-content"
|
|
56
|
+
:style="{
|
|
57
|
+
backgroundImage: `url(${$appData.themeColors[value.color].bgUrl})`
|
|
58
|
+
}"
|
|
59
|
+
>
|
|
40
60
|
<Icon :custom="'bico-font ' + iconItem"></Icon>
|
|
41
61
|
</div>
|
|
42
62
|
</div>
|
|
@@ -47,7 +67,7 @@
|
|
|
47
67
|
<!-- 操作按钮 -->
|
|
48
68
|
<dsh-buttons
|
|
49
69
|
class="bri-footer"
|
|
50
|
-
:list="$getOperationList(['
|
|
70
|
+
:list="$getOperationList(['canCancel', 'canConfirm'])"
|
|
51
71
|
@click="$dispatchEvent($event)"
|
|
52
72
|
></dsh-buttons>
|
|
53
73
|
</div>
|
|
@@ -55,8 +75,8 @@
|
|
|
55
75
|
|
|
56
76
|
<script>
|
|
57
77
|
export default {
|
|
58
|
-
components: {},
|
|
59
78
|
name: "DshEditPanel",
|
|
79
|
+
components: {},
|
|
60
80
|
props: {
|
|
61
81
|
value: {
|
|
62
82
|
type: Object,
|
|
@@ -78,14 +98,14 @@
|
|
|
78
98
|
type: "updateIcon",
|
|
79
99
|
event: "clickUpdateIcon"
|
|
80
100
|
},
|
|
81
|
-
|
|
101
|
+
canCancel: {
|
|
82
102
|
name: "取消",
|
|
83
|
-
type: "
|
|
103
|
+
type: "canCancel",
|
|
84
104
|
event: "clickCancel"
|
|
85
105
|
},
|
|
86
|
-
|
|
106
|
+
canConfirm: {
|
|
87
107
|
name: "确定",
|
|
88
|
-
type: "
|
|
108
|
+
type: "canConfirm",
|
|
89
109
|
btnType: "primary",
|
|
90
110
|
event: "clickConfirm"
|
|
91
111
|
}
|
|
@@ -107,7 +127,9 @@
|
|
|
107
127
|
},
|
|
108
128
|
|
|
109
129
|
onBlur (value) {
|
|
110
|
-
|
|
130
|
+
if (!value.name) {
|
|
131
|
+
value.name = value.oldName || "未命名";
|
|
132
|
+
}
|
|
111
133
|
},
|
|
112
134
|
// 点击修改应用主题色
|
|
113
135
|
clickUpdateColor (item, colorItem, colorKey, appObj) {
|