Skip to content

Commit

Permalink
还原
Browse files Browse the repository at this point in the history
  • Loading branch information
z10026393 committed Aug 9, 2021
1 parent 547e729 commit ee44108
Show file tree
Hide file tree
Showing 168 changed files with 519 additions and 519 deletions.
4 changes: 2 additions & 2 deletions .babelrc
Expand Up @@ -29,9 +29,9 @@
],
"plugins": [
["module-resolver", {
"root": ["td-element-week"],
"root": ["element-ui"],
"alias": {
"td-element-week/src": "td-element-week/lib"
"element-ui/src": "element-ui/lib"
}
}]
]
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Expand Up @@ -11,12 +11,12 @@ lerna-debug.log.*
lib
.idea
.vscode
examples/td-element-week
examples/element-ui
examples/pages/en-US
examples/pages/zh-CN
examples/pages/es
examples/pages/fr-FR
fe.element/td-element-week
fe.element/element-ui
.npmrc
coverage
waiter.config.js
Expand Down
26 changes: 13 additions & 13 deletions README.md
Expand Up @@ -9,21 +9,21 @@
<a href="https://coveralls.io/github/ElemeFE/element?branch=master">
<img src="https://coveralls.io/repos/github/ElemeFE/element/badge.svg?branch=master">
</a>
<a href="https://cdnjs.com/libraries/td-element-week">
<img src="https://img.shields.io/cdnjs/v/td-element-week.svg">
<a href="https://cdnjs.com/libraries/element-ui">
<img src="https://img.shields.io/cdnjs/v/element-ui.svg">
</a>
<a href="https://www.npmjs.org/package/td-element-week">
<img src="https://img.shields.io/npm/v/td-element-week.svg">
<a href="https://www.npmjs.org/package/element-ui">
<img src="https://img.shields.io/npm/v/element-ui.svg">
</a>
<a href="https://npmcharts.com/compare/td-element-week?minimal=true">
<img src="http://img.shields.io/npm/dm/td-element-week.svg">
<a href="https://npmcharts.com/compare/element-ui?minimal=true">
<img src="http://img.shields.io/npm/dm/element-ui.svg">
</a>
<br>
<a href="http://img.badgesize.io/https://unpkg.com/td-element-week/lib/index.js?compression=gzip&label=gzip%20size:%20JS">
<img src="http://img.badgesize.io/https://unpkg.com/td-element-week/lib/index.js?compression=gzip&label=gzip%20size:%20JS">
<a href="http://img.badgesize.io/https://unpkg.com/element-ui/lib/index.js?compression=gzip&label=gzip%20size:%20JS">
<img src="http://img.badgesize.io/https://unpkg.com/element-ui/lib/index.js?compression=gzip&label=gzip%20size:%20JS">
</a>
<a href="http://img.badgesize.io/https://unpkg.com/td-element-week/lib/theme-chalk/index.css?compression=gzip&label=gzip%20size:%20CSS">
<img src="http://img.badgesize.io/https://unpkg.com/td-element-week/lib/theme-chalk/index.css?compression=gzip&label=gzip%20size:%20CSS">
<a href="http://img.badgesize.io/https://unpkg.com/element-ui/lib/theme-chalk/index.css?compression=gzip&label=gzip%20size:%20CSS">
<img src="http://img.badgesize.io/https://unpkg.com/element-ui/lib/theme-chalk/index.css?compression=gzip&label=gzip%20size:%20CSS">
</a>
<a href="#backers">
<img src="https://opencollective.com/element/backers/badge.svg">
Expand Down Expand Up @@ -67,13 +67,13 @@ For Vue 3.0, we recommend using [Element Plus](https://github.com/element-plus/e

## Install
```shell
npm install td-element-week -S
npm install element-ui -S
```

## Quick Start
``` javascript
import Vue from 'vue'
import Element from 'td-element-week'
import Element from 'element-ui'

Vue.use(Element)

Expand All @@ -82,7 +82,7 @@ import {
Select,
Button
// ...
} from 'td-element-week'
} from 'element-ui'

Vue.component(Select.name, Select)
Vue.component(Button.name, Button)
Expand Down
4 changes: 2 additions & 2 deletions build/bin/build-entry.js
Expand Up @@ -11,8 +11,8 @@ var INSTALL_COMPONENT_TEMPLATE = ' {{name}}';
var MAIN_TEMPLATE = `/* Automatically generated by './build/bin/build-entry.js' */
{{include}}
import locale from 'td-element-week/src/locale';
import CollapseTransition from 'td-element-week/src/transitions/collapse-transition';
import locale from 'element-ui/src/locale';
import CollapseTransition from 'element-ui/src/transitions/collapse-transition';
const components = [
{{install}},
Expand Down
4 changes: 2 additions & 2 deletions build/bin/new.js
Expand Up @@ -112,8 +112,8 @@ fileSave(sassPath)
.write(sassImportText, 'utf8')
.end('\n');

// 添加到 td-element-week.d.ts
const elementTsPath = path.join(__dirname, '../../types/td-element-week.d.ts');
// 添加到 element-ui.d.ts
const elementTsPath = path.join(__dirname, '../../types/element-ui.d.ts');

let elementTsText = `${fs.readFileSync(elementTsPath)}
/** ${ComponentName} Component */
Expand Down
12 changes: 6 additions & 6 deletions build/config.js
Expand Up @@ -9,21 +9,21 @@ var transitionList = fs.readdirSync(path.resolve(__dirname, '../src/transitions'
var externals = {};

Object.keys(Components).forEach(function(key) {
externals[`td-element-week/packages/${key}`] = `td-element-week/lib/${key}`;
externals[`element-ui/packages/${key}`] = `element-ui/lib/${key}`;
});

externals['td-element-week/src/locale'] = 'td-element-week/lib/locale';
externals['element-ui/src/locale'] = 'element-ui/lib/locale';
utilsList.forEach(function(file) {
file = path.basename(file, '.js');
externals[`td-element-week/src/utils/${file}`] = `td-element-week/lib/utils/${file}`;
externals[`element-ui/src/utils/${file}`] = `element-ui/lib/utils/${file}`;
});
mixinsList.forEach(function(file) {
file = path.basename(file, '.js');
externals[`td-element-week/src/mixins/${file}`] = `td-element-week/lib/mixins/${file}`;
externals[`element-ui/src/mixins/${file}`] = `element-ui/lib/mixins/${file}`;
});
transitionList.forEach(function(file) {
file = path.basename(file, '.js');
externals[`td-element-week/src/transitions/${file}`] = `td-element-week/lib/transitions/${file}`;
externals[`element-ui/src/transitions/${file}`] = `element-ui/lib/transitions/${file}`;
});

externals = [Object.assign({
Expand All @@ -36,7 +36,7 @@ exports.alias = {
main: path.resolve(__dirname, '../src'),
packages: path.resolve(__dirname, '../packages'),
examples: path.resolve(__dirname, '../examples'),
'td-element-week': path.resolve(__dirname, '../')
'element-ui': path.resolve(__dirname, '../')
};

exports.vue = {
Expand Down
6 changes: 3 additions & 3 deletions build/deploy-ci.sh
Expand Up @@ -44,8 +44,8 @@ if [ "$TRAVIS_TAG" ]; then
mkdir $SUB_FOLDER
rm -rf *.js *.css *.map static
rm -rf $SUB_FOLDER/**
cp -rf ../../examples/td-element-week/** .
cp -rf ../../examples/td-element-week/** $SUB_FOLDER/
cp -rf ../../examples/element-ui/** .
cp -rf ../../examples/element-ui/** $SUB_FOLDER/
git add -A .
git commit -m "$TRAVIS_COMMIT_MSG"
git push origin gh-pages
Expand All @@ -61,7 +61,7 @@ cd temp_web
git clone https://$ROT_TOKEN@github.com/ElementUI/dev.git && cd dev
mkdir $TRAVIS_BRANCH
rm -rf $TRAVIS_BRANCH/**
cp -rf ../../examples/td-element-week/** $TRAVIS_BRANCH/
cp -rf ../../examples/element-ui/** $TRAVIS_BRANCH/
git add -A .
git commit -m "$TRAVIS_COMMIT_MSG"
git push origin master
Expand Down
4 changes: 2 additions & 2 deletions build/deploy-faas.sh
Expand Up @@ -10,8 +10,8 @@ SUB_FOLDER='2.15'
mkdir -p $SUB_FOLDER
rm -rf *.js *.css *.map static
rm -rf $SUB_FOLDER/**
cp -rf ../../examples/td-element-week/** .
cp -rf ../../examples/td-element-week/** $SUB_FOLDER/
cp -rf ../../examples/element-ui/** .
cp -rf ../../examples/element-ui/** $SUB_FOLDER/
cd ../..

# deploy domestic site
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.common.js
Expand Up @@ -12,7 +12,7 @@ module.exports = {
output: {
path: path.resolve(process.cwd(), './lib'),
publicPath: '/dist/',
filename: 'td-element-week.common.js',
filename: 'element-ui.common.js',
chunkFilename: '[id].js',
libraryExport: 'default',
library: 'ELEMENT',
Expand Down
4 changes: 2 additions & 2 deletions build/webpack.demo.js
Expand Up @@ -19,7 +19,7 @@ const webpackConfig = {
docs: './examples/entry.js'
} : (isPlay ? './examples/play.js' : './examples/entry.js'),
output: {
path: path.resolve(process.cwd(), './examples/td-element-week/'),
path: path.resolve(process.cwd(), './examples/element-ui/'),
publicPath: process.env.CI_ENV || '',
filename: '[name].[hash:7].js',
chunkFilename: isProd ? '[name].[hash:7].js' : '[name].js'
Expand Down Expand Up @@ -152,7 +152,7 @@ if (isProd) {
cacheGroups: {
vendor: {
test: /\/src\//,
name: 'td-element-week',
name: 'element-ui',
chunks: 'all'
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/components/demo-block.vue
Expand Up @@ -206,10 +206,10 @@
// since 2.6.2 use code rather than jsfiddle https://blog.codepen.io/documentation/api/prefill/
const { script, html, style } = this.codepen;
const resourcesTpl = '<scr' + 'ipt src="//unpkg.com/vue/dist/vue.js"></scr' + 'ipt>' +
'\n<scr' + `ipt src="//unpkg.com/td-element-week@${ version }/lib/index.js"></scr` + 'ipt>';
'\n<scr' + `ipt src="//unpkg.com/element-ui@${ version }/lib/index.js"></scr` + 'ipt>';
let jsTpl = (script || '').replace(/export default/, 'var Main =').trim();
let htmlTpl = `${resourcesTpl}\n<div id="app">\n${html.trim()}\n</div>`;
let cssTpl = `@import url("//unpkg.com/td-element-week@${ version }/lib/theme-chalk/index.css");\n${(style || '').trim()}\n`;
let cssTpl = `@import url("//unpkg.com/element-ui@${ version }/lib/theme-chalk/index.css");\n${(style || '').trim()}\n`;
jsTpl = jsTpl
? jsTpl + '\nvar Ctor = Vue.extend(Main)\nnew Ctor().$mount(\'#app\')'
: 'new Vue().$mount(\'#app\')';
Expand Down
2 changes: 1 addition & 1 deletion examples/components/footer.vue
Expand Up @@ -16,7 +16,7 @@
<a :href="gitterLink" class="footer-main-link" target="_blank">{{ langConfig.gitter }}</a>
<a href="https://github.com/ElemeFE/element/issues" class="footer-main-link" target="_blank">{{ langConfig.feedback }}</a>
<a :href="`https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.${ lang }.md`" class="footer-main-link" target="_blank">{{ langConfig.contribution }}</a>
<a href="https://segmentfault.com/t/td-element-week" class="footer-main-link" target="_blank">SegmentFault</a>
<a href="https://segmentfault.com/t/element-ui" class="footer-main-link" target="_blank">SegmentFault</a>
<a href="https://github.com/ElementUI/awesome-element" class="footer-main-link" target="_blank">Awesome Element</a>
</div>
<div class="footer-social">
Expand Down
Expand Up @@ -51,10 +51,10 @@
import AlphaSlider from './alpha-slider';
import Predefine from './predefine';
import ColorList from './color-list';
import Popper from 'td-element-week/src/utils/vue-popper';
import Locale from 'td-element-week/src/mixins/locale';
import ElInput from 'td-element-week/packages/input';
import ElButton from 'td-element-week/packages/button';
import Popper from 'element-ui/src/utils/vue-popper';
import Locale from 'element-ui/src/mixins/locale';
import ElInput from 'element-ui/packages/input';
import ElButton from 'element-ui/packages/button';

export default {
name: 'el-color-picker-dropdown',
Expand Down
Expand Up @@ -34,8 +34,8 @@
<script>
import Color from './color';
import PickerDropdown from './components/picker-dropdown.vue';
import Clickoutside from 'td-element-week/src/utils/clickoutside';
import Emitter from 'td-element-week/src/mixins/emitter';
import Clickoutside from 'element-ui/src/utils/clickoutside';
import Emitter from 'element-ui/src/mixins/emitter';
export default {
name: 'ElColorPicker',
Expand Down
2 changes: 1 addition & 1 deletion examples/components/theme-picker.vue
Expand Up @@ -59,7 +59,7 @@
const docsHandler = getHandler('docs', 'docs-style');
if (!this.chalk) {
const url = `https://unpkg.com/td-element-week@${ version }/lib/theme-chalk/index.css`;
const url = `https://unpkg.com/element-ui@${ version }/lib/theme-chalk/index.css`;
this.getCSSString(url, chalkHandler, 'chalk');
} else {
chalkHandler();
Expand Down
2 changes: 1 addition & 1 deletion examples/components/theme/theme-card.vue
Expand Up @@ -250,7 +250,7 @@ import {
} from './constant.js';
import { savePreviewToLocal } from './localstorage';
import { tintColor } from '../../color.js';
import dateUtil from 'td-element-week/src/utils/date';
import dateUtil from 'element-ui/src/utils/date';
import { getActionDisplayName } from '../theme-configurator/utils/utils';
export default {
Expand Down
10 changes: 5 additions & 5 deletions examples/docs/en-US/custom-theme.md
Expand Up @@ -21,15 +21,15 @@ The above website enables you to preview theme of a new theme color in real-time
$--color-primary: teal;

/* icon font path, required */
$--font-path: '~td-element-week/lib/theme-chalk/fonts';
$--font-path: '~element-ui/lib/theme-chalk/fonts';

@import "~td-element-week/packages/theme-chalk/src/index";
@import "~element-ui/packages/theme-chalk/src/index";
```

Then in the entry file of your project, import this style file instead of Element's built CSS:
```JS
import Vue from 'vue'
import Element from 'td-element-week'
import Element from 'element-ui'
import './element-variables.scss'

Vue.use(Element)
Expand Down Expand Up @@ -107,7 +107,7 @@ Importing your own theme is just like importing the default theme, only this tim

```javascript
import '../theme/index.css'
import ElementUI from 'td-element-week'
import ElementUI from 'element-ui'
import Vue from 'vue'

Vue.use(ElementUI)
Expand All @@ -121,7 +121,7 @@ If you are using `babel-plugin-component` for on-demand import, just modify `.ba
[
"component",
{
"libraryName": "td-element-week",
"libraryName": "element-ui",
"styleLibraryName": "~theme"
}
]
Expand Down

0 comments on commit ee44108

Please sign in to comment.