Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
tjztj committed Mar 31, 2021
1 parent ca98444 commit 2c2567a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/field/SelectField.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ class SelectField extends ModelField
protected string $defaultFilterClass=SelectFilter::class;


//[
// [
// 'value'=>'',
// 'text'=>'',
// 'group'=>'',
// 'hide'=>false,
// ]
//]


/**
* 是否可多选
* @param bool|null $multiple
Expand Down
4 changes: 2 additions & 2 deletions tp-script-vue-curd-static/field/select/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ define([],function(){
<template v-if="field.items&&field.items[0].group">
<a-select-opt-group v-for="(items,key) in groupItems" :label="key">
<a-select-option :value="optionItem.value" v-for="optionItem in items">
<a-select-option :value="optionItem.value" v-for="optionItem in items" v-show="!optionItem.hide">
{{optionItem.text}}
</a-select-option>
</a-select-opt-group>
</template>
<template v-else>
<a-select-option :value="optionItem.value" v-for="optionItem in field.items">
<a-select-option :value="optionItem.value" v-for="optionItem in field.items" v-show="!optionItem.hide">
{{optionItem.text}}
</a-select-option>
</template>
Expand Down

0 comments on commit 2c2567a

Please sign in to comment.