mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
perf: icon
This commit is contained in:
parent
378feceb5f
commit
8f5981a313
@ -1,6 +1,6 @@
|
|||||||
import { iconType } from "./types";
|
import { iconType } from "./types";
|
||||||
import { h, defineComponent, Component } from "vue";
|
import { h, defineComponent, Component } from "vue";
|
||||||
import { IconifyIconOffline, FontIcon } from "../index";
|
import { IconifyIconOnline, IconifyIconOffline, FontIcon } from "../index";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支持fontawesome4、5+、iconfont、remixicon、element-plus的icons、自定义svg
|
* 支持fontawesome4、5+、iconfont、remixicon、element-plus的icons、自定义svg
|
||||||
@ -37,7 +37,9 @@ export function useRenderIcon(icon: string, attrs?: iconType): Component {
|
|||||||
return defineComponent({
|
return defineComponent({
|
||||||
name: "Icon",
|
name: "Icon",
|
||||||
render() {
|
render() {
|
||||||
return h(IconifyIconOffline, {
|
const IconifyIcon =
|
||||||
|
attrs && attrs["online"] ? IconifyIconOnline : IconifyIconOffline;
|
||||||
|
return h(IconifyIcon, {
|
||||||
icon: icon,
|
icon: icon,
|
||||||
...attrs
|
...attrs
|
||||||
});
|
});
|
||||||
|
@ -11,7 +11,9 @@ export interface iconType {
|
|||||||
horizontalAlign?: boolean;
|
horizontalAlign?: boolean;
|
||||||
verticalAlign?: boolean;
|
verticalAlign?: boolean;
|
||||||
align?: string;
|
align?: string;
|
||||||
|
online?: boolean;
|
||||||
onLoad?: Function;
|
onLoad?: Function;
|
||||||
|
includes?: Function;
|
||||||
|
|
||||||
// all icon
|
// all icon
|
||||||
style?: object;
|
style?: object;
|
||||||
|
@ -59,6 +59,9 @@ function onBack() {
|
|||||||
clearable
|
clearable
|
||||||
v-model="ruleForm.verifyCode"
|
v-model="ruleForm.verifyCode"
|
||||||
placeholder="短信验证码"
|
placeholder="短信验证码"
|
||||||
|
:prefix-icon="
|
||||||
|
useRenderIcon('ri:shield-keyhole-line', { online: true })
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
|
@ -101,6 +101,9 @@ function onBack() {
|
|||||||
clearable
|
clearable
|
||||||
v-model="ruleForm.verifyCode"
|
v-model="ruleForm.verifyCode"
|
||||||
placeholder="短信验证码"
|
placeholder="短信验证码"
|
||||||
|
:prefix-icon="
|
||||||
|
useRenderIcon('ri:shield-keyhole-line', { online: true })
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
|
@ -80,6 +80,9 @@ function onBack() {
|
|||||||
clearable
|
clearable
|
||||||
v-model="ruleForm.verifyCode"
|
v-model="ruleForm.verifyCode"
|
||||||
placeholder="短信验证码"
|
placeholder="短信验证码"
|
||||||
|
:prefix-icon="
|
||||||
|
useRenderIcon('ri:shield-keyhole-line', { online: true })
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
|
@ -114,6 +114,9 @@ watch(imgCode, value => {
|
|||||||
clearable
|
clearable
|
||||||
v-model="ruleForm.verifyCode"
|
v-model="ruleForm.verifyCode"
|
||||||
placeholder="验证码"
|
placeholder="验证码"
|
||||||
|
:prefix-icon="
|
||||||
|
useRenderIcon('ri:shield-keyhole-line', { online: true })
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<ReImageVerify v-model:code="imgCode" />
|
<ReImageVerify v-model:code="imgCode" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user