@abi-software/simulationvuer 2.0.17 → 2.0.18-demo.1
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/dist/simulationvuer.js +266 -262
- package/dist/simulationvuer.umd.cjs +21 -21
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/SimulationVuer.vue +70 -27
- package/src/components/SimulationVuerInput.vue +60 -18
- package/src/components.d.ts +0 -3
|
@@ -1,12 +1,43 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-show="visible">
|
|
3
3
|
<p :class="labelClasses">{{ name }}</p>
|
|
4
|
-
<el-select
|
|
5
|
-
|
|
4
|
+
<el-select
|
|
5
|
+
v-if="isDiscrete"
|
|
6
|
+
class="discrete"
|
|
7
|
+
popper-class="discrete-popper"
|
|
8
|
+
size="small"
|
|
9
|
+
v-model="vModel"
|
|
10
|
+
:teleported="true"
|
|
11
|
+
@change="updateUi()"
|
|
12
|
+
>
|
|
13
|
+
<el-option
|
|
14
|
+
v-for="possibleValue in possibleValues"
|
|
15
|
+
:key="possibleValue.value"
|
|
16
|
+
:label="possibleValue.name"
|
|
17
|
+
:value="possibleValue.value"
|
|
18
|
+
/>
|
|
6
19
|
</el-select>
|
|
7
20
|
<div class="sliders-and-fields" v-if="!isDiscrete">
|
|
8
|
-
<el-slider
|
|
9
|
-
|
|
21
|
+
<el-slider
|
|
22
|
+
v-model="vModel"
|
|
23
|
+
:max="maximumValue"
|
|
24
|
+
:min="minimumValue"
|
|
25
|
+
:show-input="false"
|
|
26
|
+
:show-tooltip="false"
|
|
27
|
+
:step="stepValue"
|
|
28
|
+
@input="updateUi()"
|
|
29
|
+
/>
|
|
30
|
+
<el-input-number
|
|
31
|
+
class="scalar"
|
|
32
|
+
size="small"
|
|
33
|
+
v-model="vModel"
|
|
34
|
+
:controls="false"
|
|
35
|
+
:max="maximumValue"
|
|
36
|
+
:min="minimumValue"
|
|
37
|
+
:step="stepValue"
|
|
38
|
+
:step-strictly="true"
|
|
39
|
+
@input="updateUi()"
|
|
40
|
+
/>
|
|
10
41
|
</div>
|
|
11
42
|
</div>
|
|
12
43
|
</template>
|
|
@@ -63,9 +94,17 @@ export default {
|
|
|
63
94
|
|
|
64
95
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
65
96
|
<style scoped lang="scss">
|
|
97
|
+
// select box, slider and input number height
|
|
98
|
+
$input-height: 32px;
|
|
99
|
+
$input-number-width: 45px;
|
|
100
|
+
|
|
101
|
+
p {
|
|
102
|
+
font-size: 14px;
|
|
103
|
+
}
|
|
104
|
+
|
|
66
105
|
:deep(.el-input-number.scalar) {
|
|
67
|
-
|
|
68
|
-
|
|
106
|
+
width: $input-number-width;
|
|
107
|
+
height: $input-height;
|
|
69
108
|
}
|
|
70
109
|
|
|
71
110
|
:deep(.el-input-number.scalar .el-input) {
|
|
@@ -77,13 +116,17 @@ export default {
|
|
|
77
116
|
}
|
|
78
117
|
|
|
79
118
|
:deep(.el-select.discrete) {
|
|
80
|
-
margin-
|
|
119
|
+
margin-top: 4px;
|
|
120
|
+
|
|
121
|
+
.el-select__wrapper {
|
|
122
|
+
height: $input-height;
|
|
123
|
+
}
|
|
81
124
|
}
|
|
82
125
|
|
|
83
126
|
:deep(.el-slider) {
|
|
84
|
-
width: 108px;
|
|
85
|
-
margin-top: -12px;
|
|
86
127
|
margin-left: 8px;
|
|
128
|
+
width: calc(100% - 16px);
|
|
129
|
+
height: $input-height;
|
|
87
130
|
}
|
|
88
131
|
|
|
89
132
|
:deep(.el-slider__bar) {
|
|
@@ -96,7 +139,7 @@ export default {
|
|
|
96
139
|
|
|
97
140
|
.discrete {
|
|
98
141
|
margin-left: 8px;
|
|
99
|
-
width:
|
|
142
|
+
width: calc(100% - 16px);
|
|
100
143
|
}
|
|
101
144
|
|
|
102
145
|
.discrete {
|
|
@@ -134,11 +177,11 @@ div.simulation-vuer {
|
|
|
134
177
|
}
|
|
135
178
|
|
|
136
179
|
div.sliders-and-fields {
|
|
137
|
-
display:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
margin-
|
|
180
|
+
display: flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
justify-content: space-between;
|
|
183
|
+
gap: 16px;
|
|
184
|
+
margin-top: -4px;
|
|
142
185
|
}
|
|
143
186
|
|
|
144
187
|
p.default {
|
|
@@ -154,9 +197,8 @@ p.discrete {
|
|
|
154
197
|
}
|
|
155
198
|
|
|
156
199
|
p.scalar {
|
|
157
|
-
|
|
158
|
-
grid-column-end: 3;
|
|
159
|
-
margin-bottom: 8px;
|
|
200
|
+
margin-bottom: 0;
|
|
160
201
|
margin-top: 0;
|
|
202
|
+
padding-right: $input-number-width;
|
|
161
203
|
}
|
|
162
204
|
</style>
|
package/src/components.d.ts
CHANGED
|
@@ -8,12 +8,9 @@ export {}
|
|
|
8
8
|
declare module 'vue' {
|
|
9
9
|
export interface GlobalComponents {
|
|
10
10
|
ElButton: typeof import('element-plus/es')['ElButton']
|
|
11
|
-
ElDialog: typeof import('element-plus/es')['ElDialog']
|
|
12
11
|
ElDivider: typeof import('element-plus/es')['ElDivider']
|
|
13
12
|
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
|
14
13
|
ElOption: typeof import('element-plus/es')['ElOption']
|
|
15
|
-
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
|
16
|
-
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
|
17
14
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
|
18
15
|
ElSlider: typeof import('element-plus/es')['ElSlider']
|
|
19
16
|
RouterLink: typeof import('vue-router')['RouterLink']
|