Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Element
提交
d70ad3df
E
Element
项目概览
jobily
/
Element
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
Element
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d70ad3df
编写于
10月 28, 2016
作者:
杨
杨奕
提交者:
FuryBean
10月 28, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
misc updates (#705)
上级
19d7e72f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
9 deletion
+28
-9
FAQ.md
FAQ.md
+26
-7
examples/docs/zh-cn/table.md
examples/docs/zh-cn/table.md
+1
-1
examples/route.config.js
examples/route.config.js
+1
-1
未找到文件。
FAQ.md
浏览文件 @
d70ad3df
## FAQ
### 给组件绑定的事件为什么无法触发?
<details>
<summary>
给组件绑定的事件为什么无法触发?
</summary>
在 Vue 2.0 中,为自定义组件绑定原生事件必须使用
`.native`
修饰符:
```
html
<
el-button
@
click.native=
"handleButtonClick"
>
Click Me
</el-button
>
<
my-component
@
click.native=
"handleClick"
>
Click Me
</my-component
>
```
### 如何在 Table 组件的每一行添加操作该行数据的按钮?
从易用性的角度出发,我们对
`Button`
组件进行了处理,使它可以监听
`click`
事件:
```
html
<el-button
@
click=
"handleButtonClick"
>
Click Me
</el-button>
```
但是对于其他组件,还是需要添加
`.native`
修饰符。
</details>
<details>
<summary>
如何在 Table 组件的每一行添加操作该行数据的按钮?
</summary>
使用 inline-template 即可:
```
html
...
...
@@ -16,16 +26,22 @@
</el-table-column>
```
参数
`row`
即为对应行的数据。
</details>
### 你们的文档怎么偷偷更新了?
<details>
<summary>
你们的文档怎么偷偷更新了?
</summary>
我们只会在 Element 发布新版本时同步更新文档,以体现最新的变化。详细的更新内容可以查看
[
changelog
](
https://github.com/ElemeFE/element/blob/master/CHANGELOG.md
)
。
</details>
### 在项目中引入 Element,但是 CSS 报错/字体文件报错/组件没有样式是什么原因?
<details>
<summary>
在项目中引入 Element,但是 CSS 报错/字体文件报错/组件没有样式是什么原因?
</summary>
请参考我们提供的
[
starter kit
](
https://github.com/ElementUI/element-starter
)
,在 webpack 的 loaders 中正确配置 file-loader、css-loader 和 style-loader。此外,我们还提供了基于
[
cooking
](
https://github.com/ElementUI/element-cooking-starter
)
和
[
laravel
](
https://github.com/ElementUI/element-in-laravel-starter
)
的项目模板。
</details>
### 在项目中引入 Element,报 `Uncaught Error: Module build failed: SyntaxError: 'with' in strict mode` 是什么原因?
<details>
<summary>
在项目中引入 Element,报
`Uncaught Error: Module build failed: SyntaxError: 'with' in strict mode`
是什么原因?
</summary>
请避免你使用的编译器处理 Element。比如,若是使用 webpack,请在 loaders 中配置:
```
javascript
...
...
@@ -35,8 +51,10 @@
exclude
:
/
node_modules
/
}
```
</details>
### 将 Element 克隆至本地,运行时为何会报错/跑不起来?
<details>
<summary>
将 Element 克隆至本地,运行时为何会报错/跑不起来?
</summary>
首先,确保克隆的是 master 分支的最新代码,并且文件完整。其次,确保本地的 node 版本在 4.0 以上,npm 版本在 3.0 以上。最后,可以启动开发环境:
...
...
@@ -49,3 +67,4 @@ npm run dev
```
bash
npm run dist
```
</details>
examples/docs/zh-cn/table.md
浏览文件 @
d70ad3df
...
...
@@ -522,7 +522,7 @@
fixed=
"right"
label=
"操作"
width=
"80"
>
<el-button
type=
"
primary
"
size=
"small"
>
编辑
</el-button>
<el-button
type=
"
text
"
size=
"small"
>
编辑
</el-button>
</el-table-column>
</el-table>
</template>
...
...
examples/route.config.js
浏览文件 @
d70ad3df
...
...
@@ -3,7 +3,7 @@ import navConfig from './nav.config.json';
const
registerRoute
=
(
config
)
=>
{
let
route
=
[{
path
:
'
/component
'
,
redirect
:
'
/component/
quickstart
'
,
redirect
:
'
/component/
installation
'
,
component
:
require
(
'
./pages/component.vue
'
),
children
:
[]
}];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录