Skip to content

Commit

Permalink
feat: use remove replace hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
F-loat committed Jan 6, 2020
1 parent a07ae83 commit 8aae90d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'}">
Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 8aae90d

Please sign in to comment.