mirror of
https://github.com/pure-admin/pure-admin-thin.git
synced 2025-06-07 08:57:47 +08:00
feat: 新增菜单icon和隐藏
This commit is contained in:
parent
32fdd488d8
commit
55814a6a30
@ -4,6 +4,7 @@ import ReCol from "@/components/ReCol";
|
||||
import { formRules } from "./utils/rule";
|
||||
import { usePublicHooks } from "../hooks";
|
||||
import { MenuRequest } from "@/api/system/menu";
|
||||
import IconSelect from "@/components/ReIcon/src/Select.vue";
|
||||
|
||||
interface FormProps {
|
||||
formInline: MenuRequest;
|
||||
@ -101,7 +102,13 @@ defineExpose({ getRef });
|
||||
</re-col>
|
||||
</template>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="30">
|
||||
<re-col :value="12" :xs="24" :sm="24">
|
||||
<el-form-item :label="`${typeName}图标`" prop="meta.icon">
|
||||
<IconSelect v-model="newFormInline.meta.icon" />
|
||||
</el-form-item>
|
||||
</re-col>
|
||||
</el-row>
|
||||
<el-row :gutter="30">
|
||||
<re-col :value="12" :xs="24" :sm="24">
|
||||
<el-form-item :label="`${typeName}名称`" prop="menuName">
|
||||
@ -188,12 +195,15 @@ defineExpose({ getRef });
|
||||
|
||||
<el-row>
|
||||
<re-col :value="12" :xs="24" :sm="24">
|
||||
<el-form-item label="排序">
|
||||
<el-input-number
|
||||
v-model="newFormInline.meta.rank"
|
||||
:min="0"
|
||||
:max="999"
|
||||
controls-position="right"
|
||||
<el-form-item label="显示">
|
||||
<el-switch
|
||||
v-model="newFormInline.meta.showLink"
|
||||
inline-prompt
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
active-text="显示"
|
||||
inactive-text="隐藏"
|
||||
:style="switchStyle"
|
||||
/>
|
||||
</el-form-item>
|
||||
</re-col>
|
||||
@ -211,5 +221,17 @@ defineExpose({ getRef });
|
||||
</el-form-item>
|
||||
</re-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<re-col :value="12" :xs="24" :sm="24">
|
||||
<el-form-item label="排序">
|
||||
<el-input-number
|
||||
v-model="newFormInline.meta.rank"
|
||||
:min="0"
|
||||
:max="999"
|
||||
controls-position="right"
|
||||
/>
|
||||
</el-form-item>
|
||||
</re-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
|
@ -17,6 +17,7 @@ import { usePublicHooks } from "../../hooks";
|
||||
import { addDialog } from "@/components/ReDialog";
|
||||
import { reactive, ref, onMounted, h, computed } from "vue";
|
||||
import { isAllEmpty } from "@pureadmin/utils";
|
||||
import { IconifyIconOnline } from "@/components/ReIcon";
|
||||
|
||||
export function useHook() {
|
||||
const searchFormParams = reactive({
|
||||
@ -65,6 +66,16 @@ export function useHook() {
|
||||
width: 160,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
label: "图标",
|
||||
prop: "row.icon",
|
||||
minWidth: 40,
|
||||
cellRenderer: ({ row }) => (
|
||||
<div class="flex justify-center">
|
||||
<IconifyIconOnline icon={row.icon} />
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
prop: "status",
|
||||
|
Loading…
x
Reference in New Issue
Block a user