editor: mark dynamic props
This commit is contained in:
parent
f216db4530
commit
6b51dcf113
2 changed files with 12 additions and 1 deletions
|
|
@ -49,10 +49,12 @@ var editObject = function(widget, options = {}){
|
|||
|
||||
if (i=='type' && (data.type == 'tab' || data.type == 'root')) continue
|
||||
|
||||
let dynamic = widgets[data.type].dynamicProps.includes(i)
|
||||
|
||||
let type = typeof data[i],
|
||||
value = type != 'string'?JSON.stringify(data[i], null, ' ').replace(/\n\s\s\s\s/g, ' ').replace(/\n\s\s(\}|\])/g, ' $1'):data[i],
|
||||
wrapper = $('<div class="input-wrapper"></div>').appendTo(form),
|
||||
label = $(`<label>${i}</label>`).appendTo(wrapper),
|
||||
label = $(`<label ${dynamic ? 'class="dynamic" title="dynamic"': ''}>${i}</label>`).appendTo(wrapper),
|
||||
input
|
||||
|
||||
if (i=='type') {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,15 @@
|
|||
min-width: 29%;
|
||||
box-shadow: 1rem 0 0 0 var(--color-bg) inset;
|
||||
margin-top: 1rem;
|
||||
&.dynamic:after {
|
||||
content:"\f0e7";
|
||||
font-family: FontAwesome;
|
||||
vertical-align:super;
|
||||
font-size: 75%;
|
||||
opacity: 0.75!important;
|
||||
position: absolute;
|
||||
margin-top: -4rem;
|
||||
}
|
||||
}
|
||||
.input {
|
||||
background: var(--color-bg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue