Skip to content

Commit

Permalink
前端自动化页面选项修复
Browse files Browse the repository at this point in the history
  • Loading branch information
piexlMax committed Jun 10, 2023
1 parent f6e78d7 commit ec9a493
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 72 deletions.
85 changes: 15 additions & 70 deletions web/src/view/systemTools/autoCode/component/fieldDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,80 +108,25 @@ const props = defineProps({
default: function() {
return {}
}
}
},
typeOptions: {
type: Array,
default: function() {
return []
}
},
typeSearchOptions: {
type: Array,
default: function() {
return []
}
},
})
const middleDate = ref({})
const dictOptions = ref([])
const typeSearchOptions = ref([
{
label: '=',
value: '='
},
{
label: '<>',
value: '<>'
},
{
label: '>',
value: '>'
},
{
label: '<',
value: '<'
},
{
label: 'LIKE',
value: 'LIKE'
},
{
label: 'BETWEEN',
value: 'BETWEEN'
},
{
label: 'NOT BETWEEN',
value: 'NOT BETWEEN'
}
])
const typeOptions = ref([
{
label: '字符串',
value: 'string'
},
{
label: '整型',
value: 'int'
},
{
label: '布尔值',
value: 'bool'
},
{
label: '浮点型',
value: 'float64'
},
{
label: '时间',
value: 'time.Time'
},
{
label: '枚举',
value: 'enum'
},
{
label: '单图片(字符串)',
value: 'picture',
},
{
label: '文件(json字符串)',
value: 'file',
},
{
label: '多图片(开发中)',
value: 'pictures',
disabled: true
}
])
const rules = ref({
fieldName: [
{ required: true, message: '请输入字段英文名', trigger: 'blur' }
Expand Down
17 changes: 15 additions & 2 deletions web/src/view/systemTools/autoCode/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
</div>
<!-- 组件弹窗 -->
<el-dialog v-model="dialogFlag" width="70%" title="组件内容">
<FieldDialog v-if="dialogFlag" ref="fieldDialogNode" :dialog-middle="dialogMiddle" />
<FieldDialog v-if="dialogFlag" ref="fieldDialogNode" :dialog-middle="dialogMiddle" :typeOptions="typeOptions"/>
<template #footer>
<div class="dialog-footer">
<el-button @click="closeDialog">取 消</el-button>
Expand All @@ -286,7 +286,7 @@
<el-button type="primary" @click="copy">复制</el-button>
</div>
</template>
<PreviewCodeDialog v-if="previewFlag" ref="previewNode" :preview-code="preViewCode" />
<PreviewCodeDialog v-if="previewFlag" ref="previewNode" :typeSearchOptions="typeSearchOptions" :preview-code="preViewCode" />
<template #footer>
<div class="dialog-footer" style="padding-top:14px;padding-right:14px">
<el-button type="primary" @click="previewFlag = false">确 定</el-button>
Expand Down Expand Up @@ -332,6 +332,19 @@ const typeOptions = ref([
{
label: '枚举',
value: 'enum'
},
{
label: '单图片(字符串)',
value: 'picture',
},
{
label: '文件(json字符串)',
value: 'file',
},
{
label: '多图片(开发中)',
value: 'pictures',
disabled: true
}
])
Expand Down

0 comments on commit ec9a493

Please sign in to comment.