💄 Change ui for tips

This commit is contained in:
zhengyi 2023-12-25 14:49:17 +08:00
parent 320c3b9d92
commit abb67a98d1
10 changed files with 935 additions and 715 deletions

View File

@ -14,7 +14,9 @@
"@babel/core": "^7.23.6", "@babel/core": "^7.23.6",
"@babel/preset-env": "^7.23.6", "@babel/preset-env": "^7.23.6",
"babel-loader": "^9.1.3", "babel-loader": "^9.1.3",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.8.1", "css-loader": "^6.8.1",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.4", "html-webpack-plugin": "^5.5.4",
"less": "^4.2.0", "less": "^4.2.0",
"less-loader": "^11.1.3", "less-loader": "^11.1.3",

File diff suppressed because it is too large Load Diff

BIN
src/fonts/iconfont.ttf Normal file

Binary file not shown.

BIN
src/fonts/iconfont.woff Normal file

Binary file not shown.

BIN
src/fonts/iconfont.woff2 Normal file

Binary file not shown.

View File

@ -1 +1 @@
@border-radius: 6px; @border-radius: 3px;

View File

@ -12,3 +12,10 @@
background-color: lightpink; background-color: lightpink;
border-radius: @border-radius; border-radius: @border-radius;
} }
@font-face {
font-family: 'iconfont';
src: url('../fonts/iconfont.woff2?t=1703484934750') format('woff2'),
url('../fonts/iconfont.woff?t=1703484934750') format('woff'),
url('../fonts/iconfont.ttf?t=1703484934750') format('truetype');
}

View File

@ -15,34 +15,75 @@
@info-bg: lightblue; @info-bg: lightblue;
.tips { .tips {
padding: 5px 10px; position: relative;
margin: 20px;
padding: 15px 15px;
border-left-style: @border-type; border-left-style: @border-type;
border-left-width: @border-width; border-left-width: @border-width;
border-radius: @border-radius; border-radius: @border-radius;
border-left-color: #666666; border-left-color: #666666;
background-color: #eeeeee; background-color: #eeeeee;
&&:after {
font-family: "iconfont", serif !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
padding: 4px;
border-radius: 50%;
color: #eeeeee;
background-color: #666666;
display: block;
position: absolute;
left: calc(-12px - @border-width / 2);
top: 6px;
content: "\e77e";
}
&&-warn { &&-warn {
background-color: @warn-bg-color; background-color: @warn-bg-color;
color: @warn-color; color: @warn-color;
border-left-color: @warn-color; border-left-color: @warn-color;
&&:after {
color: @warn-bg-color;
background-color: @warn-color;
content: "\e671";
}
} }
&&-danger { &&-danger {
background-color: @danger-bg-color; background-color: @danger-bg-color;
color: @danger-color; color: @danger-color;
border-left-color: @danger-color; border-left-color: @danger-color;
&&:after {
background-color: @danger-color;
color: @danger-bg-color;
content: "\e671";
}
} }
&&-success { &&-success {
background-color: @success-bg; background-color: @success-bg;
color: @success-color; color: @success-color;
border-left-color: @success-color; border-left-color: @success-color;
&&:after {
background-color: @success-color;
color: @success-bg;
}
} }
&&-info { &&-info {
background-color: @info-bg; background-color: @info-bg;
color: @info-color; color: @info-color;
border-left-color: @info-color; border-left-color: @info-color;
&&:after {
color: @info-bg;
background-color: @info-color;
}
} }
} }

View File

@ -16,6 +16,11 @@ module.exports = {
}, },
module: { module: {
rules: [ rules: [
{
test: /.(woff2?|eot|ttf|otf)(.*)?$/,
exclude: "/node-modules/",
loader: "file-loader"
},
{ {
test: /\.js$/, test: /\.js$/,
exclude: '/node_modules/', exclude: '/node_modules/',

View File

@ -1,6 +1,7 @@
const path = require("path") const path = require("path")
const HtmlWebpackPlugin = require("html-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CopyPlugin = require("copy-webpack-plugin");
module.exports = { module.exports = {
watch: true, watch: true,
@ -16,6 +17,11 @@ module.exports = {
}, },
module: { module: {
rules: [ rules: [
{
test: /.(woff2?|eot|ttf|otf)(.*)?$/,
exclude: "/node-modules/",
loader: "file-loader"
},
{ {
test: /\.tsx?$/, test: /\.tsx?$/,
use: "ts-loader", use: "ts-loader",
@ -45,6 +51,11 @@ module.exports = {
}), }),
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
filename: "index.css" filename: "index.css"
}),
new CopyPlugin({
patterns: [
{from: "src/fonts", to: "fonts"}
]
}) })
], ],
devServer: { devServer: {