mirror of
https://github.com/vxcontrol/ncform.git
synced 2026-07-21 06:15:23 -04:00
feat: use remove replace hidden
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
<div v-for="(fieldSchema, field) in filteredPropreties"
|
||||
:key="field"
|
||||
:class="['el-col-' + (fieldSchema.ui.columns * 2 || 24)]"
|
||||
:style="{display: _analyzeVal(fieldSchema.ui.hidden) ? 'none' : ''}"
|
||||
class="el-col el-form-item">
|
||||
|
||||
<template>
|
||||
@@ -43,6 +44,7 @@
|
||||
<div v-for="(fieldSchema, field) in filteredPropreties"
|
||||
:key="field"
|
||||
:class="['el-col-' + (fieldSchema.ui.columns * 2 || 24)]"
|
||||
:style="{display: _analyzeVal(fieldSchema.ui.hidden) ? 'none' : ''}"
|
||||
class="el-col el-form-item">
|
||||
<template>
|
||||
<label v-if="!fieldSchema.ui.noLabelSpace" :style="{'visibility': fieldSchema.ui.showLabel ? 'visible' : 'hidden', width: mergeConfig.labelWidth}" class="el-form-item__label">
|
||||
@@ -175,9 +177,9 @@ export default {
|
||||
const { properties } = this.schema
|
||||
return Object.keys(properties).reduce((result, curkey) => {
|
||||
const curval = properties[curkey]
|
||||
const hidden = this._analyzeVal(curval.ui.hidden)
|
||||
const remove = this._analyzeVal(curval.ui.remove)
|
||||
|
||||
if (!hidden) {
|
||||
if (!remove) {
|
||||
result[curkey] = curval
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<div v-for="(fieldSchema, field) in filteredPropreties"
|
||||
:key="field"
|
||||
:class="['col-md-' + (fieldSchema.ui.columns || 12)]"
|
||||
:style="{display: _analyzeVal(fieldSchema.ui.hidden) ? 'none' : ''}"
|
||||
class="form-group">
|
||||
<template>
|
||||
<label v-if="!legendEnable(fieldSchema) && !fieldSchema.ui.noLabelSpace" :style="{'visibility': fieldSchema.ui.showLabel ? 'visible' : 'hidden'}">
|
||||
@@ -34,6 +35,7 @@
|
||||
<div v-for="(fieldSchema, field) in filteredPropreties"
|
||||
:key="field"
|
||||
:class="['col-md-' + (fieldSchema.ui.columns || 12)]"
|
||||
:style="{display: _analyzeVal(fieldSchema.ui.hidden) ? 'none' : ''}"
|
||||
class="form-group row">
|
||||
<template>
|
||||
<label v-if="!legendEnable(fieldSchema) && !fieldSchema.ui.noLabelSpace" :style="{'visibility': fieldSchema.ui.showLabel ? 'visible' : 'hidden', width: mergeConfig.labelWidth}" class="col-form-label">
|
||||
@@ -110,9 +112,9 @@
|
||||
const { properties } = this.schema
|
||||
return Object.keys(properties).reduce((result, curkey) => {
|
||||
const curval = properties[curkey]
|
||||
const hidden = this._analyzeVal(curval.ui.hidden)
|
||||
const remove = this._analyzeVal(curval.ui.remove)
|
||||
|
||||
if (!hidden) {
|
||||
if (!remove) {
|
||||
result[curkey] = curval
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user