add omi-element-ui
This commit is contained in:
parent
10336656ed
commit
6d6449234a
|
@ -11,4 +11,4 @@ package-lock.json
|
|||
.vscode/
|
||||
.idea/
|
||||
|
||||
/plugins/*/node_modules
|
||||
/packages/*/node_modules
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
# Omi Element UI
|
||||
|
||||
## Docs
|
||||
|
||||
* (English Docs)[http://element-cn.eleme.io/#/en-US/component/]
|
||||
* (中文文档)[https://element.eleme.io/#/zh-CN/component/]
|
||||
|
||||
## Different with element-ui
|
||||
|
||||
Put the icon to the right:
|
||||
|
||||
Omi:
|
||||
|
||||
```js
|
||||
<el-button type="primary" icon="el-icon-upload" icon-right>上传</el-button>
|
||||
```
|
||||
|
||||
Element:
|
||||
|
||||
```js
|
||||
<el-button type="primary">上传<i class="el-icon-upload el-icon--right"></i></el-button>
|
||||
```
|
||||
|
||||
## Contribute Element-UI to Omi
|
||||
|
||||
Create the element directory in the [omi-element-ui] and finish it then pull request! Many thanks.
|
||||
|
||||
## Develop
|
||||
|
||||
``` bash
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
## Release
|
||||
|
||||
``` bash
|
||||
npm build
|
||||
```
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
let fs = require('fs'),
|
||||
fileList = [];
|
||||
|
||||
|
||||
if (typeof String.prototype.endsWith != 'function') {
|
||||
String.prototype.endsWith = function (suffix) {
|
||||
return this.indexOf(suffix, this.length - suffix.length) !== -1;
|
||||
};
|
||||
}
|
||||
|
||||
function walk(path) {
|
||||
let dirList = fs.readdirSync(path);
|
||||
dirList.forEach(function (item) {
|
||||
if (!fs.statSync(path + '/' + item).isDirectory()) {
|
||||
if (item.endsWith('\.js')) {
|
||||
fileList.push(item.substr(0, item.length - 3));
|
||||
}
|
||||
} else {
|
||||
//walk(path + '/' + item);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
walk('./src');
|
||||
|
||||
|
||||
|
||||
module.exports = fileList;
|
|
@ -0,0 +1,93 @@
|
|||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const paths = require('./paths');
|
||||
|
||||
// Make sure that including paths.js after env.js will read .env variables.
|
||||
delete require.cache[require.resolve('./paths')];
|
||||
|
||||
const NODE_ENV = process.env.NODE_ENV;
|
||||
if (!NODE_ENV) {
|
||||
throw new Error(
|
||||
'The NODE_ENV environment variable is required but was not specified.'
|
||||
);
|
||||
}
|
||||
|
||||
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
|
||||
var dotenvFiles = [
|
||||
`${paths.dotenv}.${NODE_ENV}.local`,
|
||||
`${paths.dotenv}.${NODE_ENV}`,
|
||||
// Don't include `.env.local` for `test` environment
|
||||
// since normally you expect tests to produce the same
|
||||
// results for everyone
|
||||
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
|
||||
paths.dotenv,
|
||||
].filter(Boolean);
|
||||
|
||||
// Load environment variables from .env* files. Suppress warnings using silent
|
||||
// if this file is missing. dotenv will never modify any environment variables
|
||||
// that have already been set. Variable expansion is supported in .env files.
|
||||
// https://github.com/motdotla/dotenv
|
||||
// https://github.com/motdotla/dotenv-expand
|
||||
dotenvFiles.forEach(dotenvFile => {
|
||||
if (fs.existsSync(dotenvFile)) {
|
||||
require('dotenv-expand')(
|
||||
require('dotenv').config({
|
||||
path: dotenvFile,
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// We support resolving modules according to `NODE_PATH`.
|
||||
// This lets you use absolute paths in imports inside large monorepos:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/253.
|
||||
// It works similar to `NODE_PATH` in Node itself:
|
||||
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
|
||||
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
|
||||
// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421
|
||||
// We also resolve them to make sure all tools using them work consistently.
|
||||
const appDirectory = fs.realpathSync(process.cwd());
|
||||
process.env.NODE_PATH = (process.env.NODE_PATH || '')
|
||||
.split(path.delimiter)
|
||||
.filter(folder => folder && !path.isAbsolute(folder))
|
||||
.map(folder => path.resolve(appDirectory, folder))
|
||||
.join(path.delimiter);
|
||||
|
||||
// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
|
||||
// injected into the application via DefinePlugin in Webpack configuration.
|
||||
const REACT_APP = /^REACT_APP_/i;
|
||||
|
||||
function getClientEnvironment(publicUrl) {
|
||||
const raw = Object.keys(process.env)
|
||||
.filter(key => REACT_APP.test(key))
|
||||
.reduce(
|
||||
(env, key) => {
|
||||
env[key] = process.env[key];
|
||||
return env;
|
||||
},
|
||||
{
|
||||
// Useful for determining whether we’re running in production mode.
|
||||
// Most importantly, it switches React into the correct mode.
|
||||
NODE_ENV: process.env.NODE_ENV || 'development',
|
||||
// Useful for resolving the correct path to static assets in `public`.
|
||||
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
|
||||
// This should only be used as an escape hatch. Normally you would put
|
||||
// images into the `src` and `import` them in code to get their paths.
|
||||
PUBLIC_URL: publicUrl,
|
||||
}
|
||||
);
|
||||
// Stringify all values so we can feed into Webpack DefinePlugin
|
||||
const stringified = {
|
||||
'process.env': Object.keys(raw).reduce((env, key) => {
|
||||
env[key] = JSON.stringify(raw[key]);
|
||||
return env;
|
||||
}, {}),
|
||||
};
|
||||
|
||||
return { raw, stringified };
|
||||
}
|
||||
|
||||
module.exports = getClientEnvironment;
|
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
// This is a custom Jest transformer turning style imports into empty objects.
|
||||
// http://facebook.github.io/jest/docs/en/webpack.html
|
||||
|
||||
module.exports = {
|
||||
process() {
|
||||
return 'module.exports = {};';
|
||||
},
|
||||
getCacheKey() {
|
||||
// The output is always the same.
|
||||
return 'cssTransform';
|
||||
},
|
||||
};
|
|
@ -0,0 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
|
||||
// This is a custom Jest transformer turning file imports into filenames.
|
||||
// http://facebook.github.io/jest/docs/en/webpack.html
|
||||
|
||||
module.exports = {
|
||||
process(src, filename) {
|
||||
return `module.exports = ${JSON.stringify(path.basename(filename))};`;
|
||||
},
|
||||
};
|
|
@ -0,0 +1,55 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const url = require('url');
|
||||
|
||||
// Make sure any symlinks in the project folder are resolved:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/637
|
||||
const appDirectory = fs.realpathSync(process.cwd());
|
||||
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
|
||||
|
||||
const envPublicUrl = process.env.PUBLIC_URL;
|
||||
|
||||
function ensureSlash(path, needsSlash) {
|
||||
const hasSlash = path.endsWith('/');
|
||||
if (hasSlash && !needsSlash) {
|
||||
return path.substr(path, path.length - 1);
|
||||
} else if (!hasSlash && needsSlash) {
|
||||
return `${path}/`;
|
||||
} else {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
const getPublicUrl = appPackageJson =>
|
||||
envPublicUrl || require(appPackageJson).homepage;
|
||||
|
||||
// We use `PUBLIC_URL` environment variable or "homepage" field to infer
|
||||
// "public path" at which the app is served.
|
||||
// Webpack needs to know it to put the right <script> hrefs into HTML even in
|
||||
// single-page apps that may serve index.html for nested URLs like /todos/42.
|
||||
// We can't use a relative path in HTML because we don't want to load something
|
||||
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
|
||||
function getServedPath(appPackageJson) {
|
||||
const publicUrl = getPublicUrl(appPackageJson);
|
||||
const servedUrl =
|
||||
envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/');
|
||||
return ensureSlash(servedUrl, true);
|
||||
}
|
||||
|
||||
// config after eject: we're in ./config/
|
||||
module.exports = {
|
||||
dotenv: resolveApp('.env'),
|
||||
appBuild: resolveApp('build'),
|
||||
appPublic: resolveApp('public'),
|
||||
appHtml: resolveApp('public/index.html'),
|
||||
appIndexJs: resolveApp('src/index.js'),
|
||||
appPackageJson: resolveApp('package.json'),
|
||||
appSrc: resolveApp('src'),
|
||||
yarnLockFile: resolveApp('yarn.lock'),
|
||||
testsSetup: resolveApp('src/setupTests.js'),
|
||||
appNodeModules: resolveApp('node_modules'),
|
||||
publicUrl: getPublicUrl(resolveApp('package.json')),
|
||||
servedPath: getServedPath(resolveApp('package.json')),
|
||||
};
|
|
@ -0,0 +1,22 @@
|
|||
'use strict';
|
||||
|
||||
if (typeof Promise === 'undefined') {
|
||||
// Rejection tracking prevents a common issue where React gets into an
|
||||
// inconsistent state due to an error, but it gets swallowed by a Promise,
|
||||
// and the user has no idea what causes React's erratic future behavior.
|
||||
require('promise/lib/rejection-tracking').enable();
|
||||
window.Promise = require('promise/lib/es6-extensions.js');
|
||||
}
|
||||
|
||||
// fetch() polyfill for making API calls.
|
||||
require('whatwg-fetch');
|
||||
|
||||
// Object.assign() is commonly used with React.
|
||||
// It will use the native implementation if it's present and isn't buggy.
|
||||
Object.assign = require('object-assign');
|
||||
|
||||
// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.
|
||||
// We don't polyfill it in the browser--this is user's responsibility.
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
require('raf').polyfill(global);
|
||||
}
|
|
@ -0,0 +1,287 @@
|
|||
'use strict';
|
||||
|
||||
const autoprefixer = require('autoprefixer');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
|
||||
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
|
||||
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
|
||||
const eslintFormatter = require('react-dev-utils/eslintFormatter');
|
||||
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
||||
const getClientEnvironment = require('./env');
|
||||
const paths = require('./paths');
|
||||
const fileList = require('./entry');
|
||||
|
||||
let entry = {};
|
||||
let htmlWebpackPlugins = [];
|
||||
|
||||
fileList.forEach(function (item) {
|
||||
entry[item] = [
|
||||
require.resolve('./polyfills'),
|
||||
require.resolve('react-dev-utils/webpackHotDevClient'),
|
||||
paths.appSrc + '/' + item + '.js',
|
||||
];
|
||||
|
||||
htmlWebpackPlugins.push(
|
||||
new HtmlWebpackPlugin({
|
||||
inject: true,
|
||||
chunks: [item],
|
||||
template: paths.appHtml,
|
||||
filename: item + '.html'
|
||||
}));
|
||||
});
|
||||
|
||||
// Webpack uses `publicPath` to determine where the app is being served from.
|
||||
// In development, we always serve from the root. This makes config easier.
|
||||
const publicPath = '/';
|
||||
// `publicUrl` is just like `publicPath`, but we will provide it to our app
|
||||
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
|
||||
// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
|
||||
const publicUrl = '';
|
||||
// Get environment variables to inject into our app.
|
||||
const env = getClientEnvironment(publicUrl);
|
||||
|
||||
// This is the development configuration.
|
||||
// It is focused on developer experience and fast rebuilds.
|
||||
// The production configuration is different and lives in a separate file.
|
||||
module.exports = {
|
||||
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
|
||||
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.
|
||||
devtool: 'cheap-module-source-map',
|
||||
// These are the "entry points" to our application.
|
||||
// This means they will be the "root" imports that are included in JS bundle.
|
||||
// The first two entry points enable "hot" CSS and auto-refreshes for JS.
|
||||
entry: entry,
|
||||
output: {
|
||||
// Add /* filename */ comments to generated require()s in the output.
|
||||
pathinfo: true,
|
||||
path: paths.appBuild,
|
||||
// This does not produce a real file. It's just the virtual path that is
|
||||
// served by WebpackDevServer in development. This is the JS bundle
|
||||
// containing code from all our entry points, and the Webpack runtime.
|
||||
filename: 'static/js/[name].bundle.js',
|
||||
// There are also additional JS chunk files if you use code splitting.
|
||||
chunkFilename: 'static/js/[name].chunk.js',
|
||||
// This is the URL that app is served from. We use "/" in development.
|
||||
publicPath: publicPath,
|
||||
// Point sourcemap entries to original disk location (format as URL on Windows)
|
||||
devtoolModuleFilenameTemplate: info =>
|
||||
path.resolve(info.absoluteResourcePath).replace(/\\/g, '/'),
|
||||
},
|
||||
resolve: {
|
||||
// This allows you to set a fallback for where Webpack should look for modules.
|
||||
// We placed these paths second because we want `node_modules` to "win"
|
||||
// if there are any conflicts. This matches Node resolution mechanism.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/253
|
||||
modules: ['node_modules', paths.appNodeModules].concat(
|
||||
// It is guaranteed to exist because we tweak it in `env.js`
|
||||
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
|
||||
),
|
||||
// These are the reasonable defaults supported by the Node ecosystem.
|
||||
// We also include JSX as a common component filename extension to support
|
||||
// some tools, although we do not recommend using it, see:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/290
|
||||
// `web` extension prefixes have been added for better support
|
||||
// for React Native Web.
|
||||
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
|
||||
alias: {
|
||||
|
||||
// Support React Native Web
|
||||
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
|
||||
'react-native': 'react-native-web',
|
||||
},
|
||||
plugins: [
|
||||
// Prevents users from importing files from outside of src/ (or node_modules/).
|
||||
// This often causes confusion because we only process files within src/ with babel.
|
||||
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
|
||||
// please link the files into your node_modules/ and let module-resolution kick in.
|
||||
// Make sure your source files are compiled, as they will not be processed in any way.
|
||||
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
|
||||
],
|
||||
},
|
||||
module: {
|
||||
strictExportPresence: true,
|
||||
rules: [
|
||||
// TODO: Disable require.ensure as it's not a standard language feature.
|
||||
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
|
||||
// { parser: { requireEnsure: false } },
|
||||
|
||||
// First, run the linter.
|
||||
// It's important to do this before Babel processes the JS.
|
||||
// {
|
||||
// test: /\.(js|jsx|mjs)$/,
|
||||
// enforce: 'pre',
|
||||
// use: [
|
||||
// {
|
||||
// options: {
|
||||
// formatter: eslintFormatter,
|
||||
// eslintPath: require.resolve('eslint'),
|
||||
|
||||
// },
|
||||
// loader: require.resolve('eslint-loader'),
|
||||
// },
|
||||
// ],
|
||||
// include: paths.appSrc,
|
||||
// },
|
||||
{
|
||||
// "oneOf" will traverse all following loaders until one will
|
||||
// match the requirements. When no loader matches it will fall
|
||||
// back to the "file" loader at the end of the loader list.
|
||||
oneOf: [
|
||||
// "url" loader works like "file" loader except that it embeds assets
|
||||
// smaller than specified limit in bytes as data URLs to avoid requests.
|
||||
// A missing `test` is equivalent to a match.
|
||||
{
|
||||
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
|
||||
loader: require.resolve('url-loader'),
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
// Process JS with Babel.
|
||||
{
|
||||
test: /\.(js|jsx|mjs)$/,
|
||||
include: paths.appSrc,
|
||||
loader: require.resolve('babel-loader'),
|
||||
options: {
|
||||
|
||||
// This is a feature of `babel-loader` for webpack (not Babel itself).
|
||||
// It enables caching results in ./node_modules/.cache/babel-loader/
|
||||
// directory for faster rebuilds.
|
||||
cacheDirectory: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /[\\|\/]_[\S]*\.css$/,
|
||||
use: [
|
||||
'to-string-loader',
|
||||
'css-loader'
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /[\\|\/]_[\S]*\.scss$/,
|
||||
use: [
|
||||
'to-string-loader',
|
||||
'css-loader',
|
||||
'sass-loader'
|
||||
]
|
||||
},
|
||||
// "postcss" loader applies autoprefixer to our CSS.
|
||||
// "css" loader resolves paths in CSS and adds assets as dependencies.
|
||||
// "style" loader turns CSS into JS modules that inject <style> tags.
|
||||
// In production, we use a plugin to extract that CSS to a file, but
|
||||
// in development "style" loader enables hot editing of CSS.
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
require.resolve('style-loader'),
|
||||
{
|
||||
loader: require.resolve('css-loader'),
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: require.resolve('postcss-loader'),
|
||||
options: {
|
||||
// Necessary for external CSS imports to work
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2677
|
||||
ident: 'postcss',
|
||||
plugins: () => [
|
||||
require('postcss-flexbugs-fixes'),
|
||||
autoprefixer({
|
||||
browsers: [
|
||||
'>1%',
|
||||
'last 4 versions',
|
||||
'Firefox ESR',
|
||||
'not ie < 9', // React doesn't support IE8 anyway
|
||||
],
|
||||
flexbox: 'no-2009',
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
// "file" loader makes sure those assets get served by WebpackDevServer.
|
||||
// When you `import` an asset, you get its (virtual) filename.
|
||||
// In production, they would get copied to the `build` folder.
|
||||
// This loader doesn't use a "test" so it will catch all modules
|
||||
// that fall through the other loaders.
|
||||
{
|
||||
// Exclude `js` files to keep "css" loader working as it injects
|
||||
// its runtime that would otherwise processed through "file" loader.
|
||||
// Also exclude `html` and `json` extensions so they get processed
|
||||
// by webpacks internal loaders.
|
||||
exclude: [/\.(js|jsx|mjs)$/, /\.html$/, /\.json$/],
|
||||
loader: require.resolve('file-loader'),
|
||||
options: {
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
// ** STOP ** Are you adding a new loader?
|
||||
// Make sure to add the new loader(s) before the "file" loader.
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
// Makes some environment variables available in index.html.
|
||||
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
|
||||
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
// In development, this will be an empty string.
|
||||
new InterpolateHtmlPlugin(env.raw),
|
||||
...htmlWebpackPlugins,
|
||||
// Generates an `index.html` file with the <script> injected.
|
||||
// new HtmlWebpackPlugin({
|
||||
// inject: true,
|
||||
// chunks:["index"],
|
||||
// template: paths.appHtml,
|
||||
// }),
|
||||
// new HtmlWebpackPlugin({
|
||||
// inject: true,
|
||||
// chunks:["admin"],
|
||||
// template:paths.appHtml,
|
||||
// filename:'admin.html'
|
||||
// }),
|
||||
// Add module names to factory functions so they appear in browser profiler.
|
||||
new webpack.NamedModulesPlugin(),
|
||||
// Makes some environment variables available to the JS code, for example:
|
||||
// if (process.env.NODE_ENV === 'development') { ... }. See `./env.js`.
|
||||
new webpack.DefinePlugin(env.stringified),
|
||||
// This is necessary to emit hot updates (currently CSS only):
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
// Watcher doesn't work well if you mistype casing in a path so we use
|
||||
// a plugin that prints an error when you attempt to do this.
|
||||
// See https://github.com/facebookincubator/create-react-app/issues/240
|
||||
new CaseSensitivePathsPlugin(),
|
||||
// If you require a missing module and then `npm install` it, you still have
|
||||
// to restart the development server for Webpack to discover it. This plugin
|
||||
// makes the discovery automatic so you don't have to restart.
|
||||
// See https://github.com/facebookincubator/create-react-app/issues/186
|
||||
new WatchMissingNodeModulesPlugin(paths.appNodeModules),
|
||||
// Moment.js is an extremely popular library that bundles large locale files
|
||||
// by default due to how Webpack interprets its code. This is a practical
|
||||
// solution that requires the user to opt into importing specific locales.
|
||||
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
|
||||
// You can remove this if you don't use Moment.js:
|
||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||
],
|
||||
// Some libraries import Node modules but don't use them in the browser.
|
||||
// Tell Webpack to provide empty mocks for them so importing them works.
|
||||
node: {
|
||||
dgram: 'empty',
|
||||
fs: 'empty',
|
||||
net: 'empty',
|
||||
tls: 'empty',
|
||||
child_process: 'empty',
|
||||
},
|
||||
// Turn off performance hints during development because we don't do any
|
||||
// splitting or minification in interest of speed. These warnings become
|
||||
// cumbersome.
|
||||
performance: {
|
||||
hints: false,
|
||||
},
|
||||
};
|
|
@ -0,0 +1,365 @@
|
|||
'use strict';
|
||||
|
||||
const autoprefixer = require('autoprefixer');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
const ManifestPlugin = require('webpack-manifest-plugin');
|
||||
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
|
||||
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin');
|
||||
const eslintFormatter = require('react-dev-utils/eslintFormatter');
|
||||
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
||||
const paths = require('./paths');
|
||||
const getClientEnvironment = require('./env');
|
||||
const fileList = require('./entry');
|
||||
|
||||
let entry = {};
|
||||
let htmlWebpackPlugins = [];
|
||||
|
||||
fileList.forEach(function (item) {
|
||||
entry[item] = [
|
||||
require.resolve('./polyfills'),
|
||||
paths.appSrc + '/' + item + '.js',
|
||||
];
|
||||
|
||||
htmlWebpackPlugins.push(
|
||||
new HtmlWebpackPlugin({
|
||||
inject: true,
|
||||
chunks:[item],
|
||||
template: paths.appHtml,
|
||||
filename: item + '.html',
|
||||
minify: {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeRedundantAttributes: true,
|
||||
useShortDoctype: true,
|
||||
removeEmptyAttributes: true,
|
||||
removeStyleLinkTypeAttributes: true,
|
||||
keepClosingSlash: true,
|
||||
minifyJS: true,
|
||||
minifyCSS: true,
|
||||
minifyURLs: true,
|
||||
},
|
||||
}))
|
||||
});
|
||||
|
||||
// Webpack uses `publicPath` to determine where the app is being served from.
|
||||
// It requires a trailing slash, or the file assets will get an incorrect path.
|
||||
const publicPath = paths.servedPath;
|
||||
// Some apps do not use client-side routing with pushState.
|
||||
// For these, "homepage" can be set to "." to enable relative asset paths.
|
||||
const shouldUseRelativeAssetPaths = publicPath === './';
|
||||
// Source maps are resource heavy and can cause out of memory issue for large source files.
|
||||
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
|
||||
// `publicUrl` is just like `publicPath`, but we will provide it to our app
|
||||
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
|
||||
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
|
||||
const publicUrl = publicPath.slice(0, -1);
|
||||
// Get environment variables to inject into our app.
|
||||
const env = getClientEnvironment(publicUrl);
|
||||
|
||||
// Assert this just to be safe.
|
||||
// Development builds of React are slow and not intended for production.
|
||||
if (env.stringified['process.env'].NODE_ENV !== '"production"') {
|
||||
throw new Error('Production builds must have NODE_ENV=production.');
|
||||
}
|
||||
|
||||
// Note: defined here because it will be used more than once.
|
||||
const cssFilename = 'static/css/[name].[contenthash:8].css';
|
||||
|
||||
// ExtractTextPlugin expects the build output to be flat.
|
||||
// (See https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/27)
|
||||
// However, our output is structured with css, js and media folders.
|
||||
// To have this structure working with relative paths, we have to use custom options.
|
||||
const extractTextPluginOptions = shouldUseRelativeAssetPaths
|
||||
? // Making sure that the publicPath goes back to to build folder.
|
||||
{ publicPath: Array(cssFilename.split('/').length).join('../') }
|
||||
: {};
|
||||
|
||||
// This is the production configuration.
|
||||
// It compiles slowly and is focused on producing a fast and minimal bundle.
|
||||
// The development configuration is different and lives in a separate file.
|
||||
module.exports = {
|
||||
// Don't attempt to continue if there are any errors.
|
||||
bail: true,
|
||||
// We generate sourcemaps in production. This is slow but gives good results.
|
||||
// You can exclude the *.map files from the build during deployment.
|
||||
devtool: shouldUseSourceMap ? 'source-map' : false,
|
||||
// In production, we only want to load the polyfills and the app code.
|
||||
entry: entry,
|
||||
output: {
|
||||
// The build folder.
|
||||
path: paths.appBuild,
|
||||
// Generated JS file names (with nested folders).
|
||||
// There will be one main bundle, and one file per asynchronous chunk.
|
||||
// We don't currently advertise code splitting but Webpack supports it.
|
||||
filename: 'static/js/[name].[chunkhash:8].js',
|
||||
chunkFilename: 'static/js/[name].[chunkhash:8].chunk.js',
|
||||
// We inferred the "public path" (such as / or /my-project) from homepage.
|
||||
publicPath: publicPath,
|
||||
// Point sourcemap entries to original disk location (format as URL on Windows)
|
||||
devtoolModuleFilenameTemplate: info =>
|
||||
path
|
||||
.relative(paths.appSrc, info.absoluteResourcePath)
|
||||
.replace(/\\/g, '/'),
|
||||
},
|
||||
resolve: {
|
||||
// This allows you to set a fallback for where Webpack should look for modules.
|
||||
// We placed these paths second because we want `node_modules` to "win"
|
||||
// if there are any conflicts. This matches Node resolution mechanism.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/253
|
||||
modules: ['node_modules', paths.appNodeModules].concat(
|
||||
// It is guaranteed to exist because we tweak it in `env.js`
|
||||
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
|
||||
),
|
||||
// These are the reasonable defaults supported by the Node ecosystem.
|
||||
// We also include JSX as a common component filename extension to support
|
||||
// some tools, although we do not recommend using it, see:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/290
|
||||
// `web` extension prefixes have been added for better support
|
||||
// for React Native Web.
|
||||
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx'],
|
||||
alias: {
|
||||
|
||||
// Support React Native Web
|
||||
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
|
||||
'react-native': 'react-native-web',
|
||||
},
|
||||
plugins: [
|
||||
// Prevents users from importing files from outside of src/ (or node_modules/).
|
||||
// This often causes confusion because we only process files within src/ with babel.
|
||||
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
|
||||
// please link the files into your node_modules/ and let module-resolution kick in.
|
||||
// Make sure your source files are compiled, as they will not be processed in any way.
|
||||
new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
|
||||
],
|
||||
},
|
||||
module: {
|
||||
strictExportPresence: true,
|
||||
rules: [
|
||||
// TODO: Disable require.ensure as it's not a standard language feature.
|
||||
// We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.
|
||||
// { parser: { requireEnsure: false } },
|
||||
|
||||
// First, run the linter.
|
||||
// It's important to do this before Babel processes the JS.
|
||||
// {
|
||||
// test: /\.(js|jsx|mjs)$/,
|
||||
// enforce: 'pre',
|
||||
// use: [
|
||||
// {
|
||||
// options: {
|
||||
// formatter: eslintFormatter,
|
||||
// eslintPath: require.resolve('eslint'),
|
||||
|
||||
// },
|
||||
// loader: require.resolve('eslint-loader'),
|
||||
// },
|
||||
// ],
|
||||
// include: paths.appSrc,
|
||||
// },
|
||||
{
|
||||
// "oneOf" will traverse all following loaders until one will
|
||||
// match the requirements. When no loader matches it will fall
|
||||
// back to the "file" loader at the end of the loader list.
|
||||
oneOf: [
|
||||
// "url" loader works just like "file" loader but it also embeds
|
||||
// assets smaller than specified size as data URLs to avoid requests.
|
||||
{
|
||||
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
|
||||
loader: require.resolve('url-loader'),
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
// Process JS with Babel.
|
||||
{
|
||||
test: /\.(js|jsx|mjs)$/,
|
||||
include: paths.appSrc,
|
||||
loader: require.resolve('babel-loader'),
|
||||
options: {
|
||||
|
||||
compact: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /[\\|\/]_[\S]*\.css$/,
|
||||
use: [
|
||||
'to-string-loader',
|
||||
'css-loader'
|
||||
]
|
||||
},
|
||||
// The notation here is somewhat confusing.
|
||||
// "postcss" loader applies autoprefixer to our CSS.
|
||||
// "css" loader resolves paths in CSS and adds assets as dependencies.
|
||||
// "style" loader normally turns CSS into JS modules injecting <style>,
|
||||
// but unlike in development configuration, we do something different.
|
||||
// `ExtractTextPlugin` first applies the "postcss" and "css" loaders
|
||||
// (second argument), then grabs the result CSS and puts it into a
|
||||
// separate file in our build process. This way we actually ship
|
||||
// a single CSS file in production instead of JS code injecting <style>
|
||||
// tags. If you use code splitting, however, any async bundles will still
|
||||
// use the "style" loader inside the async code so CSS from them won't be
|
||||
// in the main CSS file.
|
||||
{
|
||||
test: /\.css$/,
|
||||
loader: ExtractTextPlugin.extract(
|
||||
Object.assign(
|
||||
{
|
||||
fallback: {
|
||||
loader: require.resolve('style-loader'),
|
||||
options: {
|
||||
hmr: false,
|
||||
},
|
||||
},
|
||||
use: [
|
||||
{
|
||||
loader: require.resolve('css-loader'),
|
||||
options: {
|
||||
importLoaders: 1,
|
||||
minimize: true,
|
||||
sourceMap: shouldUseSourceMap,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: require.resolve('postcss-loader'),
|
||||
options: {
|
||||
// Necessary for external CSS imports to work
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2677
|
||||
ident: 'postcss',
|
||||
plugins: () => [
|
||||
require('postcss-flexbugs-fixes'),
|
||||
autoprefixer({
|
||||
browsers: [
|
||||
'>1%',
|
||||
'last 4 versions',
|
||||
'Firefox ESR',
|
||||
'not ie < 9', // React doesn't support IE8 anyway
|
||||
],
|
||||
flexbox: 'no-2009',
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
extractTextPluginOptions
|
||||
)
|
||||
),
|
||||
// Note: this won't work without `new ExtractTextPlugin()` in `plugins`.
|
||||
},
|
||||
// "file" loader makes sure assets end up in the `build` folder.
|
||||
// When you `import` an asset, you get its filename.
|
||||
// This loader doesn't use a "test" so it will catch all modules
|
||||
// that fall through the other loaders.
|
||||
{
|
||||
loader: require.resolve('file-loader'),
|
||||
// Exclude `js` files to keep "css" loader working as it injects
|
||||
// it's runtime that would otherwise processed through "file" loader.
|
||||
// Also exclude `html` and `json` extensions so they get processed
|
||||
// by webpacks internal loaders.
|
||||
exclude: [/\.(js|jsx|mjs)$/, /\.html$/, /\.json$/],
|
||||
options: {
|
||||
name: 'static/media/[name].[hash:8].[ext]',
|
||||
},
|
||||
},
|
||||
// ** STOP ** Are you adding a new loader?
|
||||
// Make sure to add the new loader(s) before the "file" loader.
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
// Makes some environment variables available in index.html.
|
||||
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
|
||||
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
// In production, it will be an empty string unless you specify "homepage"
|
||||
// in `package.json`, in which case it will be the pathname of that URL.
|
||||
new InterpolateHtmlPlugin(env.raw),
|
||||
// Generates an `index.html` file with the <script> injected.
|
||||
...htmlWebpackPlugins,
|
||||
// Makes some environment variables available to the JS code, for example:
|
||||
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
|
||||
// It is absolutely essential that NODE_ENV was set to production here.
|
||||
// Otherwise React will be compiled in the very slow development mode.
|
||||
new webpack.DefinePlugin(env.stringified),
|
||||
// Minify the code.
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false,
|
||||
// Disabled because of an issue with Uglify breaking seemingly valid code:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2376
|
||||
// Pending further investigation:
|
||||
// https://github.com/mishoo/UglifyJS2/issues/2011
|
||||
comparisons: false,
|
||||
},
|
||||
mangle: {
|
||||
safari10: true,
|
||||
},
|
||||
output: {
|
||||
comments: false,
|
||||
// Turned on because emoji and regex is not minified properly using default
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2488
|
||||
ascii_only: true,
|
||||
},
|
||||
sourceMap: shouldUseSourceMap,
|
||||
}),
|
||||
// Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.
|
||||
new ExtractTextPlugin({
|
||||
filename: cssFilename,
|
||||
}),
|
||||
// Generate a manifest file which contains a mapping of all asset filenames
|
||||
// to their corresponding output file so that tools can pick it up without
|
||||
// having to parse `index.html`.
|
||||
new ManifestPlugin({
|
||||
fileName: 'asset-manifest.json',
|
||||
}),
|
||||
// Generate a service worker script that will precache, and keep up to date,
|
||||
// the HTML & assets that are part of the Webpack build.
|
||||
new SWPrecacheWebpackPlugin({
|
||||
// By default, a cache-busting query parameter is appended to requests
|
||||
// used to populate the caches, to ensure the responses are fresh.
|
||||
// If a URL is already hashed by Webpack, then there is no concern
|
||||
// about it being stale, and the cache-busting can be skipped.
|
||||
dontCacheBustUrlsMatching: /\.\w{8}\./,
|
||||
filename: 'service-worker.js',
|
||||
logger(message) {
|
||||
if (message.indexOf('Total precache size is') === 0) {
|
||||
// This message occurs for every build and is a bit too noisy.
|
||||
return;
|
||||
}
|
||||
if (message.indexOf('Skipping static resource') === 0) {
|
||||
// This message obscures real errors so we ignore it.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2612
|
||||
return;
|
||||
}
|
||||
console.log(message);
|
||||
},
|
||||
minify: true,
|
||||
// For unknown URLs, fallback to the index page
|
||||
navigateFallback: publicUrl + '/index.html',
|
||||
// Ignores URLs starting from /__ (useful for Firebase):
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2237#issuecomment-302693219
|
||||
navigateFallbackWhitelist: [/^(?!\/__).*/],
|
||||
// Don't precache sourcemaps (they're large) and build asset manifest:
|
||||
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/],
|
||||
}),
|
||||
// Moment.js is an extremely popular library that bundles large locale files
|
||||
// by default due to how Webpack interprets its code. This is a practical
|
||||
// solution that requires the user to opt into importing specific locales.
|
||||
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
|
||||
// You can remove this if you don't use Moment.js:
|
||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||
],
|
||||
// Some libraries import Node modules but don't use them in the browser.
|
||||
// Tell Webpack to provide empty mocks for them so importing them works.
|
||||
node: {
|
||||
dgram: 'empty',
|
||||
fs: 'empty',
|
||||
net: 'empty',
|
||||
tls: 'empty',
|
||||
child_process: 'empty',
|
||||
},
|
||||
};
|
|
@ -0,0 +1,108 @@
|
|||
'use strict';
|
||||
|
||||
const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
|
||||
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
|
||||
const ignoredFiles = require('react-dev-utils/ignoredFiles');
|
||||
const config = require('./webpack.config.dev');
|
||||
const paths = require('./paths');
|
||||
|
||||
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
|
||||
const host = process.env.HOST || '0.0.0.0';
|
||||
|
||||
// const fileList = require('./entry');
|
||||
|
||||
// let rewrites = [];
|
||||
|
||||
// fileList.forEach(function (item) {
|
||||
|
||||
// rewrites.push({ from: new RegExp('^\/' + item + '.html', 'g'), to: '/build/' + item + '.html' })
|
||||
|
||||
// });
|
||||
|
||||
|
||||
|
||||
module.exports = function(proxy, allowedHost) {
|
||||
return {
|
||||
// WebpackDevServer 2.4.3 introduced a security fix that prevents remote
|
||||
// websites from potentially accessing local content through DNS rebinding:
|
||||
// https://github.com/webpack/webpack-dev-server/issues/887
|
||||
// https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a
|
||||
// However, it made several existing use cases such as development in cloud
|
||||
// environment or subdomains in development significantly more complicated:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2271
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2233
|
||||
// While we're investigating better solutions, for now we will take a
|
||||
// compromise. Since our WDS configuration only serves files in the `public`
|
||||
// folder we won't consider accessing them a vulnerability. However, if you
|
||||
// use the `proxy` feature, it gets more dangerous because it can expose
|
||||
// remote code execution vulnerabilities in backends like Django and Rails.
|
||||
// So we will disable the host check normally, but enable it if you have
|
||||
// specified the `proxy` setting. Finally, we let you override it if you
|
||||
// really know what you're doing with a special environment variable.
|
||||
disableHostCheck:
|
||||
!proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true',
|
||||
// Enable gzip compression of generated files.
|
||||
compress: true,
|
||||
// Silence WebpackDevServer's own logs since they're generally not useful.
|
||||
// It will still show compile warnings and errors with this setting.
|
||||
clientLogLevel: 'none',
|
||||
// By default WebpackDevServer serves physical files from current directory
|
||||
// in addition to all the virtual build products that it serves from memory.
|
||||
// This is confusing because those files won’t automatically be available in
|
||||
// production build folder unless we copy them. However, copying the whole
|
||||
// project directory is dangerous because we may expose sensitive files.
|
||||
// Instead, we establish a convention that only files in `public` directory
|
||||
// get served. Our build script will copy `public` into the `build` folder.
|
||||
// In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:
|
||||
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
// In JavaScript code, you can access it with `process.env.PUBLIC_URL`.
|
||||
// Note that we only recommend to use `public` folder as an escape hatch
|
||||
// for files like `favicon.ico`, `manifest.json`, and libraries that are
|
||||
// for some reason broken when imported through Webpack. If you just want to
|
||||
// use an image, put it in `src` and `import` it from JavaScript instead.
|
||||
contentBase: paths.appPublic,
|
||||
// By default files from `contentBase` will not trigger a page reload.
|
||||
watchContentBase: true,
|
||||
// Enable hot reloading server. It will provide /sockjs-node/ endpoint
|
||||
// for the WebpackDevServer client so it can learn when the files were
|
||||
// updated. The WebpackDevServer client is included as an entry point
|
||||
// in the Webpack development configuration. Note that only changes
|
||||
// to CSS are currently hot reloaded. JS changes will refresh the browser.
|
||||
hot: true,
|
||||
// It is important to tell WebpackDevServer to use the same "root" path
|
||||
// as we specified in the config. In development, we always serve from /.
|
||||
publicPath: config.output.publicPath,
|
||||
// WebpackDevServer is noisy by default so we emit custom message instead
|
||||
// by listening to the compiler events with `compiler.plugin` calls above.
|
||||
quiet: true,
|
||||
// Reportedly, this avoids CPU overload on some systems.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/293
|
||||
// src/node_modules is not ignored to support absolute imports
|
||||
// https://github.com/facebookincubator/create-react-app/issues/1065
|
||||
watchOptions: {
|
||||
ignored: ignoredFiles(paths.appSrc),
|
||||
},
|
||||
// Enable HTTPS if the HTTPS environment variable is set to 'true'
|
||||
https: protocol === 'https',
|
||||
host: host,
|
||||
overlay: false,
|
||||
historyApiFallback: {
|
||||
// Paths with dots should still use the history fallback.
|
||||
// See https://github.com/facebookincubator/create-react-app/issues/387.
|
||||
disableDotRule: true
|
||||
//rewrites: rewrites
|
||||
},
|
||||
public: allowedHost,
|
||||
proxy,
|
||||
before(app) {
|
||||
// This lets us open files from the runtime error overlay.
|
||||
app.use(errorOverlayMiddleware());
|
||||
// This service worker file is effectively a 'no-op' that will reset any
|
||||
// previous service worker registered for the same host:port combination.
|
||||
// We do this in development to avoid hitting the production cache if
|
||||
// it used the same host and port.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432
|
||||
app.use(noopServiceWorkerMiddleware());
|
||||
},
|
||||
};
|
||||
};
|
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
"name": "my-app",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"autoprefixer": "7.1.6",
|
||||
"babel-core": "6.26.0",
|
||||
"babel-eslint": "7.2.3",
|
||||
"babel-jest": "20.0.3",
|
||||
"babel-loader": "7.1.2",
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
"babel-plugin-transform-decorators-legacy": "^1.3.5",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"babel-preset-omi": "^0.1.1",
|
||||
"babel-runtime": "6.26.0",
|
||||
"case-sensitive-paths-webpack-plugin": "2.1.1",
|
||||
"chalk": "1.1.3",
|
||||
"css-loader": "0.28.7",
|
||||
"dotenv": "4.0.0",
|
||||
"dotenv-expand": "4.2.0",
|
||||
"eslint": "4.10.0",
|
||||
"eslint-loader": "1.9.0",
|
||||
"eslint-plugin-flowtype": "2.39.1",
|
||||
"eslint-plugin-import": "2.8.0",
|
||||
"eslint-plugin-jsx-a11y": "5.1.1",
|
||||
"extract-text-webpack-plugin": "3.0.2",
|
||||
"file-loader": "1.1.5",
|
||||
"fs-extra": "3.0.1",
|
||||
"html-webpack-plugin": "2.29.0",
|
||||
"jest": "20.0.4",
|
||||
"object-assign": "4.1.1",
|
||||
"omi": "^4.0.3",
|
||||
"postcss-flexbugs-fixes": "3.2.0",
|
||||
"postcss-loader": "2.0.8",
|
||||
"promise": "8.0.1",
|
||||
"raf": "3.4.0",
|
||||
"react-dev-utils": "^5.0.1",
|
||||
"resolve": "1.6.0",
|
||||
"style-loader": "0.19.0",
|
||||
"sw-precache-webpack-plugin": "0.11.4",
|
||||
"to-string-loader": "^1.1.5",
|
||||
"url-loader": "0.6.2",
|
||||
"webpack": "3.8.1",
|
||||
"webpack-dev-server": "2.9.4",
|
||||
"webpack-manifest-plugin": "1.3.2",
|
||||
"whatwg-fetch": "2.0.3",
|
||||
"node-sass": "^4.9.4",
|
||||
"sass-loader": "^7.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node scripts/start.js",
|
||||
"build": "node scripts/build.js"
|
||||
},
|
||||
"jest": {
|
||||
"collectCoverageFrom": [
|
||||
"src/**/*.{js,jsx,mjs}"
|
||||
],
|
||||
"setupFiles": [
|
||||
"<rootDir>/config/polyfills.js"
|
||||
],
|
||||
"testMatch": [
|
||||
"<rootDir>/src/**/__tests__/**/*.{js,jsx,mjs}",
|
||||
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}"
|
||||
],
|
||||
"testEnvironment": "node",
|
||||
"testURL": "http://localhost",
|
||||
"transform": {
|
||||
"^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
|
||||
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
|
||||
"^(?!.*\\.(js|jsx|mjs|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
|
||||
},
|
||||
"transformIgnorePatterns": [
|
||||
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$"
|
||||
],
|
||||
"moduleNameMapper": {
|
||||
"^react-native$": "react-native-web"
|
||||
},
|
||||
"moduleFileExtensions": [
|
||||
"web.js",
|
||||
"js",
|
||||
"json",
|
||||
"web.jsx",
|
||||
"jsx",
|
||||
"node",
|
||||
"mjs"
|
||||
]
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"env",
|
||||
"omi"
|
||||
],
|
||||
"plugins": [
|
||||
"transform-class-properties",
|
||||
"transform-decorators-legacy"
|
||||
]
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is added to the
|
||||
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
|
||||
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>Omi</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@2.0.0/webcomponents-bundle.js"></script>
|
||||
<noscript>
|
||||
You need to enable JavaScript to run this app.
|
||||
</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"short_name": "Omi App",
|
||||
"name": "Omi Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
}
|
||||
],
|
||||
"start_url": "./index.html",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
'use strict';
|
||||
|
||||
// Do this as the first thing so that any code reading it knows the right env.
|
||||
process.env.BABEL_ENV = 'production';
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
||||
// Makes the script crash on unhandled rejections instead of silently
|
||||
// ignoring them. In the future, promise rejections that are not handled will
|
||||
// terminate the Node.js process with a non-zero exit code.
|
||||
process.on('unhandledRejection', err => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
// Ensure environment variables are read.
|
||||
require('../config/env');
|
||||
|
||||
const path = require('path');
|
||||
const chalk = require('chalk');
|
||||
const fs = require('fs-extra');
|
||||
const webpack = require('webpack');
|
||||
const config = require('../config/webpack.config.prod');
|
||||
const paths = require('../config/paths');
|
||||
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
|
||||
const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
|
||||
const printHostingInstructions = require('react-dev-utils/printHostingInstructions');
|
||||
const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
|
||||
const printBuildError = require('react-dev-utils/printBuildError');
|
||||
|
||||
const measureFileSizesBeforeBuild =
|
||||
FileSizeReporter.measureFileSizesBeforeBuild;
|
||||
const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild;
|
||||
const useYarn = fs.existsSync(paths.yarnLockFile);
|
||||
|
||||
// These sizes are pretty large. We'll warn for bundles exceeding them.
|
||||
const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024;
|
||||
const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;
|
||||
|
||||
// Warn and crash if required files are missing
|
||||
if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// First, read the current file sizes in build directory.
|
||||
// This lets us display how much they changed later.
|
||||
measureFileSizesBeforeBuild(paths.appBuild)
|
||||
.then(previousFileSizes => {
|
||||
// Remove all content but keep the directory so that
|
||||
// if you're in it, you don't end up in Trash
|
||||
fs.emptyDirSync(paths.appBuild);
|
||||
// Merge with the public folder
|
||||
copyPublicFolder();
|
||||
// Start the webpack build
|
||||
return build(previousFileSizes);
|
||||
})
|
||||
.then(
|
||||
({ stats, previousFileSizes, warnings }) => {
|
||||
if (warnings.length) {
|
||||
console.log(chalk.yellow('Compiled with warnings.\n'));
|
||||
console.log(warnings.join('\n\n'));
|
||||
console.log(
|
||||
'\nSearch for the ' +
|
||||
chalk.underline(chalk.yellow('keywords')) +
|
||||
' to learn more about each warning.'
|
||||
);
|
||||
console.log(
|
||||
'To ignore, add ' +
|
||||
chalk.cyan('// eslint-disable-next-line') +
|
||||
' to the line before.\n'
|
||||
);
|
||||
} else {
|
||||
console.log(chalk.green('Compiled successfully.\n'));
|
||||
}
|
||||
|
||||
console.log('File sizes after gzip:\n');
|
||||
printFileSizesAfterBuild(
|
||||
stats,
|
||||
previousFileSizes,
|
||||
paths.appBuild,
|
||||
WARN_AFTER_BUNDLE_GZIP_SIZE,
|
||||
WARN_AFTER_CHUNK_GZIP_SIZE
|
||||
);
|
||||
console.log();
|
||||
|
||||
const appPackage = require(paths.appPackageJson);
|
||||
const publicUrl = paths.publicUrl;
|
||||
const publicPath = config.output.publicPath;
|
||||
const buildFolder = path.relative(process.cwd(), paths.appBuild);
|
||||
printHostingInstructions(
|
||||
appPackage,
|
||||
publicUrl,
|
||||
publicPath,
|
||||
buildFolder,
|
||||
useYarn
|
||||
);
|
||||
},
|
||||
err => {
|
||||
console.log(chalk.red('Failed to compile.\n'));
|
||||
printBuildError(err);
|
||||
process.exit(1);
|
||||
}
|
||||
);
|
||||
|
||||
// Create the production build and print the deployment instructions.
|
||||
function build(previousFileSizes) {
|
||||
console.log('Creating an optimized production build...');
|
||||
|
||||
let compiler = webpack(config);
|
||||
return new Promise((resolve, reject) => {
|
||||
compiler.run((err, stats) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
const messages = formatWebpackMessages(stats.toJson({}, true));
|
||||
if (messages.errors.length) {
|
||||
// Only keep the first error. Others are often indicative
|
||||
// of the same problem, but confuse the reader with noise.
|
||||
if (messages.errors.length > 1) {
|
||||
messages.errors.length = 1;
|
||||
}
|
||||
return reject(new Error(messages.errors.join('\n\n')));
|
||||
}
|
||||
if (
|
||||
process.env.CI &&
|
||||
(typeof process.env.CI !== 'string' ||
|
||||
process.env.CI.toLowerCase() !== 'false') &&
|
||||
messages.warnings.length
|
||||
) {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
'\nTreating warnings as errors because process.env.CI = true.\n' +
|
||||
'Most CI servers set it automatically.\n'
|
||||
)
|
||||
);
|
||||
return reject(new Error(messages.warnings.join('\n\n')));
|
||||
}
|
||||
return resolve({
|
||||
stats,
|
||||
previousFileSizes,
|
||||
warnings: messages.warnings,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function copyPublicFolder() {
|
||||
fs.copySync(paths.appPublic, paths.appBuild, {
|
||||
dereference: true,
|
||||
filter: file => file !== paths.appHtml,
|
||||
});
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
'use strict';
|
||||
|
||||
// Do this as the first thing so that any code reading it knows the right env.
|
||||
process.env.BABEL_ENV = 'development';
|
||||
process.env.NODE_ENV = 'development';
|
||||
|
||||
// Makes the script crash on unhandled rejections instead of silently
|
||||
// ignoring them. In the future, promise rejections that are not handled will
|
||||
// terminate the Node.js process with a non-zero exit code.
|
||||
process.on('unhandledRejection', err => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
// Ensure environment variables are read.
|
||||
require('../config/env');
|
||||
|
||||
const fs = require('fs');
|
||||
const chalk = require('chalk');
|
||||
const webpack = require('webpack');
|
||||
const WebpackDevServer = require('webpack-dev-server');
|
||||
const clearConsole = require('react-dev-utils/clearConsole');
|
||||
const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');
|
||||
const {
|
||||
choosePort,
|
||||
createCompiler,
|
||||
prepareProxy,
|
||||
prepareUrls,
|
||||
} = require('react-dev-utils/WebpackDevServerUtils');
|
||||
const openBrowser = require('react-dev-utils/openBrowser');
|
||||
const paths = require('../config/paths');
|
||||
const config = require('../config/webpack.config.dev');
|
||||
const createDevServerConfig = require('../config/webpackDevServer.config');
|
||||
|
||||
const useYarn = fs.existsSync(paths.yarnLockFile);
|
||||
const isInteractive = process.stdout.isTTY;
|
||||
|
||||
// Warn and crash if required files are missing
|
||||
if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Tools like Cloud9 rely on this.
|
||||
const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;
|
||||
const HOST = process.env.HOST || '0.0.0.0';
|
||||
|
||||
if (process.env.HOST) {
|
||||
console.log(
|
||||
chalk.cyan(
|
||||
`Attempting to bind to HOST environment variable: ${chalk.yellow(
|
||||
chalk.bold(process.env.HOST)
|
||||
)}`
|
||||
)
|
||||
);
|
||||
console.log(
|
||||
`If this was unintentional, check that you haven't mistakenly set it in your shell.`
|
||||
);
|
||||
console.log(`Learn more here: ${chalk.yellow('http://bit.ly/2mwWSwH')}`);
|
||||
console.log();
|
||||
}
|
||||
|
||||
// We attempt to use the default port but if it is busy, we offer the user to
|
||||
// run on a different port. `choosePort()` Promise resolves to the next free port.
|
||||
choosePort(HOST, DEFAULT_PORT)
|
||||
.then(port => {
|
||||
if (port == null) {
|
||||
// We have not found a port.
|
||||
return;
|
||||
}
|
||||
const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
|
||||
const appName = require(paths.appPackageJson).name;
|
||||
const urls = prepareUrls(protocol, HOST, port);
|
||||
// Create a webpack compiler that is configured with custom messages.
|
||||
const compiler = createCompiler(webpack, config, appName, urls, useYarn);
|
||||
// Load proxy config
|
||||
const proxySetting = require(paths.appPackageJson).proxy;
|
||||
const proxyConfig = prepareProxy(proxySetting, paths.appPublic);
|
||||
// Serve webpack assets generated by the compiler over a web sever.
|
||||
const serverConfig = createDevServerConfig(
|
||||
proxyConfig,
|
||||
urls.lanUrlForConfig
|
||||
);
|
||||
const devServer = new WebpackDevServer(compiler, serverConfig);
|
||||
// Launch WebpackDevServer.
|
||||
devServer.listen(port, HOST, err => {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
if (isInteractive) {
|
||||
clearConsole();
|
||||
}
|
||||
console.log(chalk.cyan('Starting the development server...\n'));
|
||||
openBrowser(urls.localUrlForBrowser);
|
||||
});
|
||||
|
||||
['SIGINT', 'SIGTERM'].forEach(function(sig) {
|
||||
process.on(sig, function() {
|
||||
devServer.close();
|
||||
process.exit();
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
if (err && err.message) {
|
||||
console.log(err.message);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
// Do this as the first thing so that any code reading it knows the right env.
|
||||
process.env.BABEL_ENV = 'test';
|
||||
process.env.NODE_ENV = 'test';
|
||||
process.env.PUBLIC_URL = '';
|
||||
|
||||
// Makes the script crash on unhandled rejections instead of silently
|
||||
// ignoring them. In the future, promise rejections that are not handled will
|
||||
// terminate the Node.js process with a non-zero exit code.
|
||||
process.on('unhandledRejection', err => {
|
||||
throw err;
|
||||
});
|
||||
|
||||
// Ensure environment variables are read.
|
||||
require('../config/env');
|
||||
|
||||
const jest = require('jest');
|
||||
let argv = process.argv.slice(2);
|
||||
|
||||
// Watch unless on CI or in coverage mode
|
||||
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
|
||||
argv.push('--watch');
|
||||
}
|
||||
|
||||
|
||||
jest.run(argv);
|
|
@ -0,0 +1,8 @@
|
|||
import { render } from 'omi'
|
||||
import './assets/index.css'
|
||||
import './elements/hello'
|
||||
import registerServiceWorker from './assets/register-service-worker'
|
||||
import store from './store/admin-store'
|
||||
|
||||
render(<hello-element />, '#root', store)
|
||||
registerServiceWorker()
|
|
@ -0,0 +1,5 @@
|
|||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: sans-serif;
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
// In production, we register a service worker to serve assets from local cache.
|
||||
|
||||
// This lets the app load faster on subsequent visits in production, and gives
|
||||
// it offline capabilities. However, it also means that developers (and users)
|
||||
// will only see deployed updates on the "N+1" visit to a page, since previously
|
||||
// cached resources are updated in the background.
|
||||
|
||||
// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
|
||||
// This link also includes instructions on opting out of this behavior.
|
||||
|
||||
const isLocalhost = Boolean(
|
||||
window.location.hostname === 'localhost' ||
|
||||
// [::1] is the IPv6 localhost address.
|
||||
window.location.hostname === '[::1]' ||
|
||||
// 127.0.0.1/8 is considered localhost for IPv4.
|
||||
window.location.hostname.match(
|
||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||
)
|
||||
)
|
||||
|
||||
export default function register() {
|
||||
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
||||
// The URL constructor is available in all browsers that support SW.
|
||||
const publicUrl = new URL(process.env.PUBLIC_URL, window.location)
|
||||
if (publicUrl.origin !== window.location.origin) {
|
||||
// Our service worker won't work if PUBLIC_URL is on a different origin
|
||||
// from what our page is served on. This might happen if a CDN is used to
|
||||
// serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374
|
||||
return
|
||||
}
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`
|
||||
|
||||
if (isLocalhost) {
|
||||
// This is running on localhost. Lets check if a service worker still exists or not.
|
||||
checkValidServiceWorker(swUrl)
|
||||
|
||||
// Add some additional logging to localhost, pointing developers to the
|
||||
// service worker/PWA documentation.
|
||||
navigator.serviceWorker.ready.then(() => {
|
||||
console.log(
|
||||
'This web app is being served cache-first by a service ' +
|
||||
'worker. To learn more, visit https://goo.gl/SC7cgQ'
|
||||
)
|
||||
})
|
||||
} else {
|
||||
// Is not local host. Just register service worker
|
||||
registerValidSW(swUrl)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function registerValidSW(swUrl) {
|
||||
navigator.serviceWorker
|
||||
.register(swUrl)
|
||||
.then(registration => {
|
||||
registration.onupdatefound = () => {
|
||||
const installingWorker = registration.installing
|
||||
installingWorker.onstatechange = () => {
|
||||
if (installingWorker.state === 'installed') {
|
||||
if (navigator.serviceWorker.controller) {
|
||||
// At this point, the old content will have been purged and
|
||||
// the fresh content will have been added to the cache.
|
||||
// It's the perfect time to display a "New content is
|
||||
// available; please refresh." message in your web app.
|
||||
console.log('New content is available; please refresh.')
|
||||
} else {
|
||||
// At this point, everything has been precached.
|
||||
// It's the perfect time to display a
|
||||
// "Content is cached for offline use." message.
|
||||
console.log('Content is cached for offline use.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error during service worker registration:', error)
|
||||
})
|
||||
}
|
||||
|
||||
function checkValidServiceWorker(swUrl) {
|
||||
// Check if the service worker can be found. If it can't reload the page.
|
||||
fetch(swUrl)
|
||||
.then(response => {
|
||||
// Ensure service worker exists, and that we really are getting a JS file.
|
||||
if (
|
||||
response.status === 404 ||
|
||||
response.headers.get('content-type').indexOf('javascript') === -1
|
||||
) {
|
||||
// No service worker found. Probably a different app. Reload the page.
|
||||
navigator.serviceWorker.ready.then(registration => {
|
||||
registration.unregister().then(() => {
|
||||
window.location.reload()
|
||||
})
|
||||
})
|
||||
} else {
|
||||
// Service worker found. Proceed as normal.
|
||||
registerValidSW(swUrl)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
console.log(
|
||||
'No internet connection found. App is running in offline mode.'
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
export function unregister() {
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.ready.then(registration => {
|
||||
registration.unregister()
|
||||
})
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
div{
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
el-button{
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
el-button-group el-button{
|
||||
margin:0.5px;
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
import { tag, WeElement } from 'omi'
|
||||
import style from './_index.css'
|
||||
import '../../omi-element-ui/el-button'
|
||||
import '../../omi-element-ui/el-button-group'
|
||||
|
||||
@tag('my-app')
|
||||
class MyApp extends WeElement {
|
||||
|
||||
onClick = (evt) => {
|
||||
console.log(evt)
|
||||
}
|
||||
|
||||
css() {
|
||||
return style
|
||||
}
|
||||
|
||||
render(props, data) {
|
||||
return (
|
||||
<div>
|
||||
<div>
|
||||
<el-button onClick={this.onClick}>默认按钮1</el-button>
|
||||
<el-button type="primary">主要按钮</el-button>
|
||||
<el-button type="success">成功按钮</el-button>
|
||||
<el-button type="info">信息按钮</el-button>
|
||||
<el-button type="warning">警告按钮</el-button>
|
||||
<el-button type="danger">危险按钮</el-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-button plain>朴素按钮</el-button>
|
||||
<el-button type="primary" plain>主要按钮</el-button>
|
||||
<el-button type="success" plain>成功按钮</el-button>
|
||||
<el-button type="info" plain>信息按钮</el-button>
|
||||
<el-button type="warning" plain>警告按钮</el-button>
|
||||
<el-button type="danger" plain>危险按钮</el-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-button round>圆角按钮</el-button>
|
||||
<el-button type="primary" round>主要按钮</el-button>
|
||||
<el-button type="success" round>成功按钮</el-button>
|
||||
<el-button type="info" round>信息按钮</el-button>
|
||||
<el-button type="warning" round>警告按钮</el-button>
|
||||
<el-button type="danger" round>危险按钮</el-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-button icon="el-icon-search" circle></el-button>
|
||||
<el-button type="primary" icon="el-icon-edit" circle></el-button>
|
||||
<el-button type="success" icon="el-icon-check" circle></el-button>
|
||||
<el-button type="info" icon="el-icon-message" circle></el-button>
|
||||
<el-button type="warning" icon="el-icon-star-off" circle></el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" circle></el-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-button disabled onClick={this.onClick}>默认按钮</el-button>
|
||||
<el-button type="primary" disabled>主要按钮</el-button>
|
||||
<el-button type="success" disabled>成功按钮</el-button>
|
||||
<el-button type="info" disabled>信息按钮</el-button>
|
||||
<el-button type="warning" disabled>警告按钮</el-button>
|
||||
<el-button type="danger" disabled>危险按钮</el-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-button plain disabled onClick={this.onClick}>朴素按钮</el-button>
|
||||
<el-button type="primary" plain disabled>主要按钮</el-button>
|
||||
<el-button type="success" plain disabled>成功按钮</el-button>
|
||||
<el-button type="info" plain disabled>信息按钮</el-button>
|
||||
<el-button type="warning" plain disabled>警告按钮</el-button>
|
||||
<el-button type="danger" plain disabled>危险按钮</el-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-button type="text">文字按钮</el-button>
|
||||
<el-button type="text" disabled>文字按钮</el-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-edit"></el-button>
|
||||
<el-button type="primary" icon="el-icon-share"></el-button>
|
||||
<el-button type="primary" icon="el-icon-delete"></el-button>
|
||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-upload" icon-right>上传</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<el-button-group>
|
||||
<el-button type="primary" icon="el-icon-arrow-left">上一页</el-button>
|
||||
<el-button type="primary" icon="el-icon-arrow-right" icon-right>下一页</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div>
|
||||
<el-button-group>
|
||||
<el-button type="primary" icon="el-icon-edit"></el-button>
|
||||
<el-button type="primary" icon="el-icon-share"></el-button>
|
||||
<el-button type="primary" icon="el-icon-delete"></el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-loading">加载中</el-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<el-button>默认按钮</el-button>
|
||||
<el-button size="medium">中等按钮</el-button>
|
||||
<el-button size="small">小型按钮</el-button>
|
||||
<el-button size="mini">超小按钮</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button round>默认按钮</el-button>
|
||||
<el-button size="medium" round>中等按钮</el-button>
|
||||
<el-button size="small" round>小型按钮</el-button>
|
||||
<el-button size="mini" round>超小按钮</el-button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
|
||||
<g fill="#61DAFB">
|
||||
<circle cx="420.9" cy="296.5" r="245.7"/>
|
||||
</g>
|
||||
<g fill="black">
|
||||
<circle cx="420.9" cy="296.5" r="165.7"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 236 B |
|
@ -0,0 +1,10 @@
|
|||
.hello{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.omi{
|
||||
width: 143px;
|
||||
height: 59px;
|
||||
margin: 0 auto;
|
||||
background-image: url(./omi.png);
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
import { tag, WeElement } from 'omi'
|
||||
import style from './_index.css'
|
||||
|
||||
@tag('hello-element')
|
||||
class HelloElement extends WeElement{
|
||||
static get data() {
|
||||
return { name: '' }
|
||||
}
|
||||
|
||||
installed(){
|
||||
setTimeout(()=>{
|
||||
this.store.data.name = 'Good Job!'
|
||||
},1000)
|
||||
}
|
||||
css(){
|
||||
return style
|
||||
}
|
||||
|
||||
render(props, data){
|
||||
return(
|
||||
<div class="hello">
|
||||
<h1> {data.name} </h1>
|
||||
<div> I am hello element.</div>
|
||||
<div class="omi"></div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
|
@ -0,0 +1,8 @@
|
|||
import { render } from 'omi'
|
||||
import './assets/index.css'
|
||||
import './elements/app'
|
||||
import registerServiceWorker from './assets/register-service-worker'
|
||||
import store from './store/app-store'
|
||||
|
||||
render(<my-app />, '#root', store)
|
||||
registerServiceWorker()
|
|
@ -0,0 +1,12 @@
|
|||
import { tag, WeElement } from 'omi'
|
||||
|
||||
@tag('el-button-group', true)
|
||||
class ElButtonGroup extends WeElement {
|
||||
render() {
|
||||
return (
|
||||
<div class="el-button-group">
|
||||
<slot></slot>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
import { tag, WeElement } from 'omi'
|
||||
import '../style/global/index.css'
|
||||
import style from '../style/_button.scss'
|
||||
|
||||
@tag('el-button', true)
|
||||
class ElButton extends WeElement {
|
||||
|
||||
css() {
|
||||
return style
|
||||
}
|
||||
|
||||
render(props, data) {
|
||||
let classStr = 'el-button'
|
||||
if (props.type) {
|
||||
classStr += ` el-button--${props.type}`
|
||||
}
|
||||
if (props.plain) {
|
||||
classStr += ` is-plain`
|
||||
}
|
||||
if (props.round) {
|
||||
classStr += ` is-round`
|
||||
}
|
||||
if (props.circle) {
|
||||
classStr += ` is-circle`
|
||||
}
|
||||
if (props.disabled) {
|
||||
classStr += ` is-disabled`
|
||||
}
|
||||
|
||||
if(typeof data.position=== 'string'){
|
||||
classStr+= " "+data.position
|
||||
}
|
||||
|
||||
if(props.size){
|
||||
classStr+= " el-button--"+props.size
|
||||
}
|
||||
if(props.iconRight){
|
||||
return (
|
||||
<button onClick={this.onClick} class={classStr}>
|
||||
<slot></slot>
|
||||
{props.icon&&<i class={props.icon}></i>}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<button onClick={this.onClick} class={classStr}>
|
||||
{props.icon&&<i class={props.icon}></i>}
|
||||
<slot></slot>
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
onClick = (evt) => {
|
||||
if (!this.props.disabled) {
|
||||
this.props.onClick && this.props.onClick(evt)
|
||||
}
|
||||
evt.stopPropagation()
|
||||
}
|
||||
|
||||
install(){
|
||||
if(this.parentNode.nodeName === 'EL-BUTTON-GROUP'){
|
||||
for(let i=0,len =this.parentNode.childNodes.length;i<len;i++ ){
|
||||
if(this.parentNode.childNodes[i]===this){
|
||||
if(i ===0){
|
||||
this.data.position = 'first'
|
||||
}else if(i===len-1){
|
||||
this.data.position = 'last'
|
||||
}else {
|
||||
this.data.position = 'between'
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,269 @@
|
|||
@charset "UTF-8";
|
||||
@import "common/var";
|
||||
@import "mixins/button";
|
||||
@import "mixins/mixins";
|
||||
@import "mixins/utils";
|
||||
@import "icon.scss";
|
||||
|
||||
@include b(button) {
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
background: $--button-default-fill;
|
||||
border: $--border-base;
|
||||
border-color: $--button-default-border;
|
||||
color: $--button-default-color;
|
||||
-webkit-appearance: none;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
outline: none;
|
||||
margin: 0;
|
||||
transition: .1s;
|
||||
font-weight: $--button-font-weight;
|
||||
@include utils-user-select(none);
|
||||
& + & {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
@include button-size($--button-padding-vertical, $--button-padding-horizontal, $--button-font-size, $--button-border-radius);
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $--color-primary;
|
||||
border-color: $--color-primary-light-7;
|
||||
background-color: $--color-primary-light-9;
|
||||
}
|
||||
|
||||
&:active {
|
||||
color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
|
||||
border-color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&::-moz-focus-inner {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
& [class*="el-icon-"] {
|
||||
& + span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(plain) {
|
||||
&:hover,
|
||||
&:focus {
|
||||
background: $--color-white;
|
||||
border-color: $--color-primary;
|
||||
color: $--color-primary;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: $--color-white;
|
||||
border-color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
|
||||
color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(active) {
|
||||
color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
|
||||
border-color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
|
||||
}
|
||||
|
||||
@include when(disabled) {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $--button-disabled-color;
|
||||
cursor: not-allowed;
|
||||
background-image: none;
|
||||
background-color: $--button-disabled-fill;
|
||||
border-color: $--button-disabled-border;
|
||||
}
|
||||
|
||||
&.el-button--text {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&.is-plain {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $--color-white;
|
||||
border-color: $--button-disabled-border;
|
||||
color: $--button-disabled-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include when(loading) {
|
||||
position: relative;
|
||||
pointer-events: none;
|
||||
|
||||
&:before {
|
||||
pointer-events: none;
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: -1px;
|
||||
right: -1px;
|
||||
bottom: -1px;
|
||||
border-radius: inherit;
|
||||
background-color: rgba(255,255,255,.35);
|
||||
}
|
||||
}
|
||||
@include when(round) {
|
||||
border-radius: 20px;
|
||||
padding: 12px 23px;
|
||||
}
|
||||
@include when(circle) {
|
||||
border-radius: 50%;
|
||||
padding: $--button-padding-vertical;
|
||||
}
|
||||
@include m(primary) {
|
||||
@include button-variant($--button-primary-color, $--button-primary-fill, $--button-primary-border);
|
||||
}
|
||||
@include m(success) {
|
||||
@include button-variant($--button-success-color, $--button-success-fill, $--button-success-border);
|
||||
}
|
||||
@include m(warning) {
|
||||
@include button-variant($--button-warning-color, $--button-warning-fill, $--button-warning-border);
|
||||
}
|
||||
@include m(danger) {
|
||||
@include button-variant($--button-danger-color, $--button-danger-fill, $--button-danger-border);
|
||||
}
|
||||
@include m(info) {
|
||||
@include button-variant($--button-info-color, $--button-info-fill, $--button-info-border);
|
||||
}
|
||||
@include m(medium) {
|
||||
@include button-size($--button-medium-padding-vertical, $--button-medium-padding-horizontal, $--button-medium-font-size, $--button-medium-border-radius);
|
||||
@include when(circle) {
|
||||
padding: $--button-medium-padding-vertical;
|
||||
}
|
||||
}
|
||||
@include m(small) {
|
||||
@include button-size($--button-small-padding-vertical, $--button-small-padding-horizontal, $--button-small-font-size, $--button-small-border-radius);
|
||||
@include when(circle) {
|
||||
padding: $--button-small-padding-vertical;
|
||||
}
|
||||
}
|
||||
@include m(mini) {
|
||||
@include button-size($--button-mini-padding-vertical, $--button-mini-padding-horizontal, $--button-mini-font-size, $--button-mini-border-radius);
|
||||
@include when(circle) {
|
||||
padding: $--button-mini-padding-vertical;
|
||||
}
|
||||
}
|
||||
@include m(text) {
|
||||
border-color: transparent;
|
||||
color: $--color-primary;
|
||||
background: transparent;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: mix($--color-white, $--color-primary, $--button-hover-tint-percent);
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
&:active {
|
||||
color: mix($--color-black, $--color-primary, $--button-active-shade-percent);
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&.is-disabled,
|
||||
&.is-disabled:hover,
|
||||
&.is-disabled:focus {
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.first,.between{
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.last,.between{
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
@include b(button-group) {
|
||||
@include utils-clearfix;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
|
||||
& > .el-button {
|
||||
float: left;
|
||||
position: relative;
|
||||
& + .el-button {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
&:last-child {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
&:first-child:last-child {
|
||||
border-top-right-radius: $--button-border-radius;
|
||||
border-bottom-right-radius: $--button-border-radius;
|
||||
border-top-left-radius: $--button-border-radius;
|
||||
border-bottom-left-radius: $--button-border-radius;
|
||||
|
||||
&.is-round {
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
&.is-circle {
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
&:not(:first-child):not(:last-child) {
|
||||
border-radius: 0;
|
||||
}
|
||||
&:not(:last-child) {
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@include when(active) {
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
& > .el-dropdown {
|
||||
& > .el-button {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border-left-color: rgba($--color-white, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
@each $type in (primary, success, warning, danger, info) {
|
||||
.el-button--#{$type} {
|
||||
&:first-child {
|
||||
border-right-color: rgba($--color-white, 0.5);
|
||||
}
|
||||
&:last-child {
|
||||
border-left-color: rgba($--color-white, 0.5);
|
||||
}
|
||||
&:not(:first-child):not(:last-child) {
|
||||
border-left-color: rgba($--color-white, 0.5);
|
||||
border-right-color: rgba($--color-white, 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(alert) {
|
||||
width: 100%;
|
||||
padding: $--alert-padding;
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
border-radius: $--alert-border-radius;
|
||||
position: relative;
|
||||
background-color: $--color-white;
|
||||
overflow: hidden;
|
||||
opacity: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
transition: opacity .2s;
|
||||
|
||||
@include when(center) {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@include m(success) {
|
||||
background-color: $--alert-success-color;
|
||||
color: $--color-success;
|
||||
|
||||
.el-alert__description {
|
||||
color: $--color-success;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(info) {
|
||||
background-color: $--alert-info-color;
|
||||
color: $--color-info;
|
||||
|
||||
.el-alert__description {
|
||||
color: $--color-info;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(warning) {
|
||||
background-color: $--alert-warning-color;
|
||||
color: $--color-warning;
|
||||
|
||||
.el-alert__description {
|
||||
color: $--color-warning;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(error) {
|
||||
background-color: $--alert-danger-color;
|
||||
color: $--color-danger;
|
||||
|
||||
.el-alert__description {
|
||||
color: $--color-danger;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(content) {
|
||||
display: table-cell;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
@include e(icon) {
|
||||
font-size: $--alert-icon-size;
|
||||
width: $--alert-icon-size;
|
||||
@include when(big) {
|
||||
font-size: $--alert-icon-large-size;
|
||||
width: $--alert-icon-large-size;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(title) {
|
||||
font-size: $--alert-title-font-size;
|
||||
line-height: 18px;
|
||||
@include when(bold) {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
& .el-alert__description {
|
||||
font-size: $--alert-description-font-size;
|
||||
margin: 5px 0 0 0;
|
||||
}
|
||||
|
||||
@include e(closebtn) {
|
||||
font-size: $--alert-close-font-size;
|
||||
color: $--color-text-placeholder;
|
||||
opacity: 1;
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 15px;
|
||||
cursor: pointer;
|
||||
|
||||
@include when(customed) {
|
||||
font-style: normal;
|
||||
font-size: $--alert-close-customed-font-size;
|
||||
top: 9px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-alert-fade-enter,
|
||||
.el-alert-fade-leave-active {
|
||||
opacity: 0;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
@import "mixins/mixins";
|
||||
|
||||
@include b(aside) {
|
||||
overflow: auto;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
@import "mixins/mixins";
|
||||
@import "mixins/utils";
|
||||
@import "common/var";
|
||||
@import "./input.scss";
|
||||
@import "./scrollbar.scss";
|
||||
@import "./popper";
|
||||
|
||||
@include b(autocomplete) {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@include b(autocomplete-suggestion) {
|
||||
margin: 5px 0;
|
||||
box-shadow: $--box-shadow-light;
|
||||
border-radius: $--border-radius-base;
|
||||
|
||||
@include e(wrap) {
|
||||
max-height: 280px;
|
||||
padding: 10px 0;
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
background-color: $--color-white;
|
||||
border: 1px solid $--border-color-light;
|
||||
border-radius: $--border-radius-base;
|
||||
}
|
||||
|
||||
@include e(list) {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
& li {
|
||||
padding: 0 20px;
|
||||
margin: 0;
|
||||
line-height: 34px;
|
||||
cursor: pointer;
|
||||
color: $--color-text-regular;
|
||||
font-size: $--font-size-base;
|
||||
list-style: none;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
&:hover {
|
||||
background-color: $--select-option-hover-background;
|
||||
}
|
||||
|
||||
&.highlighted {
|
||||
background-color: $--select-option-hover-background;
|
||||
}
|
||||
|
||||
&.divider {
|
||||
margin-top: 6px;
|
||||
border-top: 1px solid $--color-black;
|
||||
}
|
||||
|
||||
&.divider:last-child {
|
||||
margin-bottom: -6px;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(loading) {
|
||||
li {
|
||||
text-align: center;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
font-size: 20px;
|
||||
color: #999;
|
||||
@include utils-vertical-center;
|
||||
|
||||
&:hover {
|
||||
background-color: $--color-white;
|
||||
}
|
||||
}
|
||||
|
||||
& .el-icon-loading {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(badge) {
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
|
||||
@include e(content) {
|
||||
background-color: $--badge-fill;
|
||||
border-radius: $--badge-radius;
|
||||
color: $--color-white;
|
||||
display: inline-block;
|
||||
font-size: $--badge-font-size;
|
||||
height: $--badge-size;
|
||||
line-height: $--badge-size;
|
||||
padding: 0 $--badge-padding;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
border: 1px solid $--color-white;
|
||||
|
||||
@include when(fixed) {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: #{1 + $--badge-size / 2};
|
||||
transform: translateY(-50%) translateX(100%);
|
||||
|
||||
@include when(dot) {
|
||||
right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(dot) {
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
padding: 0;
|
||||
right: 0;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
@each $type in (primary, success, warning, info, danger) {
|
||||
@include m($type) {
|
||||
@if $type == primary {
|
||||
background-color: $--color-primary;
|
||||
} @else if $type == success {
|
||||
background-color: $--color-success;
|
||||
} @else if $type == warning {
|
||||
background-color: $--color-warning;
|
||||
} @else if $type == info {
|
||||
background-color: $--color-info;
|
||||
} @else {
|
||||
background-color: $--color-danger;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
@import "common/transition.scss";
|
||||
@import "icon.scss";
|
|
@ -0,0 +1,55 @@
|
|||
@import "mixins/mixins";
|
||||
@import "mixins/utils";
|
||||
@import "common/var";
|
||||
|
||||
@include b(breadcrumb) {
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
@include utils-clearfix;
|
||||
|
||||
@include e(separator) {
|
||||
margin: 0 9px;
|
||||
font-weight: bold;
|
||||
color: $--color-text-placeholder;
|
||||
|
||||
&[class*=icon] {
|
||||
margin: 0 6px;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(item) {
|
||||
float: left;
|
||||
|
||||
@include e(inner) {
|
||||
color: $--color-text-regular;
|
||||
|
||||
&.is-link, & a {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
transition: $--color-transition-base;
|
||||
color: $--color-text-primary;
|
||||
|
||||
&:hover {
|
||||
color: $--color-primary;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
.el-breadcrumb__inner,
|
||||
.el-breadcrumb__inner a {
|
||||
&, &:hover {
|
||||
font-weight: normal;
|
||||
color: $--color-text-regular;
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
|
||||
.el-breadcrumb__separator {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(card) {
|
||||
border-radius: $--card-border-radius;
|
||||
border: 1px solid $--card-border-color;
|
||||
background-color: $--color-white;
|
||||
overflow: hidden;
|
||||
color: $--color-text-primary;
|
||||
transition: 0.3s;
|
||||
|
||||
@include when(always-shadow) {
|
||||
box-shadow: $--box-shadow-light;
|
||||
}
|
||||
|
||||
@include when(hover-shadow) {
|
||||
&:hover,
|
||||
&:focus {
|
||||
box-shadow: $--box-shadow-light;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(header) {
|
||||
padding: #{$--card-padding - 2 $--card-padding};
|
||||
border-bottom: 1px solid $--card-border-color;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@include e(body) {
|
||||
padding: $--card-padding;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(carousel) {
|
||||
@include e(item) {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
z-index: #{$--index-normal - 1};
|
||||
|
||||
@include when(active) {
|
||||
z-index: #{$--index-normal + 1};
|
||||
}
|
||||
|
||||
@include when(animating) {
|
||||
transition: transform .4s ease-in-out;
|
||||
}
|
||||
|
||||
@include m(card) {
|
||||
width: 50%;
|
||||
transition: transform .4s ease-in-out;
|
||||
&.is-in-stage {
|
||||
cursor: pointer;
|
||||
z-index: $--index-normal;
|
||||
&:hover .el-carousel__mask,
|
||||
&.is-hover .el-carousel__mask {
|
||||
opacity: 0.12;
|
||||
}
|
||||
}
|
||||
&.is-active {
|
||||
z-index: #{$--index-normal + 1};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(mask) {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: $--color-white;
|
||||
opacity: 0.24;
|
||||
transition: .2s;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(carousel) {
|
||||
overflow-x: hidden;
|
||||
position: relative;
|
||||
|
||||
@include e(container) {
|
||||
position: relative;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
@include e(arrow) {
|
||||
border: none;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: $--carousel-arrow-size;
|
||||
width: $--carousel-arrow-size;
|
||||
cursor: pointer;
|
||||
transition: .3s;
|
||||
border-radius: 50%;
|
||||
background-color: $--carousel-arrow-background;
|
||||
color: $--color-white;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
z-index: 10;
|
||||
transform: translateY(-50%);
|
||||
text-align: center;
|
||||
font-size: $--carousel-arrow-font-size;
|
||||
|
||||
@include m(left) {
|
||||
left: 16px;
|
||||
}
|
||||
|
||||
@include m(right) {
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $--carousel-arrow-hover-background;
|
||||
}
|
||||
|
||||
& i {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(indicators) {
|
||||
position: absolute;
|
||||
list-style: none;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
z-index: #{$--index-normal + 1};
|
||||
|
||||
@include m(outside) {
|
||||
bottom: #{$--carousel-indicator-height + $--carousel-indicator-padding-vertical * 2};
|
||||
text-align: center;
|
||||
position: static;
|
||||
transform: none;
|
||||
.el-carousel__indicator:hover button {
|
||||
opacity: 0.64;
|
||||
}
|
||||
button {
|
||||
background-color: $--carousel-indicator-out-color;
|
||||
opacity: 0.24;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(labels) {
|
||||
left: 0;
|
||||
right: 0;
|
||||
transform: none;
|
||||
text-align: center;
|
||||
|
||||
.el-carousel__button {
|
||||
height: auto;
|
||||
width: auto;
|
||||
padding: 2px 18px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.el-carousel__indicator {
|
||||
padding: 6px 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(indicator) {
|
||||
display: inline-block;
|
||||
background-color: transparent;
|
||||
padding: $--carousel-indicator-padding-vertical $--carousel-indicator-padding-horizontal;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover button {
|
||||
opacity: 0.72;
|
||||
}
|
||||
|
||||
@include when(active) {
|
||||
button {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(button) {
|
||||
display: block;
|
||||
opacity: 0.48;
|
||||
width: $--carousel-indicator-width;
|
||||
height: $--carousel-indicator-height;
|
||||
background-color: $--color-white;
|
||||
border: none;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
transition: .3s;
|
||||
}
|
||||
}
|
||||
|
||||
.carousel-arrow-left-enter,
|
||||
.carousel-arrow-left-leave-active {
|
||||
transform: translateY(-50%) translateX(-10px);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.carousel-arrow-right-enter,
|
||||
.carousel-arrow-right-leave-active {
|
||||
transform: translateY(-50%) translateX(10px);
|
||||
opacity: 0;
|
||||
}
|
|
@ -0,0 +1,180 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
@import "./input.scss";
|
||||
@import "./popper";
|
||||
|
||||
@include b(cascader) {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
font-size: $--font-size-base;
|
||||
line-height: $--input-height;
|
||||
|
||||
.el-input,
|
||||
.el-input__inner {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.el-input.is-focus .el-input__inner {
|
||||
border-color: $--input-focus-border;
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.el-icon-arrow-down {
|
||||
transition: transform .3s;
|
||||
font-size: 14px;
|
||||
|
||||
@include when(reverse) {
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.el-icon-circle-close {
|
||||
z-index: #{$--index-normal + 1};
|
||||
transition: $--color-transition-base;
|
||||
|
||||
&:hover {
|
||||
color: $--color-text-secondary;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(clearIcon) {
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@include e(label) {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
padding: 0 25px 0 15px;
|
||||
color: $--input-color;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
font-size: inherit;
|
||||
|
||||
span {
|
||||
color: $--color-black;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(medium) {
|
||||
font-size: $--input-medium-font-size;
|
||||
line-height: #{$--input-medium-height};
|
||||
}
|
||||
|
||||
@include m(small) {
|
||||
font-size: $--input-small-font-size;
|
||||
line-height: #{$--input-small-height};
|
||||
}
|
||||
|
||||
@include m(mini) {
|
||||
font-size: $--input-mini-font-size;
|
||||
line-height: #{$--input-mini-height};
|
||||
}
|
||||
|
||||
@include when(disabled) {
|
||||
.el-cascader__label {
|
||||
z-index: #{$--index-normal + 1};
|
||||
color: $--disabled-color-base;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(cascader-menus) {
|
||||
white-space: nowrap;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
margin: 5px 0;
|
||||
z-index: #{$--index-normal + 1};
|
||||
border: $--select-dropdown-border;
|
||||
border-radius: $--border-radius-small;
|
||||
box-shadow: $--select-dropdown-shadow;
|
||||
}
|
||||
|
||||
@include b(cascader-menu) {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
height: 204px;
|
||||
overflow: auto;
|
||||
border-right: $--select-dropdown-border;
|
||||
background-color: $--select-dropdown-background;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 6px 0;
|
||||
min-width: 160px;
|
||||
|
||||
&:last-child {
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
@include e(item) {
|
||||
font-size: $--select-font-size;
|
||||
padding: 8px 20px;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: $--select-option-color;
|
||||
height: $--select-option-height;
|
||||
line-height: 1.5;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
@include m(extensible) {
|
||||
&:after {
|
||||
font-family: 'element-icons';
|
||||
content: "\e604";
|
||||
font-size: 14px;
|
||||
color: rgb(191, 203, 217);
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(disabled) {
|
||||
color: $--select-option-disabled-color;
|
||||
background-color: $--select-option-disabled-background;
|
||||
cursor: not-allowed;
|
||||
|
||||
&:hover {
|
||||
background-color: $--color-white;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(active) {
|
||||
color: $--select-option-selected;
|
||||
}
|
||||
|
||||
&:hover, &:focus:not(:active) {
|
||||
background-color: $--select-option-hover-background;
|
||||
}
|
||||
|
||||
&.selected {
|
||||
color: $--color-white;
|
||||
background-color: $--select-option-selected-hover;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(item__keyword) {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@include m(flexible) {
|
||||
height: auto;
|
||||
max-height: 180px;
|
||||
overflow: auto;
|
||||
|
||||
.el-cascader-menu__item {
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,358 @@
|
|||
@import "common/var";
|
||||
@import "mixins/mixins";
|
||||
@import "mixins/_button";
|
||||
@import "mixins/utils";
|
||||
|
||||
@include b(checkbox) {
|
||||
color: $--checkbox-color;
|
||||
font-weight: $--checkbox-font-weight;
|
||||
font-size: $--font-size-base;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
user-select: none;
|
||||
|
||||
@include when(bordered) {
|
||||
padding: $--checkbox-bordered-padding;
|
||||
border-radius: $--border-radius-base;
|
||||
border: $--border-base;
|
||||
box-sizing: border-box;
|
||||
line-height: normal;
|
||||
height: $--checkbox-bordered-height;
|
||||
|
||||
&.is-checked {
|
||||
border-color: $--color-primary;
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
border-color: $--border-color-lighter;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
& + .el-checkbox.is-bordered {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
&.el-checkbox--medium {
|
||||
padding: $--checkbox-bordered-medium-padding;
|
||||
border-radius: $--button-medium-border-radius;
|
||||
height: $--checkbox-bordered-medium-height;
|
||||
|
||||
.el-checkbox__label {
|
||||
line-height: 17px;
|
||||
font-size: $--button-medium-font-size;
|
||||
}
|
||||
|
||||
.el-checkbox__inner {
|
||||
height: $--checkbox-bordered-medium-input-height;
|
||||
width: $--checkbox-bordered-medium-input-width;
|
||||
}
|
||||
}
|
||||
|
||||
&.el-checkbox--small {
|
||||
padding: $--checkbox-bordered-small-padding;
|
||||
border-radius: $--button-small-border-radius;
|
||||
height: $--checkbox-bordered-small-height;
|
||||
|
||||
.el-checkbox__label {
|
||||
line-height: 15px;
|
||||
font-size: $--button-small-font-size;
|
||||
}
|
||||
|
||||
.el-checkbox__inner {
|
||||
height: $--checkbox-bordered-small-input-height;
|
||||
width: $--checkbox-bordered-small-input-width;
|
||||
|
||||
&::after {
|
||||
height: 6px;
|
||||
width: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.el-checkbox--mini {
|
||||
padding: $--checkbox-bordered-mini-padding;
|
||||
border-radius: $--button-mini-border-radius;
|
||||
height: $--checkbox-bordered-mini-height;
|
||||
|
||||
.el-checkbox__label {
|
||||
line-height: 12px;
|
||||
font-size: $--button-mini-font-size;
|
||||
}
|
||||
|
||||
.el-checkbox__inner {
|
||||
height: $--checkbox-bordered-mini-input-height;
|
||||
width: $--checkbox-bordered-mini-input-width;
|
||||
&::after {
|
||||
height: 6px;
|
||||
width: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(input) {
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
|
||||
@include when(disabled) {
|
||||
.el-checkbox__inner {
|
||||
background-color: $--checkbox-disabled-input-fill;
|
||||
border-color: $--checkbox-disabled-input-border-color;
|
||||
cursor: not-allowed;
|
||||
|
||||
&::after {
|
||||
cursor: not-allowed;
|
||||
border-color: $--checkbox-disabled-icon-color;
|
||||
}
|
||||
|
||||
& + .el-checkbox__label {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-checked {
|
||||
.el-checkbox__inner {
|
||||
background-color: $--checkbox-disabled-checked-input-fill;
|
||||
border-color: $--checkbox-disabled-checked-input-border-color;
|
||||
|
||||
&::after {
|
||||
border-color: $--checkbox-disabled-checked-icon-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.is-indeterminate {
|
||||
.el-checkbox__inner {
|
||||
background-color: $--checkbox-disabled-checked-input-fill;
|
||||
border-color: $--checkbox-disabled-checked-input-border-color;
|
||||
|
||||
&::before {
|
||||
background-color: $--checkbox-disabled-checked-icon-color;
|
||||
border-color: $--checkbox-disabled-checked-icon-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& + span.el-checkbox__label {
|
||||
color: $--disabled-color-base;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(checked) {
|
||||
.el-checkbox__inner {
|
||||
background-color: $--checkbox-checked-input-fill;
|
||||
border-color: $--checkbox-checked-input-border-color;
|
||||
|
||||
&::after {
|
||||
transform: rotate(45deg) scaleY(1);
|
||||
}
|
||||
}
|
||||
|
||||
& + .el-checkbox__label {
|
||||
color: $--checkbox-checked-text-color;
|
||||
}
|
||||
}
|
||||
@include when(focus) { /*focus时 视觉上区分*/
|
||||
.el-checkbox__inner {
|
||||
border-color: $--checkbox-input-border-color-hover;
|
||||
}
|
||||
}
|
||||
@include when(indeterminate) {
|
||||
.el-checkbox__inner {
|
||||
background-color: $--checkbox-checked-input-fill;
|
||||
border-color: $--checkbox-checked-input-border-color;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
display: block;
|
||||
background-color: $--checkbox-checked-icon-color;
|
||||
height: 2px;
|
||||
transform: scale(0.5);
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@include e(inner) {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
border: $--checkbox-input-border;
|
||||
border-radius: $--checkbox-input-border-radius;
|
||||
box-sizing: border-box;
|
||||
width: $--checkbox-input-width;
|
||||
height: $--checkbox-input-height;
|
||||
background-color: $--checkbox-input-fill;
|
||||
z-index: $--index-normal;
|
||||
transition: border-color .25s cubic-bezier(.71,-.46,.29,1.46),
|
||||
background-color .25s cubic-bezier(.71,-.46,.29,1.46);
|
||||
|
||||
&:hover {
|
||||
border-color: $--checkbox-input-border-color-hover;
|
||||
}
|
||||
|
||||
&::after {
|
||||
box-sizing: content-box;
|
||||
content: "";
|
||||
border: 1px solid $--checkbox-checked-icon-color;
|
||||
border-left: 0;
|
||||
border-top: 0;
|
||||
height: 7px;
|
||||
left: 4px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
transform: rotate(45deg) scaleY(0);
|
||||
width: 3px;
|
||||
transition: transform .15s ease-in .05s;
|
||||
transform-origin: center;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(original) {
|
||||
opacity: 0;
|
||||
outline: none;
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
@include e(label) {
|
||||
display: inline-block;
|
||||
padding-left: 10px;
|
||||
line-height: 19px;
|
||||
font-size: $--checkbox-font-size;
|
||||
}
|
||||
|
||||
& + .el-checkbox {
|
||||
margin-left: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@include b(checkbox-button) {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
@include e(inner) {
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
font-weight: $--checkbox-font-weight;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
background: $--button-default-fill;
|
||||
border: $--border-base;
|
||||
border-left: 0;
|
||||
color: $--button-default-color;
|
||||
-webkit-appearance: none;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
outline: none;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
transition: $--all-transition;
|
||||
@include utils-user-select(none);
|
||||
|
||||
@include button-size($--button-padding-vertical, $--button-padding-horizontal, $--button-font-size, 0);
|
||||
|
||||
&:hover {
|
||||
color: $--color-primary;
|
||||
}
|
||||
|
||||
& [class*="el-icon-"] {
|
||||
line-height: 0.9;
|
||||
|
||||
& + span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(original) {
|
||||
opacity: 0;
|
||||
outline: none;
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
&.is-checked {
|
||||
& .el-checkbox-button__inner {
|
||||
color: $--checkbox-button-checked-color;
|
||||
background-color: $--checkbox-button-checked-fill;
|
||||
border-color: $--checkbox-button-checked-border-color;
|
||||
box-shadow: -1px 0 0 0 $--color-primary-light-4;
|
||||
}
|
||||
&:first-child .el-checkbox-button__inner {
|
||||
border-left-color: $--checkbox-button-checked-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
& .el-checkbox-button__inner {
|
||||
color: $--button-disabled-color;
|
||||
cursor: not-allowed;
|
||||
background-image: none;
|
||||
background-color: $--button-disabled-fill;
|
||||
border-color: $--button-disabled-border;
|
||||
box-shadow: none;
|
||||
}
|
||||
&:first-child .el-checkbox-button__inner {
|
||||
border-left-color: $--button-disabled-border;
|
||||
}
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
.el-checkbox-button__inner {
|
||||
border-left: $--border-base;
|
||||
border-radius: $--border-radius-base 0 0 $--border-radius-base;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-focus {
|
||||
& .el-checkbox-button__inner {
|
||||
border-color: $--checkbox-button-checked-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
.el-checkbox-button__inner {
|
||||
border-radius: 0 $--border-radius-base $--border-radius-base 0;
|
||||
}
|
||||
}
|
||||
@include m(medium) {
|
||||
.el-checkbox-button__inner {
|
||||
@include button-size($--button-medium-padding-vertical, $--button-medium-padding-horizontal, $--button-medium-font-size, 0);
|
||||
}
|
||||
}
|
||||
@include m(small) {
|
||||
.el-checkbox-button__inner {
|
||||
@include button-size($--button-small-padding-vertical, $--button-small-padding-horizontal, $--button-small-font-size, 0);
|
||||
}
|
||||
}
|
||||
@include m(mini) {
|
||||
.el-checkbox-button__inner {
|
||||
@include button-size($--button-mini-padding-vertical, $--button-mini-padding-horizontal, $--button-mini-font-size, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(checkbox-group) {
|
||||
font-size: 0;
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
@import "./common/var.scss";
|
||||
@import "./mixins/mixins.scss";
|
||||
|
||||
[class*="el-col-"] {
|
||||
float: left;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.el-col-0 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@for $i from 0 through 24 {
|
||||
.el-col-#{$i} {
|
||||
width: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-offset-#{$i} {
|
||||
margin-left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-pull-#{$i} {
|
||||
position: relative;
|
||||
right: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-push-#{$i} {
|
||||
position: relative;
|
||||
left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
}
|
||||
|
||||
@include res(xs) {
|
||||
.el-col-xs-0 {
|
||||
display: none;
|
||||
}
|
||||
@for $i from 0 through 24 {
|
||||
.el-col-xs-#{$i} {
|
||||
width: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-xs-offset-#{$i} {
|
||||
margin-left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-xs-pull-#{$i} {
|
||||
position: relative;
|
||||
right: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-xs-push-#{$i} {
|
||||
position: relative;
|
||||
left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include res(sm) {
|
||||
.el-col-sm-0 {
|
||||
display: none;
|
||||
}
|
||||
@for $i from 0 through 24 {
|
||||
.el-col-sm-#{$i} {
|
||||
width: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-sm-offset-#{$i} {
|
||||
margin-left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-sm-pull-#{$i} {
|
||||
position: relative;
|
||||
right: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-sm-push-#{$i} {
|
||||
position: relative;
|
||||
left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include res(md) {
|
||||
.el-col-md-0 {
|
||||
display: none;
|
||||
}
|
||||
@for $i from 0 through 24 {
|
||||
.el-col-md-#{$i} {
|
||||
width: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-md-offset-#{$i} {
|
||||
margin-left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-md-pull-#{$i} {
|
||||
position: relative;
|
||||
right: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-md-push-#{$i} {
|
||||
position: relative;
|
||||
left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include res(lg) {
|
||||
.el-col-lg-0 {
|
||||
display: none;
|
||||
}
|
||||
@for $i from 0 through 24 {
|
||||
.el-col-lg-#{$i} {
|
||||
width: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-lg-offset-#{$i} {
|
||||
margin-left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-lg-pull-#{$i} {
|
||||
position: relative;
|
||||
right: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-lg-push-#{$i} {
|
||||
position: relative;
|
||||
left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include res(xl) {
|
||||
.el-col-xl-0 {
|
||||
display: none;
|
||||
}
|
||||
@for $i from 0 through 24 {
|
||||
.el-col-xl-#{$i} {
|
||||
width: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-xl-offset-#{$i} {
|
||||
margin-left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-xl-pull-#{$i} {
|
||||
position: relative;
|
||||
right: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
|
||||
.el-col-xl-push-#{$i} {
|
||||
position: relative;
|
||||
left: (1 / 24 * $i * 100) * 1%;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
@import "common/transition";
|
||||
|
||||
@include b(collapse) {
|
||||
border-top: 1px solid $--collapse-border-color;
|
||||
border-bottom: 1px solid $--collapse-border-color;
|
||||
}
|
||||
@include b(collapse-item) {
|
||||
@include e(header) {
|
||||
height: $--collapse-header-height;
|
||||
line-height: $--collapse-header-height;
|
||||
background-color: $--collapse-header-fill;
|
||||
color: $--collapse-header-color;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid $--collapse-border-color;
|
||||
font-size: $--collapse-header-size;
|
||||
font-weight: 500;
|
||||
transition: border-bottom-color .3s;
|
||||
outline: none;
|
||||
@include e(arrow) {
|
||||
margin-right: 8px;
|
||||
transition: transform .3s;
|
||||
float: right;
|
||||
line-height: 48px;
|
||||
font-weight: 300;
|
||||
@include when(active) {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
&.focusing:focus:not(:hover){
|
||||
color: $--color-primary;
|
||||
}
|
||||
@include when(active) {
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(wrap) {
|
||||
will-change: height;
|
||||
background-color: $--collapse-content-fill;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid $--collapse-border-color;
|
||||
}
|
||||
|
||||
@include e(content) {
|
||||
padding-bottom: 25px;
|
||||
font-size: $--collapse-content-size;
|
||||
color: $--collapse-content-color;
|
||||
line-height: 1.769230769230769;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,384 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(color-predefine) {
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
margin-top: 8px;
|
||||
width: 280px;
|
||||
|
||||
@include e(colors) {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@include e(color-selector) {
|
||||
margin: 0 0 8px 8px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
|
||||
&:nth-child(10n + 1) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&.selected {
|
||||
box-shadow: 0 0 3px 2px $--color-primary;
|
||||
}
|
||||
|
||||
> div {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
@include when(alpha) {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(color-hue-slider) {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
width: 280px;
|
||||
height: 12px;
|
||||
background-color: #f00;
|
||||
padding: 0 2px;
|
||||
|
||||
@include e(bar) {
|
||||
position: relative;
|
||||
background: linear-gradient(
|
||||
to right, #f00 0%,
|
||||
#ff0 17%, #0f0 33%,
|
||||
#0ff 50%, #00f 67%,
|
||||
#f0f 83%, #f00 100%);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@include e(thumb) {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 4px;
|
||||
height: 100%;
|
||||
border-radius: 1px;
|
||||
background: #fff;
|
||||
border: 1px solid #f0f0f0;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@include when(vertical) {
|
||||
width: 12px;
|
||||
height: 180px;
|
||||
padding: 2px 0;
|
||||
|
||||
.el-color-hue-slider__bar {
|
||||
background: linear-gradient(
|
||||
to bottom, #f00 0%,
|
||||
#ff0 17%, #0f0 33%,
|
||||
#0ff 50%, #00f 67%,
|
||||
#f0f 83%, #f00 100%);
|
||||
}
|
||||
|
||||
.el-color-hue-slider__thumb {
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(color-svpanel) {
|
||||
position: relative;
|
||||
width: 280px;
|
||||
height: 180px;
|
||||
|
||||
@include e(('white', 'black')) {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
@include e('white') {
|
||||
background: linear-gradient(to right, #fff, rgba(255,255,255,0));
|
||||
}
|
||||
|
||||
@include e('black') {
|
||||
background: linear-gradient(to top, #000, rgba(0,0,0,0));
|
||||
}
|
||||
|
||||
@include e(cursor) {
|
||||
position: absolute;
|
||||
|
||||
> div {
|
||||
cursor: head;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,0.3), 0 0 1px 2px rgba(0,0,0,0.4);
|
||||
border-radius: 50%;
|
||||
transform: translate(-2px, -2px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(color-alpha-slider) {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
width: 280px;
|
||||
height: 12px;
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
|
||||
|
||||
@include e(bar) {
|
||||
position: relative;
|
||||
background: linear-gradient(
|
||||
to right, rgba(255, 255, 255, 0) 0%,
|
||||
rgba(255, 255, 255, 1) 100%);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@include e(thumb) {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 4px;
|
||||
height: 100%;
|
||||
border-radius: 1px;
|
||||
background: #fff;
|
||||
border: 1px solid #f0f0f0;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@include when(vertical) {
|
||||
width: 20px;
|
||||
height: 180px;
|
||||
|
||||
.el-color-alpha-slider__bar {
|
||||
background: linear-gradient(
|
||||
to bottom, rgba(255, 255, 255, 0) 0%,
|
||||
rgba(255, 255, 255, 1) 100%);
|
||||
}
|
||||
|
||||
.el-color-alpha-slider__thumb {
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(color-dropdown) {
|
||||
width: 300px;
|
||||
|
||||
@include e(main-wrapper) {
|
||||
margin-bottom: 6px;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(btns) {
|
||||
margin-top: 6px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@include e(value) {
|
||||
float: left;
|
||||
line-height: 26px;
|
||||
font-size: 12px;
|
||||
color: $--color-black;
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
@include e(btn) {
|
||||
border: 1px solid #dcdcdc;
|
||||
color: #333;
|
||||
line-height: 24px;
|
||||
border-radius: 2px;
|
||||
padding: 0 20px;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
outline: none;
|
||||
font-size: 12px;
|
||||
|
||||
&[disabled] {
|
||||
color: #cccccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
&:hover {
|
||||
color: $--color-primary;
|
||||
border-color: $--color-primary;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(link-btn) {
|
||||
cursor: pointer;
|
||||
color: $--color-primary;
|
||||
text-decoration: none;
|
||||
padding: 15px;
|
||||
font-size: 12px;
|
||||
&:hover {
|
||||
color: tint($--color-primary, $--button-hover-tint-percent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(color-picker) {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
line-height: normal;
|
||||
height: 40px;
|
||||
|
||||
@include when(disabled) {
|
||||
.el-color-picker__trigger {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(medium) {
|
||||
height: 36px;
|
||||
|
||||
.el-color-picker__trigger {
|
||||
height: 36px;
|
||||
width: 36px;
|
||||
}
|
||||
|
||||
.el-color-picker__mask {
|
||||
height: 34px;
|
||||
width: 34px;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(small) {
|
||||
height: 32px;
|
||||
|
||||
.el-color-picker__trigger {
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
}
|
||||
|
||||
.el-color-picker__mask {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.el-color-picker__icon,
|
||||
.el-color-picker__empty {
|
||||
transform: translate3d(-50%, -50%, 0) scale(0.8);
|
||||
}
|
||||
}
|
||||
|
||||
@include m(mini) {
|
||||
height: 28px;
|
||||
|
||||
.el-color-picker__trigger {
|
||||
height: 28px;
|
||||
width: 28px;
|
||||
}
|
||||
|
||||
.el-color-picker__mask {
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
}
|
||||
|
||||
.el-color-picker__icon,
|
||||
.el-color-picker__empty {
|
||||
transform: translate3d(-50%, -50%, 0) scale(0.8);
|
||||
}
|
||||
}
|
||||
|
||||
@include e(mask) {
|
||||
height: 38px;
|
||||
width: 38px;
|
||||
border-radius: 4px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
z-index: 1;
|
||||
cursor: not-allowed;
|
||||
background-color: rgba(255, 255, 255, .7);
|
||||
}
|
||||
|
||||
@include e(trigger) {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
padding: 4px;
|
||||
border: 1px solid #e6e6e6;
|
||||
border-radius: 4px;
|
||||
font-size: 0;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@include e(color) {
|
||||
position: relative;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #999;
|
||||
border-radius: $--border-radius-small;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
|
||||
@include when(alpha) {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
|
||||
}
|
||||
}
|
||||
|
||||
@include e(color-inner) {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
@include e(empty) {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, -50%, 0);
|
||||
}
|
||||
|
||||
@include e(icon) {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate3d(-50%, -50%, 0);
|
||||
color: $--color-white;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@include e(panel) {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
padding: 6px;
|
||||
box-sizing: content-box;
|
||||
background-color: $--color-white;
|
||||
border: 1px solid $--border-color-lighter;
|
||||
border-radius: $--border-radius-base;
|
||||
box-shadow: $--dropdown-menu-box-shadow;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
@import "../mixins/mixins";
|
||||
|
||||
.v-modal-enter {
|
||||
animation: v-modal-in .2s ease;
|
||||
}
|
||||
|
||||
.v-modal-leave {
|
||||
animation: v-modal-out .2s ease forwards;
|
||||
}
|
||||
|
||||
@keyframes v-modal-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes v-modal-out {
|
||||
0% {
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.v-modal {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0.5;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
@include b(popup-parent) {
|
||||
@include m(hidden) {
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
@import "var";
|
||||
|
||||
.fade-in-linear-enter-active,
|
||||
.fade-in-linear-leave-active {
|
||||
transition: $--fade-linear-transition;
|
||||
}
|
||||
.fade-in-linear-enter,
|
||||
.fade-in-linear-leave,
|
||||
.fade-in-linear-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.el-fade-in-linear-enter-active,
|
||||
.el-fade-in-linear-leave-active {
|
||||
transition: $--fade-linear-transition;
|
||||
}
|
||||
.el-fade-in-linear-enter,
|
||||
.el-fade-in-linear-leave,
|
||||
.el-fade-in-linear-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.el-fade-in-enter-active,
|
||||
.el-fade-in-leave-active {
|
||||
transition: all .3s cubic-bezier(.55,0,.1,1);
|
||||
}
|
||||
.el-fade-in-enter,
|
||||
.el-fade-in-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.el-zoom-in-center-enter-active,
|
||||
.el-zoom-in-center-leave-active {
|
||||
transition: all .3s cubic-bezier(.55,0,.1,1);
|
||||
}
|
||||
.el-zoom-in-center-enter,
|
||||
.el-zoom-in-center-leave-active {
|
||||
opacity: 0;
|
||||
transform: scaleX(0);
|
||||
}
|
||||
|
||||
.el-zoom-in-top-enter-active,
|
||||
.el-zoom-in-top-leave-active {
|
||||
opacity: 1;
|
||||
transform: scaleY(1);
|
||||
transition: $--md-fade-transition;
|
||||
transform-origin: center top;
|
||||
}
|
||||
.el-zoom-in-top-enter,
|
||||
.el-zoom-in-top-leave-active {
|
||||
opacity: 0;
|
||||
transform: scaleY(0);
|
||||
}
|
||||
|
||||
.el-zoom-in-bottom-enter-active,
|
||||
.el-zoom-in-bottom-leave-active {
|
||||
opacity: 1;
|
||||
transform: scaleY(1);
|
||||
transition: $--md-fade-transition;
|
||||
transform-origin: center bottom;
|
||||
}
|
||||
.el-zoom-in-bottom-enter,
|
||||
.el-zoom-in-bottom-leave-active {
|
||||
opacity: 0;
|
||||
transform: scaleY(0);
|
||||
}
|
||||
|
||||
.el-zoom-in-left-enter-active,
|
||||
.el-zoom-in-left-leave-active {
|
||||
opacity: 1;
|
||||
transform: scale(1, 1);
|
||||
transition: $--md-fade-transition;
|
||||
transform-origin: top left;
|
||||
}
|
||||
.el-zoom-in-left-enter,
|
||||
.el-zoom-in-left-leave-active {
|
||||
opacity: 0;
|
||||
transform: scale(.45, .45);
|
||||
}
|
||||
|
||||
.collapse-transition {
|
||||
transition: 0.3s height ease-in-out, 0.3s padding-top ease-in-out, 0.3s padding-bottom ease-in-out;
|
||||
}
|
||||
.horizontal-collapse-transition {
|
||||
transition: 0.3s width ease-in-out, 0.3s padding-left ease-in-out, 0.3s padding-right ease-in-out;
|
||||
}
|
||||
|
||||
.el-list-enter-active,
|
||||
.el-list-leave-active {
|
||||
transition: all 1s;
|
||||
}
|
||||
.el-list-enter, .el-list-leave-active {
|
||||
opacity: 0;
|
||||
transform: translateY(-30px);
|
||||
}
|
||||
|
||||
.el-opacity-transition {
|
||||
transition: opacity .3s cubic-bezier(.55,0,.1,1);
|
||||
}
|
|
@ -0,0 +1,713 @@
|
|||
/* Element Chalk Variables */
|
||||
|
||||
/* Transition
|
||||
-------------------------- */
|
||||
$--all-transition: all .3s cubic-bezier(.645,.045,.355,1) !default;
|
||||
$--fade-transition: opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) !default;
|
||||
$--fade-linear-transition: opacity 200ms linear !default;
|
||||
$--md-fade-transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), opacity 300ms cubic-bezier(0.23, 1, 0.32, 1) !default;
|
||||
$--border-transition-base: border-color .2s cubic-bezier(.645,.045,.355,1) !default;
|
||||
$--color-transition-base: color .2s cubic-bezier(.645,.045,.355,1) !default;
|
||||
|
||||
/* Colors
|
||||
-------------------------- */
|
||||
$--color-white: #fff !default;
|
||||
$--color-black: #000 !default;
|
||||
|
||||
$--color-primary: #409EFF !default;
|
||||
$--color-primary-light-1: mix($--color-white, $--color-primary, 10%) !default; /* 53a8ff */
|
||||
$--color-primary-light-2: mix($--color-white, $--color-primary, 20%) !default; /* 66b1ff */
|
||||
$--color-primary-light-3: mix($--color-white, $--color-primary, 30%) !default; /* 79bbff */
|
||||
$--color-primary-light-4: mix($--color-white, $--color-primary, 40%) !default; /* 8cc5ff */
|
||||
$--color-primary-light-5: mix($--color-white, $--color-primary, 50%) !default; /* a0cfff */
|
||||
$--color-primary-light-6: mix($--color-white, $--color-primary, 60%) !default; /* b3d8ff */
|
||||
$--color-primary-light-7: mix($--color-white, $--color-primary, 70%) !default; /* c6e2ff */
|
||||
$--color-primary-light-8: mix($--color-white, $--color-primary, 80%) !default; /* d9ecff */
|
||||
$--color-primary-light-9: mix($--color-white, $--color-primary, 90%) !default; /* ecf5ff */
|
||||
|
||||
$--color-success: #67c23a !default;
|
||||
$--color-warning: #e6a23c !default;
|
||||
$--color-danger: #f56c6c !default;
|
||||
$--color-info: #909399 !default;
|
||||
|
||||
$--color-success-light: mix($--color-white, $--color-success, 80%) !default;
|
||||
$--color-warning-light: mix($--color-white, $--color-warning, 80%) !default;
|
||||
$--color-danger-light: mix($--color-white, $--color-danger, 80%) !default;
|
||||
$--color-info-light: mix($--color-white, $--color-info, 80%) !default;
|
||||
|
||||
$--color-success-lighter: mix($--color-white, $--color-success, 90%) !default;
|
||||
$--color-warning-lighter: mix($--color-white, $--color-warning, 90%) !default;
|
||||
$--color-danger-lighter: mix($--color-white, $--color-danger, 90%) !default;
|
||||
$--color-info-lighter: mix($--color-white, $--color-info, 90%) !default;
|
||||
|
||||
$--color-text-primary: #303133 !default;
|
||||
$--color-text-regular: #606266 !default;
|
||||
$--color-text-secondary: #909399 !default;
|
||||
$--color-text-placeholder: #c0c4cc !default;
|
||||
|
||||
/* Link
|
||||
-------------------------- */
|
||||
$--link-color: $--color-primary-light-2 !default;
|
||||
$--link-hover-color: $--color-primary !default;
|
||||
|
||||
/* Background
|
||||
-------------------------- */
|
||||
$--background-color-base: #f5f7fa !default;
|
||||
|
||||
/* Border
|
||||
-------------------------- */
|
||||
$--border-width-base: 1px !default;
|
||||
$--border-style-base: solid !default;
|
||||
$--border-color-base: #dcdfe6 !default;
|
||||
$--border-color-light: #e4e7ed !default;
|
||||
$--border-color-lighter: #ebeef5 !default;
|
||||
$--border-color-extra-light: #f2f6fc !default;
|
||||
$--border-color-hover: $--color-text-placeholder !default;
|
||||
$--border-base: $--border-width-base $--border-style-base $--border-color-base !default;
|
||||
$--border-radius-base: 4px !default;
|
||||
$--border-radius-small: 2px !default;
|
||||
$--border-radius-circle: 100% !default;
|
||||
|
||||
/* Box-shadow
|
||||
-------------------------- */
|
||||
$--box-shadow-base: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04) !default;
|
||||
$--box-shadow-dark: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .12) !default;
|
||||
$--box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1) !default;
|
||||
|
||||
/* Fill
|
||||
-------------------------- */
|
||||
$--fill-base: $--color-white !default;
|
||||
|
||||
/* Font
|
||||
-------------------------- */
|
||||
$--font-path: 'fonts' !default;
|
||||
$--font-size-base: 14px !default;
|
||||
$--font-size-small: 13px !default;
|
||||
$--font-size-large: 18px !default;
|
||||
$--font-color-disabled-base: #bbb !default;
|
||||
$--font-weight-primary: 500 !default;
|
||||
$--font-line-height-primary: 24px !default;
|
||||
|
||||
/* Size
|
||||
-------------------------- */
|
||||
$--size-base: 14px !default;
|
||||
|
||||
/* z-index
|
||||
-------------------------- */
|
||||
$--index-normal: 1 !default;
|
||||
$--index-top: 1000 !default;
|
||||
$--index-popper: 2000 !default;
|
||||
|
||||
/* Disable base
|
||||
-------------------------- */
|
||||
$--disabled-fill-base: $--background-color-base !default;
|
||||
$--disabled-color-base: $--color-text-placeholder !default;
|
||||
$--disabled-border-base: $--border-color-light !default;
|
||||
|
||||
/* Icon
|
||||
-------------------------- */
|
||||
$--icon-color: #666 !default;
|
||||
$--icon-color-base: $--color-info !default;
|
||||
|
||||
/* Checkbox
|
||||
-------------------------- */
|
||||
$--checkbox-font-size: 14px !default;
|
||||
$--checkbox-font-weight: $--font-weight-primary !default;
|
||||
$--checkbox-color: $--color-text-regular !default;
|
||||
$--checkbox-input-height: 14px !default;
|
||||
$--checkbox-input-width: 14px !default;
|
||||
$--checkbox-input-border-radius: $--border-radius-small !default;
|
||||
$--checkbox-input-fill: $--color-white !default;
|
||||
$--checkbox-input-border: $--border-base !default;
|
||||
$--checkbox-input-border-color: $--border-color-base !default;
|
||||
$--checkbox-icon-color: $--color-white !default;
|
||||
|
||||
$--checkbox-disabled-input-border-color: $--border-color-base !default;
|
||||
$--checkbox-disabled-input-fill: #edf2fc !default;
|
||||
$--checkbox-disabled-icon-color: $--color-text-placeholder !default;
|
||||
|
||||
$--checkbox-disabled-checked-input-fill: $--border-color-extra-light !default;
|
||||
$--checkbox-disabled-checked-input-border-color: $--border-color-base !default;
|
||||
$--checkbox-disabled-checked-icon-color: $--color-text-placeholder !default;
|
||||
|
||||
$--checkbox-checked-text-color: $--color-primary !default;
|
||||
$--checkbox-checked-input-border-color: $--color-primary !default;
|
||||
$--checkbox-checked-input-fill: $--color-primary !default;
|
||||
$--checkbox-checked-icon-color: $--fill-base !default;
|
||||
|
||||
$--checkbox-input-border-color-hover: $--color-primary !default;
|
||||
|
||||
$--checkbox-bordered-height: 40px !default;
|
||||
$--checkbox-bordered-padding: 9px 20px 9px 10px !default;
|
||||
$--checkbox-bordered-medium-padding: 7px 20px 7px 10px !default;
|
||||
$--checkbox-bordered-small-padding: 5px 15px 5px 10px !default;
|
||||
$--checkbox-bordered-mini-padding: 3px 15px 3px 10px !default;
|
||||
$--checkbox-bordered-medium-input-height: 14px !default;
|
||||
$--checkbox-bordered-medium-input-width: 14px !default;
|
||||
$--checkbox-bordered-medium-height: 36px !default;
|
||||
$--checkbox-bordered-small-input-height: 12px !default;
|
||||
$--checkbox-bordered-small-input-width: 12px !default;
|
||||
$--checkbox-bordered-small-height: 32px !default;
|
||||
$--checkbox-bordered-mini-input-height: 12px !default;
|
||||
$--checkbox-bordered-mini-input-width: 12px !default;
|
||||
$--checkbox-bordered-mini-height: 28px !default;
|
||||
|
||||
$--checkbox-button-font-size: $--font-size-base !default;
|
||||
$--checkbox-button-checked-fill: $--color-primary !default;
|
||||
$--checkbox-button-checked-color: $--color-white !default;
|
||||
$--checkbox-button-checked-border-color: $--color-primary !default;
|
||||
|
||||
|
||||
|
||||
/* Radio
|
||||
-------------------------- */
|
||||
$--radio-font-size: 14px !default;
|
||||
$--radio-font-weight: $--font-weight-primary !default;
|
||||
$--radio-color: $--color-text-regular !default;
|
||||
$--radio-input-height: 14px !default;
|
||||
$--radio-input-width: 14px !default;
|
||||
$--radio-input-border-radius: $--border-radius-circle !default;
|
||||
$--radio-input-fill: $--color-white !default;
|
||||
$--radio-input-border: $--border-base !default;
|
||||
$--radio-input-border-color: $--border-color-base !default;
|
||||
$--radio-icon-color: $--color-white !default;
|
||||
|
||||
$--radio-disabled-input-border-color: $--disabled-border-base !default;
|
||||
$--radio-disabled-input-fill: $--disabled-fill-base !default;
|
||||
$--radio-disabled-icon-color: $--disabled-fill-base !default;
|
||||
|
||||
$--radio-disabled-checked-input-border-color: $--disabled-border-base !default;
|
||||
$--radio-disabled-checked-input-fill: $--disabled-fill-base !default;
|
||||
$--radio-disabled-checked-icon-color: $--color-text-placeholder !default;
|
||||
|
||||
$--radio-checked-text-color: $--color-primary !default;
|
||||
$--radio-checked-input-border-color: $--color-primary !default;
|
||||
$--radio-checked-input-fill: $--color-white !default;
|
||||
$--radio-checked-icon-color: $--color-primary !default;
|
||||
|
||||
$--radio-input-border-color-hover: $--color-primary !default;
|
||||
|
||||
$--radio-bordered-height: 40px !default;
|
||||
$--radio-bordered-padding: 12px 20px 0 10px !default;
|
||||
$--radio-bordered-medium-padding: 10px 20px 0 10px !default;
|
||||
$--radio-bordered-small-padding: 8px 15px 0 10px !default;
|
||||
$--radio-bordered-mini-padding: 6px 15px 0 10px !default;
|
||||
$--radio-bordered-medium-input-height: 14px !default;
|
||||
$--radio-bordered-medium-input-width: 14px !default;
|
||||
$--radio-bordered-medium-height: 36px !default;
|
||||
$--radio-bordered-small-input-height: 12px !default;
|
||||
$--radio-bordered-small-input-width: 12px !default;
|
||||
$--radio-bordered-small-height: 32px !default;
|
||||
$--radio-bordered-mini-input-height: 12px !default;
|
||||
$--radio-bordered-mini-input-width: 12px !default;
|
||||
$--radio-bordered-mini-height: 28px !default;
|
||||
|
||||
$--radio-button-font-size: $--font-size-base !default;
|
||||
$--radio-button-checked-fill: $--color-primary !default;
|
||||
$--radio-button-checked-color: $--color-white !default;
|
||||
$--radio-button-checked-border-color: $--color-primary !default;
|
||||
$--radio-button-disabled-checked-fill: $--border-color-extra-light !default;
|
||||
|
||||
/* Select
|
||||
-------------------------- */
|
||||
$--select-border-color-hover: $--border-color-hover !default;
|
||||
$--select-disabled-border: $--disabled-border-base !default;
|
||||
$--select-font-size: $--font-size-base !default;
|
||||
$--select-close-hover-color: $--color-text-secondary !default;
|
||||
|
||||
$--select-input-color: $--color-text-placeholder !default;
|
||||
$--select-multiple-input-color: #666 !default;
|
||||
$--select-input-focus-background: $--color-primary !default;
|
||||
$--select-input-font-size: 14px !default;
|
||||
|
||||
$--select-option-color: $--color-text-regular !default;
|
||||
$--select-option-disabled-color: $--color-text-placeholder !default;
|
||||
$--select-option-disabled-background: $--color-white !default;
|
||||
$--select-option-height: 34px !default;
|
||||
$--select-option-hover-background: $--background-color-base !default;
|
||||
$--select-option-selected: $--color-primary !default;
|
||||
$--select-option-selected-hover: $--background-color-base !default;
|
||||
|
||||
$--select-group-color: $--color-info !default;
|
||||
$--select-group-height: 30px !default;
|
||||
$--select-group-font-size: 12px !default;
|
||||
|
||||
$--select-dropdown-background: $--color-white !default;
|
||||
$--select-dropdown-shadow: $--box-shadow-light !default;
|
||||
$--select-dropdown-empty-color: #999 !default;
|
||||
$--select-dropdown-max-height: 274px !default;
|
||||
$--select-dropdown-padding: 6px 0 !default;
|
||||
$--select-dropdown-empty-padding: 10px 0 !default;
|
||||
$--select-dropdown-border: solid 1px $--border-color-light !default;
|
||||
|
||||
/* Alert
|
||||
-------------------------- */
|
||||
$--alert-padding: 8px 16px !default;
|
||||
$--alert-border-radius: $--border-radius-base !default;
|
||||
$--alert-title-font-size: 13px !default;
|
||||
$--alert-description-font-size: 12px !default;
|
||||
$--alert-close-font-size: 12px !default;
|
||||
$--alert-close-customed-font-size: 13px !default;
|
||||
|
||||
$--alert-success-color: $--color-success-lighter !default;
|
||||
$--alert-info-color: $--color-info-lighter !default;
|
||||
$--alert-warning-color: $--color-warning-lighter !default;
|
||||
$--alert-danger-color: $--color-danger-lighter !default;
|
||||
|
||||
$--alert-icon-size: 16px !default;
|
||||
$--alert-icon-large-size: 28px !default;
|
||||
|
||||
/* Message Box
|
||||
-------------------------- */
|
||||
$--msgbox-width: 420px !default;
|
||||
$--msgbox-border-radius: 4px !default;
|
||||
$--msgbox-font-size: $--font-size-large !default;
|
||||
$--msgbox-content-font-size: $--font-size-base !default;
|
||||
$--msgbox-content-color: $--color-text-regular !default;
|
||||
$--msgbox-error-font-size: 12px !default;
|
||||
$--msgbox-padding-primary: 15px !default;
|
||||
|
||||
$--msgbox-success-color: $--color-success !default;
|
||||
$--msgbox-info-color: $--color-info !default;
|
||||
$--msgbox-warning-color: $--color-warning !default;
|
||||
$--msgbox-danger-color: $--color-danger !default;
|
||||
|
||||
/* Message
|
||||
-------------------------- */
|
||||
$--message-shadow: $--box-shadow-base !default;
|
||||
$--message-min-width: 380px !default;
|
||||
$--message-background-color: #edf2fc !default;
|
||||
$--message-padding: 15px 15px 15px 20px !default;
|
||||
$--message-content-color: $--color-text-regular !default;
|
||||
$--message-close-color: $--color-text-placeholder !default;
|
||||
$--message-close-size: 16px !default;
|
||||
$--message-close-hover-color: $--color-text-secondary !default;
|
||||
|
||||
$--message-success-color: $--color-success !default;
|
||||
$--message-info-color: $--color-info !default;
|
||||
$--message-warning-color: $--color-warning !default;
|
||||
$--message-danger-color: $--color-danger !default;
|
||||
|
||||
/* Notification
|
||||
-------------------------- */
|
||||
$--notification-width: 330px !default;
|
||||
$--notification-padding: 14px 26px 14px 13px !default;
|
||||
$--notification-radius: 8px !default;
|
||||
$--notification-shadow: $--box-shadow-light !default;
|
||||
$--notification-border-color: $--border-color-lighter !default;
|
||||
$--notification-icon-size: 24px !default;
|
||||
$--notification-close-font-size: $--message-close-size !default;
|
||||
$--notification-group-margin: 13px !default;
|
||||
$--notification-font-size: $--font-size-base !default;
|
||||
$--notification-color: $--color-text-regular !default;
|
||||
$--notification-title-font-size: 16px !default;
|
||||
$--notification-title-color: $--color-text-primary !default;
|
||||
|
||||
$--notification-close-color: $--color-text-secondary !default;
|
||||
$--notification-close-hover-color: $--color-text-regular !default;
|
||||
|
||||
$--notification-success-color: $--color-success !default;
|
||||
$--notification-info-color: $--color-info !default;
|
||||
$--notification-warning-color: $--color-warning !default;
|
||||
$--notification-danger-color: $--color-danger !default;
|
||||
|
||||
/* Input
|
||||
-------------------------- */
|
||||
$--input-font-size: $--font-size-base !default;
|
||||
$--input-color: $--color-text-regular !default;
|
||||
$--input-width: 140px !default;
|
||||
$--input-height: 40px !default;
|
||||
$--input-border: $--border-base !default;
|
||||
$--input-border-color: $--border-color-base !default;
|
||||
$--input-border-radius: $--border-radius-base !default;
|
||||
$--input-border-color-hover: $--border-color-hover !default;
|
||||
$--input-fill: $--color-white !default;
|
||||
$--input-fill-disabled: $--disabled-fill-base !default;
|
||||
$--input-color-disabled: $--font-color-disabled-base !default;
|
||||
$--input-icon-color: $--color-text-placeholder !default;
|
||||
$--input-placeholder-color: $--color-text-placeholder !default;
|
||||
$--input-max-width: 314px !default;
|
||||
|
||||
$--input-hover-border: $--border-color-hover !default;
|
||||
$--input-clear-hover-color: $--color-text-secondary !default;
|
||||
|
||||
$--input-focus-border: $--color-primary !default;
|
||||
$--input-focus-fill: $--color-white !default;
|
||||
|
||||
$--input-disabled-fill: $--disabled-fill-base !default;
|
||||
$--input-disabled-border: $--disabled-border-base !default;
|
||||
$--input-disabled-color: $--disabled-color-base !default;
|
||||
$--input-disabled-placeholder-color: $--color-text-placeholder !default;
|
||||
|
||||
$--input-medium-font-size: 14px !default;
|
||||
$--input-medium-height: 36px !default;
|
||||
|
||||
$--input-small-font-size: 13px !default;
|
||||
$--input-small-height: 32px !default;
|
||||
|
||||
$--input-mini-font-size: 12px !default;
|
||||
$--input-mini-height: 28px !default;
|
||||
|
||||
/* Cascader
|
||||
-------------------------- */
|
||||
$--cascader-menu-fill: $--fill-base !default;
|
||||
$--cascader-menu-font-size: $--font-size-base !default;
|
||||
$--cascader-menu-radius: $--border-radius-base !default;
|
||||
$--cascader-menu-border: $--border-base !default;
|
||||
$--cascader-menu-border-color: $--border-color-base !default;
|
||||
$--cascader-menu-border-width: $--border-width-base !default;
|
||||
$--cascader-menu-color: $--color-text-regular !default;
|
||||
$--cascader-menu-option-color-active: $--color-text-secondary !default;
|
||||
$--cascader-menu-option-fill-active: rgba($--color-text-secondary, 0.12) !default;
|
||||
$--cascader-menu-option-color-hover: $--color-text-regular !default;
|
||||
$--cascader-menu-option-fill-hover: rgba($--color-text-primary, 0.06) !default;
|
||||
$--cascader-menu-option-color-disabled: #999 !default;
|
||||
$--cascader-menu-option-fill-disabled: rgba($--color-black, 0.06) !default;
|
||||
$--cascader-menu-option-empty-color: #666 !default;
|
||||
$--cascader-menu-group-color: #999 !default;
|
||||
$--cascader-menu-shadow: 0 1px 2px rgba($--color-black, 0.14), 0 0 3px rgba($--color-black, 0.14) !default;
|
||||
$--cascader-menu-option-pinyin-color: #999 !default;
|
||||
$--cascader-menu-submenu-shadow: 1px 1px 2px rgba($--color-black, 0.14), 1px 0 2px rgba($--color-black, 0.14) !default;
|
||||
|
||||
/* Group
|
||||
-------------------------- */
|
||||
$--group-option-flex: 0 0 (1/5) * 100% !default;
|
||||
$--group-option-offset-bottom: 12px !default;
|
||||
$--group-option-fill-hover: rgba($--color-black, 0.06) !default;
|
||||
$--group-title-color: $--color-black !default;
|
||||
$--group-title-font-size: $--font-size-base !default;
|
||||
$--group-title-width: 66px !default;
|
||||
|
||||
/* Tab
|
||||
-------------------------- */
|
||||
$--tab-font-size: $--font-size-base !default;
|
||||
$--tab-border-line: 1px solid #e4e4e4 !default;
|
||||
$--tab-header-color-active: $--color-text-secondary !default;
|
||||
$--tab-header-color-hover: $--color-text-regular !default;
|
||||
$--tab-header-color: $--color-text-regular !default;
|
||||
$--tab-header-fill-active: rgba($--color-black, 0.06) !default;
|
||||
$--tab-header-fill-hover: rgba($--color-black, 0.06) !default;
|
||||
$--tab-vertical-header-width: 90px !default;
|
||||
$--tab-vertical-header-count-color: $--color-white !default;
|
||||
$--tab-vertical-header-count-fill: $--color-text-secondary !default;
|
||||
|
||||
/* Button
|
||||
-------------------------- */
|
||||
$--button-font-size: 14px !default;
|
||||
$--button-font-weight: $--font-weight-primary !default;
|
||||
$--button-border-radius: $--border-radius-base !default;
|
||||
$--button-padding-vertical: 12px !default;
|
||||
$--button-padding-horizontal: 20px !default;
|
||||
|
||||
$--button-medium-font-size: 14px !default;
|
||||
$--button-medium-border-radius: $--border-radius-base !default;
|
||||
$--button-medium-padding-vertical: 10px !default;
|
||||
$--button-medium-padding-horizontal: 20px !default;
|
||||
|
||||
$--button-small-font-size: 12px !default;
|
||||
$--button-small-border-radius: #{$--border-radius-base - 1} !default;
|
||||
$--button-small-padding-vertical: 9px !default;
|
||||
$--button-small-padding-horizontal: 15px !default;
|
||||
|
||||
$--button-mini-font-size: 12px !default;
|
||||
$--button-mini-border-radius: #{$--border-radius-base - 1} !default;
|
||||
$--button-mini-padding-vertical: 7px !default;
|
||||
$--button-mini-padding-horizontal: 15px !default;
|
||||
|
||||
$--button-default-color: $--color-text-regular !default;
|
||||
$--button-default-fill: $--color-white !default;
|
||||
$--button-default-border: $--border-color-base !default;
|
||||
|
||||
$--button-disabled-color: $--color-text-placeholder !default;
|
||||
$--button-disabled-fill: $--color-white !default;
|
||||
$--button-disabled-border: $--border-color-lighter !default;
|
||||
|
||||
$--button-primary-border: $--color-primary !default;
|
||||
$--button-primary-color: $--color-white !default;
|
||||
$--button-primary-fill: $--color-primary !default;
|
||||
|
||||
$--button-success-border: $--color-success !default;
|
||||
$--button-success-color: $--color-white !default;
|
||||
$--button-success-fill: $--color-success !default;
|
||||
|
||||
$--button-warning-border: $--color-warning !default;
|
||||
$--button-warning-color: $--color-white !default;
|
||||
$--button-warning-fill: $--color-warning !default;
|
||||
|
||||
$--button-danger-border: $--color-danger !default;
|
||||
$--button-danger-color: $--color-white !default;
|
||||
$--button-danger-fill: $--color-danger !default;
|
||||
|
||||
$--button-info-border: $--color-info !default;
|
||||
$--button-info-color: $--color-white !default;
|
||||
$--button-info-fill: $--color-info !default;
|
||||
|
||||
$--button-hover-tint-percent: 20% !default;
|
||||
$--button-active-shade-percent: 10% !default;
|
||||
|
||||
|
||||
/* cascader
|
||||
-------------------------- */
|
||||
$--cascader-height: 200px !default;
|
||||
|
||||
/* Switch
|
||||
-------------------------- */
|
||||
$--switch-on-color: $--color-primary !default;
|
||||
$--switch-off-color: $--border-color-base !default;
|
||||
$--switch-disabled-color: $--border-color-lighter !default;
|
||||
$--switch-disabled-text-color: $--color-text-placeholder !default;
|
||||
|
||||
$--switch-font-size: $--font-size-base !default;
|
||||
$--switch-core-border-radius: 10px !default;
|
||||
$--switch-width: 40px !default;
|
||||
$--switch-height: 20px !default;
|
||||
$--switch-button-size: 16px !default;
|
||||
|
||||
/* Dialog
|
||||
-------------------------- */
|
||||
$--dialog-background-color: $--color-primary-light-4 !default;
|
||||
$--dialog-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !default;
|
||||
$--dialog-close-hover-color: $--color-primary !default;
|
||||
$--dialog-title-font-size: $--font-size-large !default;
|
||||
$--dialog-font-size: 14px !default;
|
||||
$--dialog-line-height: $--font-line-height-primary !default;
|
||||
$--dialog-padding-primary: 20px !default;
|
||||
|
||||
/* Table
|
||||
-------------------------- */
|
||||
$--table-border-color: $--border-color-lighter !default;
|
||||
$--table-border: 1px solid $--table-border-color !default;
|
||||
$--table-text-color: $--color-text-regular !default;
|
||||
$--table-header-color: $--color-text-secondary !default;
|
||||
$--table-row-hover-background: $--background-color-base !default;
|
||||
$--table-current-row-background: $--color-primary-light-9 !default;
|
||||
$--table-header-background: $--color-white !default;
|
||||
$--table-footer-background: $--color-text-placeholder !default;
|
||||
$--table-fixed-box-shadow: 0 0 10px rgba(0, 0, 0, .12) !default;
|
||||
|
||||
/* Pagination
|
||||
-------------------------- */
|
||||
$--pagination-font-size: 13px !default;
|
||||
$--pagination-fill: $--color-white !default;
|
||||
$--pagination-color: $--color-text-primary !default;
|
||||
$--pagination-border-radius: 3px !default;
|
||||
$--pagination-button-color: $--color-text-primary !default;
|
||||
$--pagination-button-width: 35.5px !default;
|
||||
$--pagination-button-height: 28px !default;
|
||||
$--pagination-button-disabled-color: $--color-text-placeholder !default;
|
||||
$--pagination-button-disabled-fill: $--color-white !default;
|
||||
$--pagination-hover-fill: $--color-primary !default;
|
||||
$--pagination-hover-color: $--color-white !default;
|
||||
|
||||
/* Popover
|
||||
-------------------------- */
|
||||
$--popover-fill: $--color-white !default;
|
||||
$--popover-font-size: $--font-size-base !default;
|
||||
$--popover-border-color: $--border-color-lighter !default;
|
||||
$--popover-arrow-size: 6px !default;
|
||||
$--popover-padding: 12px !default;
|
||||
$--popover-padding-large: 18px 20px !default;
|
||||
$--popover-title-font-size: 16px !default;
|
||||
$--popover-title-color: $--color-text-primary !default;
|
||||
|
||||
/* Tooltip
|
||||
-------------------------- */
|
||||
$--tooltip-fill: $--color-text-primary !default;
|
||||
$--tooltip-color: $--color-white !default;
|
||||
$--tooltip-font-size: 12px !default;
|
||||
$--tooltip-border-color: $--color-text-primary !default;
|
||||
$--tooltip-arrow-size: 6px !default;
|
||||
$--tooltip-padding: 10px !default;
|
||||
|
||||
/* Tag
|
||||
-------------------------- */
|
||||
$--tag-padding: 0 10px !default;
|
||||
$--tag-fill: rgba($--color-primary, 0.10) !default;
|
||||
$--tag-color: $--color-primary !default;
|
||||
$--tag-border: rgba($--color-primary, 0.20) !default;
|
||||
$--tag-font-size: 12px !default;
|
||||
$--tag-border-radius: 4px !default;
|
||||
|
||||
$--tag-info-fill: rgba($--color-info, 0.10) !default;
|
||||
$--tag-info-border: rgba($--color-info, 0.20) !default;
|
||||
$--tag-info-color: $--color-info !default;
|
||||
|
||||
$--tag-primary-fill: rgba($--color-primary, 0.10) !default;
|
||||
$--tag-primary-border: rgba($--color-primary, 0.20) !default;
|
||||
$--tag-primary-color: $--color-primary !default;
|
||||
|
||||
$--tag-success-fill: rgba($--color-success, 0.10) !default;
|
||||
$--tag-success-border: rgba($--color-success, 0.20) !default;
|
||||
$--tag-success-color: $--color-success !default;
|
||||
|
||||
$--tag-warning-fill: rgba($--color-warning, 0.10) !default;
|
||||
$--tag-warning-border: rgba($--color-warning, 0.20) !default;
|
||||
$--tag-warning-color: $--color-warning !default;
|
||||
|
||||
$--tag-danger-fill: rgba($--color-danger, 0.10) !default;
|
||||
$--tag-danger-border: rgba($--color-danger, 0.20) !default;
|
||||
$--tag-danger-color: $--color-danger !default;
|
||||
|
||||
/* Tree
|
||||
-------------------------- */
|
||||
$--tree-node-hover-color: $--background-color-base !default;
|
||||
$--tree-text-color: $--color-text-regular !default;
|
||||
$--tree-expand-icon-color: $--color-text-placeholder !default;
|
||||
|
||||
/* Dropdown
|
||||
-------------------------- */
|
||||
$--dropdown-menu-box-shadow: $--box-shadow-light !default;
|
||||
$--dropdown-menuItem-hover-fill: $--color-primary-light-9 !default;
|
||||
$--dropdown-menuItem-hover-color: $--link-color !default;
|
||||
|
||||
/* Badge
|
||||
-------------------------- */
|
||||
$--badge-fill: $--color-danger !default;
|
||||
$--badge-radius: 10px !default;
|
||||
$--badge-font-size: 12px !default;
|
||||
$--badge-padding: 6px !default;
|
||||
$--badge-size: 18px !default;
|
||||
|
||||
/* Card
|
||||
--------------------------*/
|
||||
$--card-border-color: $--border-color-lighter !default;
|
||||
$--card-border-radius: 4px !default;
|
||||
$--card-padding: 20px !default;
|
||||
|
||||
/* Slider
|
||||
--------------------------*/
|
||||
$--slider-main-background-color: $--color-primary !default;
|
||||
$--slider-runway-background-color: $--border-color-light !default;
|
||||
$--slider-button-hover-color: mix($--color-primary, black, 97%) !default;
|
||||
$--slider-stop-background-color: $--color-white !default;
|
||||
$--slider-disable-color: $--color-text-placeholder !default;
|
||||
|
||||
$--slider-margin: 16px 0 !default;
|
||||
$--slider-border-radius: 3px !default;
|
||||
$--slider-height: 6px !default;
|
||||
$--slider-button-size: 16px !default;
|
||||
$--slider-button-wrapper-size: 36px !default;
|
||||
$--slider-button-wrapper-offset: -15px !default;
|
||||
|
||||
/* Steps
|
||||
--------------------------*/
|
||||
$--steps-border-color: $--disabled-border-base !default;
|
||||
$--steps-border-radius: 4px !default;
|
||||
$--steps-padding: 20px !default;
|
||||
|
||||
/* Menu
|
||||
--------------------------*/
|
||||
$--menu-item-font-size: $--font-size-base !default;
|
||||
$--menu-item-color: $--color-text-primary !default;
|
||||
$--menu-item-fill: $--color-white !default;
|
||||
$--menu-item-hover-fill: $--color-primary-light-9 !default;
|
||||
|
||||
/* Rate
|
||||
--------------------------*/
|
||||
$--rate-height: 20px !default;
|
||||
$--rate-font-size: $--font-size-base !default;
|
||||
$--rate-icon-size: 18px !default;
|
||||
$--rate-icon-margin: 6px !default;
|
||||
$--rate-icon-color: $--color-text-placeholder !default;
|
||||
|
||||
/* DatePicker
|
||||
--------------------------*/
|
||||
$--datepicker-color: $--color-text-regular !default;
|
||||
$--datepicker-off-color: $--color-text-placeholder !default;
|
||||
$--datepicker-header-color: $--color-text-regular !default;
|
||||
$--datepicker-icon-color: $--color-text-primary !default;
|
||||
$--datepicker-border-color: $--disabled-border-base !default;
|
||||
$--datepicker-inner-border-color: #e4e4e4 !default;
|
||||
$--datepicker-inrange-color: $--border-color-extra-light !default;
|
||||
$--datepicker-inrange-hover-color: $--border-color-extra-light !default;
|
||||
$--datepicker-active-color: $--color-primary !default;
|
||||
$--datepicker-text-hover-color: $--color-primary !default;
|
||||
$--datepicker-cell-hover-color: #fff !default;
|
||||
|
||||
/* Loading
|
||||
--------------------------*/
|
||||
$--loading-spinner-size: 42px !default;
|
||||
$--loading-fullscreen-spinner-size: 50px !default;
|
||||
|
||||
/* Scrollbar
|
||||
--------------------------*/
|
||||
$--scrollbar-background-color: rgba($--color-text-secondary, .3) !default;
|
||||
$--scrollbar-hover-background-color: rgba($--color-text-secondary, .5) !default;
|
||||
|
||||
/* Carousel
|
||||
--------------------------*/
|
||||
$--carousel-arrow-font-size: 12px !default;
|
||||
$--carousel-arrow-size: 36px !default;
|
||||
$--carousel-arrow-background: rgba(31, 45, 61, 0.11) !default;
|
||||
$--carousel-arrow-hover-background: rgba(31, 45, 61, 0.23) !default;
|
||||
$--carousel-indicator-width: 30px !default;
|
||||
$--carousel-indicator-height: 2px !default;
|
||||
$--carousel-indicator-padding-horizontal: 4px !default;
|
||||
$--carousel-indicator-padding-vertical: 12px !default;
|
||||
$--carousel-indicator-out-color: $--border-color-hover !default;
|
||||
|
||||
/* Collapse
|
||||
--------------------------*/
|
||||
$--collapse-border-color: $--border-color-lighter !default;
|
||||
$--collapse-header-height: 48px !default;
|
||||
$--collapse-header-padding: 20px !default;
|
||||
$--collapse-header-fill: $--color-white !default;
|
||||
$--collapse-header-color: $--color-text-primary !default;
|
||||
$--collapse-header-size: 13px !default;
|
||||
$--collapse-content-fill: $--color-white !default;
|
||||
$--collapse-content-size: 13px !default;
|
||||
$--collapse-content-color: $--color-text-primary !default;
|
||||
|
||||
/* Transfer
|
||||
--------------------------*/
|
||||
$--transfer-border-color: $--border-color-lighter !default;
|
||||
$--transfer-border-radius: $--border-radius-base !default;
|
||||
$--transfer-panel-width: 200px !default;
|
||||
$--transfer-panel-header-height: 40px !default;
|
||||
$--transfer-panel-header-background: $--background-color-base !default;
|
||||
$--transfer-panel-footer-height: 40px !default;
|
||||
$--transfer-panel-body-height: 246px !default;
|
||||
$--transfer-item-height: 30px !default;
|
||||
$--transfer-item-hover-background: $--color-text-secondary !default;
|
||||
$--transfer-filter-height: 32px !default;
|
||||
|
||||
/* Header
|
||||
--------------------------*/
|
||||
$--header-padding: 0 20px !default;
|
||||
|
||||
/* Footer
|
||||
--------------------------*/
|
||||
$--footer-padding: 0 20px !default;
|
||||
|
||||
/* Main
|
||||
--------------------------*/
|
||||
$--main-padding: 20px !default;
|
||||
|
||||
/* Break-point
|
||||
--------------------------*/
|
||||
$--sm: 768px !default;
|
||||
$--md: 992px !default;
|
||||
$--lg: 1200px !default;
|
||||
$--xl: 1920px !default;
|
||||
|
||||
$--breakpoints: (
|
||||
'xs' : (max-width: $--sm),
|
||||
'sm' : (min-width: $--sm),
|
||||
'md' : (min-width: $--md),
|
||||
'lg' : (min-width: $--lg),
|
||||
'xl' : (min-width: $--xl)
|
||||
);
|
||||
|
||||
$--breakpoints-spec: (
|
||||
'xs-only' : (max-width: $--sm - 1),
|
||||
'sm-and-up' : (min-width: $--sm),
|
||||
'sm-only': "(min-width: #{$--sm}) and (max-width: #{$--md} - 1)",
|
||||
'sm-and-down': (max-width: $--md - 1),
|
||||
'md-and-up' : (min-width: $--md),
|
||||
'md-only': "(min-width: #{$--md}) and (max-width: #{$--lg } - 1)",
|
||||
'md-and-down': (max-width: $--lg - 1),
|
||||
'lg-and-up' : (min-width: $--lg),
|
||||
'lg-only': "(min-width: #{$--lg}) and (max-width: #{$--xl } - 1)",
|
||||
'lg-and-down': (max-width: $--xl - 1),
|
||||
'xl-only' : (min-width: $--xl),
|
||||
);
|
|
@ -0,0 +1,14 @@
|
|||
@import "mixins/mixins";
|
||||
|
||||
@include b(container) {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex: 1;
|
||||
flex-basis: auto;
|
||||
box-sizing: border-box;
|
||||
min-width: 0;
|
||||
|
||||
@include when(vertical) {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
@import "./date-picker/date-table.scss";
|
||||
@import "./date-picker/month-table.scss";
|
||||
@import "./date-picker/year-table.scss";
|
||||
@import "./date-picker/time-spinner.scss";
|
||||
@import "./date-picker/picker.scss";
|
||||
@import "./date-picker/date-picker.scss";
|
||||
@import "./date-picker/date-range-picker.scss";
|
||||
@import "./date-picker/time-range-picker.scss";
|
||||
@import "./date-picker/time-picker.scss";
|
||||
@import "./input.scss";
|
||||
@import "./scrollbar.scss";
|
||||
@import "./popper";
|
|
@ -0,0 +1,97 @@
|
|||
@import "../common/var";
|
||||
@import "../mixins/mixins";
|
||||
@import "./picker-panel.scss";
|
||||
|
||||
@include b(date-picker) {
|
||||
width: 322px;
|
||||
|
||||
&.has-sidebar.has-time {
|
||||
width: 434px;
|
||||
}
|
||||
|
||||
&.has-sidebar {
|
||||
width: 438px;
|
||||
}
|
||||
|
||||
&.has-time .el-picker-panel__body-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.el-picker-panel__content {
|
||||
width: 292px;
|
||||
}
|
||||
|
||||
table {
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@include e(editor-wrap) {
|
||||
position: relative;
|
||||
display: table-cell;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
@include e(time-header) {
|
||||
position: relative;
|
||||
border-bottom: 1px solid $--datepicker-inner-border-color;
|
||||
font-size: 12px;
|
||||
padding: 8px 5px 5px 5px;
|
||||
display: table;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@include e(header) {
|
||||
margin: 12px;
|
||||
text-align: center;
|
||||
|
||||
@include m(bordered) {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: solid 1px $--border-color-lighter;
|
||||
|
||||
& + .el-picker-panel__content {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(header-label) {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
padding: 0 5px;
|
||||
line-height: 22px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
color: $--color-text-regular;
|
||||
|
||||
&:hover {
|
||||
color: $--datepicker-text-hover-color;
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: $--datepicker-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(prev-btn) {
|
||||
float: left;
|
||||
}
|
||||
|
||||
@include e(next-btn) {
|
||||
float: right;
|
||||
}
|
||||
|
||||
@include e(time-wrap) {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@include e(time-label) {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
line-height: 30px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
@import "../common/var";
|
||||
|
||||
@include b(date-range-picker) {
|
||||
width: 646px;
|
||||
|
||||
&.has-sidebar {
|
||||
width: 756px;
|
||||
}
|
||||
|
||||
table {
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-picker-panel__body {
|
||||
min-width: 513px;
|
||||
}
|
||||
|
||||
.el-picker-panel__content {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@include e(header) {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
height: 28px;
|
||||
|
||||
[class*=arrow-left] {
|
||||
float: left;
|
||||
}
|
||||
|
||||
[class*=arrow-right] {
|
||||
float: right;
|
||||
}
|
||||
|
||||
div {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
margin-right: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(content) {
|
||||
float: left;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 16px;
|
||||
|
||||
@include when(left) {
|
||||
border-right: 1px solid $--datepicker-inner-border-color;
|
||||
}
|
||||
|
||||
@include when(right) {
|
||||
.el-date-range-picker__header {
|
||||
|
||||
div {
|
||||
margin-left: 50px;
|
||||
margin-right: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(editors-wrap) {
|
||||
box-sizing: border-box;
|
||||
display: table-cell;
|
||||
|
||||
@include when(right) {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(time-header) {
|
||||
position: relative;
|
||||
border-bottom: 1px solid $--datepicker-inner-border-color;
|
||||
font-size: 12px;
|
||||
padding: 8px 5px 5px 5px;
|
||||
display: table;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
> .el-icon-arrow-right {
|
||||
font-size: 20px;
|
||||
vertical-align: middle;
|
||||
display: table-cell;
|
||||
color: $--datepicker-icon-color;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(time-picker-wrap) {
|
||||
position: relative;
|
||||
display: table-cell;
|
||||
padding: 0 5px;
|
||||
|
||||
.el-picker-panel {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
background: $--color-white;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,151 @@
|
|||
@import "../common/var";
|
||||
@import "../mixins/mixins";
|
||||
|
||||
@include b(date-table) {
|
||||
font-size: 12px;
|
||||
user-select: none;
|
||||
|
||||
@include when(week-mode) {
|
||||
.el-date-table__row {
|
||||
&:hover {
|
||||
div {
|
||||
background-color: $--datepicker-inrange-color;
|
||||
}
|
||||
td.available:hover {
|
||||
color: $--datepicker-color;
|
||||
}
|
||||
td:first-child div {
|
||||
margin-left: 5px;
|
||||
border-top-left-radius: 15px;
|
||||
border-bottom-left-radius: 15px;
|
||||
}
|
||||
td:last-child div {
|
||||
margin-right: 5px;
|
||||
border-top-right-radius: 15px;
|
||||
border-bottom-right-radius: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
&.current div {
|
||||
background-color: $--datepicker-inrange-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
width: 32px;
|
||||
height: 30px;
|
||||
padding: 4px 0;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
|
||||
& div {
|
||||
height: 30px;
|
||||
padding: 3px 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
& span {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
line-height: 24px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
&.next-month,
|
||||
&.prev-month {
|
||||
color: $--datepicker-off-color;
|
||||
}
|
||||
|
||||
&.today {
|
||||
position: relative;
|
||||
span {
|
||||
color: $--color-primary;
|
||||
font-weight: bold;
|
||||
}
|
||||
&.start-date span,
|
||||
&.end-date span {
|
||||
color: $--color-white;
|
||||
}
|
||||
}
|
||||
|
||||
&.available:hover {
|
||||
color: $--datepicker-text-hover-color;
|
||||
}
|
||||
|
||||
&.in-range div {
|
||||
background-color: $--datepicker-inrange-color;
|
||||
&:hover {
|
||||
background-color: $--datepicker-inrange-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
&.current:not(.disabled) span {
|
||||
color: $--color-white;
|
||||
background-color: $--datepicker-active-color;
|
||||
}
|
||||
&.start-date div,
|
||||
&.end-date div {
|
||||
color: $--color-white;
|
||||
}
|
||||
|
||||
&.start-date span,
|
||||
&.end-date span {
|
||||
background-color: $--datepicker-active-color;
|
||||
}
|
||||
|
||||
&.start-date div {
|
||||
margin-left: 5px;
|
||||
border-top-left-radius: 15px;
|
||||
border-bottom-left-radius: 15px;
|
||||
}
|
||||
|
||||
&.end-date div {
|
||||
margin-right: 5px;
|
||||
border-top-right-radius: 15px;
|
||||
border-bottom-right-radius: 15px;
|
||||
}
|
||||
|
||||
&.disabled div {
|
||||
background-color: $--background-color-base;
|
||||
opacity: 1;
|
||||
cursor: not-allowed;
|
||||
color: $--color-text-placeholder;
|
||||
}
|
||||
|
||||
&.selected div {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
background-color: $--datepicker-inrange-color;
|
||||
border-radius: 15px;
|
||||
&:hover {
|
||||
background-color: $--datepicker-inrange-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
&.selected span {
|
||||
background-color: $--datepicker-active-color;
|
||||
color: $--color-white;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
&.week {
|
||||
font-size: 80%;
|
||||
color: $--datepicker-header-color;
|
||||
}
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 5px;
|
||||
color: $--datepicker-header-color;
|
||||
font-weight: 400;
|
||||
border-bottom: solid 1px $--border-color-lighter;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
@import "../common/var";
|
||||
|
||||
@include b(month-table) {
|
||||
font-size: 12px;
|
||||
margin: -1px;
|
||||
border-collapse: collapse;
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
padding: 20px 3px;
|
||||
cursor: pointer;
|
||||
|
||||
&.disabled .cell {
|
||||
background-color: $--background-color-base;
|
||||
cursor: not-allowed;
|
||||
color: $--color-text-placeholder;
|
||||
|
||||
&:hover {
|
||||
color: $--color-text-placeholder;
|
||||
}
|
||||
}
|
||||
|
||||
.cell {
|
||||
width: 48px;
|
||||
height: 32px;
|
||||
display: block;
|
||||
line-height: 32px;
|
||||
color: $--datepicker-color;
|
||||
margin: 0 auto;
|
||||
|
||||
&:hover {
|
||||
color: $--datepicker-text-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
&.current:not(.disabled) .cell {
|
||||
color: $--datepicker-active-color;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
@import "../common/var";
|
||||
|
||||
@include b(picker-panel) {
|
||||
color: $--color-text-regular;
|
||||
border: 1px solid $--datepicker-border-color;
|
||||
box-shadow: $--box-shadow-light;
|
||||
background: $--color-white;
|
||||
border-radius: $--border-radius-base;
|
||||
line-height: 30px;
|
||||
margin: 5px 0;
|
||||
|
||||
@include e((body, body-wrapper)) {
|
||||
&::after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(content) {
|
||||
position: relative;
|
||||
margin: 15px;
|
||||
}
|
||||
|
||||
@include e(footer) {
|
||||
border-top: 1px solid $--datepicker-inner-border-color;
|
||||
padding: 4px;
|
||||
text-align: right;
|
||||
background-color: $--color-white;
|
||||
position: relative;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
@include e(shortcut) {
|
||||
display: block;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
background-color: transparent;
|
||||
line-height: 28px;
|
||||
font-size: 14px;
|
||||
color: $--datepicker-color;
|
||||
padding-left: 12px;
|
||||
text-align: left;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: $--datepicker-text-hover-color;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: #e6f1fe;
|
||||
color: $--datepicker-active-color;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(btn) {
|
||||
border: 1px solid #dcdcdc;
|
||||
color: #333;
|
||||
line-height: 24px;
|
||||
border-radius: 2px;
|
||||
padding: 0 20px;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
outline: none;
|
||||
font-size: 12px;
|
||||
|
||||
&[disabled] {
|
||||
color: #cccccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(icon-btn) {
|
||||
font-size: 12px;
|
||||
color: $--datepicker-icon-color;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
margin-top: 8px;
|
||||
|
||||
&:hover {
|
||||
color: $--datepicker-text-hover-color;
|
||||
}
|
||||
|
||||
@include when(disabled) {
|
||||
color: $--font-color-disabled-base;
|
||||
|
||||
&:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(link-btn) {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.el-picker-panel *[slot=sidebar],
|
||||
.el-picker-panel__sidebar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 110px;
|
||||
border-right: 1px solid $--datepicker-inner-border-color;
|
||||
box-sizing: border-box;
|
||||
padding-top: 6px;
|
||||
background-color: $--color-white;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.el-picker-panel *[slot=sidebar] + .el-picker-panel__body,
|
||||
.el-picker-panel__sidebar + .el-picker-panel__body {
|
||||
margin-left: 110px;
|
||||
}
|
|
@ -0,0 +1,190 @@
|
|||
@import "../mixins/mixins";
|
||||
@import "../common/var";
|
||||
@import "../common/transition";
|
||||
|
||||
@include b(date-editor) {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
|
||||
&.el-input,
|
||||
&.el-input__inner {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
@include m((daterange, timerange)) {
|
||||
&.el-input,
|
||||
&.el-input__inner {
|
||||
width: 350px;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(datetimerange) {
|
||||
&.el-input,
|
||||
&.el-input__inner {
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(dates) {
|
||||
.el-input__inner {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.el-icon-circle-close {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.el-range__icon {
|
||||
font-size: 14px;
|
||||
margin-left: -5px;
|
||||
color: $--color-text-placeholder;
|
||||
float: left;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.el-range-input {
|
||||
appearance: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 39%;
|
||||
text-align: center;
|
||||
font-size: $--font-size-base;
|
||||
color: $--color-text-regular;
|
||||
|
||||
&::placeholder {
|
||||
color: $--color-text-placeholder;
|
||||
}
|
||||
}
|
||||
|
||||
.el-range-separator {
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
padding: 0 5px;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
line-height: 32px;
|
||||
font-size: 14px;
|
||||
width: 5%;
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
|
||||
.el-range__close-icon {
|
||||
font-size: 14px;
|
||||
color: $--color-text-placeholder;
|
||||
width: 25px;
|
||||
display: inline-block;
|
||||
float: right;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
@include b(range-editor) {
|
||||
&.el-input__inner {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
.el-range-input {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
@include when(active) {
|
||||
border-color: $--color-primary;
|
||||
|
||||
&:hover {
|
||||
border-color: $--color-primary;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(medium) {
|
||||
&.el-input__inner {
|
||||
height: $--input-medium-height;
|
||||
}
|
||||
|
||||
.el-range-separator {
|
||||
line-height: 28px;
|
||||
font-size: $--input-medium-font-size;
|
||||
}
|
||||
|
||||
.el-range-input {
|
||||
font-size: $--input-medium-font-size;
|
||||
}
|
||||
|
||||
.el-range__icon,
|
||||
.el-range__close-icon {
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(small) {
|
||||
&.el-input__inner {
|
||||
height: $--input-small-height;
|
||||
}
|
||||
|
||||
.el-range-separator {
|
||||
line-height: 24px;
|
||||
font-size: $--input-small-font-size;
|
||||
}
|
||||
|
||||
.el-range-input {
|
||||
font-size: $--input-small-font-size;
|
||||
}
|
||||
|
||||
.el-range__icon,
|
||||
.el-range__close-icon {
|
||||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(mini) {
|
||||
&.el-input__inner {
|
||||
height: $--input-mini-height;
|
||||
}
|
||||
|
||||
.el-range-separator {
|
||||
line-height: 20px;
|
||||
font-size: $--input-mini-font-size;
|
||||
}
|
||||
|
||||
.el-range-input {
|
||||
font-size: $--input-mini-font-size;
|
||||
}
|
||||
|
||||
.el-range__icon,
|
||||
.el-range__close-icon {
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(disabled) {
|
||||
background-color: $--input-disabled-fill;
|
||||
border-color: $--input-disabled-border;
|
||||
color: $--input-disabled-color;
|
||||
cursor: not-allowed;
|
||||
|
||||
&:hover, &:focus {
|
||||
border-color: $--input-disabled-border;
|
||||
}
|
||||
|
||||
input {
|
||||
background-color: $--input-disabled-fill;
|
||||
color: $--input-disabled-color;
|
||||
cursor: not-allowed;
|
||||
&::placeholder {
|
||||
color: $--input-disabled-placeholder-color;
|
||||
}
|
||||
}
|
||||
|
||||
.el-range-separator {
|
||||
color: $--input-disabled-color;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
@import "../common/var";
|
||||
|
||||
@include b(time-panel) {
|
||||
margin: 5px 0;
|
||||
border: solid 1px $--datepicker-border-color;
|
||||
background-color: $--color-white;
|
||||
box-shadow: $--box-shadow-light;
|
||||
border-radius: 2px;
|
||||
position: absolute;
|
||||
width: 180px;
|
||||
left: 0;
|
||||
z-index: $--index-top;
|
||||
user-select: none;
|
||||
|
||||
@include e(content) {
|
||||
font-size: 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
&::after, &::before {
|
||||
content: "";
|
||||
top: 50%;
|
||||
position: absolute;
|
||||
margin-top: -15px;
|
||||
height: 32px;
|
||||
z-index: -1;
|
||||
left: 0;
|
||||
right: 0;
|
||||
box-sizing: border-box;
|
||||
padding-top: 6px;
|
||||
text-align: left;
|
||||
border-top: 1px solid $--border-color-light;
|
||||
border-bottom: 1px solid $--border-color-light;
|
||||
}
|
||||
|
||||
&::after {
|
||||
left: 50%;
|
||||
margin-left: 12%;
|
||||
margin-right: 12%;
|
||||
}
|
||||
|
||||
&::before {
|
||||
padding-left: 50%;
|
||||
margin-right: 12%;
|
||||
margin-left: 12%;
|
||||
}
|
||||
|
||||
&.has-seconds {
|
||||
&::after {
|
||||
left: calc(100% / 3 * 2);
|
||||
}
|
||||
|
||||
&::before {
|
||||
padding-left: calc(100% / 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(footer) {
|
||||
border-top: 1px solid $--datepicker-inner-border-color;
|
||||
padding: 4px;
|
||||
height: 36px;
|
||||
line-height: 25px;
|
||||
text-align: right;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@include e(btn) {
|
||||
border: none;
|
||||
line-height: 28px;
|
||||
padding: 0 5px;
|
||||
margin: 0 5px;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
outline: none;
|
||||
font-size: 12px;
|
||||
color: $--color-text-primary;
|
||||
|
||||
&.confirm {
|
||||
font-weight: 800;
|
||||
color: $--datepicker-active-color;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
@import "../common/var";
|
||||
|
||||
@include b(time-range-picker) {
|
||||
width: 354px;
|
||||
overflow: visible;
|
||||
|
||||
@include e(content) {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
@include e(cell) {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 4px 7px 7px;
|
||||
width: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@include e(header) {
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@include e(body) {
|
||||
border-radius:2px;
|
||||
border: 1px solid $--datepicker-border-color;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
@import "../common/var";
|
||||
|
||||
@include b(time-spinner) {
|
||||
&.has-seconds {
|
||||
.el-time-spinner__wrapper {
|
||||
width: 33.3%;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(wrapper) {
|
||||
max-height: 190px;
|
||||
overflow: auto;
|
||||
display: inline-block;
|
||||
width: 50%;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
|
||||
& .el-scrollbar__wrap:not(.el-scrollbar__wrap--hidden-default) {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
@include when(arrow) {
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
|
||||
.el-time-spinner__list {
|
||||
transform: translateY(-32px);
|
||||
}
|
||||
|
||||
.el-time-spinner__item:hover:not(.disabled):not(.active) {
|
||||
background: $--color-white;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(arrow) {
|
||||
font-size: 12px;
|
||||
color: $--color-text-secondary;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: $--index-normal;
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: $--color-primary;
|
||||
}
|
||||
|
||||
&.el-icon-arrow-up {
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
&.el-icon-arrow-down {
|
||||
bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(input) {
|
||||
&.el-input {
|
||||
width: 70%;
|
||||
|
||||
.el-input__inner {
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(list) {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
text-align: center;
|
||||
|
||||
&::after,
|
||||
&::before {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(item) {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
font-size: 12px;
|
||||
color: $--color-text-regular;
|
||||
|
||||
&:hover:not(.disabled):not(.active) {
|
||||
background: $--background-color-base;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&.active:not(.disabled) {
|
||||
color: $--color-text-primary;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
color: $--color-text-placeholder;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
@import "../common/var";
|
||||
|
||||
@include b(year-table) {
|
||||
font-size: 12px;
|
||||
margin: -1px;
|
||||
border-collapse: collapse;
|
||||
|
||||
.el-icon {
|
||||
color: $--datepicker-icon-color;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
padding: 20px 3px;
|
||||
cursor: pointer;
|
||||
|
||||
&.disabled .cell {
|
||||
background-color: $--background-color-base;
|
||||
cursor: not-allowed;
|
||||
color: $--color-text-placeholder;
|
||||
|
||||
&:hover {
|
||||
color: $--color-text-placeholder;
|
||||
}
|
||||
}
|
||||
|
||||
.cell {
|
||||
width: 48px;
|
||||
height: 32px;
|
||||
display: block;
|
||||
line-height: 32px;
|
||||
color: $--datepicker-color;
|
||||
margin: 0 auto;
|
||||
|
||||
&:hover {
|
||||
color: $--datepicker-text-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
&.current:not(.disabled) .cell {
|
||||
color: $--datepicker-active-color;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
@import "mixins/mixins";
|
||||
@import "mixins/utils";
|
||||
@import "common/var";
|
||||
@import "common/popup";
|
||||
|
||||
@include b(dialog) {
|
||||
position: relative;
|
||||
margin: 0 auto 50px;
|
||||
background: $--color-white;
|
||||
border-radius: $--border-radius-small;
|
||||
box-shadow: $--dialog-box-shadow;
|
||||
box-sizing: border-box;
|
||||
width: 50%;
|
||||
|
||||
@include when(fullscreen) {
|
||||
width: 100%;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@include e(wrapper) {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@include e(header) {
|
||||
padding: $--dialog-padding-primary;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
@include e(headerbtn) {
|
||||
position: absolute;
|
||||
top: $--dialog-padding-primary;
|
||||
right: $--dialog-padding-primary;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
font-size: $--message-close-size;
|
||||
|
||||
.el-dialog__close {
|
||||
color: $--color-info;
|
||||
}
|
||||
|
||||
&:focus, &:hover {
|
||||
.el-dialog__close {
|
||||
color: $--color-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(title) {
|
||||
line-height: $--dialog-line-height;
|
||||
font-size: $--dialog-title-font-size;
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
|
||||
@include e(body) {
|
||||
padding: 30px 20px;
|
||||
color: $--color-text-regular;
|
||||
font-size: $--dialog-font-size;
|
||||
}
|
||||
|
||||
@include e(footer) {
|
||||
padding: $--dialog-padding-primary;
|
||||
padding-top: 10px;
|
||||
text-align: right;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
// 内容居中布局
|
||||
@include m(center) {
|
||||
text-align: center;
|
||||
|
||||
@include e(body) {
|
||||
text-align: initial;
|
||||
padding: 25px ($--dialog-padding-primary + 5px) 30px;
|
||||
}
|
||||
|
||||
@include e(footer) {
|
||||
text-align: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-fade-enter-active {
|
||||
animation: dialog-fade-in .3s;
|
||||
}
|
||||
|
||||
.dialog-fade-leave-active {
|
||||
animation: dialog-fade-out .3s;
|
||||
}
|
||||
|
||||
@keyframes dialog-fade-in {
|
||||
0% {
|
||||
transform: translate3d(0, -20px, 0);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dialog-fade-out {
|
||||
0% {
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
transform: translate3d(0, -20px, 0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
@import "common/var";
|
||||
@import "mixins/mixins";
|
||||
|
||||
.hidden {
|
||||
@each $break-point-name, $value in $--breakpoints-spec {
|
||||
&-#{$break-point-name} {
|
||||
@include res($break-point-name, $--breakpoints-spec) {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,169 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
@import "button";
|
||||
@import "./popper";
|
||||
|
||||
@include b(dropdown) {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
color: $--color-text-regular;
|
||||
font-size: $--font-size-base;
|
||||
|
||||
.el-button-group {
|
||||
display: block;
|
||||
.el-button {
|
||||
float: none;
|
||||
}
|
||||
}
|
||||
|
||||
& .el-dropdown__caret-button {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
position: relative;
|
||||
border-left: none;
|
||||
|
||||
&::before {
|
||||
$gap: 5px;
|
||||
|
||||
content: '';
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 1px;
|
||||
top: $gap;
|
||||
bottom: $gap;
|
||||
left: 0;
|
||||
background: mix(white, transparent, 50%);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&::before {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
& .el-dropdown__icon {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
@include e(icon) {
|
||||
font-size: 12px;
|
||||
margin: 0 3px;
|
||||
}
|
||||
|
||||
.el-dropdown-selfdefine { // 自定义
|
||||
&:focus:active, &:focus:not(.focusing) {
|
||||
outline-width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(dropdown-menu) {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
padding: 10px 0;
|
||||
margin: 5px 0;
|
||||
background-color: $--color-white;
|
||||
border: 1px solid $--border-color-lighter;
|
||||
border-radius: $--border-radius-base;
|
||||
box-shadow: $--dropdown-menu-box-shadow;
|
||||
|
||||
@include e(item) {
|
||||
list-style: none;
|
||||
line-height: 36px;
|
||||
padding: 0 20px;
|
||||
margin: 0;
|
||||
font-size: $--font-size-base;
|
||||
color: $--color-text-regular;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
&:not(.is-disabled):hover, &:focus {
|
||||
background-color: $--dropdown-menuItem-hover-fill;
|
||||
color: $--dropdown-menuItem-hover-color;
|
||||
}
|
||||
|
||||
@include m(divided) {
|
||||
$divided-offset: 6px;
|
||||
|
||||
position: relative;
|
||||
margin-top: $divided-offset;
|
||||
border-top: 1px solid $--border-color-lighter;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
height: $divided-offset;
|
||||
display: block;
|
||||
margin: 0 -20px;
|
||||
background-color: $--color-white;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(disabled) {
|
||||
cursor: default;
|
||||
color: $--font-color-disabled-base;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(medium) {
|
||||
padding: 6px 0;
|
||||
|
||||
@include e(item) {
|
||||
line-height: 30px;
|
||||
padding: 0 17px;
|
||||
font-size: 14px;
|
||||
|
||||
&.el-dropdown-menu__item--divided {
|
||||
$divided-offset: 6px;
|
||||
margin-top: $divided-offset;
|
||||
|
||||
&:before {
|
||||
height: $divided-offset;
|
||||
margin: 0 -17px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include m(small) {
|
||||
padding: 6px 0;
|
||||
|
||||
@include e(item) {
|
||||
line-height: 27px;
|
||||
padding: 0 15px;
|
||||
font-size: 13px;
|
||||
|
||||
&.el-dropdown-menu__item--divided {
|
||||
$divided-offset: 4px;
|
||||
margin-top: $divided-offset;
|
||||
|
||||
&:before {
|
||||
height: $divided-offset;
|
||||
margin: 0 -15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include m(mini) {
|
||||
padding: 3px 0;
|
||||
|
||||
@include e(item) {
|
||||
line-height: 24px;
|
||||
padding: 0 10px;
|
||||
font-size: 12px;
|
||||
|
||||
&.el-dropdown-menu__item--divided {
|
||||
$divided-offset: 3px;
|
||||
margin-top: $divided-offset;
|
||||
|
||||
&:before {
|
||||
height: $divided-offset;
|
||||
margin: 0 -10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(footer) {
|
||||
padding: $--footer-padding;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
}
|
|
@ -0,0 +1,174 @@
|
|||
@import "mixins/mixins";
|
||||
@import "mixins/utils";
|
||||
@import "common/var";
|
||||
|
||||
@include b(form) {
|
||||
@include m(label-left) {
|
||||
& .el-form-item__label {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
@include m(label-top) {
|
||||
& .el-form-item__label {
|
||||
float: none;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
padding: 0 0 10px 0;
|
||||
}
|
||||
}
|
||||
@include m(inline) {
|
||||
& .el-form-item {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
vertical-align: top;
|
||||
}
|
||||
& .el-form-item__label {
|
||||
float: none;
|
||||
display: inline-block;
|
||||
}
|
||||
& .el-form-item__content {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
&.el-form--label-top .el-form-item__content {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
@include b(form-item) {
|
||||
margin-bottom: 22px;
|
||||
@include utils-clearfix;
|
||||
|
||||
& .el-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
& .el-input__validateIcon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@include m(medium) {
|
||||
.el-form-item__label {
|
||||
line-height: 36px;
|
||||
}
|
||||
.el-form-item__content {
|
||||
line-height: 36px;
|
||||
}
|
||||
}
|
||||
@include m(small) {
|
||||
.el-form-item__label {
|
||||
line-height: 32px;
|
||||
}
|
||||
.el-form-item__content {
|
||||
line-height: 32px;
|
||||
}
|
||||
&.el-form-item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.el-form-item__error {
|
||||
padding-top: 2px;
|
||||
}
|
||||
}
|
||||
@include m(mini) {
|
||||
.el-form-item__label {
|
||||
line-height: 28px;
|
||||
}
|
||||
.el-form-item__content {
|
||||
line-height: 28px;
|
||||
}
|
||||
&.el-form-item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.el-form-item__error {
|
||||
padding-top: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(label) {
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
float: left;
|
||||
font-size: 14px;
|
||||
color: $--color-text-regular;
|
||||
line-height: 40px;
|
||||
padding: 0 12px 0 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@include e(content) {
|
||||
line-height: 40px;
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
@include utils-clearfix;
|
||||
|
||||
.el-input-group {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
@include e(error) {
|
||||
color: $--color-danger;
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
padding-top: 4px;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
|
||||
@include m(inline) {
|
||||
position: relative;
|
||||
top: auto;
|
||||
left: auto;
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(required) {
|
||||
@include pseudo('not(.is-no-asterisk)') {
|
||||
& > .el-form-item__label:before {
|
||||
content: '*';
|
||||
color: $--color-danger;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include when(error) {
|
||||
& .el-input__inner,
|
||||
& .el-textarea__inner {
|
||||
&, &:focus {
|
||||
border-color: $--color-danger;
|
||||
}
|
||||
}
|
||||
& .el-input-group__append,
|
||||
& .el-input-group__prepend {
|
||||
& .el-input__inner {
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
.el-input__validateIcon {
|
||||
color: $--color-danger;
|
||||
}
|
||||
}
|
||||
@include when(success) {
|
||||
& .el-input__inner,
|
||||
& .el-textarea__inner {
|
||||
&, &:focus {
|
||||
border-color: $--color-success;
|
||||
}
|
||||
}
|
||||
& .el-input-group__append,
|
||||
& .el-input-group__prepend {
|
||||
& .el-input__inner {
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
.el-input__validateIcon {
|
||||
color: $--color-success;
|
||||
}
|
||||
}
|
||||
@include m(feedback) {
|
||||
.el-input__validateIcon {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
/* http://robdodson.me/at-font-face-doesnt-work-in-shadow-dom/ */
|
||||
@font-face {
|
||||
font-family: 'element-icons';
|
||||
src: url('../fonts/element-icons.woff') format('woff'), /* chrome, firefox */
|
||||
url('../fonts/element-icons.ttf') format('truetype'); /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
|
||||
font-weight: normal;
|
||||
font-style: normal
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(header) {
|
||||
padding: $--header-padding;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
}
|
|
@ -0,0 +1,179 @@
|
|||
@import "common/var";
|
||||
|
||||
|
||||
[class^="el-icon-"], [class*=" el-icon-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'element-icons' !important;
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
vertical-align: baseline;
|
||||
display: inline-block;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.el-icon-info:before { content: "\e61a"; }
|
||||
|
||||
.el-icon-error:before { content: "\e62c"; }
|
||||
|
||||
.el-icon-success:before { content: "\e62d"; }
|
||||
|
||||
.el-icon-warning:before { content: "\e62e"; }
|
||||
|
||||
.el-icon-question:before { content: "\e634"; }
|
||||
|
||||
.el-icon-back:before { content: "\e606"; }
|
||||
|
||||
.el-icon-arrow-left:before { content: "\e600"; }
|
||||
|
||||
.el-icon-arrow-down:before { content: "\e603"; }
|
||||
|
||||
.el-icon-arrow-right:before { content: "\e604"; }
|
||||
|
||||
.el-icon-arrow-up:before { content: "\e605"; }
|
||||
|
||||
.el-icon-caret-left:before { content: "\e60a"; }
|
||||
|
||||
.el-icon-caret-bottom:before { content: "\e60b"; }
|
||||
|
||||
.el-icon-caret-top:before { content: "\e60c"; }
|
||||
|
||||
.el-icon-caret-right:before { content: "\e60e"; }
|
||||
|
||||
.el-icon-d-arrow-left:before { content: "\e610"; }
|
||||
|
||||
.el-icon-d-arrow-right:before { content: "\e613"; }
|
||||
|
||||
.el-icon-minus:before { content: "\e621"; }
|
||||
|
||||
.el-icon-plus:before { content: "\e62b"; }
|
||||
|
||||
.el-icon-remove:before { content: "\e635"; }
|
||||
|
||||
.el-icon-circle-plus:before { content: "\e601"; }
|
||||
|
||||
.el-icon-remove-outline:before { content: "\e63c"; }
|
||||
|
||||
.el-icon-circle-plus-outline:before { content: "\e602"; }
|
||||
|
||||
.el-icon-close:before { content: "\e60f"; }
|
||||
|
||||
.el-icon-check:before { content: "\e611"; }
|
||||
|
||||
.el-icon-circle-close:before { content: "\e607"; }
|
||||
|
||||
.el-icon-circle-check:before { content: "\e639"; }
|
||||
|
||||
.el-icon-circle-close-outline:before { content: "\e609"; }
|
||||
|
||||
.el-icon-circle-check-outline:before { content: "\e63e"; }
|
||||
|
||||
.el-icon-zoom-out:before { content: "\e645"; }
|
||||
|
||||
.el-icon-zoom-in:before { content: "\e641"; }
|
||||
|
||||
.el-icon-d-caret:before { content: "\e615"; }
|
||||
|
||||
.el-icon-sort:before { content: "\e640"; }
|
||||
|
||||
.el-icon-sort-down:before { content: "\e630"; }
|
||||
|
||||
.el-icon-sort-up:before { content: "\e631"; }
|
||||
|
||||
.el-icon-tickets:before { content: "\e63f"; }
|
||||
|
||||
.el-icon-document:before { content: "\e614"; }
|
||||
|
||||
.el-icon-goods:before { content: "\e618"; }
|
||||
|
||||
.el-icon-sold-out:before { content: "\e63b"; }
|
||||
|
||||
.el-icon-news:before { content: "\e625"; }
|
||||
|
||||
.el-icon-message:before { content: "\e61b"; }
|
||||
|
||||
.el-icon-date:before { content: "\e608"; }
|
||||
|
||||
.el-icon-printer:before { content: "\e62f"; }
|
||||
|
||||
.el-icon-time:before { content: "\e642"; }
|
||||
|
||||
.el-icon-bell:before { content: "\e622"; }
|
||||
|
||||
.el-icon-mobile-phone:before { content: "\e624"; }
|
||||
|
||||
.el-icon-service:before { content: "\e63a"; }
|
||||
|
||||
.el-icon-view:before { content: "\e643"; }
|
||||
|
||||
.el-icon-menu:before { content: "\e620"; }
|
||||
|
||||
.el-icon-more:before { content: "\e646"; }
|
||||
|
||||
.el-icon-more-outline:before { content: "\e626"; }
|
||||
|
||||
.el-icon-star-on:before { content: "\e637"; }
|
||||
|
||||
.el-icon-star-off:before { content: "\e63d"; }
|
||||
|
||||
.el-icon-location:before { content: "\e61d"; }
|
||||
|
||||
.el-icon-location-outline:before { content: "\e61f"; }
|
||||
|
||||
.el-icon-phone:before { content: "\e627"; }
|
||||
|
||||
.el-icon-phone-outline:before { content: "\e628"; }
|
||||
|
||||
.el-icon-picture:before { content: "\e629"; }
|
||||
|
||||
.el-icon-picture-outline:before { content: "\e62a"; }
|
||||
|
||||
.el-icon-delete:before { content: "\e612"; }
|
||||
|
||||
.el-icon-search:before { content: "\e619"; }
|
||||
|
||||
.el-icon-edit:before { content: "\e61c"; }
|
||||
|
||||
.el-icon-edit-outline:before { content: "\e616"; }
|
||||
|
||||
.el-icon-rank:before { content: "\e632"; }
|
||||
|
||||
.el-icon-refresh:before { content: "\e633"; }
|
||||
|
||||
.el-icon-share:before { content: "\e636"; }
|
||||
|
||||
.el-icon-setting:before { content: "\e638"; }
|
||||
|
||||
.el-icon-upload:before { content: "\e60d"; }
|
||||
|
||||
.el-icon-upload2:before { content: "\e644"; }
|
||||
|
||||
.el-icon-download:before { content: "\e617"; }
|
||||
|
||||
.el-icon-loading:before { content: "\e61e"; }
|
||||
|
||||
.el-icon-loading {
|
||||
animation: rotating 2s linear infinite;
|
||||
}
|
||||
|
||||
.el-icon--right {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.el-icon--left {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
@keyframes rotating {
|
||||
0% {
|
||||
transform: rotateZ(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotateZ(360deg);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
@import "./base.scss";
|
||||
@import "./pagination.scss";
|
||||
@import "./dialog.scss";
|
||||
@import "./autocomplete.scss";
|
||||
@import "./dropdown.scss";
|
||||
@import "./dropdown-menu.scss";
|
||||
@import "./dropdown-item.scss";
|
||||
@import "./menu.scss";
|
||||
@import "./submenu.scss";
|
||||
@import "./menu-item.scss";
|
||||
@import "./menu-item-group.scss";
|
||||
@import "./input.scss";
|
||||
@import "./input-number.scss";
|
||||
@import "./radio.scss";
|
||||
@import "./radio-group.scss";
|
||||
@import "./radio-button.scss";
|
||||
@import "./checkbox.scss";
|
||||
@import "./checkbox-button.scss";
|
||||
@import "./checkbox-group.scss";
|
||||
@import "./switch.scss";
|
||||
@import "./select.scss";
|
||||
@import "./button.scss";
|
||||
@import "./button-group.scss";
|
||||
@import "./table.scss";
|
||||
@import "./table-column.scss";
|
||||
@import "./date-picker.scss";
|
||||
@import "./time-select.scss";
|
||||
@import "./time-picker.scss";
|
||||
@import "./popover.scss";
|
||||
@import "./tooltip.scss";
|
||||
@import "./message-box.scss";
|
||||
@import "./breadcrumb.scss";
|
||||
@import "./breadcrumb-item.scss";
|
||||
@import "./form.scss";
|
||||
@import "./form-item.scss";
|
||||
@import "./tabs.scss";
|
||||
@import "./tab-pane.scss";
|
||||
@import "./tag.scss";
|
||||
@import "./tree.scss";
|
||||
@import "./alert.scss";
|
||||
@import "./notification.scss";
|
||||
@import "./slider.scss";
|
||||
@import "./loading.scss";
|
||||
@import "./row.scss";
|
||||
@import "./col.scss";
|
||||
@import "./upload.scss";
|
||||
@import "./progress.scss";
|
||||
@import "./spinner.scss";
|
||||
@import "./message.scss";
|
||||
@import "./badge.scss";
|
||||
@import "./card.scss";
|
||||
@import "./rate.scss";
|
||||
@import "./steps.scss";
|
||||
@import "./step.scss";
|
||||
@import "./carousel.scss";
|
||||
@import "./scrollbar.scss";
|
||||
@import "./carousel-item.scss";
|
||||
@import "./collapse.scss";
|
||||
@import "./collapse-item.scss";
|
||||
@import "./cascader.scss";
|
||||
@import "./color-picker.scss";
|
||||
@import "./transfer.scss";
|
||||
@import "./container.scss";
|
||||
@import "./header.scss";
|
||||
@import "./aside.scss";
|
||||
@import "./main.scss";
|
||||
@import "./footer.scss";
|
|
@ -0,0 +1,180 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
@import "input";
|
||||
|
||||
@include b(input-number) {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 180px;
|
||||
line-height: #{$--input-height - 2};
|
||||
|
||||
.el-input {
|
||||
display: block;
|
||||
|
||||
&__inner {
|
||||
-webkit-appearance: none;
|
||||
padding-left: #{$--input-height + 10};
|
||||
padding-right: #{$--input-height + 10};
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@include e((increase, decrease)) {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 1px;
|
||||
width: $--input-height;
|
||||
height: auto;
|
||||
text-align: center;
|
||||
background: $--background-color-base;
|
||||
color: $--color-text-regular;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
|
||||
&:hover {
|
||||
color: $--color-primary;
|
||||
|
||||
&:not(.is-disabled) ~ .el-input .el-input__inner:not(.is-disabled) {
|
||||
border-color: $--input-focus-border;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
color: $--disabled-color-base;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(increase) {
|
||||
right: 1px;
|
||||
border-radius: 0 $--border-radius-base $--border-radius-base 0;
|
||||
border-left: $--border-base;
|
||||
}
|
||||
|
||||
@include e(decrease) {
|
||||
left: 1px;
|
||||
border-radius: $--border-radius-base 0 0 $--border-radius-base;
|
||||
border-right: $--border-base;
|
||||
}
|
||||
|
||||
@include when(disabled) {
|
||||
@include e((increase, decrease)) {
|
||||
border-color: $--disabled-border-base;
|
||||
color: $--disabled-border-base;
|
||||
|
||||
&:hover {
|
||||
color: $--disabled-border-base;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include m(medium) {
|
||||
width: 200px;
|
||||
line-height: #{$--input-medium-height - 2};
|
||||
|
||||
@include e((increase, decrease)) {
|
||||
width: $--input-medium-height;
|
||||
font-size: $--input-medium-font-size;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
padding-left: #{$--input-medium-height + 7};
|
||||
padding-right: #{$--input-medium-height + 7};
|
||||
}
|
||||
}
|
||||
|
||||
@include m(small) {
|
||||
width: 130px;
|
||||
line-height: #{$--input-small-height - 2};
|
||||
|
||||
@include e((increase, decrease)) {
|
||||
width: $--input-small-height;
|
||||
font-size: $--input-small-font-size;
|
||||
|
||||
[class*=el-icon] {
|
||||
transform: scale(.9);
|
||||
}
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
padding-left: #{$--input-small-height + 7};
|
||||
padding-right: #{$--input-small-height + 7};
|
||||
}
|
||||
}
|
||||
|
||||
@include m(mini) {
|
||||
width: 130px;
|
||||
line-height: #{$--input-mini-height - 2};
|
||||
|
||||
@include e((increase, decrease)) {
|
||||
width: $--input-mini-height;
|
||||
font-size: $--input-mini-font-size;
|
||||
|
||||
[class*=el-icon] {
|
||||
transform: scale(.8);
|
||||
}
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
padding-left: #{$--input-mini-height + 7};
|
||||
padding-right: #{$--input-mini-height + 7};
|
||||
}
|
||||
}
|
||||
|
||||
@include when(without-controls) {
|
||||
.el-input__inner {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(controls-right) {
|
||||
.el-input__inner {
|
||||
padding-left: 15px;
|
||||
padding-right: #{$--input-height + 10};
|
||||
}
|
||||
|
||||
@include e((increase, decrease)) {
|
||||
height: auto;
|
||||
line-height: #{($--input-height - 2) / 2};
|
||||
|
||||
[class*=el-icon] {
|
||||
transform: scale(.8);
|
||||
}
|
||||
}
|
||||
|
||||
@include e(increase) {
|
||||
border-radius: 0 $--border-radius-base 0 0;
|
||||
border-bottom: $--border-base;
|
||||
}
|
||||
|
||||
@include e(decrease) {
|
||||
right: 1px;
|
||||
bottom: 1px;
|
||||
top: auto;
|
||||
left: auto;
|
||||
border-right: none;
|
||||
border-left: $--border-base;
|
||||
border-radius: 0 0 $--border-radius-base 0;
|
||||
}
|
||||
|
||||
&[class*=medium] {
|
||||
[class*=increase], [class*=decrease] {
|
||||
line-height: #{($--input-medium-height - 2) / 2};
|
||||
}
|
||||
}
|
||||
|
||||
&[class*=small] {
|
||||
[class*=increase], [class*=decrease] {
|
||||
line-height: #{($--input-small-height - 2) / 2};
|
||||
}
|
||||
}
|
||||
|
||||
&[class*=mini] {
|
||||
[class*=increase], [class*=decrease] {
|
||||
line-height: #{($--input-mini-height - 2) / 2};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,310 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(textarea) {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
vertical-align: bottom;
|
||||
font-size: $--font-size-base;
|
||||
|
||||
@include e(inner) {
|
||||
display: block;
|
||||
resize: vertical;
|
||||
padding: 5px 15px;
|
||||
line-height: 1.5;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
font-size: inherit;
|
||||
color: $--input-color;
|
||||
background-color: $--input-fill;
|
||||
background-image: none;
|
||||
border: $--input-border;
|
||||
border-radius: $--input-border-radius;
|
||||
transition: $--border-transition-base;
|
||||
|
||||
&::placeholder {
|
||||
color: $--input-placeholder-color;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border-color: $--input-hover-border;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: $--input-focus-border;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(disabled) {
|
||||
.el-textarea__inner {
|
||||
background-color: $--input-disabled-fill;
|
||||
border-color: $--input-disabled-border;
|
||||
color: $--input-disabled-color;
|
||||
cursor: not-allowed;
|
||||
|
||||
&::placeholder {
|
||||
color: $--input-disabled-placeholder-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(input) {
|
||||
position: relative;
|
||||
font-size: $--font-size-base;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
@include scroll-bar;
|
||||
|
||||
& .el-input__clear {
|
||||
color: $--input-icon-color;
|
||||
font-size: $--input-font-size;
|
||||
line-height: 16px;
|
||||
cursor: pointer;
|
||||
transition: $--color-transition-base;
|
||||
|
||||
&:hover {
|
||||
color: $--input-clear-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(inner) {
|
||||
-webkit-appearance: none;
|
||||
background-color: $--input-fill;
|
||||
background-image: none;
|
||||
border-radius: $--input-border-radius;
|
||||
border: $--input-border;
|
||||
box-sizing: border-box;
|
||||
color: $--input-color;
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
height: $--input-height;
|
||||
line-height: $--input-height;
|
||||
outline: none;
|
||||
padding: 0 15px;
|
||||
transition: $--border-transition-base;
|
||||
width: 100%;
|
||||
|
||||
&::placeholder {
|
||||
color: $--input-placeholder-color;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border-color: $--input-hover-border;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: $--input-focus-border;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(suffix) {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
right: 5px;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
color: $--input-icon-color;
|
||||
transition: all .3s;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@include e(suffix-inner) {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
@include e(prefix) {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
left: 5px;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
color: $--input-icon-color;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
@include e(icon) {
|
||||
height: 100%;
|
||||
width: 25px;
|
||||
text-align: center;
|
||||
transition: all .3s;
|
||||
line-height: $--input-height;
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
height: 100%;
|
||||
width: 0;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(validateIcon) {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@include when(active) {
|
||||
.el-input__inner {
|
||||
outline: none;
|
||||
border-color: $--input-focus-border;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(disabled) {
|
||||
.el-input__inner {
|
||||
background-color: $--input-disabled-fill;
|
||||
border-color: $--input-disabled-border;
|
||||
color: $--input-disabled-color;
|
||||
cursor: not-allowed;
|
||||
|
||||
&::placeholder {
|
||||
color: $--input-disabled-placeholder-color;
|
||||
}
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(suffix) {
|
||||
.el-input__inner {
|
||||
padding-right: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(prefix) {
|
||||
.el-input__inner {
|
||||
padding-left: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(medium) {
|
||||
font-size: $--input-medium-font-size;
|
||||
|
||||
@include e(inner) {
|
||||
height: $--input-medium-height;
|
||||
line-height: $--input-medium-height;
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
line-height: $--input-medium-height;
|
||||
}
|
||||
}
|
||||
@include m(small) {
|
||||
font-size: $--input-small-font-size;
|
||||
|
||||
@include e(inner) {
|
||||
height: $--input-small-height;
|
||||
line-height: $--input-small-height;
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
line-height: $--input-small-height;
|
||||
}
|
||||
}
|
||||
@include m(mini) {
|
||||
font-size: $--input-mini-font-size;
|
||||
|
||||
@include e(inner) {
|
||||
height: $--input-mini-height;
|
||||
line-height: $--input-mini-height;
|
||||
}
|
||||
|
||||
.el-input__icon {
|
||||
line-height: $--input-mini-height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(input-group) {
|
||||
line-height: normal;
|
||||
display: inline-table;
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing:0;
|
||||
|
||||
> .el-input__inner {
|
||||
vertical-align: middle;
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
@include e((append, prepend)) {
|
||||
background-color: $--background-color-base;
|
||||
color: $--color-info;
|
||||
vertical-align: middle;
|
||||
display: table-cell;
|
||||
position: relative;
|
||||
border: $--border-base;
|
||||
border-radius: $--input-border-radius;
|
||||
padding: 0 20px;
|
||||
width: 1px;
|
||||
white-space: nowrap;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.el-select,
|
||||
.el-button {
|
||||
display: inline-block;
|
||||
margin: -10px -20px;
|
||||
}
|
||||
|
||||
button.el-button,
|
||||
div.el-select .el-input__inner,
|
||||
div.el-select:hover .el-input__inner {
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
border-top: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.el-button,
|
||||
.el-input {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(prepend) {
|
||||
border-right: 0;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
@include e(append) {
|
||||
border-left: 0;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
@include m(prepend) {
|
||||
.el-input__inner {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.el-select .el-input.is-focus .el-input__inner {
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(append) {
|
||||
.el-input__inner {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.el-select .el-input.is-focus .el-input__inner {
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** disalbe default clear on IE */
|
||||
.el-input__inner::-ms-clear {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(loading-parent) {
|
||||
@include m(relative) {
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
@include m(hidden) {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
}
|
||||
|
||||
@include b(loading-mask) {
|
||||
position: absolute;
|
||||
z-index: 2000;
|
||||
background-color: rgba(255, 255, 255, .9);
|
||||
margin: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
transition: opacity 0.3s;
|
||||
|
||||
@include when(fullscreen) {
|
||||
position: fixed;
|
||||
|
||||
.el-loading-spinner {
|
||||
margin-top: #{- $--loading-fullscreen-spinner-size / 2};
|
||||
|
||||
.circular {
|
||||
height: $--loading-fullscreen-spinner-size;
|
||||
width: $--loading-fullscreen-spinner-size;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(loading-spinner) {
|
||||
top: 50%;
|
||||
margin-top: #{- $--loading-spinner-size / 2};
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
|
||||
.el-loading-text {
|
||||
color: $--color-primary;
|
||||
margin: 3px 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.circular {
|
||||
height: $--loading-spinner-size;
|
||||
width: $--loading-spinner-size;
|
||||
animation: loading-rotate 2s linear infinite;
|
||||
}
|
||||
|
||||
.path {
|
||||
animation: loading-dash 1.5s ease-in-out infinite;
|
||||
stroke-dasharray: 90, 150;
|
||||
stroke-dashoffset: 0;
|
||||
stroke-width: 2;
|
||||
stroke: $--color-primary;
|
||||
stroke-linecap: round;
|
||||
}
|
||||
|
||||
i {
|
||||
color: $--color-primary;
|
||||
}
|
||||
}
|
||||
|
||||
.el-loading-fade-enter,
|
||||
.el-loading-fade-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@keyframes loading-rotate {
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loading-dash {
|
||||
0% {
|
||||
stroke-dasharray: 1, 200;
|
||||
stroke-dashoffset: 0;
|
||||
}
|
||||
50% {
|
||||
stroke-dasharray: 90, 150;
|
||||
stroke-dashoffset: -40px;
|
||||
}
|
||||
100% {
|
||||
stroke-dasharray: 90, 150;
|
||||
stroke-dashoffset: -120px;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(main) {
|
||||
// IE11 supports the <main> element partially https://caniuse.com/#search=main
|
||||
display: block;
|
||||
flex: 1;
|
||||
flex-basis: auto;
|
||||
overflow: auto;
|
||||
box-sizing: border-box;
|
||||
padding: $--main-padding;
|
||||
}
|
|
@ -0,0 +1,289 @@
|
|||
@import "mixins/mixins";
|
||||
@import "mixins/utils";
|
||||
@import "common/var";
|
||||
@import "common/transition";
|
||||
|
||||
@mixin menu-item {
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-size: $--menu-item-font-size;
|
||||
color: $--menu-item-color;
|
||||
padding: 0 20px;
|
||||
list-style: none;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
transition: border-color .3s, background-color .3s, color .3s;
|
||||
box-sizing: border-box;
|
||||
white-space: nowrap;
|
||||
|
||||
* {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
i {
|
||||
color: $--color-text-secondary;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
outline: none;
|
||||
background-color: $--menu-item-hover-fill;
|
||||
}
|
||||
|
||||
@include when(disabled) {
|
||||
opacity: 0.25;
|
||||
cursor: not-allowed;
|
||||
background: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@include b(menu) {
|
||||
border-right: solid 1px #e6e6e6;
|
||||
list-style: none;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
background-color: $--menu-item-fill;
|
||||
@include utils-clearfix;
|
||||
&.el-menu--horizontal {
|
||||
border-bottom: solid 1px #e6e6e6;
|
||||
}
|
||||
|
||||
@include m(horizontal) {
|
||||
border-right: none;
|
||||
& > .el-menu-item {
|
||||
float: left;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
margin: 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
color: $--color-text-secondary;
|
||||
|
||||
a,
|
||||
a:hover {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
&:not(.is-disabled):hover,
|
||||
&:not(.is-disabled):focus{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
& > .el-submenu {
|
||||
float: left;
|
||||
|
||||
&:focus,
|
||||
&:hover {
|
||||
outline: none;
|
||||
.el-submenu__title {
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
.el-submenu__title {
|
||||
border-bottom: 2px solid $--color-primary;
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
}
|
||||
|
||||
& .el-submenu__title {
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
border-bottom: 2px solid transparent;
|
||||
color: $--color-text-secondary;
|
||||
|
||||
&:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
& .el-submenu__icon-arrow {
|
||||
position: static;
|
||||
vertical-align: middle;
|
||||
margin-left: 8px;
|
||||
margin-top: -3px;
|
||||
}
|
||||
}
|
||||
& .el-menu {
|
||||
& .el-menu-item,
|
||||
& .el-submenu__title {
|
||||
background-color: $--color-white;
|
||||
float: none;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
padding: 0 10px;
|
||||
color: $--color-text-secondary;
|
||||
}
|
||||
& .el-menu-item.is-active,
|
||||
& .el-submenu.is-active > .el-submenu__title {
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
}
|
||||
& .el-menu-item:not(.is-disabled):hover,
|
||||
& .el-menu-item:not(.is-disabled):focus {
|
||||
outline: none;
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
& > .el-menu-item.is-active {
|
||||
border-bottom: 2px solid $--color-primary;
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
}
|
||||
@include m(collapse) {
|
||||
width: 64px;
|
||||
|
||||
> .el-menu-item,
|
||||
> .el-submenu > .el-submenu__title {
|
||||
[class^="el-icon-"] {
|
||||
margin: 0;
|
||||
vertical-align: middle;
|
||||
width: 24px;
|
||||
text-align: center;
|
||||
}
|
||||
.el-submenu__icon-arrow {
|
||||
display: none;
|
||||
}
|
||||
span {
|
||||
height: 0;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
> .el-menu-item.is-active i {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.el-menu .el-submenu {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.el-submenu {
|
||||
position: relative;
|
||||
& .el-menu {
|
||||
position: absolute;
|
||||
margin-left: 5px;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
z-index: 10;
|
||||
border: 1px solid $--border-color-light;
|
||||
border-radius: $--border-radius-small;
|
||||
box-shadow: $--box-shadow-light;
|
||||
}
|
||||
|
||||
&.is-opened {
|
||||
> .el-submenu__title .el-submenu__icon-arrow {
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@include m(popup) {
|
||||
z-index: 100;
|
||||
min-width: 200px;
|
||||
border: none;
|
||||
padding: 5px 0;
|
||||
border-radius: $--border-radius-small;
|
||||
box-shadow: $--box-shadow-light;
|
||||
|
||||
&-bottom-start {
|
||||
margin-top: 5px;
|
||||
}
|
||||
&-right-start {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@include b(menu-item) {
|
||||
@include menu-item;
|
||||
|
||||
& [class^="el-icon-"] {
|
||||
margin-right: 5px;
|
||||
width: 24px;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@include when(active) {
|
||||
color: $--color-primary;
|
||||
i {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(submenu) {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
|
||||
@include e(title) {
|
||||
@include menu-item;
|
||||
|
||||
&:hover {
|
||||
background-color: $--menu-item-hover-fill;
|
||||
}
|
||||
}
|
||||
& .el-menu {
|
||||
border: none;
|
||||
}
|
||||
& .el-menu-item {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
padding: 0 45px;
|
||||
min-width: 200px;
|
||||
}
|
||||
@include e(icon-arrow) {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 20px;
|
||||
margin-top: -7px;
|
||||
transition: transform .3s;
|
||||
font-size: 12px;
|
||||
}
|
||||
@include when(active) {
|
||||
.el-submenu__title {
|
||||
border-bottom-color: $--color-primary;
|
||||
}
|
||||
}
|
||||
@include when(opened) {
|
||||
> .el-submenu__title .el-submenu__icon-arrow {
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
}
|
||||
@include when(disabled) {
|
||||
.el-submenu__title,
|
||||
.el-menu-item {
|
||||
opacity: 0.25;
|
||||
cursor: not-allowed;
|
||||
background: none !important;
|
||||
}
|
||||
}
|
||||
[class^="el-icon-"] {
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
width: 24px;
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
@include b(menu-item-group) {
|
||||
> ul {
|
||||
padding: 0;
|
||||
}
|
||||
@include e(title) {
|
||||
padding: 7px 0 7px 20px;
|
||||
line-height: normal;
|
||||
font-size: 12px;
|
||||
color: $--color-text-secondary;
|
||||
}
|
||||
}
|
||||
|
||||
.horizontal-collapse-transition .el-submenu__title .el-submenu__icon-arrow {
|
||||
transition: .2s;
|
||||
opacity: 0;
|
||||
}
|
|
@ -0,0 +1,223 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
@import "common/popup";
|
||||
@import "button";
|
||||
@import "input";
|
||||
|
||||
@include b(message-box) {
|
||||
display: inline-block;
|
||||
width: $--msgbox-width;
|
||||
padding-bottom: 10px;
|
||||
vertical-align: middle;
|
||||
background-color: $--color-white;
|
||||
border-radius: $--msgbox-border-radius;
|
||||
border: 1px solid $--border-color-lighter;
|
||||
font-size: $--msgbox-font-size;
|
||||
box-shadow: $--box-shadow-light;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
backface-visibility: hidden;
|
||||
|
||||
@include e(wrapper) {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
width: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(header) {
|
||||
position: relative;
|
||||
padding: $--msgbox-padding-primary;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
@include e(title) {
|
||||
padding-left: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: $--msgbox-font-size;
|
||||
line-height: 1;
|
||||
color: $--color-text-primary;
|
||||
}
|
||||
|
||||
@include e(headerbtn) {
|
||||
position: absolute;
|
||||
top: $--msgbox-padding-primary;
|
||||
right: $--msgbox-padding-primary;
|
||||
padding: 0;
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
font-size: $--message-close-size;
|
||||
cursor: pointer;
|
||||
|
||||
.el-message-box__close {
|
||||
color: $--color-info;
|
||||
}
|
||||
|
||||
&:focus, &:hover {
|
||||
.el-message-box__close {
|
||||
color: $--color-primary;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@include e(content) {
|
||||
position: relative;
|
||||
padding: 10px $--msgbox-padding-primary;
|
||||
color: $--msgbox-content-color;
|
||||
font-size: $--msgbox-content-font-size;
|
||||
}
|
||||
|
||||
@include e(input) {
|
||||
padding-top: 15px;
|
||||
|
||||
& input.invalid {
|
||||
border-color: $--color-danger;
|
||||
&:focus {
|
||||
border-color: $--color-danger;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(status) {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 24px !important;
|
||||
|
||||
&::before {
|
||||
// 防止图标切割
|
||||
padding-left: 1px;
|
||||
}
|
||||
|
||||
+ .el-message-box__message {
|
||||
padding-left: 36px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
&.el-icon-success {
|
||||
color: $--msgbox-success-color;
|
||||
}
|
||||
|
||||
&.el-icon-info {
|
||||
color: $--msgbox-info-color;
|
||||
}
|
||||
|
||||
&.el-icon-warning {
|
||||
color: $--msgbox-warning-color;
|
||||
}
|
||||
|
||||
&.el-icon-error {
|
||||
color: $--msgbox-danger-color;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(message) {
|
||||
margin: 0;
|
||||
|
||||
& p {
|
||||
margin: 0;
|
||||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(errormsg) {
|
||||
color: $--color-danger;
|
||||
font-size: $--msgbox-error-font-size;
|
||||
min-height: 18px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
@include e(btns) {
|
||||
padding: 5px 15px 0;
|
||||
text-align: right;
|
||||
|
||||
& button:nth-child(2) {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(btns-reverse) {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
// centerAlign 布局
|
||||
@include m(center) {
|
||||
padding-bottom: 30px;
|
||||
|
||||
@include e(header) {
|
||||
padding-top: 30px;
|
||||
}
|
||||
|
||||
@include e(title) {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@include e(status) {
|
||||
position: relative;
|
||||
top: auto;
|
||||
padding-right: 5px;
|
||||
text-align: center;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
@include e(message) {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
@include e((btns, content)) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@include e(content) {
|
||||
$padding-horizontal: $--msgbox-padding-primary + 12px;
|
||||
|
||||
padding-left: $padding-horizontal;
|
||||
padding-right: $padding-horizontal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.msgbox-fade-enter-active {
|
||||
animation: msgbox-fade-in .3s;
|
||||
}
|
||||
|
||||
.msgbox-fade-leave-active {
|
||||
animation: msgbox-fade-out .3s;
|
||||
}
|
||||
|
||||
@keyframes msgbox-fade-in {
|
||||
0% {
|
||||
transform: translate3d(0, -20px, 0);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes msgbox-fade-out {
|
||||
0% {
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
transform: translate3d(0, -20px, 0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(message) {
|
||||
min-width: $--message-min-width;
|
||||
box-sizing: border-box;
|
||||
border-radius: $--border-radius-base;
|
||||
border-width: $--border-width-base;
|
||||
border-style: $--border-style-base;
|
||||
border-color: $--border-color-lighter;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 20px;
|
||||
transform: translateX(-50%);
|
||||
background-color: $--message-background-color;
|
||||
transition: opacity 0.3s, transform .4s;
|
||||
overflow: hidden;
|
||||
padding: $--message-padding;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@include when(center) {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@include when(closable) {
|
||||
.el-message__content {
|
||||
padding-right: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@include m(info) {
|
||||
.el-message__content {
|
||||
color: $--message-info-color;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(success) {
|
||||
background-color: $--color-success-lighter;
|
||||
border-color: $--color-success-light;
|
||||
|
||||
.el-message__content {
|
||||
color: $--message-success-color;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(warning) {
|
||||
background-color: $--color-warning-lighter;
|
||||
border-color: $--color-warning-light;
|
||||
|
||||
.el-message__content {
|
||||
color: $--message-warning-color;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(error) {
|
||||
background-color: $--color-danger-lighter;
|
||||
border-color: $--color-danger-light;
|
||||
|
||||
.el-message__content {
|
||||
color: $--message-danger-color;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(icon) {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
@include e(content) {
|
||||
padding: 0;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
&:focus {
|
||||
outline-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(closeBtn) {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 15px;
|
||||
transform: translateY(-50%);
|
||||
cursor: pointer;
|
||||
color: $--message-close-color;
|
||||
font-size: $--message-close-size;
|
||||
|
||||
&:focus {
|
||||
outline-width: 0;
|
||||
}
|
||||
&:hover {
|
||||
color: $--message-close-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
& .el-icon-success {
|
||||
color: $--message-success-color;
|
||||
}
|
||||
|
||||
& .el-icon-error {
|
||||
color: $--message-danger-color;
|
||||
}
|
||||
|
||||
& .el-icon-info {
|
||||
color: $--message-info-color;
|
||||
}
|
||||
|
||||
& .el-icon-warning {
|
||||
color: $--message-warning-color;
|
||||
}
|
||||
}
|
||||
|
||||
.el-message-fade-enter,
|
||||
.el-message-fade-leave-active {
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -100%);
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
@import "../common/var";
|
||||
@mixin button-plain($color) {
|
||||
color: $color;
|
||||
background: mix($--color-white, $color, 90%);
|
||||
border-color: mix($--color-white, $color, 60%);
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background: $color;
|
||||
border-color: $color;
|
||||
color: $--color-white;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: mix($--color-black, $color, $--button-active-shade-percent);
|
||||
border-color: mix($--color-black, $color, $--button-active-shade-percent);
|
||||
color: $--color-white;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
color: mix($--color-white, $color, 40%);
|
||||
background-color: mix($--color-white, $color, 90%);
|
||||
border-color: mix($--color-white, $color, 80%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin button-variant($color, $background-color, $border-color) {
|
||||
color: $color;
|
||||
background-color: $background-color;
|
||||
border-color: $border-color;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background: mix($--color-white, $background-color, $--button-hover-tint-percent);
|
||||
border-color: mix($--color-white, $border-color, $--button-hover-tint-percent);
|
||||
color: $color;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: mix($--color-black, $background-color, $--button-active-shade-percent);
|
||||
border-color: mix($--color-black, $border-color, $--button-active-shade-percent);
|
||||
color: $color;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&.is-active {
|
||||
background: mix($--color-black, $background-color, $--button-active-shade-percent);
|
||||
border-color: mix($--color-black, $border-color, $--button-active-shade-percent);
|
||||
color: $color;
|
||||
}
|
||||
|
||||
&.is-disabled {
|
||||
&,
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
color: $--color-white;
|
||||
background-color: mix($background-color, $--color-white);
|
||||
border-color: mix($border-color, $--color-white);
|
||||
}
|
||||
}
|
||||
|
||||
&.is-plain {
|
||||
@include button-plain($background-color);
|
||||
}
|
||||
}
|
||||
|
||||
@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) {
|
||||
padding: $padding-vertical $padding-horizontal;
|
||||
font-size: $font-size;
|
||||
border-radius: $border-radius;
|
||||
&.is-round {
|
||||
padding: $padding-vertical $padding-horizontal;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
$namespace: 'el';
|
||||
$element-separator: '__';
|
||||
$modifier-separator: '--';
|
||||
$state-prefix: 'is-';
|
|
@ -0,0 +1,44 @@
|
|||
@import "config";
|
||||
|
||||
/* BEM support Func
|
||||
-------------------------- */
|
||||
@function selectorToString($selector) {
|
||||
$selector: inspect($selector);
|
||||
$selector: str-slice($selector, 2, -2);
|
||||
@return $selector;
|
||||
}
|
||||
|
||||
@function containsModifier($selector) {
|
||||
$selector: selectorToString($selector);
|
||||
|
||||
@if str-index($selector, $modifier-separator) {
|
||||
@return true;
|
||||
} @else {
|
||||
@return false;
|
||||
}
|
||||
}
|
||||
|
||||
@function containWhenFlag($selector) {
|
||||
$selector: selectorToString($selector);
|
||||
|
||||
@if str-index($selector, '.' + $state-prefix) {
|
||||
@return true
|
||||
} @else {
|
||||
@return false
|
||||
}
|
||||
}
|
||||
|
||||
@function containPseudoClass($selector) {
|
||||
$selector: selectorToString($selector);
|
||||
|
||||
@if str-index($selector, ':') {
|
||||
@return true
|
||||
} @else {
|
||||
@return false
|
||||
}
|
||||
}
|
||||
|
||||
@function hitAllSpecialNestRule($selector) {
|
||||
|
||||
@return containsModifier($selector) or containWhenFlag($selector) or containPseudoClass($selector);
|
||||
}
|
|
@ -0,0 +1,190 @@
|
|||
@import "function";
|
||||
@import "../common/var";
|
||||
|
||||
/* Break-points
|
||||
-------------------------- */
|
||||
@mixin res($key, $map: $--breakpoints) {
|
||||
// 循环断点Map,如果存在则返回
|
||||
@if map-has-key($map, $key) {
|
||||
@media only screen and #{inspect(map-get($map, $key))} {
|
||||
@content;
|
||||
}
|
||||
} @else {
|
||||
@warn "Undefeined points: `#{$map}`";
|
||||
}
|
||||
}
|
||||
|
||||
/* Scrollbar
|
||||
-------------------------- */
|
||||
@mixin scroll-bar {
|
||||
$--scrollbar-thumb-background: #b4bccc;
|
||||
$--scrollbar-track-background: #fff;
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
z-index: 11;
|
||||
width: 6px;
|
||||
|
||||
&:horizontal {
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
&-thumb {
|
||||
border-radius: 5px;
|
||||
width: 6px;
|
||||
background: $--scrollbar-thumb-background;
|
||||
}
|
||||
|
||||
&-corner {
|
||||
background: $--scrollbar-track-background;
|
||||
}
|
||||
|
||||
&-track {
|
||||
background: $--scrollbar-track-background;
|
||||
|
||||
&-piece {
|
||||
background: $--scrollbar-track-background;
|
||||
width: 6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Placeholder
|
||||
-------------------------- */
|
||||
@mixin placeholder {
|
||||
&::-webkit-input-placeholder {
|
||||
@content
|
||||
}
|
||||
|
||||
&::-moz-placeholder {
|
||||
@content
|
||||
}
|
||||
|
||||
&:-ms-input-placeholder {
|
||||
@content
|
||||
}
|
||||
}
|
||||
|
||||
/* BEM
|
||||
-------------------------- */
|
||||
@mixin b($block) {
|
||||
$B: $namespace+'-'+$block !global;
|
||||
|
||||
.#{$B} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin e($element) {
|
||||
$E: $element !global;
|
||||
$selector: &;
|
||||
$currentSelector: "";
|
||||
@each $unit in $element {
|
||||
$currentSelector: #{$currentSelector + "." + $B + $element-separator + $unit + ","};
|
||||
}
|
||||
|
||||
@if hitAllSpecialNestRule($selector) {
|
||||
@at-root {
|
||||
#{$selector} {
|
||||
#{$currentSelector} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
@at-root {
|
||||
#{$currentSelector} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin m($modifier) {
|
||||
$selector: &;
|
||||
$currentSelector: "";
|
||||
@each $unit in $modifier {
|
||||
$currentSelector: #{$currentSelector + & + $modifier-separator + $unit + ","};
|
||||
}
|
||||
|
||||
@at-root {
|
||||
#{$currentSelector} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin configurable-m($modifier, $E-flag: false) {
|
||||
$selector: &;
|
||||
$interpolation: '';
|
||||
|
||||
@if $E-flag {
|
||||
$interpolation: $element-separator + $E-flag;
|
||||
}
|
||||
|
||||
@at-root {
|
||||
#{$selector} {
|
||||
.#{$B+$interpolation+$modifier-separator+$modifier} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin spec-selector($specSelector: '', $element: $E, $modifier: false, $block: $B) {
|
||||
$modifierCombo: '';
|
||||
|
||||
@if $modifier {
|
||||
$modifierCombo: $modifier-separator + $modifier;
|
||||
}
|
||||
|
||||
@at-root {
|
||||
#{&}#{$specSelector}.#{$block+$element-separator+$element+$modifierCombo} {
|
||||
@content
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin meb($modifier: false, $element: $E, $block: $B) {
|
||||
$selector: &;
|
||||
$modifierCombo: '';
|
||||
|
||||
@if $modifier {
|
||||
$modifierCombo: $modifier-separator + $modifier;
|
||||
}
|
||||
|
||||
@at-root {
|
||||
#{$selector} {
|
||||
.#{$block+$element-separator+$element+$modifierCombo} {
|
||||
@content
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin when($state) {
|
||||
@at-root {
|
||||
&.#{$state-prefix + $state} {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin extend-rule($name) {
|
||||
@extend #{'%shared-'+$name};
|
||||
}
|
||||
|
||||
@mixin share-rule($name) {
|
||||
$rule-name: '%shared-'+$name;
|
||||
|
||||
@at-root #{$rule-name} {
|
||||
@content
|
||||
}
|
||||
}
|
||||
|
||||
@mixin pseudo($pseudo) {
|
||||
@at-root #{&}#{':#{$pseudo}'} {
|
||||
@content
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
@mixin utils-user-select($value) {
|
||||
-moz-user-select: $value;
|
||||
-webkit-user-select: $value;
|
||||
-ms-user-select: $value;
|
||||
}
|
||||
|
||||
@mixin utils-clearfix {
|
||||
$selector: &;
|
||||
|
||||
@at-root {
|
||||
#{$selector}::before,
|
||||
#{$selector}::after {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
#{$selector}::after {
|
||||
clear: both
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin utils-vertical-center {
|
||||
$selector: &;
|
||||
|
||||
@at-root {
|
||||
#{$selector}::after {
|
||||
display: inline-block;
|
||||
content: "";
|
||||
height: 100%;
|
||||
vertical-align: middle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin utils-ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(notification) {
|
||||
display: flex;
|
||||
width: $--notification-width;
|
||||
padding: $--notification-padding;
|
||||
border-radius: $--notification-radius;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid $--notification-border-color;
|
||||
position: fixed;
|
||||
background-color: $--color-white;
|
||||
box-shadow: $--notification-shadow;
|
||||
transition: opacity .3s, transform .3s, left .3s, right .3s, top 0.4s, bottom .3s;
|
||||
overflow: hidden;
|
||||
|
||||
&.right {
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
&.left {
|
||||
left: 16px;
|
||||
}
|
||||
|
||||
@include e(group) {
|
||||
margin-left: $--notification-group-margin;
|
||||
}
|
||||
|
||||
@include e(title) {
|
||||
font-weight: bold;
|
||||
font-size: $--notification-title-font-size;
|
||||
color: $--notification-title-color;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@include e(content) {
|
||||
font-size: $--notification-font-size;
|
||||
line-height: 21px;
|
||||
margin: 6px 0 0 0;
|
||||
color: $--notification-color;
|
||||
text-align: justify;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(icon) {
|
||||
height: $--notification-icon-size;
|
||||
width: $--notification-icon-size;
|
||||
font-size: $--notification-icon-size;
|
||||
}
|
||||
|
||||
@include e(closeBtn) {
|
||||
position: absolute;
|
||||
top: 18px;
|
||||
right: 15px;
|
||||
cursor: pointer;
|
||||
color: $--notification-close-color;
|
||||
font-size: $--notification-close-font-size;
|
||||
|
||||
&:hover {
|
||||
color: $--notification-close-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
.el-icon-success {
|
||||
color: $--notification-success-color;
|
||||
}
|
||||
|
||||
.el-icon-error {
|
||||
color: $--notification-danger-color;
|
||||
}
|
||||
|
||||
.el-icon-info {
|
||||
color: $--notification-info-color;
|
||||
}
|
||||
|
||||
.el-icon-warning {
|
||||
color: $--notification-warning-color;
|
||||
}
|
||||
}
|
||||
|
||||
.el-notification-fade-enter {
|
||||
&.right {
|
||||
right: 0;
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
&.left {
|
||||
left: 0;
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
|
||||
.el-notification-fade-leave-active {
|
||||
opacity: 0;
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(select-group) {
|
||||
$gap: 20px;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
@include e(wrap) {
|
||||
position: relative;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
&:not(:last-of-type) {
|
||||
padding-bottom: 24px;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
display: block;
|
||||
left: $gap;
|
||||
right: $gap;
|
||||
bottom: 12px;
|
||||
height: 1px;
|
||||
background: $--border-color-light;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(title) {
|
||||
padding-left: $gap;
|
||||
font-size: $--select-group-font-size;
|
||||
color: $--select-group-color;
|
||||
line-height: $--select-group-height;
|
||||
}
|
||||
|
||||
& .el-select-dropdown__item {
|
||||
padding-left: $gap;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(select-dropdown) {
|
||||
@include e(item) {
|
||||
font-size: $--select-font-size;
|
||||
padding: 0 20px;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: $--select-option-color;
|
||||
height: $--select-option-height;
|
||||
line-height: $--select-option-height;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
|
||||
@include when(disabled) {
|
||||
color: $--select-option-disabled-color;
|
||||
cursor: not-allowed;
|
||||
|
||||
&:hover {
|
||||
background-color: $--color-white;
|
||||
}
|
||||
}
|
||||
|
||||
&.hover, &:hover {
|
||||
background-color: $--select-option-hover-background;
|
||||
}
|
||||
|
||||
&.selected {
|
||||
color: $--select-option-selected;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,295 @@
|
|||
@import "mixins/mixins";
|
||||
@import "mixins/utils";
|
||||
@import "common/var";
|
||||
@import "select";
|
||||
|
||||
@include b(pagination) {
|
||||
white-space: nowrap;
|
||||
padding: 2px 5px;
|
||||
color: $--pagination-color;
|
||||
font-weight: bold;
|
||||
@include utils-clearfix;
|
||||
|
||||
span:not([class*=suffix]),
|
||||
button {
|
||||
display: inline-block;
|
||||
font-size: $--pagination-font-size;
|
||||
min-width: $--pagination-button-width;
|
||||
height: $--pagination-button-height;
|
||||
line-height: $--pagination-button-height;
|
||||
vertical-align: top;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.el-input__inner {
|
||||
text-align: center;
|
||||
-moz-appearance: textfield;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
// pagesize 的下拉 icon
|
||||
.el-input__suffix {
|
||||
right: 0;
|
||||
transform: scale(.8);
|
||||
}
|
||||
|
||||
.el-select .el-input {
|
||||
width: 100px;
|
||||
margin: 0 5px;
|
||||
|
||||
.el-input__inner {
|
||||
padding-right: 25px;
|
||||
border-radius: $--pagination-border-radius;
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
border: none;
|
||||
padding: 0 6px;
|
||||
background: transparent;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $--pagination-hover-fill;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
color: $--pagination-button-disabled-color;
|
||||
background-color: $--pagination-button-disabled-fill;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-prev,
|
||||
.btn-next {
|
||||
background: center center no-repeat;
|
||||
background-size: 16px;
|
||||
background-color: $--pagination-fill;
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
color: $--pagination-button-color;
|
||||
|
||||
.el-icon {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-prev {
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.btn-next {
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
.el-pager li.disabled {
|
||||
color: $--color-text-placeholder;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
@include m(small) {
|
||||
.btn-prev,
|
||||
.btn-next,
|
||||
.el-pager li,
|
||||
.el-pager li.btn-quicknext,
|
||||
.el-pager li.btn-quickprev,
|
||||
.el-pager li:last-child {
|
||||
border-color: transparent;
|
||||
font-size: 12px;
|
||||
line-height: 22px;
|
||||
height: 22px;
|
||||
min-width: 22px;
|
||||
}
|
||||
|
||||
.arrow.disabled {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.more::before,
|
||||
li.more::before {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
span:not([class*=suffix]),
|
||||
button {
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
@include e(editor) {
|
||||
height: 22px;
|
||||
&.el-input .el-input__inner {
|
||||
height: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(sizes) {
|
||||
margin: 0 10px 0 0;
|
||||
font-weight: normal;
|
||||
color: $--color-text-regular;
|
||||
|
||||
.el-input .el-input__inner {
|
||||
font-size: $--pagination-font-size;
|
||||
padding-left: 8px;
|
||||
|
||||
&:hover {
|
||||
border-color: $--pagination-hover-fill;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include e(total) {
|
||||
margin-right: 10px;
|
||||
font-weight: normal;
|
||||
color: $--color-text-regular;
|
||||
}
|
||||
|
||||
@include e(jump) {
|
||||
margin-left: 24px;
|
||||
font-weight: normal;
|
||||
color: $--color-text-regular;
|
||||
|
||||
.el-input__inner {
|
||||
padding: 0 3px;
|
||||
}
|
||||
}
|
||||
|
||||
@include e(rightwrapper) {
|
||||
float: right;
|
||||
}
|
||||
|
||||
@include e(editor) {
|
||||
line-height: 18px;
|
||||
padding: 0 2px;
|
||||
height: $--pagination-button-height;
|
||||
|
||||
text-align: center;
|
||||
margin: 0 2px;
|
||||
box-sizing: border-box;
|
||||
border-radius: $--pagination-border-radius;
|
||||
|
||||
&.el-input {
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
&.el-input .el-input__inner {
|
||||
height: $--pagination-button-height;
|
||||
}
|
||||
|
||||
.el-input__inner::-webkit-inner-spin-button,
|
||||
.el-input__inner::-webkit-outer-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(background) {
|
||||
.btn-prev,
|
||||
.btn-next,
|
||||
.el-pager li {
|
||||
margin: 0 5px;
|
||||
background-color: $--color-info-lighter;
|
||||
color: $--color-text-regular;
|
||||
min-width: 30px;
|
||||
border-radius: 2px;
|
||||
|
||||
&.disabled {
|
||||
color: $--color-text-placeholder;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-prev, .btn-next {
|
||||
padding: 0;
|
||||
|
||||
&:disabled {
|
||||
color: $--color-text-placeholder;
|
||||
}
|
||||
}
|
||||
|
||||
.el-pager li:not(.disabled) {
|
||||
&:hover {
|
||||
color: $--pagination-hover-fill;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: $--color-primary;
|
||||
color: $--color-white;
|
||||
}
|
||||
}
|
||||
|
||||
&.el-pagination--small {
|
||||
.btn-prev,
|
||||
.btn-next,
|
||||
.el-pager li {
|
||||
margin: 0 3px;
|
||||
min-width: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(pager) {
|
||||
user-select: none;
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
font-size: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
.more::before {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
li {
|
||||
padding: 0 4px;
|
||||
background: $--pagination-fill;
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
font-size: $--pagination-font-size;
|
||||
min-width: $--pagination-button-width;
|
||||
height: $--pagination-button-height;
|
||||
line-height: $--pagination-button-height;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
|
||||
&.btn-quicknext,
|
||||
&.btn-quickprev {
|
||||
line-height: 28px;
|
||||
color: $--pagination-button-color;
|
||||
|
||||
&.disabled {
|
||||
color: $--color-text-placeholder;
|
||||
}
|
||||
}
|
||||
|
||||
&.btn-quickprev:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&.btn-quicknext:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&.active + li {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $--pagination-hover-fill;
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: $--pagination-hover-fill;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
@import "./popper";
|
||||
|
||||
@include b(popover) {
|
||||
position: absolute;
|
||||
background: $--popover-fill;
|
||||
min-width: 150px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid $--popover-border-color;
|
||||
padding: $--popover-padding;
|
||||
z-index: $--index-popper;
|
||||
color: $--color-text-regular;
|
||||
line-height: 1.4;
|
||||
text-align: justify;
|
||||
font-size: $--popover-font-size;
|
||||
box-shadow: $--box-shadow-light;
|
||||
|
||||
@include m(plain) {
|
||||
padding: $--popover-padding-large;
|
||||
}
|
||||
|
||||
@include e(title) {
|
||||
color: $--popover-title-color;
|
||||
font-size: $--popover-title-font-size;
|
||||
line-height: 1;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
@include e(reference) {
|
||||
&:focus:not(.focusing), &:focus:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus:active, &:focus {
|
||||
outline-width: 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
@import "mixins/mixins";
|
||||
@import "common/var";
|
||||
|
||||
@include b(popper) {
|
||||
.popper__arrow,
|
||||
.popper__arrow::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.popper__arrow {
|
||||
border-width: $--popover-arrow-size;
|
||||
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03))
|
||||
}
|
||||
|
||||
.popper__arrow::after {
|
||||
content: " ";
|
||||
border-width: $--popover-arrow-size;
|
||||
}
|
||||
|
||||
&[x-placement^="top"] {
|
||||
margin-bottom: #{$--popover-arrow-size + 6};
|
||||
}
|
||||
|
||||
&[x-placement^="top"] .popper__arrow {
|
||||
bottom: -$--popover-arrow-size;
|
||||
left: 50%;
|
||||
margin-right: #{$--tooltip-arrow-size / 2};
|
||||
border-top-color: $--popover-border-color;
|
||||
border-bottom-width: 0;
|
||||
|
||||
&::after {
|
||||
bottom: 1px;
|
||||
margin-left: -$--popover-arrow-size;
|
||||
border-top-color: $--popover-fill;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&[x-placement^="bottom"] {
|
||||
margin-top: #{$--popover-arrow-size + 6};
|
||||
}
|
||||
|
||||
&[x-placement^="bottom"] .popper__arrow {
|
||||
top: -$--popover-arrow-size;
|
||||
left: 50%;
|
||||
margin-right: #{$--tooltip-arrow-size / 2};
|
||||
border-top-width: 0;
|
||||
border-bottom-color: $--popover-border-color;
|
||||
|
||||
&::after {
|
||||
top: 1px;
|
||||
margin-left: -$--popover-arrow-size;
|
||||
border-top-width: 0;
|
||||
border-bottom-color: $--popover-fill;
|
||||
}
|
||||
}
|
||||
|
||||
&[x-placement^="right"] {
|
||||
margin-left: #{$--popover-arrow-size + 6};
|
||||
}
|
||||
|
||||
&[x-placement^="right"] .popper__arrow {
|
||||
top: 50%;
|
||||
left: -$--popover-arrow-size;
|
||||
margin-bottom: #{$--tooltip-arrow-size / 2};
|
||||
border-right-color: $--popover-border-color;
|
||||
border-left-width: 0;
|
||||
|
||||
&::after {
|
||||
bottom: -$--popover-arrow-size;
|
||||
left: 1px;
|
||||
border-right-color: $--popover-fill;
|
||||
border-left-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&[x-placement^="left"] {
|
||||
margin-right: #{$--popover-arrow-size + 6};
|
||||
}
|
||||
|
||||
&[x-placement^="left"] .popper__arrow {
|
||||
top: 50%;
|
||||
right: -$--popover-arrow-size;
|
||||
margin-bottom: #{$--tooltip-arrow-size / 2};
|
||||
border-right-width: 0;
|
||||
border-left-color: $--popover-border-color;
|
||||
|
||||
&::after {
|
||||
right: 1px;
|
||||
bottom: -$--popover-arrow-size;
|
||||
margin-left: -$--popover-arrow-size;
|
||||
border-right-width: 0;
|
||||
border-left-color: $--popover-fill;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
@import "mixins/mixins";
|
||||
@import "mixins/utils";
|
||||
@import "common/var";
|
||||
|
||||
@include b(progress) {
|
||||
position: relative;
|
||||
line-height: 1;
|
||||
|
||||
@include e(text) {
|
||||
font-size:14px;
|
||||
color: $--color-text-regular;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-left: 10px;
|
||||
line-height: 1;
|
||||
|
||||
i {
|
||||
vertical-align: middle;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(circle) {
|
||||
display: inline-block;
|
||||
|
||||
.el-progress__text {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
transform: translate(0, -50%);
|
||||
|
||||
i {
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include m(without-text) {
|
||||
.el-progress__text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.el-progress-bar {
|
||||
padding-right: 0;
|
||||
margin-right: 0;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@include m(text-inside) {
|
||||
.el-progress-bar {
|
||||
padding-right: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(success) {
|
||||
.el-progress-bar__inner {
|
||||
background-color: $--color-success;
|
||||
}
|
||||
|
||||
.el-progress__text {
|
||||
color: $--color-success;
|
||||
}
|
||||
}
|
||||
|
||||
@include when(exception) {
|
||||
.el-progress-bar__inner {
|
||||
background-color: $--color-danger;
|
||||
}
|
||||
|
||||
.el-progress__text {
|
||||
color: $--color-danger;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include b(progress-bar) {
|
||||
padding-right: 50px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 100%;
|
||||
margin-right: -55px;
|
||||
box-sizing: border-box;
|
||||
|
||||
@include e(outer) {
|
||||
height: 6px;
|
||||
border-radius: 100px;
|
||||
background-color: $--border-color-lighter;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
}
|
||||
@include e(inner) {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
background-color: $--color-primary;
|
||||
text-align: right;
|
||||
border-radius: 100px;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
|
||||
@include utils-vertical-center;
|
||||
}
|
||||
|
||||
@include e(innerText) {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
color: $--color-white;
|
||||
font-size: 12px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes progress {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 32px 0;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue