去掉 icon-font-awesome

This commit is contained in:
Wang Kejun 2023-04-25 14:40:23 +08:00
parent b90e0a7d86
commit 9c04b61a36
16 changed files with 0 additions and 17254 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +0,0 @@
/// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../general-app-domain").EntityDict, keyof import("../../general-app-domain").EntityDict, false, {
type: string;
size: string | number;
color: string;
name: string;
larger: string;
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
export default _default;

View File

@ -1,12 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = OakComponent({
isList: false,
properties: {
type: 'fas',
size: 0,
color: 'primary',
name: '',
larger: '1x',
},
});

View File

@ -1,3 +0,0 @@
{
"component": true
}

View File

@ -1,22 +0,0 @@
@import './fontawesome.less';
@import '../../config/styles/mp/index.less';
.primary {
color: @oak-color-primary;
}
.error {
color: @oak-color-error;
}
.warning {
color: @oak-color-warning;
}
.success {
color: @oak-color-success;
}
.info {
color: @oak-color-info;
}

View File

@ -1,9 +0,0 @@
<block wx:if="{{type==='far' || type==='fas'}}">
<text
class="fa {{type}} fa-{{name}} fa-{{larger || '1x'}} {{color || 'primary'}}"
style="{{ size ? 'font-size:'+size+'rpx;':''}}{{ color && color !== 'primary' && color !== 'info'&& color !== 'error'&& color !== 'success'&& color !== 'warning' ? 'color:' + color+';' : '' }}">
</text>
</block>
<block wx:else>
<text>不支持的icon类型{{type}}</text>
</block>

View File

@ -1,12 +0,0 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../general-app-domain';
import './web.less';
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {
name: string;
type: 'far' | 'fas';
color?: 'primary' | 'success' | 'error' | 'waring' | 'info' | string;
className?: string;
size?: string;
larger?: '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x' | 'xs' | '2xs' | 'sm' | 'lg' | 'xl' | '2xl';
}, {}>): JSX.Element;

View File

@ -1,24 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
require("./web.less");
function Render(props) {
var data = props.data;
var name = data.name, type = data.type, _a = data.color, color = _a === void 0 ? 'primary' : _a, size = data.size, className = data.className, _b = data.larger, larger = _b === void 0 ? '1x' : _b;
var isColor = ['primary', 'info', 'success', 'error', 'warning'].includes(color);
if (['far', 'fas'].includes(type)) {
var class_name = type + ' ' + 'fa-' + name;
if (className) {
class_name += ' ' + className;
}
if (larger) {
class_name += ' ' + 'fa-' + larger;
}
if (isColor) {
class_name += ' ' + 'oak-icon__' + color;
}
return ((0, jsx_runtime_1.jsx)("span", { className: class_name, style: Object.assign({}, size && { fontSize: size }, !isColor && { color: color }) }));
}
return (0, jsx_runtime_1.jsxs)("span", { children: ["\u4E0D\u652F\u6301\u7684icon\u7C7B\u578B", type] });
}
exports.default = Render;

View File

@ -1,21 +0,0 @@
@import './fontawesome.less';
.oak-icon__primary {
color: var(--oak-color-primary);
}
.oak-icon__error {
color: var(--oak-color-error);
}
.oak-icon__warning {
color: var(--oak-color-warning);
}
.oak-icon__success {
color: var(--oak-color-success);
}
.oak-icon__info {
color: var(--oak-color-info);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
{
"component": true
}

View File

@ -1,22 +0,0 @@
@import './fontawesome.less';
@import '../../config/styles/mp/index.less';
.primary {
color: @oak-color-primary;
}
.error {
color: @oak-color-error;
}
.warning {
color: @oak-color-warning;
}
.success {
color: @oak-color-success;
}
.info {
color: @oak-color-info;
}

View File

@ -1,10 +0,0 @@
export default OakComponent({
isList: false,
properties: {
type: 'fas' as string,
size: 0 as number | string,
color: 'primary' as string,
name: '' as string,
larger: '1x' as string,
},
});

View File

@ -1,9 +0,0 @@
<block wx:if="{{type==='far' || type==='fas'}}">
<text
class="fa {{type}} fa-{{name}} fa-{{larger || '1x'}} {{color || 'primary'}}"
style="{{ size ? 'font-size:'+size+'rpx;':''}}{{ color && color !== 'primary' && color !== 'info'&& color !== 'error'&& color !== 'success'&& color !== 'warning' ? 'color:' + color+';' : '' }}">
</text>
</block>
<block wx:else>
<text>不支持的icon类型{{type}}</text>
</block>

View File

@ -1,21 +0,0 @@
@import './fontawesome.less';
.oak-icon__primary {
color: var(--oak-color-primary);
}
.oak-icon__error {
color: var(--oak-color-error);
}
.oak-icon__warning {
color: var(--oak-color-warning);
}
.oak-icon__success {
color: var(--oak-color-success);
}
.oak-icon__info {
color: var(--oak-color-info);
}

View File

@ -1,71 +0,0 @@
import { WebComponentProps } from 'oak-frontend-base';
import React from 'react';
import { EntityDict } from '../../general-app-domain';
import './web.less';
export default function Render(
props: WebComponentProps<
EntityDict,
'user',
false,
{
name: string;
type: 'far' | 'fas';
color?: 'primary' | 'success' | 'error' | 'waring' | 'info' | string;
className?: string;
size?: string;
larger?:
| '1x'
| '2x'
| '3x'
| '4x'
| '5x'
| '6x'
| '7x'
| '8x'
| '9x'
| '10x'
| 'xs'
| '2xs'
| 'sm'
| 'lg'
| 'xl'
| '2xl';
},
{}
>
) {
const { data } = props;
const { name, type, color = 'primary', size, className, larger = '1x' } = data;
const isColor = ['primary', 'info', 'success', 'error', 'warning'].includes(
color
);
if (['far', 'fas'].includes(type)) {
let class_name = type + ' ' + 'fa-' + name;
if (className) {
class_name += ' ' + className;
}
if (larger) {
class_name += ' ' + 'fa-' + larger;
}
if (isColor) {
class_name += ' ' + 'oak-icon__' + color;
}
return (
<span
className={class_name}
style={
Object.assign(
{},
size && { fontSize: size },
!isColor && { color }
) as React.CSSProperties
}
></span>
);
}
return <span>icon类型{type}</span>;
}