delete omiu-next
This commit is contained in:
parent
2a4c50e455
commit
9d21b3daa4
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"name": "omiu",
|
||||
"version": "0.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "babel-node src/index.js",
|
||||
"build": "babel src --out-dir lib"
|
||||
},
|
||||
"author": "dntzhang",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"express": "^4.17.1",
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
|
||||
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
|
||||
"babel-plugin-transform-es2015-parameters": "^6.24.1",
|
||||
"babel-plugin-transform-es2015-spread": "^6.22.0",
|
||||
"babel-plugin-transform-strict-mode": "^6.24.1",
|
||||
"babel-preset-env": "^1.7.0",
|
||||
"babel-preset-omi": "^0.1.1",
|
||||
"omi": "latest"
|
||||
}
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
import router from './omiu/router'
|
||||
import Table from './omiu/table'
|
||||
import Home from './view/home'
|
||||
|
||||
router.get('/', () => {
|
||||
|
||||
return Home
|
||||
})
|
||||
|
||||
router.get('/', () => {
|
||||
const table = new Table({
|
||||
dataSource: [{
|
||||
id: 1,
|
||||
name: 'xwang',
|
||||
age: 18,
|
||||
address: 'Tencent'
|
||||
}, {
|
||||
id: 2,
|
||||
name: 'dntzhang',
|
||||
age: 12,
|
||||
address: 'Tencent',
|
||||
checked: true
|
||||
}, {
|
||||
id: 3,
|
||||
name: 'lucy',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
}, {
|
||||
id: 4,
|
||||
name: 'john',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
}, {
|
||||
id: 5,
|
||||
name: 'tim',
|
||||
age: 12,
|
||||
address: 'Tencent'
|
||||
}
|
||||
|
||||
],
|
||||
columns =[{
|
||||
title: 'Name',
|
||||
key: 'name',
|
||||
}, {
|
||||
title: 'Age',
|
||||
key: 'age',
|
||||
}, {
|
||||
title: 'Address',
|
||||
key: 'address',
|
||||
}, {
|
||||
title: '操作',
|
||||
render: (item) => (
|
||||
<span>
|
||||
<a href="javascript:;" onClick={e => { this.removeItem(item) }}>Delete</a>
|
||||
</span>
|
||||
)
|
||||
}]
|
||||
})
|
||||
|
||||
return table
|
||||
|
||||
})
|
||||
|
||||
|
||||
// const express = require('express')
|
||||
// const app = express()
|
||||
|
||||
// app.get('/', function (req, res) {
|
||||
// res.send('Hello World')
|
||||
// })
|
||||
|
||||
// app.listen(3000)
|
|
@ -1,5 +0,0 @@
|
|||
class Button {
|
||||
constructor(option){
|
||||
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
function router(){
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
class Table {
|
||||
constructor(option){
|
||||
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
|
||||
import Table from './omiu/table'
|
||||
import Button from './omiu/button'
|
||||
|
||||
class Home {
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
return <div>
|
||||
<Table id='table'></Table>
|
||||
<Button id='btn' onClick={this.toggle}>Reload</Button>
|
||||
<m-button>abc</m-button>
|
||||
<m-button runat="server" id='myBtn'>abc</m-button>
|
||||
</div>
|
||||
}
|
||||
|
||||
toggle() {
|
||||
this.table.reload()
|
||||
}
|
||||
|
||||
installed(){
|
||||
this.myBtn.onClick = function(){
|
||||
this.table.clear()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Table Button runat="server"
|
||||
// m-button runat client default
|
Loading…
Reference in New Issue