mirror of
https://gitee.com/xuliangzhan_admin/vxe-table.git
synced 2026-01-21 05:27:57 +08:00
update
This commit is contained in:
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/vxe-table/favicon.ico><title>vxe-table 表格</title><link href=/vxe-table/static/css/chunk-vendors.d0b56a96.css rel=preload as=style><link href=/vxe-table/static/css/index.9e3195ac.css rel=preload as=style><link href=/vxe-table/static/js/chunk-vendors.907075e7.js rel=preload as=script><link href=/vxe-table/static/js/index.31a15b5b.js rel=preload as=script><link href=/vxe-table/static/css/chunk-vendors.d0b56a96.css rel=stylesheet><link href=/vxe-table/static/css/index.9e3195ac.css rel=stylesheet></head><body><noscript><strong>We're sorry but vxe-table doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/vxe-table/static/js/chunk-vendors.907075e7.js></script><script src=/vxe-table/static/js/index.31a15b5b.js></script></body></html>
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/vxe-table/favicon.ico><title>vxe-table 表格</title><link href=/vxe-table/static/css/chunk-vendors.d0b56a96.css rel=preload as=style><link href=/vxe-table/static/css/index.9e3195ac.css rel=preload as=style><link href=/vxe-table/static/js/chunk-vendors.907075e7.js rel=preload as=script><link href=/vxe-table/static/js/index.69aec1e2.js rel=preload as=script><link href=/vxe-table/static/css/chunk-vendors.d0b56a96.css rel=stylesheet><link href=/vxe-table/static/css/index.9e3195ac.css rel=stylesheet></head><body><noscript><strong>We're sorry but vxe-table doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/vxe-table/static/js/chunk-vendors.907075e7.js></script><script src=/vxe-table/static/js/index.69aec1e2.js></script></body></html>
|
||||
1
docs/static/js/index.31a15b5b.js
vendored
1
docs/static/js/index.31a15b5b.js
vendored
File diff suppressed because one or more lines are too long
1
docs/static/js/index.69aec1e2.js
vendored
Normal file
1
docs/static/js/index.69aec1e2.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,14 +1,19 @@
|
||||
<template>
|
||||
<div>
|
||||
<h3>高级函数</h3>
|
||||
<p>自定义渲染器</p>
|
||||
<p>自定义渲染器 + 渲染函数</p>
|
||||
<pre>
|
||||
<code class="javascript">{{ demoCodes[0] }}</code>
|
||||
<code class="html">{{ demoCodes[1] }}</code>
|
||||
</pre>
|
||||
<p>内置拦截器(对于自定义渲染的组件与内部事件存在冲突时可能会使用到)</p>
|
||||
<p>自定义渲染器 + JSX</p>
|
||||
<pre>
|
||||
<code class="javascript">{{ demoCodes[2] }}</code>
|
||||
<code class="html">{{ demoCodes[3] }}</code>
|
||||
</pre>
|
||||
<p>内置拦截器(对于自定义渲染的组件与内部事件存在冲突时可能会使用到)</p>
|
||||
<pre>
|
||||
<code class="javascript">{{ demoCodes[4] }}</code>
|
||||
</pre>
|
||||
</div>
|
||||
</template>
|
||||
@@ -70,6 +75,32 @@ export default {
|
||||
import VXETable from 'vxe-table'
|
||||
import 'vxe-table/lib/index.css'
|
||||
|
||||
VXETable.renderer.add('MyCell', {
|
||||
autofocus: '.my-cell',
|
||||
renderEdit (h, editRender, { row, column }) {
|
||||
return <input class="my-cell" text="text" value={row[column.property]} on-input={val => row[column.property] = val}/>
|
||||
},
|
||||
renderCell (h, editRender, { row, column }) {
|
||||
return <span>{row[column.property]}</span>
|
||||
}
|
||||
})
|
||||
`,
|
||||
`
|
||||
<vxe-table
|
||||
border
|
||||
height="600"
|
||||
:data.sync="tableData"
|
||||
:edit-config="{key: 'id', trigger: 'click', mode: 'row'}">
|
||||
<vxe-table-column type="selection" width="60" fixed="left"></vxe-table-column>
|
||||
<vxe-table-column type="index" width="60" fixed="left"></vxe-table-column>
|
||||
<vxe-table-column prop="name" label="Name" :edit-render="{name: 'MyCell'}"></vxe-table-column>
|
||||
</vxe-table>
|
||||
`,
|
||||
`
|
||||
import Vue from 'vue'
|
||||
import VXETable from 'vxe-table'
|
||||
import 'vxe-table/lib/index.css'
|
||||
|
||||
VXETable.interceptor.add('event.clear_actived', (params, event) => {
|
||||
// 比如点击了某日期组件的面板,此时被激活单元格不应该被自动关闭,通过返回 false 可以阻止默认的行为。
|
||||
if (event.target.className.indexOf('cascader-popper') > -1) {
|
||||
|
||||
Reference in New Issue
Block a user