Skip to content

Commit

Permalink
beta1
Browse files Browse the repository at this point in the history
  • Loading branch information
bplok20010 committed Jun 17, 2020
1 parent c97c773 commit 96feaf4
Show file tree
Hide file tree
Showing 36 changed files with 26,604 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/node_modules
/lib
/cjs
/esm
/dist
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.md
18 changes: 18 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "auto",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 100,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"trailingComma": "es5",
"useTabs": true
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 react-widget
Copyright (c) 2020 nobo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# tree-basic
# react-widget-tree-basic

`npm install --save react-widget-tree-basic`
15 changes: 15 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = api => {
const isTest = api.env("test");
if (!isTest) return {};

return {
presets: [
[
"babel-preset-packez",
{
modules: "cjs",
},
],
],
};
};
7 changes: 7 additions & 0 deletions docs/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"index.css": "static/css/index.a0a710ab.chunk.css",
"index.js": "static/js/index.a0a710ab.chunk.js",
"runtime-index.js": "static/js/runtime-index.92eae014.js",
"static/js/2.e9b6bfc8.chunk.js": "static/js/2.e9b6bfc8.chunk.js",
"index.html": "index.html"
}
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html style="width:100%;height:100%;overflow:hidden"><head><meta charset="utf-8"/><title>Tree Basic</title><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1"/><style>.demo{width:800px;height:450px;margin:100px auto;background:#fff;font-size:12px;overflow:auto}</style><link href="static/css/index.a0a710ab.chunk.css" rel="stylesheet"></head><body style="background:#f5f5f5"><div class="demo" id="demo"></div><script src="static/js/runtime-index.92eae014.js"></script><script src="static/js/2.e9b6bfc8.chunk.js"></script><script src="static/js/index.a0a710ab.chunk.js"></script></body></html>
1 change: 1 addition & 0 deletions docs/static/css/index.a0a710ab.chunk.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/static/js/2.e9b6bfc8.chunk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/index.a0a710ab.chunk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/js/runtime-index.92eae014.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions examples/Demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React, { Component } from "react";
import DemoList from "./DemoList";

export default class Demo extends Component {
state = {
current: DemoList[0],
};

onDemoChange(item, e) {
this.setState({
current: item,
});
}

render() {
const { current } = this.state;
return (
<div className="container">
<div className="slider">
{DemoList.map((item, i) => {
return (
<div
className={current === item ? "active" : ""}
onClick={this.onDemoChange.bind(this, item)}
>
{item.label}
</div>
);
})}
</div>
<div className="content">{current ? <current.component /> : null}</div>
</div>
);
}
}
13 changes: 13 additions & 0 deletions examples/DemoList.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import Demo1 from "./demos/demo1";
import Demo2 from "./demos/demo2";

export default [
{
label: "基本功能",
component: Demo1,
},
{
label: "异步加载",
component: Demo2,
},
];
Loading

0 comments on commit 96feaf4

Please sign in to comment.