{
:mask="false"
:visible="visible"
:cancel-text="$gettext('Cancel')"
- :ok-text="$gettext('Ok')"
+ :ok-text="$gettext('OK')"
:title="$gettext('Selector')"
@cancel="visible=false"
@ok="ok()"
@@ -102,7 +102,7 @@ watch(props, () => {
.std-selector-container {
height: 39.9px;
display: flex;
- align-items: center;
+ align-items: flex-start;
.std-selector {
box-sizing: border-box;
diff --git a/frontend/src/components/StdDataEntry/index.tsx b/frontend/src/components/StdDataEntry/index.tsx
index 21ec96a5..817c076e 100644
--- a/frontend/src/components/StdDataEntry/index.tsx
+++ b/frontend/src/components/StdDataEntry/index.tsx
@@ -22,8 +22,27 @@ interface IEdit {
generate: boolean
}
+function fn(obj: Object, desc: any) {
+ let arr: string[]
+ if (typeof desc === 'string') {
+ arr = desc.split('.')
+ } else {
+ arr = [...desc]
+ }
+
+ while (arr.length) {
+ // @ts-ignore
+ const top = obj[arr.shift()]
+ if (top === undefined) {
+ return null
+ }
+ obj = top
+ }
+ return obj
+}
+
function readonly(edit: IEdit, dataSource: any, dataIndex: any) {
- return h('p', dataSource[dataIndex])
+ return h('p', fn(dataSource, dataIndex))
}
function input(edit: IEdit, dataSource: any, dataIndex: any) {