Skip to content

Commit

Permalink
Merge branch 'master' into tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
zmm-fe committed Sep 6, 2020
2 parents 4735156 + 9bc3c6d commit 8a7e895
Show file tree
Hide file tree
Showing 65 changed files with 3,516 additions and 1,782 deletions.
3 changes: 2 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"plugins": [
"syntax-dynamic-import",
"@ant-design-vue/babel-plugin-jsx",
"@babel/plugin-proposal-optional-chaining"
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator"
],
"env": {
"utils": {
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@
2. 组件加上白名单,比如加一个 'input',执行 `npm run dev`
3. 访问文档(也可访问 http://localhost:8086/#/ ),在对应的组件页面调试报错即可,完成的记得标记。
4. 提交代码前请先拉取代码,commit 时信息格式为 key: content,如 `refactor: refactor alert`,注意表达简洁易懂。

## Install

```js
npm install element3 -S

```

## Quick Start

```js
import "element3/lib/theme-chalk/index.css";
import { createApp } from "vue";
import Element3 from "element3";
import App from "./App.vue";
import 'element3/lib/theme-chalk/index.css'
import { createApp } from 'vue'
import Element3 from 'element3'
import App from './App.vue'

const app = createApp(App);
app.use(Element3);
app.mount("#app");
const app = createApp(App)
app.use(Element3)
app.mount('#app')

// or
import {
Expand All @@ -28,11 +32,16 @@ import {

Vue.use(ElButton)
```

> 注意暂时不要在生产坏境使用
## export components

目前已经导出可以使用的组件列表

- ElButton
- ElSwitch
- ElProgress

## Join Discussion Group

Expand All @@ -44,7 +53,6 @@ Scan the QR code using [Dingtalk App](https://www.dingtalk.com/) to join in disc

[See Contributing Guide.](https://juejin.im/post/6864462363039531022)


<p align="center">
<img src="https://gitee.com/pandafe/element3/raw/master/element_logo.svg">
</p>
Expand Down
20 changes: 14 additions & 6 deletions build/bin/build-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var INSTALL_COMPONENT_TEMPLATE = ' {{name}}'
var MAIN_TEMPLATE = `/* Automatically generated by './build/bin/build-entry.js' */
{{include}}
import locale from 'element-ui/src/locale';
import CollapseTransition from 'element-ui/src/transitions/collapse-transition';
import CollapseTransition from 'element-ui/src/transitions/collapse-transition';
const components = [
{{install}},
Expand All @@ -26,15 +26,15 @@ const install = function(app, opts = {}) {
app.component(component.name, component);
});
// app.use(InfiniteScroll);
// app.use(Loading.directive);
app.use(InfiniteScroll);
app.use(Loading.directive);
app.config.globalProperties.$ELEMENT = {
size: opts.size || '',
zIndex: opts.zIndex || 2000
};
// app.config.globalProperties.$loading = Loading.service;
app.config.globalProperties.$loading = Loading.service;
// app.config.globalProperties.$msgbox = MessageBox;
// app.config.globalProperties.$alert = MessageBox.alert;
// app.config.globalProperties.$confirm = MessageBox.confirm;
Expand All @@ -56,7 +56,6 @@ export default {
i18n: locale.i18n,
install,
CollapseTransition,
// Loading,
{{list}}
};
`
Expand All @@ -72,6 +71,8 @@ var listTemplate = []
ComponentNames.forEach((name) => {
if (
[
'infinite-scroll',
'loading',
'image',
'card',
'alert',
Expand Down Expand Up @@ -111,12 +112,19 @@ ComponentNames.forEach((name) => {
'rate',
'divider',
'progress',
'form',
'form-item'
'message',
'pagination',
'notification',
'page-header',
'message',
'timeline',
'timeline-item',
'input-number',
'step',
'steps',
'popconfirm',
'drawer',
'transfer'
].indexOf(name) > -1
Expand Down Expand Up @@ -148,7 +156,7 @@ ComponentNames.forEach((name) => {
)
}

if (componentName !== 'Loading') listTemplate.push(` ${componentName}`)
listTemplate.push(` ${componentName}`)
} else {
}
})
Expand Down
10 changes: 8 additions & 2 deletions examples/docs/en-US/infiniteScroll.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ Add `v-infinite-scroll` to the list to automatically execute loading method when
:::demo
```html
<template>
<ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto">
<ul
class="infinite-list"
v-infinite-scroll="load"
:infinite-scroll-delay="0"
style="overflow:auto"
>
<li v-for="i in count" class="infinite-list-item">{{ i }}</li>
</ul>
</template>
Expand Down Expand Up @@ -38,7 +43,8 @@ Add `v-infinite-scroll` to the list to automatically execute loading method when
<ul
class="list"
v-infinite-scroll="load"
infinite-scroll-disabled="disabled">
:infinite-scroll-delay="0"
:infinite-scroll-disabled="disabled">
<li v-for="i in count" class="list-item">{{ i }}</li>
</ul>
<p v-if="loading">Loading...</p>
Expand Down
32 changes: 18 additions & 14 deletions examples/docs/en-US/popconfirm.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ Popconfirm is similar to Popover. So for some duplicated attributes, please refe
:::demo Only `title` attribute is avaliable in Popconfirm, `content` will be ignored.
```html
<template>
<el-popconfirm
title="Are you sure to delete this?"
>
<el-button slot="reference">Delete</el-button>
</el-popconfirm>
<el-popconfirm
title="Are you sure to delete this?"
>
<template v-slot:reference>
<el-button>Delete</el-button>
</template>
</el-popconfirm>
</template>
````
:::
Expand All @@ -23,15 +25,17 @@ You can customise Popconfirm like:
:::demo
```html
<template>
<el-popconfirm
confirmButtonText='OK'
cancelButtonText='No, Thanks'
icon="el-icon-info"
iconColor="red"
title="Are you sure to delete this?"
>
<el-button slot="reference">Delete</el-button>
</el-popconfirm>
<el-popconfirm
confirmButtonText='OK'
cancelButtonText='No, Thanks'
icon="el-icon-info"
iconColor="red"
title="Are you sure to delete this?"
>
<template v-slot:reference>
<el-button>Delete</el-button>
</template>
</el-popconfirm>
</template>
```
:::
Expand Down
11 changes: 9 additions & 2 deletions examples/docs/es/infiniteScroll.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ Añada `v-infinite-scroll` a la lista para ejecutar automáticamente el método

```html
<template>
<ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto">
<ul
class="infinite-list"
v-infinite-scroll="load"
:infinite-scroll-delay="0"
style="overflow:auto"
>
<li v-for="i in count" class="infinite-list-item">{{ i }}</li>
</ul>
</template>
Expand Down Expand Up @@ -39,7 +44,9 @@ Añada `v-infinite-scroll` a la lista para ejecutar automáticamente el método
<ul
class="list"
v-infinite-scroll="load"
infinite-scroll-disabled="disabled">
:infinite-scroll-delay="0"
:infinite-scroll-disabled="disabled"
>
<li v-for="i in count" class="list-item">{{ i }}</li>
</ul>
<p v-if="loading">Loading...</p>
Expand Down
32 changes: 18 additions & 14 deletions examples/docs/es/popconfirm.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ Popconfirm is similar to Popover. So for some duplicated attributes, please refe
:::demo Only `title` attribute is avaliable in Popconfirm, `content` will be ignored.
```html
<template>
<el-popconfirm
title="Are you sure to delete this?"
>
<el-button slot="reference">Delete</el-button>
</el-popconfirm>
<el-popconfirm
title="Are you sure to delete this?"
>
<template v-slot:reference>
<el-button>Delete</el-button>
</template>
</el-popconfirm>
</template>
````
:::
Expand All @@ -23,15 +25,17 @@ You can customise Popconfirm like:
:::demo
```html
<template>
<el-popconfirm
confirmButtonText='OK'
cancelButtonText='No, Thanks'
icon="el-icon-info"
iconColor="red"
title="Are you sure to delete this?"
>
<el-button slot="reference">Delete</el-button>
</el-popconfirm>
<el-popconfirm
confirmButtonText='OK'
cancelButtonText='No, Thanks'
icon="el-icon-info"
iconColor="red"
title="Are you sure to delete this?"
>
<template v-slot:reference>
<el-button>Delete</el-button>
</template>
</el-popconfirm>
</template>
```
:::
Expand Down
10 changes: 8 additions & 2 deletions examples/docs/fr-FR/infiniteScroll.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ Ajoutez `v-infinite-scroll` à la liste pour exécuter automatiquement la métho
:::demo
```html
<template>
<ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto">
<ul
class="infinite-list"
v-infinite-scroll="load"
:infinite-scroll-delay="0"
style="overflow:auto"
>
<li v-for="i in count" class="infinite-list-item">{{ i }}</li>
</ul>
</template>
Expand Down Expand Up @@ -38,7 +43,8 @@ Ajoutez `v-infinite-scroll` à la liste pour exécuter automatiquement la métho
<ul
class="list"
v-infinite-scroll="load"
infinite-scroll-disabled="disabled">
:infinite-scroll-delay="0"
:infinite-scroll-disabled="disabled">
<li v-for="i in count" class="list-item">{{ i }}</li>
</ul>
<p v-if="loading">Loading...</p>
Expand Down
32 changes: 18 additions & 14 deletions examples/docs/fr-FR/popconfirm.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ Popconfirm is similar to Popover. So for some duplicated attributes, please refe
:::demo Only `title` attribute is avaliable in Popconfirm, `content` will be ignored.
```html
<template>
<el-popconfirm
title="Are you sure to delete this?"
>
<el-button slot="reference">Delete</el-button>
</el-popconfirm>
<el-popconfirm
title="Are you sure to delete this?"
>
<template v-slot:reference>
<el-button>Delete</el-button>
</template>
</el-popconfirm>
</template>
````
:::
Expand All @@ -23,15 +25,17 @@ You can customise Popconfirm like:
:::demo
```html
<template>
<el-popconfirm
confirmButtonText='OK'
cancelButtonText='No, Thanks'
icon="el-icon-info"
iconColor="red"
title="Are you sure to delete this?"
>
<el-button slot="reference">Delete</el-button>
</el-popconfirm>
<el-popconfirm
confirmButtonText='OK'
cancelButtonText='No, Thanks'
icon="el-icon-info"
iconColor="red"
title="Are you sure to delete this?"
>
<template v-slot:reference>
<el-button>Delete</el-button>
</template>
</el-popconfirm>
</template>
```
:::
Expand Down
Loading

0 comments on commit 8a7e895

Please sign in to comment.