增加菜单页面,增加小程序管理页面,增加店铺员工页面
This commit is contained in:
@@ -17,7 +17,10 @@
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<template v-for="item in formItems" :key="item.prop">
|
||||
<el-col v-show="!item.hidden" v-bind="item.col">
|
||||
<template v-if="item.type === 'title'">
|
||||
<h3>{{ item.label }}</h3>
|
||||
</template>
|
||||
<el-col v-else v-show="!item.hidden" v-bind="item.col">
|
||||
<el-form-item :label="item.label" :prop="item.prop">
|
||||
<!-- Label -->
|
||||
<template v-if="item.tips" #label>
|
||||
@@ -40,7 +43,7 @@
|
||||
<el-input v-model="formData[item.prop]" v-bind="item.attrs" />
|
||||
</template>
|
||||
<!-- textarea 输入框 -->
|
||||
<template v-if="item.type === 'textarea'">
|
||||
<template v-else-if="item.type === 'textarea'">
|
||||
<el-input v-model="formData[item.prop]" v-bind="item.attrs" type="textarea" />
|
||||
</template>
|
||||
<!-- Select 选择器 -->
|
||||
@@ -51,6 +54,14 @@
|
||||
</template>
|
||||
</el-select>
|
||||
</template>
|
||||
<!-- radio-button 选择器 -->
|
||||
<template v-else-if="item.type === 'radio-button'">
|
||||
<el-radio-group v-model="formData[item.prop]" v-bind="item.attrs">
|
||||
<template v-for="option in item.options" :key="option.value">
|
||||
<el-radio-button v-bind="option" />
|
||||
</template>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
<!-- Radio 单选框 -->
|
||||
<template v-else-if="item.type === 'radio'">
|
||||
<el-radio-group v-model="formData[item.prop]" v-bind="item.attrs">
|
||||
@@ -140,7 +151,12 @@
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<template v-for="item in formItems" :key="item.prop">
|
||||
<el-col v-show="!item.hidden" v-bind="item.col">
|
||||
<template v-if="item.type === 'title'">
|
||||
<el-col :span="24">
|
||||
<h3>{{ item.label }}</h3>
|
||||
</el-col>
|
||||
</template>
|
||||
<el-col v-else v-show="!item.hidden" v-bind="item.col">
|
||||
<el-form-item :label="item.label" :prop="item.prop">
|
||||
<!-- Label -->
|
||||
<template v-if="item.tips" #label>
|
||||
@@ -167,9 +183,10 @@
|
||||
/>
|
||||
</template>
|
||||
<!-- textarea 输入框 -->
|
||||
<template v-if="item.type === 'textarea'">
|
||||
<template v-else-if="item.type === 'textarea'">
|
||||
<el-input v-model="formData[item.prop]" v-bind="item.attrs" type="textarea" />
|
||||
</template>
|
||||
|
||||
<!-- Select 选择器 -->
|
||||
<template v-else-if="item.type === 'select'">
|
||||
<el-select v-model="formData[item.prop]" v-bind="item.attrs">
|
||||
@@ -178,6 +195,14 @@
|
||||
</template>
|
||||
</el-select>
|
||||
</template>
|
||||
<!-- radio-button 选择器 -->
|
||||
<template v-else-if="item.type === 'radio-button'">
|
||||
<el-radio-group v-model="formData[item.prop]" v-bind="item.attrs">
|
||||
<template v-for="option in item.options" :key="option.value">
|
||||
<el-radio-button v-bind="option" />
|
||||
</template>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
<!-- Radio 单选框 -->
|
||||
<template v-else-if="item.type === 'radio'">
|
||||
<el-radio-group v-model="formData[item.prop]" v-bind="item.attrs">
|
||||
@@ -390,4 +415,8 @@ function handleDisabled(disable: boolean) {
|
||||
defineExpose({ setModalVisible, getFormData, setFormData, setFormItemData, handleDisabled });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
h3 {
|
||||
color: rgb(63, 158, 255);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -233,6 +233,8 @@ export type IFormItems<T = any> = Array<{
|
||||
| "input-number"
|
||||
| "text"
|
||||
| "UpImage"
|
||||
| "radio-button"
|
||||
| "title"
|
||||
| "custom";
|
||||
// 组件属性
|
||||
disabled?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user