dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.9
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/assets/brand/harvester/favicon.png +0 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/icons/demo.css +539 -0
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +1131 -0
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +216 -0
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +1 -0
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +324 -0
- package/assets/icons/iconfont.json:Zone.Identifier +0 -0
- package/assets/icons/iconfont.ttf +0 -0
- package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff +0 -0
- package/assets/icons/iconfont.woff2 +0 -0
- package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
- package/assets/images/API.svg +3 -0
- package/assets/images/action.svg +6 -0
- package/assets/images/login/password.svg +20 -0
- package/assets/images/login/user.svg +6 -0
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +19 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/pl/half-logo.svg +2 -23
- package/assets/images/pl/harvester.png +0 -0
- package/assets/images/pl/logo.png +0 -0
- package/assets/images/promp-yellow.svg +5 -0
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +63 -0
- package/assets/styles/app.scss +4 -0
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +2 -1
- package/assets/styles/base/_variables.scss +14 -7
- package/assets/styles/global/_button.scss +43 -25
- package/assets/styles/global/_columns.scss +3 -1
- package/assets/styles/global/_form.scss +45 -13
- package/assets/styles/global/_labeled-input.scss +54 -26
- package/assets/styles/global/_layout.scss +8 -3
- package/assets/styles/global/_select.scss +25 -17
- package/assets/styles/global/_table.scss +7 -1
- package/assets/styles/global/_tooltip.scss +56 -8
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +66 -43
- package/assets/styles/vendor/vue-select.scss +22 -9
- package/assets/translations/en-us.yaml +28 -4
- package/assets/translations/zh-hans.yaml +452 -189
- package/components/ActionDropdown.vue +2 -1
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +2 -0
- package/components/AppModal.vue +46 -5
- package/components/BrandImage.vue +1 -0
- package/components/ButtonDropdown.vue +26 -4
- package/components/ButtonMultiAction.vue +1 -0
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +20 -6
- package/components/ConsumptionGauge.vue +24 -5
- package/components/CopyToClipboard.vue +15 -0
- package/components/CruResource.vue +9 -8
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +29 -17
- package/components/DotState.vue +84 -0
- package/components/Drawer/Chrome.vue +2 -2
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -22
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +2 -1
- package/components/ExplorerMembers.vue +18 -3
- package/components/ExplorerProjectsNamespaces.vue +19 -5
- package/components/GlobalRoleBindings.vue +112 -48
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +3 -1
- package/components/HardwareResourceGauge.vue +39 -3
- package/components/IndentedPanel.vue +4 -10
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +28 -2
- package/components/LabelValue.vue +20 -1
- package/components/ModalWithCard.vue +12 -3
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +30 -11
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
- package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
- package/components/Resource/Detail/Metadata/index.vue +3 -1
- package/components/Resource/Detail/TitleBar/Title.vue +4 -3
- package/components/Resource/Detail/TitleBar/Top.vue +2 -0
- package/components/Resource/Detail/TitleBar/index.vue +109 -24
- package/components/ResourceDetail/Masthead/legacy.vue +181 -38
- package/components/ResourceDetail/legacy.vue +32 -14
- package/components/ResourceList/Masthead.vue +226 -54
- package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
- package/components/ResourceTable.vue +24 -2
- package/components/SideNav.vue +74 -20
- package/components/SortableTable/THead.vue +33 -3
- package/components/SortableTable/index.vue +1016 -463
- package/components/SortableTable/paging.js +26 -16
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +47 -29
- package/components/YamlEditor.vue +0 -1
- package/components/auth/Principal.vue +37 -13
- package/components/auth/RoleDetailEdit.vue +58 -7
- package/components/auth/SelectPrincipal.vue +1 -0
- package/components/breadcrumb/index.vue +316 -0
- package/components/form/ArrayList.vue +41 -33
- package/components/form/ArrayListGrouped.vue +10 -2
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +64 -59
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +32 -8
- package/components/form/Footer.vue +11 -8
- package/components/form/InputWithSelect.vue +8 -5
- package/components/form/KeyValue.vue +47 -7
- package/components/form/LabeledSelect.vue +214 -242
- package/components/form/Labels.vue +3 -3
- package/components/form/MatchExpressions.vue +24 -7
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +59 -20
- package/components/form/Password.vue +16 -7
- package/components/form/PodAffinity.vue +4 -5
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +18 -17
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +3 -6
- package/components/form/Select.vue +5 -2
- package/components/form/SimpleSecretSelector.vue +29 -9
- package/components/form/Taints.vue +2 -1
- package/components/form/UnitInput.vue +8 -3
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/formatter/BadgeStateFormatter.vue +8 -5
- package/components/formatter/LiveDate.vue +3 -3
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +132 -99
- package/components/nav/Header.vue +124 -27
- package/components/nav/HeaderPageActionMenu.vue +1 -0
- package/components/nav/NamespaceFilter.vue +20 -17
- package/components/nav/TopLevelMenu.vue +182 -119
- package/components/nav/Type.vue +63 -41
- package/composables/useClickOutside.ts +1 -1
- package/config/private-label.js +15 -11
- package/config/product/auth.js +17 -7
- package/config/product/settings.js +19 -9
- package/config/settings.ts +28 -0
- package/config/table-headers.js +3 -2
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/management.cattle.io.user.vue +17 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
- package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
- package/edit/namespace.vue +1 -2
- package/edit/token.vue +31 -12
- package/edit/workload/index.vue +4 -4
- package/list/management.cattle.io.setting.vue +22 -13
- package/list/management.cattle.io.user.vue +7 -3
- package/list/namespace.vue +3 -0
- package/list/provisioning.cattle.io.cluster.vue +6 -7
- package/mixins/brand.js +17 -0
- package/package.json +1 -1
- package/pages/account/pri.vue +229 -0
- package/pages/auth/login.vue +220 -52
- package/pages/auth/setup.vue +142 -19
- package/pages/c/_cluster/_product/namespaces.vue +5 -5
- package/pages/c/_cluster/auth/roles/index.vue +56 -5
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +174 -102
- package/pages/c/_cluster/settings/brand.vue +350 -302
- package/pages/c/_cluster/settings/performance.vue +61 -38
- package/pages/home.vue +70 -30
- package/pages/prefs.vue +27 -25
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +38 -55
- package/rancher-components/Banner/Banner.vue +12 -8
- package/rancher-components/Card/Card.vue +7 -8
- package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
- package/rancher-components/Form/Radio/RadioButton.vue +35 -11
- package/rancher-components/Form/Radio/RadioGroup.vue +13 -5
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +12 -4
- package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
- package/rancher-components/RcDropdown/types.ts +1 -0
- package/rancher-components/StringList/StringList.vue +1 -1
- package/scripts/publish-shell.sh +1 -1
- package/static/favicon.ico +0 -0
- package/static/favicon.png +0 -0
- package/static/loading-indicator.html +3 -3
- package/store/i18n.js +5 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +11 -4
- package/store/type-map.js +32 -2
- package/types/shell/index.d.ts +78 -97
- package/utils/error.js +89 -8
- package/utils/errorTranslate.json +1351 -0
- package/utils/router.js +21 -0
- package/utils/select.js +26 -3
- package/utils/string.js +8 -5
- package/utils/title.ts +1 -1
- package/vue.config.js +1 -1
|
@@ -112,8 +112,7 @@ export default {
|
|
|
112
112
|
|
|
113
113
|
<template>
|
|
114
114
|
<div
|
|
115
|
-
class="color-input"
|
|
116
|
-
:class="{[mode]:mode, disabled: isDisabled}"
|
|
115
|
+
class="color-input-box"
|
|
117
116
|
:data-testid="componentTestid + '-color-input'"
|
|
118
117
|
:tabindex="isDisabled ? -1 : 0"
|
|
119
118
|
@keydown.space.prevent
|
|
@@ -135,6 +134,7 @@ export default {
|
|
|
135
134
|
</label>
|
|
136
135
|
<div
|
|
137
136
|
:data-testid="componentTestid + '-color-input_preview-container'"
|
|
137
|
+
:class="{[mode]:mode, disabled: isDisabled}"
|
|
138
138
|
class="preview-container"
|
|
139
139
|
@click.stop="$refs.input.click($event)"
|
|
140
140
|
>
|
|
@@ -143,28 +143,31 @@ export default {
|
|
|
143
143
|
class="color-display"
|
|
144
144
|
>
|
|
145
145
|
<input
|
|
146
|
+
style="margin-bottom: 6px;"
|
|
146
147
|
ref="input"
|
|
147
148
|
:aria-disabled="isDisabled ? 'true' : 'false'"
|
|
148
149
|
:aria-label="ariaLabel"
|
|
149
150
|
:aria-describedby="ariaDescribedBy"
|
|
150
151
|
type="color"
|
|
152
|
+
class="color-input"
|
|
151
153
|
:disabled="isDisabled"
|
|
152
154
|
tabindex="-1"
|
|
153
155
|
:value="inputValue"
|
|
154
156
|
@input="$emit('update:value', $event.target.value)"
|
|
155
157
|
>
|
|
156
158
|
</span>
|
|
157
|
-
<span class="
|
|
159
|
+
<span class="color-value">{{ inputValue }}</span>
|
|
158
160
|
</div>
|
|
159
161
|
</div>
|
|
160
162
|
</template>
|
|
161
163
|
|
|
162
164
|
<style lang='scss' scoped>
|
|
163
|
-
.color-input {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
.color-input-box {
|
|
166
|
+
display: flex;
|
|
167
|
+
.text-label {
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
}
|
|
168
171
|
&:focus-visible {
|
|
169
172
|
@include focus-outline;
|
|
170
173
|
}
|
|
@@ -201,6 +204,26 @@ export default {
|
|
|
201
204
|
|
|
202
205
|
.color-value {
|
|
203
206
|
margin-left: 4px;
|
|
207
|
+
color: var(--input-label);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&.disabled, &.disabled .selected, &[disabled], &[disabled]:hover {
|
|
211
|
+
color: var(--input-disabled-text);
|
|
212
|
+
outline-width: 0;
|
|
213
|
+
border-color: var(--input-disabled-border);
|
|
214
|
+
cursor: not-allowed;
|
|
215
|
+
|
|
216
|
+
label, span, div, input {
|
|
217
|
+
cursor: not-allowed !important;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.color-value {
|
|
221
|
+
color: var(--muted);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
&::placeholder {
|
|
225
|
+
color: var(--input-disabled-placeholder);
|
|
226
|
+
}
|
|
204
227
|
}
|
|
205
228
|
}
|
|
206
229
|
|
|
@@ -226,4 +249,5 @@ export default {
|
|
|
226
249
|
}
|
|
227
250
|
}
|
|
228
251
|
}
|
|
252
|
+
|
|
229
253
|
</style>
|
|
@@ -55,7 +55,7 @@ export default defineComponent({
|
|
|
55
55
|
<div v-if="!isView">
|
|
56
56
|
<div class="spacer-small" />
|
|
57
57
|
|
|
58
|
-
<div
|
|
58
|
+
<!-- <div
|
|
59
59
|
v-for="(err,idx) in errors"
|
|
60
60
|
:key="idx"
|
|
61
61
|
>
|
|
@@ -65,7 +65,7 @@ export default defineComponent({
|
|
|
65
65
|
:closable="true"
|
|
66
66
|
@close="closeError(idx)"
|
|
67
67
|
/>
|
|
68
|
-
</div>
|
|
68
|
+
</div> -->
|
|
69
69
|
<div class="buttons">
|
|
70
70
|
<div class="left">
|
|
71
71
|
<slot name="left" />
|
|
@@ -97,9 +97,10 @@ export default defineComponent({
|
|
|
97
97
|
|
|
98
98
|
<style lang='scss'>
|
|
99
99
|
.buttons {
|
|
100
|
-
display: grid;
|
|
100
|
+
/* display: grid;
|
|
101
101
|
grid-template-areas: "left right";
|
|
102
|
-
grid-template-columns: "min-content auto";
|
|
102
|
+
grid-template-columns: "min-content auto"; */
|
|
103
|
+
display: flex;
|
|
103
104
|
|
|
104
105
|
.left {
|
|
105
106
|
grid-area: left;
|
|
@@ -111,11 +112,13 @@ export default defineComponent({
|
|
|
111
112
|
}
|
|
112
113
|
|
|
113
114
|
.right {
|
|
114
|
-
grid-area: right;
|
|
115
|
-
text-align: right;
|
|
116
|
-
|
|
115
|
+
/* grid-area: right;
|
|
116
|
+
text-align: right; */
|
|
117
|
+
display: flex;
|
|
118
|
+
justify-content: flex-end;
|
|
117
119
|
.btn, button {
|
|
118
|
-
margin: 0 0 0 $column-gutter;
|
|
120
|
+
/* margin: 0 0 0 $column-gutter; */
|
|
121
|
+
margin: 0 10px 0 0px;
|
|
119
122
|
}
|
|
120
123
|
}
|
|
121
124
|
}
|
|
@@ -217,6 +217,7 @@ export default {
|
|
|
217
217
|
|
|
218
218
|
&.labeled-select {
|
|
219
219
|
.selected {
|
|
220
|
+
background-color: var(--input-bg);
|
|
220
221
|
color: var(--input-text);
|
|
221
222
|
text-align: center;
|
|
222
223
|
margin-right: 1em;
|
|
@@ -269,19 +270,19 @@ export default {
|
|
|
269
270
|
margin-right: 0;
|
|
270
271
|
|
|
271
272
|
&:hover:not(.focused):not(.disabled):not(.view) {
|
|
272
|
-
border:
|
|
273
|
+
border: 0px solid var(--input-hover-border) !important;
|
|
273
274
|
}
|
|
274
275
|
|
|
275
276
|
&.focused {
|
|
276
|
-
border:
|
|
277
|
+
border: 0px solid var(--outline) !important;
|
|
277
278
|
}
|
|
278
279
|
|
|
279
280
|
&:hover:not(.focused):not(.disabled) {
|
|
280
|
-
border:
|
|
281
|
+
border: 0px solid var(--input-hover-border) !important;
|
|
281
282
|
}
|
|
282
283
|
|
|
283
284
|
&.focused {
|
|
284
|
-
border:
|
|
285
|
+
border: 0px solid var(--outline) !important;
|
|
285
286
|
}
|
|
286
287
|
|
|
287
288
|
&.labeled-select.focused :deep(),
|
|
@@ -291,7 +292,8 @@ export default {
|
|
|
291
292
|
|
|
292
293
|
&.labeled-select:not(.disabled):not(.view) :deep(),
|
|
293
294
|
&.unlabeled-select:not(.disabled):not(.view) :deep() {
|
|
294
|
-
border: solid 1px var(--input-border);
|
|
295
|
+
/* border: solid 1px var(--input-border); */
|
|
296
|
+
height: 32px;
|
|
295
297
|
}
|
|
296
298
|
|
|
297
299
|
&.labeled-select :deep(),
|
|
@@ -302,6 +304,7 @@ export default {
|
|
|
302
304
|
// position: relative;
|
|
303
305
|
|
|
304
306
|
.vs__selected {
|
|
307
|
+
background-color: var(--input-bg);
|
|
305
308
|
color: var(--input-text);
|
|
306
309
|
}
|
|
307
310
|
|
|
@@ -283,7 +283,7 @@ export default {
|
|
|
283
283
|
const gap = this.canRemove ? ' 50px' : '';
|
|
284
284
|
const size = 2 + this.extraColumns.length;
|
|
285
285
|
|
|
286
|
-
return `grid-template-columns: repeat(${ size },
|
|
286
|
+
return `grid-template-columns: repeat(${ size }, 400px)${ gap };`;
|
|
287
287
|
},
|
|
288
288
|
usedKeyOptions() {
|
|
289
289
|
return this.rows.map((row) => row[this.keyName]);
|
|
@@ -330,7 +330,7 @@ export default {
|
|
|
330
330
|
},
|
|
331
331
|
|
|
332
332
|
getRows(value) {
|
|
333
|
-
|
|
333
|
+
let rows = [];
|
|
334
334
|
|
|
335
335
|
if ( this.asMap ) {
|
|
336
336
|
const input = value || {};
|
|
@@ -403,6 +403,18 @@ export default {
|
|
|
403
403
|
obj.binary = false;
|
|
404
404
|
obj.canEncode = this.handleBase64;
|
|
405
405
|
obj.supported = true;
|
|
406
|
+
|
|
407
|
+
// 上传镜像问题
|
|
408
|
+
const s = this.rows.filter(item => {
|
|
409
|
+
// 如果 item.key 或 obj.key 为空,直接保留
|
|
410
|
+
if (!item.key || !obj.key) {
|
|
411
|
+
return true;
|
|
412
|
+
}
|
|
413
|
+
// 两者都有值时才比较
|
|
414
|
+
return item.key !== obj.key;
|
|
415
|
+
});
|
|
416
|
+
this.rows = s;
|
|
417
|
+
|
|
406
418
|
this.rows.push(obj);
|
|
407
419
|
this.queueUpdate();
|
|
408
420
|
this.$nextTick(() => {
|
|
@@ -466,8 +478,11 @@ export default {
|
|
|
466
478
|
const valueName = this.valueName;
|
|
467
479
|
|
|
468
480
|
for ( const row of this.rows ) {
|
|
469
|
-
let value = (row[valueName] || '');
|
|
481
|
+
// let value = (row[valueName] || '');
|
|
482
|
+
// const key = (row[keyName] || '').trim();
|
|
483
|
+
|
|
470
484
|
const key = (row[keyName] || '').trim();
|
|
485
|
+
let value = (row[valueName] || '').trim();
|
|
471
486
|
|
|
472
487
|
if (value && typeOf(value) === 'object') {
|
|
473
488
|
out[key] = JSON.parse(JSON.stringify(value));
|
|
@@ -588,6 +603,7 @@ export default {
|
|
|
588
603
|
</script>
|
|
589
604
|
<template>
|
|
590
605
|
<div class="key-value">
|
|
606
|
+
<!-- 标题部分:如果传了 title 或者插槽 title 才显示 -->
|
|
591
607
|
<div
|
|
592
608
|
v-if="title || $slots.title"
|
|
593
609
|
class="clearfix"
|
|
@@ -595,6 +611,7 @@ export default {
|
|
|
595
611
|
<slot name="title">
|
|
596
612
|
<h3>
|
|
597
613
|
{{ title }}
|
|
614
|
+
<!-- 标题右侧提示信息 -->
|
|
598
615
|
<i
|
|
599
616
|
v-if="titleProtip"
|
|
600
617
|
v-clean-tooltip="titleProtip"
|
|
@@ -603,6 +620,8 @@ export default {
|
|
|
603
620
|
</h3>
|
|
604
621
|
</slot>
|
|
605
622
|
</div>
|
|
623
|
+
|
|
624
|
+
<!-- 整个 Key-Value 表格容器 -->
|
|
606
625
|
<div
|
|
607
626
|
class="kv-container"
|
|
608
627
|
role="grid"
|
|
@@ -611,6 +630,8 @@ export default {
|
|
|
611
630
|
:aria-colcount="extraColumns.length + 2"
|
|
612
631
|
:style="containerStyle"
|
|
613
632
|
>
|
|
633
|
+
|
|
634
|
+
<!-- 表头:有数据或者处于 view 模式才显示 -->
|
|
614
635
|
<template v-if="rows.length || isView">
|
|
615
636
|
<div class="rowgroup">
|
|
616
637
|
<div class="row">
|
|
@@ -660,6 +681,8 @@ export default {
|
|
|
660
681
|
</div>
|
|
661
682
|
</div>
|
|
662
683
|
</template>
|
|
684
|
+
|
|
685
|
+
<!-- 如果是 view 模式但没有数据,显示占位符 -->
|
|
663
686
|
<template v-if="!rows.length && isView">
|
|
664
687
|
<div class="rowgroup">
|
|
665
688
|
<div class="row">
|
|
@@ -678,6 +701,8 @@ export default {
|
|
|
678
701
|
</div>
|
|
679
702
|
</div>
|
|
680
703
|
</template>
|
|
704
|
+
|
|
705
|
+
<!-- 遍历 rows 渲染每一行 -->
|
|
681
706
|
<template
|
|
682
707
|
v-for="(row,i) in rows"
|
|
683
708
|
v-else
|
|
@@ -786,7 +811,7 @@ export default {
|
|
|
786
811
|
:disabled="disabled"
|
|
787
812
|
:mode="mode"
|
|
788
813
|
:placeholder="_valuePlaceholder"
|
|
789
|
-
:min-height="
|
|
814
|
+
:min-height="32"
|
|
790
815
|
:spellcheck="false"
|
|
791
816
|
:aria-label="t('generic.ariaLabel.value', {index: i+1})"
|
|
792
817
|
@update:value="queueUpdate"
|
|
@@ -865,6 +890,8 @@ export default {
|
|
|
865
890
|
</div>
|
|
866
891
|
</template>
|
|
867
892
|
</div>
|
|
893
|
+
|
|
894
|
+
<!-- 底部新增/从文件导入 -->
|
|
868
895
|
<div
|
|
869
896
|
v-if="(addAllowed || readAllowed) && !isView"
|
|
870
897
|
class="footer mt-10"
|
|
@@ -873,6 +900,8 @@ export default {
|
|
|
873
900
|
name="add"
|
|
874
901
|
:add="add"
|
|
875
902
|
>
|
|
903
|
+
|
|
904
|
+
<!-- 添加按钮 -->
|
|
876
905
|
<button
|
|
877
906
|
v-if="addAllowed"
|
|
878
907
|
type="button"
|
|
@@ -889,6 +918,8 @@ export default {
|
|
|
889
918
|
:class="loading ? ['icon-lg', 'icon-spinner','icon-spin']: [addIcon]"
|
|
890
919
|
/> {{ _addLabel }}
|
|
891
920
|
</button>
|
|
921
|
+
|
|
922
|
+
<!-- 从文件读取 -->
|
|
892
923
|
<FileSelector
|
|
893
924
|
v-if="readAllowed"
|
|
894
925
|
:aria-label="t('generic.ariaLabel.readKeyValue')"
|
|
@@ -913,8 +944,8 @@ export default {
|
|
|
913
944
|
}
|
|
914
945
|
.kv-container {
|
|
915
946
|
display: grid;
|
|
916
|
-
align-items: center;
|
|
917
|
-
column-gap:
|
|
947
|
+
/* align-items: center; */
|
|
948
|
+
column-gap: 10px;
|
|
918
949
|
|
|
919
950
|
.key-value-label {
|
|
920
951
|
margin-bottom: 0;
|
|
@@ -939,6 +970,9 @@ export default {
|
|
|
939
970
|
}
|
|
940
971
|
&.value textarea {
|
|
941
972
|
padding: 10px 10px 10px 10px;
|
|
973
|
+
min-height:32px;
|
|
974
|
+
line-height: 12px;
|
|
975
|
+
border: solid var(--border-width) var(--input-border);
|
|
942
976
|
}
|
|
943
977
|
|
|
944
978
|
.text-monospace:not(.conceal) {
|
|
@@ -977,8 +1011,14 @@ export default {
|
|
|
977
1011
|
}
|
|
978
1012
|
}
|
|
979
1013
|
input {
|
|
980
|
-
height:
|
|
1014
|
+
height: 32px;
|
|
981
1015
|
line-height: 1;
|
|
1016
|
+
border: solid var(--border-width) var(--input-border);
|
|
1017
|
+
padding: 4px 11px;
|
|
1018
|
+
&:hover{
|
|
1019
|
+
border: solid var(--border-width) var(--input-border);
|
|
1020
|
+
box-shadow: 0 4px 6px 0 var(--input-border-box-shadow);
|
|
1021
|
+
}
|
|
982
1022
|
}
|
|
983
1023
|
.footer {
|
|
984
1024
|
.protip {
|