Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞一样的人
gin-vue-admin
提交
1f85d989
G
gin-vue-admin
项目概览
飞一样的人
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1f85d989
编写于
3月 23, 2020
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码生成器前端页面 后端基本字段 完成
上级
35ec61c8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
179 addition
and
0 deletion
+179
-0
QMPlusVuePage/src/view/superAdmin/autoCode/component/componentDialog.vue
...rc/view/superAdmin/autoCode/component/componentDialog.vue
+179
-0
未找到文件。
QMPlusVuePage/src/view/superAdmin/autoCode/component/componentDialog.vue
0 → 100644
浏览文件 @
1f85d989
<
template
>
<div>
<el-form
:model=
"dialogMiddle"
:inline=
"true"
>
<el-form-item
label=
"组件名称"
label-width=
"80"
:span=
"8"
>
<el-input
v-model=
"dialogMiddle.componentName"
autocomplete=
"off"
></el-input>
</el-form-item>
<el-form-item
label=
"数据类型"
label-width=
"80"
:span=
"8"
>
<el-select
v-model=
"dialogMiddle.componentType"
placeholder=
"请选择活动区域"
>
<el-option
v-for=
"item in typeOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"展示类型"
label-width=
"80"
:span=
"8"
>
<el-select
v-model=
"dialogMiddle.componentShowType"
placeholder=
"请选择活动区域"
>
<el-option
v-for=
"item in showTypeOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"字典Key"
label-width=
"80"
:span=
"8"
>
<el-input
v-model=
"dialogMiddle.dictionaryName"
autocomplete=
"off"
></el-input>
</el-form-item>
<div>
<el-form-item
label=
"是否多选"
label-width=
"80"
>
<el-switch
v-model=
"dialogMiddle.isMultiple"
active-text=
"多选"
inactive-text=
"单选"
>
</el-switch>
</el-form-item>
</div>
<div>
<el-form-item
label=
"是否使用字典"
label-width=
"80"
>
<el-switch
v-model=
"dialogMiddle.nideDictionary"
active-text=
"使用"
inactive-text=
"不使用"
>
</el-switch>
</el-form-item>
</div>
</el-form>
<div
class=
"button-box clearflex"
>
<el-button
@
click=
"addDictionary"
type=
"primary"
>
新增组件
</el-button>
</div>
<el-table
:data=
"dialogMiddle.componentDictionary"
stripe
style=
"width: 100%"
>
<el-table-column
label=
"展示值"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.label"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"交互值"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.value"
></el-input>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"160"
v-model=
"scope.row.visible"
>
<p>
这是一段内容这是一段内容确定删除吗?
</p>
<div
style=
"text-align: right; margin: 0"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"scope.row.visible = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"deleteRow(scope)"
>
确定
</el-button>
</div>
<el-button
type=
"text"
slot=
"reference"
>
删除
</el-button>
</el-popover>
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
const
dictionaryTemplate
=
{
label
:
""
,
value
:
""
,
visible
:
false
}
export
default
{
name
:
"
ComponentDialog
"
,
props
:{
dialogMiddle
:{
type
:
Object
,
default
:
function
(){
return
{}
}
}
},
data
(){
return
{
visible
:
false
,
typeOptions
:[
{
label
:
"
字符串
"
,
value
:
"
string
"
},
{
label
:
"
整型
"
,
value
:
"
int
"
},
{
label
:
"
布尔值
"
,
value
:
"
bool
"
},
{
label
:
"
浮点型
"
,
value
:
"
float64
"
},
{
label
:
"
时间
"
,
value
:
"
time.Time
"
},
],
showTypeOptions
:[
{
label
:
"
单选框
"
,
value
:
"
radio
"
},
{
label
:
"
多选框
"
,
value
:
"
checkBox
"
},
{
label
:
"
输入框
"
,
value
:
"
input
"
},
{
label
:
"
计数器
"
,
value
:
"
inputNumber
"
},
{
label
:
"
选择器
"
,
value
:
"
select
"
},
{
label
:
"
级联选择器
"
,
value
:
"
cascader
"
},
{
label
:
"
开关
"
,
value
:
"
switch
"
},
{
label
:
"
时间日期选择器
"
,
value
:
"
datePicker
"
}
]
}
},
methods
:{
addDictionary
(){
this
.
dialogMiddle
.
componentDictionary
.
push
({...
dictionaryTemplate
})
},
deleteRow
(
row
){
this
.
dialogMiddle
.
componentDictionary
.
splice
(
row
.
$index
,
1
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录