修改mixin和render方式

This commit is contained in:
Boyuzhou 2018-05-22 19:38:15 +08:00
parent 5e0ec16785
commit a84067bdad
26 changed files with 9589 additions and 9606 deletions

View File

@ -3,12 +3,31 @@
<component name="ChangeListManager">
<list default="true" id="fc6f46f1-46b7-479d-a1be-6709765e93ca" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/Table.css" afterPath="$PROJECT_DIR$/build/Table.css" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/lib/dragColumn.js" afterPath="$PROJECT_DIR$/build/lib/dragColumn.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/lib/filterColumn.js" afterPath="$PROJECT_DIR$/build/lib/filterColumn.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/lib/multiSelect.js" afterPath="$PROJECT_DIR$/build/lib/multiSelect.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/lib/sort.js" afterPath="$PROJECT_DIR$/build/lib/sort.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/render/CheckboxRender.js" afterPath="$PROJECT_DIR$/build/render/CheckboxRender.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/render/DateRender.js" afterPath="$PROJECT_DIR$/build/render/DateRender.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/render/InputRender.js" afterPath="$PROJECT_DIR$/build/render/InputRender.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build/render/SelectRender.js" afterPath="$PROJECT_DIR$/build/render/SelectRender.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/demo/demolist/Demo13.js" afterPath="$PROJECT_DIR$/demo/demolist/Demo13.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/demo/demolist/Demo14.js" afterPath="$PROJECT_DIR$/demo/demolist/Demo14.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/demo/demolist/Demo16.js" afterPath="$PROJECT_DIR$/demo/demolist/Demo16.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/demo/demolist/Demo19.js" afterPath="$PROJECT_DIR$/demo/demolist/Demo19.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/demo/demolist/Demo21.js" afterPath="$PROJECT_DIR$/demo/demolist/Demo21.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/demo/index.js" afterPath="$PROJECT_DIR$/demo/index.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/dist/demo.js" afterPath="$PROJECT_DIR$/dist/demo.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/dist/demo.js.map" afterPath="$PROJECT_DIR$/dist/demo.js.map" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/docs/mixin.md" afterPath="$PROJECT_DIR$/docs/mixin.md" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/docs/rendertype.md" afterPath="$PROJECT_DIR$/docs/rendertype.md" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/lib/dragColumn.js" afterPath="$PROJECT_DIR$/src/lib/dragColumn.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/lib/filterColumn.js" afterPath="$PROJECT_DIR$/src/lib/filterColumn.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/lib/multiSelect.js" afterPath="$PROJECT_DIR$/src/lib/multiSelect.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/lib/sort.js" afterPath="$PROJECT_DIR$/src/lib/sort.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/render/CheckboxRender.js" afterPath="$PROJECT_DIR$/src/render/CheckboxRender.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/render/DateRender.js" afterPath="$PROJECT_DIR$/src/render/DateRender.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/render/InputRender.js" afterPath="$PROJECT_DIR$/src/render/InputRender.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/render/SelectRender.js" afterPath="$PROJECT_DIR$/src/render/SelectRender.js" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
@ -20,164 +39,83 @@
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="InputRender.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/render/InputRender.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="312">
<caret line="13" column="2" lean-forward="false" selection-start-line="13" selection-start-column="2" selection-end-line="13" selection-end-column="2" />
<folding>
<element signature="e#0#41#0" expanded="true" />
<marker date="1526978323444" expanded="true" signature="354:4405" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="366:420" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="444:500" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="518:796" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="576:787" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="696:752" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="831:878" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="895:939" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="968:1064" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="999:1026" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="1107:1817" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="1160:1668" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="1691:1783" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="1789:1813" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="1830:4403" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="2088:3827" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="2137:2926" ph="&lt;div/&gt;" />
<marker date="1526978323444" expanded="true" signature="2194:2394" ph="/*...*/" />
<marker date="1526978323444" expanded="true" signature="2406:2911" ph="&lt;Form.FormItem/&gt;" />
<marker date="1526978323444" expanded="true" signature="2700:2884" ph="&lt;Input/&gt;" />
<marker date="1526978323444" expanded="true" signature="2947:3812" ph="&lt;div/&gt;" />
<marker date="1526978323444" expanded="true" signature="3004:3139" ph="/*...*/" />
<marker date="1526978323444" expanded="true" signature="3151:3656" ph="&lt;Form.FormItem/&gt;" />
<marker date="1526978323444" expanded="true" signature="3445:3629" ph="&lt;Input/&gt;" />
<marker date="1526978323444" expanded="true" signature="3667:3797" ph="&lt;Icon/&gt;" />
<marker date="1526978323444" expanded="true" signature="3833:4336" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="3878:3931" ph="{...}" />
<marker date="1526978323444" expanded="true" signature="3979:4083" ph="&lt;div/&gt;" />
<marker date="1526978323444" expanded="true" signature="4104:4321" ph="&lt;div/&gt;" />
<marker date="1526978323444" expanded="true" signature="4184:4306" ph="&lt;Icon/&gt;" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="sort.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/lib/sort.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="152">
<caret line="7" column="3" lean-forward="true" selection-start-line="7" selection-start-column="3" selection-end-line="7" selection-end-column="3" />
<folding>
<element signature="e#0#41#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="sum.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/lib/sum.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<state relative-caret-position="216">
<caret line="10" column="53" lean-forward="true" selection-start-line="10" selection-start-column="36" selection-end-line="10" selection-end-column="53" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="mixin.md" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/docs/mixin.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="391">
<caret line="108" column="1" lean-forward="true" selection-start-line="108" selection-start-column="1" selection-end-line="108" selection-end-column="1" />
<folding>
<marker date="1526987804056" expanded="true" signature="907:1002" ph="..." />
<marker date="1526987804056" expanded="true" signature="1247:1324" ph="..." />
<marker date="1526987804056" expanded="true" signature="1251:1324" ph="..." />
<marker date="1526987804056" expanded="true" signature="1561:1630" ph="..." />
<marker date="1526987804056" expanded="true" signature="1564:1595" ph="..." />
<marker date="1526987804056" expanded="true" signature="2089:2172" ph="..." />
<marker date="1526987804056" expanded="true" signature="2099:2172" ph="..." />
<marker date="1526987804056" expanded="true" signature="2295:2407" ph="..." />
</folding>
</first_editor>
<second_editor />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="rendertype.md" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/docs/rendertype.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="341">
<caret line="110" column="0" lean-forward="true" selection-start-line="110" selection-start-column="0" selection-end-line="110" selection-end-column="0" />
<folding>
<marker date="1526989065954" expanded="true" signature="1731:1835" ph="..." />
<marker date="1526989065954" expanded="true" signature="2397:2531" ph="..." />
<marker date="1526989065954" expanded="true" signature="3046:3140" ph="..." />
<marker date="1526989065954" expanded="true" signature="3578:3678" ph="..." />
</folding>
</first_editor>
<second_editor />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="CheckboxRender.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/render/CheckboxRender.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="78">
<caret line="3" column="13" lean-forward="false" selection-start-line="3" selection-start-column="13" selection-end-line="3" selection-end-column="13" />
<state relative-caret-position="417">
<caret line="20" column="35" lean-forward="false" selection-start-line="20" selection-start-column="27" selection-end-line="20" selection-end-column="35" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="util.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/lib/util.js">
<file leaf-file-name="SelectRender.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/render/SelectRender.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="n#!!doc" expanded="true" />
</folding>
<state relative-caret-position="72">
<caret line="4" column="8" lean-forward="false" selection-start-line="4" selection-start-column="8" selection-end-line="4" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Demo13.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo13.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="364">
<caret line="19" column="13" lean-forward="false" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" />
<folding>
<element signature="e#92#133#0" expanded="true" />
<marker date="1526978323061" expanded="true" signature="1333:2859" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1356:1506" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1393:1501" ph="{&quot;data13&quot;: data13...}" />
<marker date="1526978323061" expanded="true" signature="1539:1570" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1610:1709" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1661:1687" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1746:1845" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1797:1823" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1865:1931" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1885:1925" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1952:2150" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1972:2144" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="2015:2138" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="2074:2108" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="2163:2857" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="2184:2214" ph="{&quot;type&quot;: &quot;checkbox&quot;...}" />
<marker date="1526978323061" expanded="true" signature="2235:2846" ph="&lt;div/&gt;" />
<marker date="1526978323061" expanded="true" signature="2249:2356" ph="&lt;Button/&gt;" />
<marker date="1526978323061" expanded="true" signature="2365:2545" ph="&lt;Button/&gt;" />
<marker date="1526978323061" expanded="true" signature="2554:2833" ph="&lt;ComplexTable/&gt;" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="DateRender.js" pinned="false" current-in-tab="true">
<file leaf-file-name="DateRender.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/render/DateRender.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="468">
<caret line="56" column="24" lean-forward="false" selection-start-line="56" selection-start-column="14" selection-end-line="56" selection-end-column="24" />
<folding>
<element signature="e#0#41#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="multiSelect.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/lib/multiSelect.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="41" lean-forward="false" selection-start-line="0" selection-start-column="41" selection-end-line="0" selection-end-column="41" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="filterColumn.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/lib/filterColumn.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2413">
<caret line="6" column="18" lean-forward="false" selection-start-line="6" selection-start-column="18" selection-end-line="6" selection-end-column="18" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="dragColumn.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/lib/dragColumn.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="41" lean-forward="false" selection-start-line="0" selection-start-column="41" selection-end-line="0" selection-end-column="41" />
<state relative-caret-position="120">
<caret line="6" column="25" lean-forward="false" selection-start-line="6" selection-start-column="15" selection-end-line="6" selection-end-column="25" />
<folding />
</state>
</provider>
@ -195,9 +133,23 @@
<find>remove</find>
<find>Icon</find>
<find>moment</find>
<find>src/lib</find>
<find>dragColumn</find>
<find>Tooltip</find>
<find>multiSelect</find>
<find>sort</find>
<find>CheckboxRender</find>
<find>DateRender</find>
<find>build/render</find>
<find>InputRender</find>
<find>filterColumn</find>
<find>sortBy</find>
<find>props</find>
</findStrings>
<dirStrings>
<dir>$PROJECT_DIR$/src</dir>
<dir>$PROJECT_DIR$/demo</dir>
<dir>$PROJECT_DIR$/demo/demolist</dir>
</dirStrings>
</component>
<component name="Git.Settings">
@ -214,16 +166,24 @@
<option value="$PROJECT_DIR$/index.html" />
<option value="$PROJECT_DIR$/demo/demolist/Demo5.js" />
<option value="$PROJECT_DIR$/src/Table.js" />
<option value="$PROJECT_DIR$/demo/demolist/Demo16.js" />
<option value="$PROJECT_DIR$/package.json" />
<option value="$PROJECT_DIR$/docs/rendertype.md" />
<option value="$PROJECT_DIR$/docs/api.md" />
<option value="$PROJECT_DIR$/src/lib/multiSelect.js" />
<option value="$PROJECT_DIR$/src/render/DateRender.js" />
<option value="$PROJECT_DIR$/src/render/SelectRender.js" />
<option value="$PROJECT_DIR$/demo/demolist/Demo23.js" />
<option value="$PROJECT_DIR$/demo/demolist/Demo21.js" />
<option value="$PROJECT_DIR$/demo/demolist/Demo16.js" />
<option value="$PROJECT_DIR$/src/lib/sort.js" />
<option value="$PROJECT_DIR$/demo/demolist/Demo13.js" />
<option value="$PROJECT_DIR$/demo/demolist/Demo14.js" />
<option value="$PROJECT_DIR$/src/render/InputRender.js" />
<option value="$PROJECT_DIR$/demo/demolist/Demo19.js" />
<option value="$PROJECT_DIR$/src/lib/dragColumn.js" />
<option value="$PROJECT_DIR$/src/lib/filterColumn.js" />
<option value="$PROJECT_DIR$/src/lib/multiSelect.js" />
<option value="$PROJECT_DIR$/src/lib/sort.js" />
<option value="$PROJECT_DIR$/docs/mixin.md" />
<option value="$PROJECT_DIR$/src/render/CheckboxRender.js" />
<option value="$PROJECT_DIR$/src/render/DateRender.js" />
<option value="$PROJECT_DIR$/docs/rendertype.md" />
</list>
</option>
</component>
@ -238,7 +198,7 @@
<component name="NodeModulesDirectoryManager">
<handled-path value="$PROJECT_DIR$/node_modules" />
</component>
<component name="ProjectFrameBounds">
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-8" />
<option name="y" value="-8" />
<option name="width" value="1936" />
@ -262,86 +222,46 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="bee-table" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="bee-table" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="bee-table" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="bee-table" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="bee-table" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="bee-table" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="render" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="bee-table" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="bee-table" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="lib" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="bee-table" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="bee-table" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="demo" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<expand>
<path>
<item name="bee-table" type="b2602c69:ProjectViewProjectNode" />
<item name="bee-table" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="bee-table" type="b2602c69:ProjectViewProjectNode" />
<item name="bee-table" type="462c0819:PsiDirectoryNode" />
<item name="demo" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="bee-table" type="b2602c69:ProjectViewProjectNode" />
<item name="bee-table" type="462c0819:PsiDirectoryNode" />
<item name="docs" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="bee-table" type="b2602c69:ProjectViewProjectNode" />
<item name="bee-table" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="bee-table" type="b2602c69:ProjectViewProjectNode" />
<item name="bee-table" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="lib" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="bee-table" type="b2602c69:ProjectViewProjectNode" />
<item name="bee-table" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="render" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
@ -383,44 +303,34 @@
<workItem from="1504076176405" duration="2701000" />
<workItem from="1506672272278" duration="1303000" />
<workItem from="1523426107901" duration="1270000" />
<workItem from="1526984426793" duration="4564000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="12375000" />
<option name="totallyTimeSpent" value="16939000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<frame x="0" y="23" width="1680" height="946" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24920969" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24954791" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3286334" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32902467" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32902467" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24954791" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
</layout>
<layout-to-restore>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
@ -442,6 +352,9 @@
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout-to-restore>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
@ -452,51 +365,6 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/demo/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1632">
<caret line="72" column="1" lean-forward="true" selection-start-line="72" selection-start-column="1" selection-end-line="72" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1320">
<caret line="55" column="22" lean-forward="true" selection-start-line="55" selection-start-column="22" selection-end-line="55" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="456">
<caret line="19" column="84" lean-forward="false" selection-start-line="19" selection-start-column="84" selection-end-line="19" selection-end-column="84" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo7.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2106">
<caret line="81" column="32" lean-forward="true" selection-start-line="81" selection-start-column="32" selection-end-line="81" selection-end-column="32" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1066">
<caret line="41" column="22" lean-forward="false" selection-start-line="41" selection-start-column="22" selection-end-line="41" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2088">
<caret line="87" column="1" lean-forward="false" selection-start-line="87" selection-start-column="1" selection-end-line="87" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1632">
@ -547,13 +415,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo12.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo11.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@ -575,47 +436,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo13.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="364">
<caret line="19" column="13" lean-forward="false" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" />
<folding>
<element signature="e#92#133#0" expanded="true" />
<marker date="1526978323061" expanded="true" signature="1333:2859" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1356:1506" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1393:1501" ph="{&quot;data13&quot;: data13...}" />
<marker date="1526978323061" expanded="true" signature="1539:1570" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1610:1709" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1661:1687" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1746:1845" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1797:1823" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1865:1931" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1885:1925" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1952:2150" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="1972:2144" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="2015:2138" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="2074:2108" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="2163:2857" ph="{...}" />
<marker date="1526978323061" expanded="true" signature="2184:2214" ph="{&quot;type&quot;: &quot;checkbox&quot;...}" />
<marker date="1526978323061" expanded="true" signature="2235:2846" ph="&lt;div/&gt;" />
<marker date="1526978323061" expanded="true" signature="2249:2356" ph="&lt;Button/&gt;" />
<marker date="1526978323061" expanded="true" signature="2365:2545" ph="&lt;Button/&gt;" />
<marker date="1526978323061" expanded="true" signature="2554:2833" ph="&lt;ComplexTable/&gt;" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo14.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="408">
<caret line="33" column="17" lean-forward="false" selection-start-line="33" selection-start-column="17" selection-end-line="33" selection-end-column="17" />
<folding>
<element signature="n#!!doc" expanded="true" />
<element signature="e#87#119#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo5.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="459">
@ -721,13 +541,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo16.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="66">
<caret line="49" column="19" lean-forward="false" selection-start-line="49" selection-start-column="2" selection-end-line="49" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Table.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="6816">
@ -736,13 +549,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/render/SelectRender.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-528">
<caret line="57" column="29" lean-forward="false" selection-start-line="57" selection-start-column="29" selection-end-line="57" selection-end-column="29" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-261">
@ -751,37 +557,25 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/docs/mixin.md" />
<entry file="file://$PROJECT_DIR$/docs/mixin_en.md" />
<entry file="file://$PROJECT_DIR$/docs/rendertype.md" />
<entry file="file://$PROJECT_DIR$/docs/api.md" />
<entry file="file://$PROJECT_DIR$/src/lib/dragColumn.js">
<entry file="file://$PROJECT_DIR$/build/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="41" lean-forward="false" selection-start-line="0" selection-start-column="41" selection-end-line="0" selection-end-column="41" />
<folding />
<state relative-caret-position="234">
<caret line="9" column="23" lean-forward="false" selection-start-line="9" selection-start-column="23" selection-end-line="9" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/lib/multiSelect.js">
<entry file="file://$PROJECT_DIR$/src/lib/util.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="41" lean-forward="false" selection-start-line="0" selection-start-column="41" selection-end-line="0" selection-end-column="41" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/lib/sort.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="152">
<caret line="7" column="3" lean-forward="true" selection-start-line="7" selection-start-column="3" selection-end-line="7" selection-end-column="3" />
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#0#41#0" expanded="true" />
<element signature="n#!!doc" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/lib/sum.js">
<entry file="file://$PROJECT_DIR$/src/render/RadioRender.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
@ -789,39 +583,192 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/build/index.js">
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo23.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234">
<caret line="9" column="23" lean-forward="false" selection-start-line="9" selection-start-column="23" selection-end-line="9" selection-end-column="23" />
<state relative-caret-position="72">
<caret line="7" column="30" lean-forward="false" selection-start-line="7" selection-start-column="30" selection-end-line="7" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/lib/filterColumn.js">
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo16.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2413">
<caret line="6" column="18" lean-forward="false" selection-start-line="6" selection-start-column="18" selection-end-line="6" selection-end-column="18" />
<state relative-caret-position="125">
<caret line="38" column="0" lean-forward="false" selection-start-line="38" selection-start-column="0" selection-end-line="38" selection-end-column="0" />
<folding>
<element signature="e#70#111#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo13.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="218">
<caret line="58" column="51" lean-forward="false" selection-start-line="58" selection-start-column="51" selection-end-line="58" selection-end-column="51" />
<folding>
<element signature="e#92#133#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo12.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1372">
<caret line="8" column="7" lean-forward="false" selection-start-line="8" selection-start-column="7" selection-end-line="8" selection-end-column="7" />
<folding>
<element signature="e#89#130#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo14.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="281">
<caret line="18" column="0" lean-forward="false" selection-start-line="18" selection-start-column="0" selection-end-line="24" selection-end-column="48" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/render/CheckboxRender.js">
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo19.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="78">
<caret line="3" column="13" lean-forward="false" selection-start-line="3" selection-start-column="13" selection-end-line="3" selection-end-column="13" />
<state relative-caret-position="247">
<caret line="17" column="62" lean-forward="true" selection-start-line="17" selection-start-column="62" selection-end-line="17" selection-end-column="62" />
<folding>
<element signature="e#87#119#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/lib/multiSelect.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="297">
<caret line="24" column="35" lean-forward="false" selection-start-line="24" selection-start-column="24" selection-end-line="24" selection-end-column="35" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/render/DateRender.js">
<entry file="file://$PROJECT_DIR$/docs/api.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="-1339">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/lib/sort.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="468">
<caret line="56" column="24" lean-forward="false" selection-start-line="56" selection-start-column="14" selection-end-line="56" selection-end-column="24" />
<state relative-caret-position="0">
<caret line="0" column="41" lean-forward="false" selection-start-line="0" selection-start-column="41" selection-end-line="0" selection-end-column="41" />
<folding>
<marker date="1526985060619" expanded="true" signature="43:107" ph="/** 参数prefixCls默认bee-table,用于设置图标的样式 ...*/" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/lib/sum.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="26" lean-forward="true" selection-start-line="0" selection-start-column="26" selection-end-line="0" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/lib/dragColumn.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1842">
<caret line="11" column="14" lean-forward="false" selection-start-line="11" selection-start-column="14" selection-end-line="11" selection-end-column="14" />
<folding>
<element signature="e#0#41#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/demo/demolist/Demo21.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="50" column="6" lean-forward="false" selection-start-line="50" selection-start-column="6" selection-end-line="50" selection-end-column="6" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/lib/filterColumn.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="9" column="36" lean-forward="false" selection-start-line="9" selection-start-column="24" selection-end-line="9" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/docs/mixin.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="391">
<caret line="108" column="1" lean-forward="true" selection-start-line="108" selection-start-column="1" selection-end-line="108" selection-end-column="1" />
<folding>
<marker date="1526987804056" expanded="true" signature="907:1002" ph="..." />
<marker date="1526987804056" expanded="true" signature="1247:1324" ph="..." />
<marker date="1526987804056" expanded="true" signature="1251:1324" ph="..." />
<marker date="1526987804056" expanded="true" signature="1561:1630" ph="..." />
<marker date="1526987804056" expanded="true" signature="1564:1595" ph="..." />
<marker date="1526987804056" expanded="true" signature="2089:2172" ph="..." />
<marker date="1526987804056" expanded="true" signature="2099:2172" ph="..." />
<marker date="1526987804056" expanded="true" signature="2295:2407" ph="..." />
</folding>
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/render/DateRender.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="6" column="25" lean-forward="false" selection-start-line="6" selection-start-column="15" selection-end-line="6" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/render/InputRender.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="10" column="53" lean-forward="true" selection-start-line="10" selection-start-column="36" selection-end-line="10" selection-end-column="53" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/render/SelectRender.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="8" lean-forward="false" selection-start-line="4" selection-start-column="8" selection-end-line="4" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/render/CheckboxRender.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="417">
<caret line="20" column="35" lean-forward="false" selection-start-line="20" selection-start-column="27" selection-end-line="20" selection-end-column="35" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/docs/rendertype.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="341">
<caret line="110" column="0" lean-forward="true" selection-start-line="110" selection-start-column="0" selection-end-line="110" selection-end-column="0" />
<folding>
<marker date="1526989065954" expanded="true" signature="1731:1835" ph="..." />
<marker date="1526989065954" expanded="true" signature="2397:2531" ph="..." />
<marker date="1526989065954" expanded="true" signature="3046:3140" ph="..." />
<marker date="1526989065954" expanded="true" signature="3578:3678" ph="..." />
</folding>
</first_editor>
<second_editor />
</state>
</provider>
</entry>
</component>
</project>

View File

@ -188,7 +188,7 @@
background: rgb(227,242,253); }
.u-table th,
.u-table td {
padding: 16px 8px;
padding: 12px 8px;
word-break: break-all; }
.u-table-row-hover {
background: #e3f2fd; }
@ -223,19 +223,19 @@
overflow-y: auto;
box-sizing: border-box; }
.u-table-title {
padding: 16px 8px;
padding: 12px 8px;
border-top: 1px solid #e9e9e9; }
.u-table-content {
position: relative; }
.u-table-footer {
padding: 16px 8px;
padding: 12px 8px;
border-bottom: 1px solid #e9e9e9; }
.u-table-footer .u-table-scroll {
overflow-x: hidden; }
.u-table-footer .u-table {
margin: -16px -8px; }
margin: -12px -8px; }
.u-table-placeholder {
padding: 16px 8px;
padding: 12px 8px;
background: #fff;
border-bottom: 1px solid #e9e9e9;
text-align: center;

View File

@ -12,14 +12,6 @@ var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _beeIcon = require("bee-icon");
var _beeIcon2 = _interopRequireDefault(_beeIcon);
var _reactDom = require("react-dom");
var _reactDom2 = _interopRequireDefault(_reactDom);
var _util = require("./util");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@ -41,10 +33,10 @@ function dragColumn(Table) {
var _class, _temp, _initialiseProps;
return _temp = _class = function (_Component) {
_inherits(dragColumn, _Component);
_inherits(DragColumn, _Component);
function dragColumn(props) {
_classCallCheck(this, dragColumn);
function DragColumn(props) {
_classCallCheck(this, DragColumn);
var _this = _possibleConstructorReturn(this, _Component.call(this, props));
@ -56,13 +48,13 @@ function dragColumn(Table) {
return _this;
}
dragColumn.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
DragColumn.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
if (nextProps.columns != this.props.columns) {
this.setColumOrderByIndex();
}
};
dragColumn.prototype.render = function render() {
DragColumn.prototype.render = function render() {
var _props = this.props,
data = _props.data,
dragborder = _props.dragborder,
@ -82,7 +74,7 @@ function dragColumn(Table) {
}));
};
return dragColumn;
return DragColumn;
}(_react.Component), _initialiseProps = function _initialiseProps() {
var _this2 = this;

View File

@ -12,22 +12,6 @@ var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _beeIcon = require("bee-icon");
var _beeIcon2 = _interopRequireDefault(_beeIcon);
var _beeCheckbox = require("bee-checkbox");
var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox);
var _reactDom = require("react-dom");
var _reactDom2 = _interopRequireDefault(_reactDom);
var _beePopover = require("bee-popover");
var _beePopover2 = _interopRequireDefault(_beePopover);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
@ -41,16 +25,19 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
/**
* 参数: 过滤表头
* @param {*} Table
* @param {*} Checkbox
* @param {*} Popover
* @param {*} Icon
*/
function filterColumn(Table) {
function filterColumn(Table, Checkbox, Popover, Icon) {
var _class, _temp, _initialiseProps;
return _temp = _class = function (_Component) {
_inherits(filterColumn, _Component);
_inherits(FilterColumn, _Component);
function filterColumn(props) {
_classCallCheck(this, filterColumn);
function FilterColumn(props) {
_classCallCheck(this, FilterColumn);
var _this = _possibleConstructorReturn(this, _Component.call(this, props));
@ -74,7 +61,7 @@ function filterColumn(Table) {
return _this;
}
filterColumn.prototype.render = function render() {
FilterColumn.prototype.render = function render() {
var _props = this.props,
data = _props.data,
prefixCls = _props.prefixCls;
@ -112,7 +99,7 @@ function filterColumn(Table) {
{ className: prefixCls + "-cont" },
_react2["default"].createElement(Table, _extends({}, this.props, { columns: _columns, data: data })),
_react2["default"].createElement(
_beePopover2["default"],
Popover,
{
placement: "leftTop",
content: content, id: "aa",
@ -120,13 +107,13 @@ function filterColumn(Table) {
_react2["default"].createElement(
"div",
{ className: prefixCls + "-pop-column-filter" },
_react2["default"].createElement(_beeIcon2["default"], { type: "uf-navmenu", onClick: this.openCloumList })
_react2["default"].createElement(Icon, { type: "uf-navmenu", onClick: this.openCloumList })
)
)
);
};
return filterColumn;
return FilterColumn;
}(_react.Component), _class.defaultProps = {
prefixCls: "u-table-filter-column"
}, _initialiseProps = function _initialiseProps() {
@ -169,7 +156,7 @@ function filterColumn(Table) {
{ key: da.key + "_" + i, className: prefixCls + "-pop-cont-item", onClick: function onClick() {
_this2.checkedColumItemClick(da);
} },
_react2["default"].createElement(_beeCheckbox2["default"], { id: da.key, checked: da.checked }),
_react2["default"].createElement(Checkbox, { id: da.key, checked: da.checked }),
_react2["default"].createElement(
"span",
null,

View File

@ -1,4 +1,4 @@
"use strict";
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
@ -8,14 +8,10 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
exports["default"] = multiSelect;
var _react = require("react");
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _beeCheckbox = require("bee-checkbox");
var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
@ -28,6 +24,20 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
function indexOf(array, val) {
for (var i = 0; i < array.length; i++) {
if (array[i] === val) return i;
}
return -1;
};
function remove(array, val) {
var index = indexOf(array, val);
if (index > -1) {
array.splice(index, 1);
}
};
/**
* multiSelect={
* type--默认值为checkbox
@ -36,26 +46,14 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
* getSelectedDataFunc--function能获取到选中的数据
* 使用全选时得注意data中的key值一定要是唯一值
*/
function multiSelect(Table) {
function multiSelect(Table, Checkbox) {
var _class, _temp, _initialiseProps;
Array.prototype.indexOf = function (val) {
for (var i = 0; i < this.length; i++) {
if (this[i] == val) return i;
}
return -1;
};
Array.prototype.remove = function (val) {
var index = this.indexOf(val);
if (index > -1) {
this.splice(index, 1);
}
};
return _temp = _class = function (_Component) {
_inherits(multiSelect, _Component);
_inherits(MultiSelect, _Component);
function multiSelect(props) {
_classCallCheck(this, multiSelect);
function MultiSelect(props) {
_classCallCheck(this, MultiSelect);
var _this = _possibleConstructorReturn(this, _Component.call(this, props));
@ -70,11 +68,11 @@ function multiSelect(Table) {
return _this;
}
multiSelect.prototype.componentDidMount = function componentDidMount() {
MultiSelect.prototype.componentDidMount = function componentDidMount() {
this.setState(this.initCheckedObj(this.props));
};
multiSelect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
MultiSelect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
var props = this.props,
selectDisabled = props.selectDisabled,
selectedRow = props.selectedRow,
@ -96,7 +94,7 @@ function multiSelect(Table) {
}
};
multiSelect.prototype.renderColumnsMultiSelect = function renderColumnsMultiSelect(columns) {
MultiSelect.prototype.renderColumnsMultiSelect = function renderColumnsMultiSelect(columns) {
var _this2 = this;
var data = this.state.data;
@ -119,8 +117,8 @@ function multiSelect(Table) {
}
}
var defaultColumns = [{
title: _react2["default"].createElement(_beeCheckbox2["default"], {
className: "table-checkbox",
title: _react2["default"].createElement(Checkbox, {
className: 'table-checkbox',
checked: this.state.checkedAll,
indeterminate: indeterminate_bool && !this.state.checkedAll,
onChange: this.onAllCheckChange
@ -131,8 +129,8 @@ function multiSelect(Table) {
render: function render(text, record, index) {
var rowKey = record["key"] ? record["key"] : _this2.getRowKey(record, i);
var bool = checkedObj.hasOwnProperty(rowKey);
return _react2["default"].createElement(_beeCheckbox2["default"], {
className: "table-checkbox",
return _react2["default"].createElement(Checkbox, {
className: 'table-checkbox',
checked: checkedObj[rowKey],
disabled: !bool,
onClick: _this2.handleClick,
@ -145,7 +143,7 @@ function multiSelect(Table) {
return columns;
};
multiSelect.prototype.render = function render() {
MultiSelect.prototype.render = function render() {
var _this3 = this;
var columns = this.renderColumnsMultiSelect(this.props.columns).concat();
@ -154,7 +152,7 @@ function multiSelect(Table) {
} }, this.props, { columns: columns }));
};
return multiSelect;
return MultiSelect;
}(_react.Component), _initialiseProps = function _initialiseProps() {
var _this4 = this;
@ -246,7 +244,7 @@ function multiSelect(Table) {
var rowKey = record["key"] ? record["key"] : _this4.getRowKey(record, i);
if (checkedObj[rowKey]) {
selIds.remove(id);
remove(selIds, id);
} else {
selIds.push(id);
}
@ -274,4 +272,4 @@ function multiSelect(Table) {
};
}, _temp;
}
module.exports = exports["default"];
module.exports = exports['default'];

View File

@ -12,10 +12,6 @@ var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _beeIcon = require("bee-icon");
var _beeIcon2 = _interopRequireDefault(_beeIcon);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
@ -29,13 +25,14 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
/**
* 参数prefixCls默认bee-table,用于设置图标的样式
* @param {*} Table
* @param {*} Icon
*/
function sort(Table) {
function sort(Table, Icon) {
return function (_Component) {
_inherits(Demo11, _Component);
_inherits(SortTable, _Component);
function Demo11(props) {
_classCallCheck(this, Demo11);
function SortTable(props) {
_classCallCheck(this, SortTable);
var _this = _possibleConstructorReturn(this, _Component.call(this, props));
@ -87,7 +84,7 @@ function sort(Table) {
return _this;
}
Demo11.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
SortTable.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
if (nextProps.data !== this.props.data) {
this.setState({
sortOrder: "",
@ -97,7 +94,7 @@ function sort(Table) {
}
};
Demo11.prototype.renderColumnsDropdown = function renderColumnsDropdown(columns) {
SortTable.prototype.renderColumnsDropdown = function renderColumnsDropdown(columns) {
var _this2 = this;
var sortOrder = this.state.sortOrder;
@ -121,7 +118,7 @@ function sort(Table) {
return _this2.toggleSortOrder("ascend", column);
}
},
_react2["default"].createElement(_beeIcon2["default"], { type: "uf-triangle-up" })
_react2["default"].createElement(Icon, { type: "uf-triangle-up" })
),
_react2["default"].createElement(
"span",
@ -132,7 +129,7 @@ function sort(Table) {
return _this2.toggleSortOrder("descend", column);
}
},
_react2["default"].createElement(_beeIcon2["default"], { type: "uf-triangle-down" })
_react2["default"].createElement(Icon, { type: "uf-triangle-down" })
)
);
}
@ -146,12 +143,12 @@ function sort(Table) {
});
};
Demo11.prototype.render = function render() {
SortTable.prototype.render = function render() {
var columns = this.renderColumnsDropdown(this.props.columns.concat());
return _react2["default"].createElement(Table, _extends({}, this.props, { columns: columns, data: this.state.data }));
};
return Demo11;
return SortTable;
}(_react.Component);
}
module.exports = exports["default"];

View File

@ -1,21 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports["default"] = renderCheckbox;
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _beeIcon = require("bee-icon");
var _beeIcon2 = _interopRequireDefault(_beeIcon);
var _beeCheckbox = require("bee-checkbox");
var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
@ -26,78 +19,84 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
var CheckboxRender = function (_Component) {
_inherits(CheckboxRender, _Component);
/**
* 渲染checkbox
* @param Checkbox
* @param Icon
* @returns {CheckboxRender}
*/
function renderCheckbox(Checkbox, Icon) {
return function (_Component) {
_inherits(CheckboxRender, _Component);
function CheckboxRender() {
var _temp, _this, _ret;
function CheckboxRender() {
var _temp, _this, _ret;
_classCallCheck(this, CheckboxRender);
_classCallCheck(this, CheckboxRender);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {
value: _this.props.value,
editable: false
}, _this.handleChange = function (e) {
var value = e.target.value;
_this.setState({ value: value });
}, _this.check = function () {
_this.setState({ editable: false });
if (_this.props.onChange) {
_this.props.onChange(_this.state.value);
}
}, _this.edit = function () {
_this.setState({ editable: true });
}, _this.handleKeydown = function (event) {
if (event.keyCode == 13) {
_this.check();
}
}, _temp), _possibleConstructorReturn(_this, _ret);
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {
value: _this.props.value,
editable: false
}, _this.handleChange = function (e) {
var value = e.target.value;
_this.setState({ value: value });
}, _this.check = function () {
_this.setState({ editable: false });
if (_this.props.onChange) {
_this.props.onChange(_this.state.value);
}
}, _this.edit = function () {
_this.setState({ editable: true });
}, _this.handleKeydown = function (event) {
if (event.keyCode == 13) {
_this.check();
}
}, _temp), _possibleConstructorReturn(_this, _ret);
}
CheckboxRender.prototype.render = function render() {
var _state = this.state,
value = _state.value,
editable = _state.editable;
var isclickTrigger = this.props.isclickTrigger;
CheckboxRender.prototype.render = function render() {
var _state = this.state,
value = _state.value,
editable = _state.editable;
var isclickTrigger = this.props.isclickTrigger;
var cellContent = "";
if (editable) {
cellContent = _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(_beeCheckbox2["default"], {
onChange: this.handleChange,
onKeyDown: this.handleKeydown,
onBlur: this.check,
autoFocus: true,
value: value
})
);
} else {
cellContent = _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper" },
value || " ",
_react2["default"].createElement(_beeIcon2["default"], {
type: "uf-pencil",
className: "editable-cell-icon",
onClick: this.edit
})
);
}
return _react2["default"].createElement(
"div",
{ className: "editable-cell" },
cellContent
);
};
var cellContent = "";
if (editable) {
cellContent = _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(Checkbox, {
onChange: this.handleChange,
onKeyDown: this.handleKeydown,
onBlur: this.check,
autoFocus: true,
value: value
})
);
} else {
cellContent = _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper" },
value || " ",
_react2["default"].createElement(Icon, {
type: "uf-pencil",
className: "editable-cell-icon",
onClick: this.edit
})
);
}
return _react2["default"].createElement(
"div",
{ className: "editable-cell" },
cellContent
);
};
return CheckboxRender;
}(_react.Component);
exports["default"] = CheckboxRender;
return CheckboxRender;
}(_react.Component);
}
module.exports = exports["default"];

View File

@ -1,23 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports["default"] = renderDate;
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _beeIcon = require("bee-icon");
var _beeIcon2 = _interopRequireDefault(_beeIcon);
var _beeDatepicker = require("bee-datepicker");
var _beeDatepicker2 = _interopRequireDefault(_beeDatepicker);
var _moment = require("moment");
var _moment2 = _interopRequireDefault(_moment);
@ -32,129 +26,129 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
var MonthPicker = _beeDatepicker2["default"].MonthPicker,
RangePicker = _beeDatepicker2["default"].RangePicker,
WeekPicker = _beeDatepicker2["default"].WeekPicker;
function renderDate(DatePicker, Icon) {
var _class, _temp2;
var DateRender = function (_Component) {
_inherits(DateRender, _Component);
var MonthPicker = DatePicker.MonthPicker,
RangePicker = DatePicker.RangePicker,
WeekPicker = DatePicker.WeekPicker;
function DateRender() {
var _temp, _this, _ret;
return _temp2 = _class = function (_Component) {
_inherits(DateRender, _Component);
_classCallCheck(this, DateRender);
function DateRender() {
var _temp, _this, _ret;
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_classCallCheck(this, DateRender);
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {
value: _this.props.value,
editable: false
}, _this.handleChange = function (e) {
var _ref = _this.props || "YYYY-MM-DD",
format = _ref.format;
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var value = e ? e.format(format) : "";
_this.setState({ value: value, editable: false });
if (_this.props.onChange) {
_this.props.onChange(value);
}
}, _this.check = function () {
_this.setState({ editable: false });
if (_this.props.onChange) {
_this.props.onChange(_this.state.value);
}
}, _this.edit = function () {
_this.setState({ editable: true });
}, _this.handleKeydown = function (event) {
if (event.keyCode == 13) {
_this.check();
}
}, _temp), _possibleConstructorReturn(_this, _ret);
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {
value: _this.props.value,
editable: false
}, _this.handleChange = function (e) {
var _ref = _this.props || "YYYY-MM-DD",
format = _ref.format;
DateRender.prototype.render = function render() {
var _state = this.state,
value = _state.value,
editable = _state.editable;
var _props = this.props,
isclickTrigger = _props.isclickTrigger,
type = _props.type;
var value = e ? e.format(format) : "";
_this.setState({ value: value, editable: false });
if (_this.props.onChange) {
_this.props.onChange(value);
}
}, _this.check = function () {
_this.setState({ editable: false });
if (_this.props.onChange) {
_this.props.onChange(_this.state.value);
}
}, _this.edit = function () {
_this.setState({ editable: true });
}, _this.handleKeydown = function (event) {
if (event.keyCode == 13) {
_this.check();
}
}, _temp), _possibleConstructorReturn(_this, _ret);
}
var cellContent = "";
var TComponent = void 0;
switch (type.toLowerCase()) {
case "monthpicker":
TComponent = MonthPicker;
break;
// case "rangepicker":
// TComponent = RangePicker;
// break;
case "weekpicker":
TComponent = WeekPicker;
break;
default:
TComponent = _beeDatepicker2["default"];
break;
}
TComponent;
var date_value = value ? (0, _moment2["default"])(value) : value;
if (editable) {
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(TComponent, _extends({}, this.props, {
value: date_value,
onChange: this.handleChange
})),
_react2["default"].createElement(_beeIcon2["default"], {
type: "uf-correct",
className: "editable-cell-icon-check",
onClick: this.check
})
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(TComponent, _extends({}, this.props, {
value: date_value,
onChange: this.handleChange
})),
_react2["default"].createElement(_beeIcon2["default"], {
type: "uf-correct",
className: "editable-cell-icon-check",
onClick: this.check
})
);
} else {
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper", onClick: this.edit },
value || " "
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper" },
value || " ",
_react2["default"].createElement(_beeIcon2["default"], {
type: "uf-pencil",
className: "editable-cell-icon",
onClick: this.edit
})
);
}
return _react2["default"].createElement(
"div",
{ className: "editable-cell" },
cellContent
);
};
DateRender.prototype.render = function render() {
var _state = this.state,
value = _state.value,
editable = _state.editable;
var _props = this.props,
isclickTrigger = _props.isclickTrigger,
type = _props.type;
return DateRender;
}(_react.Component);
var cellContent = "";
var TComponent = void 0;
switch (type.toLowerCase()) {
case "monthpicker":
TComponent = MonthPicker;
break;
// case "rangepicker":
// TComponent = RangePicker;
// break;
case "weekpicker":
TComponent = WeekPicker;
break;
default:
TComponent = DatePicker;
break;
}
exports["default"] = DateRender;
var date_value = value ? (0, _moment2["default"])(value) : value;
if (editable) {
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(TComponent, _extends({}, this.props, {
value: date_value,
onChange: this.handleChange
})),
_react2["default"].createElement(Icon, {
type: "uf-correct",
className: "editable-cell-icon-check",
onClick: this.check
})
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(TComponent, _extends({}, this.props, {
value: date_value,
onChange: this.handleChange
})),
_react2["default"].createElement(Icon, {
type: "uf-correct",
className: "editable-cell-icon-check",
onClick: this.check
})
);
} else {
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper", onClick: this.edit },
value || " "
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper" },
value || " ",
_react2["default"].createElement(Icon, {
type: "uf-pencil",
className: "editable-cell-icon",
onClick: this.edit
})
);
}
return _react2["default"].createElement(
"div",
{ className: "editable-cell" },
cellContent
);
};
DateRender.defaultProps = {
type: "DatePicker"
};
return DateRender;
}(_react.Component), _class.defaultProps = {
type: "DatePicker"
}, _temp2;
}
module.exports = exports["default"];

View File

@ -1,31 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports["default"] = renderInput;
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _beeIcon = require("bee-icon");
var _beeIcon2 = _interopRequireDefault(_beeIcon);
var _beeFormControl = require("bee-form-control");
var _beeFormControl2 = _interopRequireDefault(_beeFormControl);
var _beeForm = require("bee-form");
var _beeForm2 = _interopRequireDefault(_beeForm);
var _beeTooltip = require("bee-tooltip");
var _beeTooltip2 = _interopRequireDefault(_beeTooltip);
var _propTypes = require("prop-types");
var _propTypes2 = _interopRequireDefault(_propTypes);
@ -42,165 +28,167 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
var propTypes = {
check: _propTypes2["default"].func
};
/**
* 渲染输入框
* @param Form
* @param Input
* @param Icon
* @returns {InputRender}
*/
function renderInput(Form, Input, Icon) {
var _class, _temp2;
var defaultProps = {
check: function check() {
return "";
}
};
return _temp2 = _class = function (_Component) {
_inherits(InputRender, _Component);
var InputRender = function (_Component) {
_inherits(InputRender, _Component);
function InputRender() {
var _temp, _this, _ret;
function InputRender() {
var _temp, _this, _ret;
_classCallCheck(this, InputRender);
_classCallCheck(this, InputRender);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {
value: _this.props.value,
editable: false
}, _this.handleChange = function (e) {
var value = e;
_this.setState({ value: value });
}, _this.check = function () {
if (typeof _this.flag === "undefined" || _this.flag) {
_this.props.check(_this.flag, _this.obj);
_this.setState({ editable: false });
if (_this.props.onChange) {
_this.props.onChange(_this.state.value);
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {
value: _this.props.value,
editable: false
}, _this.handleChange = function (e) {
var value = e;
_this.setState({ value: value });
}, _this.check = function () {
if (typeof _this.flag === "undefined" || _this.flag) {
_this.props.check(_this.flag, _this.obj);
_this.setState({ editable: false });
if (_this.props.onChange) {
_this.props.onChange(_this.state.value);
}
_this.flag = undefined;
}
}, _this.checkValidate = function (flag, obj) {
_this.flag = flag;
_this.obj = obj;
}, _this.edit = function () {
_this.setState({ editable: true });
}, _this.handleKeydown = function (event) {
if (event.keyCode == 13) {
_this.check();
} else if (event.keyCode == 9) {}
}, _this.formatCurrency = function (money) {
if (money && money != null && !!Number(money)) {
money = String(money);
var left = money.split(".")[0],
right = money.split(".")[1];
right = right ? right.length >= 2 ? "." + right.substr(0, 2) : "." + right + "0" : ".00";
var temp = left.split("").reverse().join("").match(/(\d{1,3})/g);
return (Number(money) < 0 ? "-" : "") + temp.join(",").split("").reverse().join("") + right;
} else if (money === 0) {
//注意===在这里的使用如果传入的money为0,if中会将其判定为boolean类型故而要另外做===判断
return "0.00";
} else {
return "";
}
}, _temp), _possibleConstructorReturn(_this, _ret);
}
_this.flag = undefined;
}
}, _this.checkValidate = function (flag, obj) {
_this.flag = flag;
_this.obj = obj;
}, _this.edit = function () {
_this.setState({ editable: true });
}, _this.handleKeydown = function (event) {
if (event.keyCode == 13) {
_this.check();
} else if (event.keyCode == 9) {}
}, _this.formatCurrency = function (money) {
if (money && money != null && !!Number(money)) {
money = String(money);
var left = money.split(".")[0],
right = money.split(".")[1];
right = right ? right.length >= 2 ? "." + right.substr(0, 2) : "." + right + "0" : ".00";
var temp = left.split("").reverse().join("").match(/(\d{1,3})/g);
return (Number(money) < 0 ? "-" : "") + temp.join(",").split("").reverse().join("") + right;
} else if (money === 0) {
//注意===在这里的使用如果传入的money为0,if中会将其判定为boolean类型故而要另外做===判断
return "0.00";
} else {
return "";
}
}, _temp), _possibleConstructorReturn(_this, _ret);
}
//货币的格式化方法
//货币的格式化方法
InputRender.prototype.render = function render() {
var _state = this.state,
value = _state.value,
editable = _state.editable;
InputRender.prototype.render = function render() {
var _state = this.state,
value = _state.value,
editable = _state.editable;
var _props = this.props,
name = _props.name,
placeholder = _props.placeholder,
isclickTrigger = _props.isclickTrigger,
format = _props.format,
formItemClassName = _props.formItemClassName,
mesClassName = _props.mesClassName,
check = _props.check,
other = _objectWithoutProperties(_props, ["name", "placeholder", "isclickTrigger", "format", "formItemClassName", "mesClassName", "check"]);
var _props = this.props,
name = _props.name,
placeholder = _props.placeholder,
isclickTrigger = _props.isclickTrigger,
format = _props.format,
formItemClassName = _props.formItemClassName,
mesClassName = _props.mesClassName,
check = _props.check,
other = _objectWithoutProperties(_props, ["name", "placeholder", "isclickTrigger", "format", "formItemClassName", "mesClassName", "check"]);
var cellContent = "";
if (editable) {
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(
_beeForm2["default"].FormItem,
_extends({
className: "formItem-style " + formItemClassName,
mesClassName: "errMessage-style " + mesClassName,
change: this.handleChange,
blur: this.check,
check: this.checkValidate
}, other),
_react2["default"].createElement(_beeFormControl2["default"], {
name: name,
placeholder: placeholder,
onKeyDown: this.handleKeydown,
autoFocus: true,
value: value
})
)
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(
_beeForm2["default"].FormItem,
_extends({
className: "formItem-style " + formItemClassName,
mesClassName: "errMessage-style " + mesClassName,
change: this.handleChange,
blur: this.check,
check: this.checkValidate
}, other),
_react2["default"].createElement(_beeFormControl2["default"], {
name: name,
placeholder: placeholder,
onKeyDown: this.handleKeydown,
autoFocus: true,
value: value
})
),
_react2["default"].createElement(_beeIcon2["default"], {
type: "uf-correct",
className: "editable-cell-icon-check",
onClick: this.check
})
);
} else {
if (format && format === "Currency") {
value = this.formatCurrency(value);
}
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper", onClick: this.edit },
value || " "
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper" },
value || " ",
_react2["default"].createElement(_beeIcon2["default"], {
type: "uf-pencil",
className: "editable-cell-icon",
onClick: this.edit
})
);
}
return _react2["default"].createElement(
"div",
{ className: "editable-cell" },
cellContent
);
};
var cellContent = "";
if (editable) {
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(
Form.FormItem,
_extends({
className: "formItem-style " + formItemClassName,
mesClassName: "errMessage-style " + mesClassName,
change: this.handleChange,
blur: this.check,
check: this.checkValidate
}, other),
_react2["default"].createElement(Input, {
name: name,
placeholder: placeholder,
onKeyDown: this.handleKeydown,
autoFocus: true,
value: value
})
)
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(
Form.FormItem,
_extends({
className: "formItem-style " + formItemClassName,
mesClassName: "errMessage-style " + mesClassName,
change: this.handleChange,
blur: this.check,
check: this.checkValidate
}, other),
_react2["default"].createElement(Input, {
name: name,
placeholder: placeholder,
onKeyDown: this.handleKeydown,
autoFocus: true,
value: value
})
),
_react2["default"].createElement(Icon, {
type: "uf-correct",
className: "editable-cell-icon-check",
onClick: this.check
})
);
} else {
if (format && format === "Currency") {
value = this.formatCurrency(value);
}
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper", onClick: this.edit },
value || " "
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper" },
value || " ",
_react2["default"].createElement(Icon, {
type: "uf-pencil",
className: "editable-cell-icon",
onClick: this.edit
})
);
}
return _react2["default"].createElement(
"div",
{ className: "editable-cell" },
cellContent
);
};
return InputRender;
}(_react.Component);
exports["default"] = InputRender;
InputRender.PropTypes = propTypes;
InputRender.defaultProps = defaultProps;
return InputRender;
}(_react.Component), _class.propTypes = {
check: _propTypes2["default"].func
}, _class.defaultProps = {
check: function check() {
return "";
}
}, _temp2;
}
module.exports = exports["default"];

View File

@ -1,11 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
exports["default"] = renderSelect;
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
@ -14,14 +16,6 @@ var _propTypes = require("prop-types");
var _propTypes2 = _interopRequireDefault(_propTypes);
var _beeIcon = require("bee-icon");
var _beeIcon2 = _interopRequireDefault(_beeIcon);
var _beeSelect = require("bee-select");
var _beeSelect2 = _interopRequireDefault(_beeSelect);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
@ -32,141 +26,145 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
var propTypes = {
dataSource: _propTypes2["default"].array
};
/**
* 渲染下拉框
* @param Select
* @param Icon
* @returns {SelectRender}
*/
function renderSelect(Select, Icon) {
var _class, _temp2;
var SelectRender = function (_Component) {
_inherits(SelectRender, _Component);
return _temp2 = _class = function (_Component) {
_inherits(SelectRender, _Component);
function SelectRender() {
var _temp, _this, _ret;
function SelectRender() {
var _temp, _this, _ret;
_classCallCheck(this, SelectRender);
_classCallCheck(this, SelectRender);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {
value: _this.props.value,
editable: false
}, _this.handleChange = function (e) {
var value = e;
if (_this.props.onChange) {
_this.props.onChange(value);
}
_this.setState({ value: value });
setTimeout(function () {
_this.setState({ editable: false });
}, 0);
}, _this.check = function () {
_this.setState({ editable: false });
if (_this.props.onChange) {
_this.props.onChange(_this.state.value);
}
}, _this.edit = function () {
_this.setState({ editable: true });
}, _temp), _possibleConstructorReturn(_this, _ret);
}
SelectRender.prototype.render = function render() {
var _this2 = this;
var _state = this.state,
value = _state.value,
editable = _state.editable;
var _props = this.props,
isclickTrigger = _props.isclickTrigger,
dataSource = _props.dataSource;
var cellContent = "";
if (editable) {
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(
_beeSelect2["default"],
_extends({}, this.props, {
value: this.state.value,
onBlur: function onBlur(value) {
console.log(value);
// this.props.onBlur();
},
onFocus: function onFocus(value) {
console.log(value);
// this.props.onBlur();
},
onChange: this.handleChange
}),
this.props.children
),
_react2["default"].createElement(_beeIcon2["default"], {
type: "uf-correct",
className: "editable-cell-icon-check",
onClick: this.check
})
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(
_beeSelect2["default"],
_extends({}, this.props, {
value: this.state.value,
onBlur: function onBlur() {
_this2.setState({
editable: true
});
_this2.props.onBlur();
},
onChange: this.handleChange
}),
this.props.children
),
_react2["default"].createElement(_beeIcon2["default"], {
type: "uf-correct",
className: "editable-cell-icon-check",
onClick: this.check
})
);
} else {
if (dataSource && dataSource.length > 0) {
for (var index = 0; index < dataSource.length; index++) {
var element = dataSource[index];
if (element.value === value) {
value = element.key;
break;
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = {
value: _this.props.value,
editable: false
}, _this.handleChange = function (e) {
var value = e;
if (_this.props.onChange) {
_this.props.onChange(value);
}
_this.setState({ value: value });
setTimeout(function () {
_this.setState({ editable: false });
}, 0);
}, _this.check = function () {
_this.setState({ editable: false });
if (_this.props.onChange) {
_this.props.onChange(_this.state.value);
}
}, _this.edit = function () {
_this.setState({ editable: true });
}, _temp), _possibleConstructorReturn(_this, _ret);
}
}
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper", onClick: this.edit },
value || " "
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper" },
value || " ",
_react2["default"].createElement(_beeIcon2["default"], {
type: "uf-pencil",
className: "editable-cell-icon",
onClick: this.edit
})
);
}
return _react2["default"].createElement(
"div",
{ className: "editable-cell" },
cellContent
);
};
return SelectRender;
}(_react.Component);
SelectRender.prototype.render = function render() {
var _this2 = this;
exports["default"] = SelectRender;
var _state = this.state,
value = _state.value,
editable = _state.editable;
var _props = this.props,
isclickTrigger = _props.isclickTrigger,
dataSource = _props.dataSource;
SelectRender.propTypes = propTypes;
var cellContent = "";
if (editable) {
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(
Select,
_extends({}, this.props, {
value: this.state.value,
onBlur: function onBlur(value) {
console.log(value);
// this.props.onBlur();
},
onFocus: function onFocus(value) {
console.log(value);
// this.props.onBlur();
},
onChange: this.handleChange
}),
this.props.children
),
_react2["default"].createElement(Icon, {
type: "uf-correct",
className: "editable-cell-icon-check",
onClick: this.check
})
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-input-wrapper" },
_react2["default"].createElement(
Select,
_extends({}, this.props, {
value: this.state.value,
onBlur: function onBlur() {
_this2.setState({
editable: true
});
_this2.props.onBlur();
},
onChange: this.handleChange
}),
this.props.children
),
_react2["default"].createElement(Icon, {
type: "uf-correct",
className: "editable-cell-icon-check",
onClick: this.check
})
);
} else {
if (dataSource && dataSource.length > 0) {
for (var index = 0; index < dataSource.length; index++) {
var element = dataSource[index];
if (element.value === value) {
value = element.key;
break;
}
}
}
cellContent = isclickTrigger ? _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper", onClick: this.edit },
value || " "
) : _react2["default"].createElement(
"div",
{ className: "editable-cell-text-wrapper" },
value || " ",
_react2["default"].createElement(Icon, {
type: "uf-pencil",
className: "editable-cell-icon",
onClick: this.edit
})
);
}
return _react2["default"].createElement(
"div",
{ className: "editable-cell" },
cellContent
);
};
return SelectRender;
}(_react.Component), _class.propTypes = {
dataSource: _propTypes2["default"].array
}, _temp2;
}
module.exports = exports["default"];

View File

@ -9,6 +9,7 @@ import React, { Component } from "react";
import Table from "../../src";
import Checkbox from "bee-checkbox";
import Button from "bee-button";
import Icon from "bee-icon";
import multiSelect from "../../src/lib/multiSelect.js";
import sort from "../../src/lib/sort.js";
import sum from "../../src/lib/sum.js";
@ -55,7 +56,7 @@ const data13_1 = [
{ a: "郭靖", b: "男", c: 25, d: "大侠", key: "3" }
];
//拼接成复杂功能的table组件不能在render中定义需要像此例子声明在组件的外侧不然操作state会导致功能出现异常
let ComplexTable = multiSelect(sum(sort(Table)));
let ComplexTable = multiSelect(sum(sort(Table, Icon)), Checkbox);
class Demo13 extends Component {
constructor(props) {

View File

@ -5,18 +5,24 @@
*
*/
import Button from "bee-button";
import React, { Component } from "react";
import React from "react";
import Table from "../../src";
import Animate from "bee-animate";
import Tooltip from "bee-tooltip";
import Button from "bee-button";
import Form from "bee-form";
import Icon from "bee-icon";
import Input from "bee-form-control";
import Checkbox from "bee-checkbox";
import Datepicker from "bee-datepicker";
import Select from "bee-select";
import InputRender from "../../build/render/InputRender.js";
import DateRender from "../../build/render/DateRender.js";
import SelectRender from "../../build/render/SelectRender.js";
import renderInput from "../../build/render/InputRender.js";
import renderDate from "../../build/render/DateRender.js";
import renderSelect from "../../build/render/SelectRender.js";
const InputRender = renderInput(Form, Input, Icon);
const DateRender = renderDate(Datepicker, Icon);
const SelectRender = renderSelect(Select, Icon);
const format = "YYYY-MM-DD";
const format2 = "YYYY-MM";

View File

@ -7,7 +7,6 @@
import React, { Component } from "react";
import Table from "../../src";
import multiSelect from "../../src/lib/multiSelect.js";
const columns16 = [
{ title: "用户名", dataIndex: "a", key: "a", width: 100 },
@ -38,7 +37,6 @@ const data16 = [
{ a: "郭靖", b: "男", c: 25, d: "操作", key: "3" }
];
// let Table1 = multiSelect(Table)
class Demo16 extends Component {
constructor(props){

View File

@ -6,24 +6,22 @@
*/
import Button from "bee-button";
import React, { Component } from "react";
import React from "react";
import Table from "../../src";
import Animate from "bee-animate";
import Tooltip from "bee-tooltip";
import Icon from "bee-icon";
import Input from "bee-form-control";
import Checkbox from "bee-checkbox";
import Form from "bee-form";
import Select from "bee-select";
import InputRender from "../../build/render/InputRender.js";
import DateRender from "../../build/render/DateRender.js";
import SelectRender from "../../build/render/SelectRender.js";
import renderInput from "../../build/render/InputRender.js";
import renderSelect from "../../build/render/SelectRender.js";
const format = "YYYY-MM-DD";
const format2 = "YYYY-MM";
const format3 = "YYYY-MM-DD HH:mm:ss";
const InputRender = renderInput(Form, Input, Icon);
const SelectRender = renderSelect(Select, Icon);
const Option = Select.Option;
const dateInputPlaceholder = "选择日期";
const dateInputPlaceholder2 = "选择年月";
const dataSource = [
{
key: "boyuzhou",
@ -155,13 +153,7 @@ class Demo19 extends React.Component {
this.setState({ dataSource });
};
};
onCheckChange = (index, key) => {
return value => {
const dataSource = [...this.state.dataSource];
dataSource[index][key] = value;
this.setState({ dataSource });
};
};
onSelectChange = (index, key) => {
return value => {
console.log(`selected ${value}`);
@ -170,19 +162,7 @@ class Demo19 extends React.Component {
this.setState({ dataSource });
};
};
onDateChange = d => {
console.log(d);
};
onDateSelect = d => {
console.log(d);
};
onDelete = index => {
return () => {
const dataSource = [...this.state.dataSource];
dataSource.splice(index, 1);
this.setState({ dataSource });
};
};
handleAdd = () => {
const { count, dataSource } = this.state;
const newData = {

View File

@ -11,6 +11,8 @@ import Table from '../../src';
import filterColumn from '../../src/lib/filterColumn';
import sum from '../../src/lib/sum';
import Icon from "bee-icon";
import Checkbox from 'bee-checkbox';
import Popover from 'bee-popover';
const columns21 = [
{
@ -46,7 +48,7 @@ const data21 = [
{ a: "郭靖", b: "男", c: 25,d:'大侠', key: "3" }
];
const FilterColumnTable = filterColumn(sum(Table));
const FilterColumnTable = filterColumn(sum(Table), Checkbox, Popover, Icon);
const defaultProps21 = {
prefixCls: "bee-table"

File diff suppressed because one or more lines are too long

16570
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ Table拓展功能方法。注拼接成复杂功能的table组件不能在rend
需要单独的去引用相应的js文件目录在lib文件夹示例如下
```js
import multiSelect from "bee-table/build/lib/multiSelect.js"
import multiSelect from "tinper-bee/lib/multiSelect.js";
```
### multiSelect
@ -25,7 +25,15 @@ import multiSelect from "bee-table/build/lib/multiSelect.js"
| selectedRow | 设置某一行数据是否被选中使用类似于rowClassName | Function(record, index):bool | 无 |
#### 使用
```js
import multiSelect from "tinper-bee/lib/multiSelect.js";
import { Table, Checkbox } from 'tinper-bee';
const MultiSelectTable = multiSelect(Table, Checkbox);
```
### sort
@ -37,7 +45,15 @@ import multiSelect from "bee-table/build/lib/multiSelect.js"
| ------ | ---------- | -------- | ---- |
| sorter | 排序函数,可以自定义 | Function | 无 |
#### 使用
```js
import sort from "tinper-bee/lib/sort.js";
import { Table, Icon } from 'tinper-bee';
const SortTable = sort(Table, Icon);
```
### sum
@ -49,5 +65,55 @@ import multiSelect from "bee-table/build/lib/multiSelect.js"
| ------ | ---------- | -------- | ---- |
| sumCol | 该列设置为合计列,合计行中会显示合计数据 | boolean | false |
#### 使用
```js
import sum from "tinper-bee/lib/sum.js";
import { Table } from 'tinper-bee';
const SumTable = sum(Table);
```
### dragColumn
拖拽列功能
#### dragColumn新增参数
| 参数 | 说明 | 类型 | 默认值 |
| ------ | ---------- | -------- | ---- |
| dragborder | 显示拖拽边框 | boolean | false |
| draggable | 是否可拖拽 | boolean | false |
| onDragStart | 拖拽开始回调函数 | function | () => {} |
| onDragEnter |拖拽进入回调函数 | function | () => {} |
| onDragOver | 拖拽划过回调函数 | function | () => {} |
| onDrop | 拖拽释放回调函数 | function | () => {} |
#### 使用
```js
import dragColumn from "tinper-bee/lib/dragColumn.js";
import { Table } from 'tinper-bee';
const DragColumnTable = dragColumn(Table);
```
### filterColumn
过滤功能
#### filterColumn新增参数
#### 使用
```js
import filterColumn from "tinper-bee/lib/filterColumn.js";
import { Table, Checkbox, Popover, Icon } from 'tinper-bee';
const DragColumnTable = filterColumn(Table, Checkbox, Popover, Icon);
```

View File

@ -5,21 +5,15 @@
需要单独的去引用相应的js文件目录在render文件夹示例如下
```js
import InputRender from "bee-table/build/render/InputRender.js"
import renderInput from "tinper-bee/lib/InputRender.js";
```
## 安装依赖包
不同的render会依赖其他组件因为此类render组件是作为bee-table的插件机制处理的默认不会去自动下载所依赖的组件所以在使用之前需要去安装相应的组件。
## 如何下载对应依赖的组件
1. 下载依赖。例如:`npm install bee-icon -S`或者`npm install bee-icon --save`
2. 引入css文件。**注如果引入了CSS的cdn资源即可忽略此步骤。**例如:`import 'bee-icon/build/Icon.css;'`
### InputRender
输入框类型render
#### 依赖的组件
该render依赖于`bee-icon`,`bee-form-control`,`bee-form`,`bee-tooltip`。
该render依赖于`Icon`,`FormControl`,`Form`,`Tooltip`。
#### 配置
@ -40,11 +34,20 @@ import InputRender from "bee-table/build/render/InputRender.js"
| htmlType | 数值类型,目前支持 email/tel/IDCard/chinese/password'类型 | string | - |
| reg | 校验正则,注:设置 htmlType 后 reg 无效 | regExp | - |
#### 使用
```js
import renderInput from "tinper-bee/lib/InputRender.js";
import { Icon, Form , FormControl } from 'tinper-bee';
const InputRender = renderInput(Form, FormControl, Icon);
```
### DateRender
日期类型render
#### 依赖的组件
该render依赖于`bee-icon`,`bee-datepicker`,`moment`
该render依赖于`moment`, `Datepicker`, `Icon`
#### 配置
@ -54,14 +57,24 @@ import InputRender from "bee-table/build/render/InputRender.js"
| type | 控制日期的显示格式DatePicker、MonthPicker或者WeekPicker暂时不支持RangePicker | string | "DatePicker" |
注:其他参数参见bee-datepicker组件参数配置
注:其他参数参见Datepicker组件参数配置
#### 使用
```js
import renderDate from "tinper-bee/lib/DateRender.js";
import Datepicker from "tinper-bee/lib/Datepicker";
import { Icon } from 'tinper-bee';
const DateRender = renderDate(Datepicker, Icon);
```
### SelectRender
输入框类型render
下拉框类型render
#### 依赖的组件
该render依赖于`bee-icon`,`bee-select`
该render依赖于`Icon`,`Select`
#### 配置
@ -72,4 +85,39 @@ import InputRender from "bee-table/build/render/InputRender.js"
注:其他参数参见bee-select组件参数配置
注:其他参数参见Select组件参数配置
#### 使用
```js
import renderSelect from "tinper-bee/lib/SelectRender.js";
import { Icon, Select } from 'tinper-bee';
const SelectRender = renderSelect(Select, Icon);
```
### CheckboxRender
复选框类型render
#### 依赖的组件
该render依赖于`Icon`,`Checkbox`
#### 配置
| 参数 | 说明 | 类型 | 默认值 |
| -------------- | ---------------------------------------- | ------- | ----- |
| onChange | 修改后触发回调函数 | function | () => {} |
| value | 设置是否选中值 | boolean | false |
注:其他参数参见Checkbox组件参数配置
#### 使用
```js
import renderCheckbox from "tinper-bee/lib/CheckboxRender.js";
import { Icon, Checkbox } from 'tinper-bee';
const CheckboxRender = renderCheckbox(Checkbox, Icon);
```

View File

@ -34,11 +34,12 @@ export default function dragColumn(Table) {
}
onDragStart=(event,data)=>{
onDragStart=(event,data)=>{
this.props.onDragStart(event,data)
}
onDragOver=(event,data)=>{
this.props.onDragOver(event,data)
}
onDragEnter=(event,data)=>{
@ -50,7 +51,8 @@ export default function dragColumn(Table) {
current.drgHover = true;
this.setState({
columns
})
});
this.props.onDragEnter(event,data);
}
onDrop=(event,data)=>{
@ -72,6 +74,7 @@ export default function dragColumn(Table) {
this.setState({
columns:_columns,
});
this.props.onDrop(event,data);
}
getTarget=(evt)=>{
@ -79,16 +82,32 @@ export default function dragColumn(Table) {
}
render() {
const {data,dragborder,draggable,className} = this.props;
const {
data,
dragborder,
draggable,
className,
columns,
onDragStart,
onDragEnter,
onDragOver,
onDrop,
...others
} = this.props;
let key = new Date().getTime();
const {columns} = this.state;
return (<Table {...this.props} columns={columns} data={data} className={`${className} u-table-drag-border`}
onDragStart={this.onDragStart} onDragOver={this.onDragOver} onDrop={this.onDrop}
onDragEnter={this.onDragEnter}
draggable={draggable}
dragborder={dragborder}
dragborderKey={key}
return (
<Table
{...others}
columns={this.state.columns}
data={data}
className={`${className} u-table-drag-border`}
onDragStart={this.onDragStart}
onDragOver={this.onDragOver}
onDrop={this.onDrop}
onDragEnter={this.onDragEnter}
draggable={draggable}
dragborder={dragborder}
dragborderKey={key}
/>)
}
};

View File

@ -42,7 +42,6 @@ export default function filterColumn(Table, Checkbox, Popover, Icon) {
}
checkedColumItemClick = (da)=>{
let {columns} = this.state;
da.checked = da.checked?false:true;
da.disable = da.checked?true:false;
this.setState({

View File

@ -1,5 +1,4 @@
import React, { Component } from "react";
import Icon from "bee-icon";
/**
* 参数prefixCls默认bee-table,用于设置图标的样式

View File

@ -6,7 +6,7 @@ import React, {Component} from "react";
* @param Icon
* @returns {CheckboxRender}
*/
export default function renderCheckbox(Checkbox, Icon) {
export default function renderCheckbox(Checkbox, Icon) {
return class CheckboxRender extends Component {
state = {
value: this.props.value,
@ -33,7 +33,6 @@ export default function renderCheckbox(Checkbox, Icon) {
render() {
const {value, editable} = this.state;
let {isclickTrigger} = this.props;
let cellContent = "";
if (editable) {
cellContent = (

View File

@ -1,98 +1,100 @@
import React, { Component } from "react";
import Icon from "bee-icon";
import Input from "bee-form-control";
import Form from "bee-form";
import Tooltip from "bee-tooltip";
import React, {Component} from "react";
import PropTypes from "prop-types";
const propTypes = {
check: PropTypes.func
};
/**
* 渲染输入框
* @param Form
* @param Input
* @param Icon
* @returns {InputRender}
*/
export default function renderInput(Form, Input, Icon) {
return class InputRender extends Component {
static propTypes = {
check: PropTypes.func
};
static defaultProps = {
check: () => ""
};
state = {
value: this.props.value,
editable: false
};
handleChange = e => {
const value = e;
this.setState({ value });
};
check = () => {
if (typeof this.flag === "undefined" || this.flag) {
this.props.check(this.flag, this.obj);
this.setState({ editable: false });
if (this.props.onChange) {
this.props.onChange(this.state.value);
}
this.flag = undefined;
}
const defaultProps = {
check: () => ""
};
export default class InputRender extends Component {
state = {
value: this.props.value,
editable: false
};
handleChange = e => {
const value = e;
this.setState({ value });
};
check = () => {
if (typeof this.flag === "undefined" || this.flag) {
this.props.check(this.flag, this.obj);
this.setState({ editable: false });
if (this.props.onChange) {
this.props.onChange(this.state.value);
}
this.flag = undefined;
}
};
checkValidate = (flag, obj) => {
this.flag = flag;
this.obj = obj;
};
edit = () => {
this.setState({ editable: true });
};
handleKeydown = event => {
if (event.keyCode == 13) {
this.check();
}else if(event.keyCode == 9){
}
};
//货币的格式化方法
formatCurrency = money => {
if (money && money != null && !!Number(money)) {
money = String(money);
let left = money.split(".")[0],
right = money.split(".")[1];
right = right
? right.length >= 2 ? "." + right.substr(0, 2) : "." + right + "0"
: ".00";
let temp = left
.split("")
.reverse()
.join("")
.match(/(\d{1,3})/g);
return (
(Number(money) < 0 ? "-" : "") +
temp
.join(",")
.split("")
.reverse()
.join("") +
right
);
} else if (money === 0) {
//注意===在这里的使用如果传入的money为0,if中会将其判定为boolean类型故而要另外做===判断
return "0.00";
} else {
return "";
}
};
render() {
let { value, editable } = this.state;
let {
name,
placeholder,
isclickTrigger,
format,
formItemClassName,
mesClassName,
check,
...other
} = this.props;
let cellContent = "";
if (editable) {
cellContent = isclickTrigger ? (
<div className="editable-cell-input-wrapper">
{/* <Input
};
checkValidate = (flag, obj) => {
this.flag = flag;
this.obj = obj;
};
edit = () => {
this.setState({ editable: true });
};
handleKeydown = event => {
if (event.keyCode == 13) {
this.check();
}else if(event.keyCode == 9){
}
};
//货币的格式化方法
formatCurrency = money => {
if (money && money != null && !!Number(money)) {
money = String(money);
let left = money.split(".")[0],
right = money.split(".")[1];
right = right
? right.length >= 2 ? "." + right.substr(0, 2) : "." + right + "0"
: ".00";
let temp = left
.split("")
.reverse()
.join("")
.match(/(\d{1,3})/g);
return (
(Number(money) < 0 ? "-" : "") +
temp
.join(",")
.split("")
.reverse()
.join("") +
right
);
} else if (money === 0) {
//注意===在这里的使用如果传入的money为0,if中会将其判定为boolean类型故而要另外做===判断
return "0.00";
} else {
return "";
}
};
render() {
let { value, editable } = this.state;
let {
name,
placeholder,
isclickTrigger,
format,
formItemClassName,
mesClassName,
check,
...other
} = this.props;
let cellContent = "";
if (editable) {
cellContent = isclickTrigger ? (
<div className="editable-cell-input-wrapper">
{/* <Input
onChange={this.handleChange}
onKeyDown={this.handleKeydown}
onBlur={this.check}
@ -100,74 +102,76 @@ export default class InputRender extends Component {
value={value}
/>
*/}
<Form.FormItem
className={"formItem-style " + formItemClassName}
mesClassName={"errMessage-style " + mesClassName}
change={this.handleChange}
blur={this.check}
check={this.checkValidate}
{...other}
>
<Input
name={name}
placeholder={placeholder}
onKeyDown={this.handleKeydown}
autoFocus
value={value}
/>
</Form.FormItem>
</div>
) : (
<div className="editable-cell-input-wrapper">
{/* <Input
<Form.FormItem
className={"formItem-style " + formItemClassName}
mesClassName={"errMessage-style " + mesClassName}
change={this.handleChange}
blur={this.check}
check={this.checkValidate}
{...other}
>
<Input
name={name}
placeholder={placeholder}
onKeyDown={this.handleKeydown}
autoFocus
value={value}
/>
</Form.FormItem>
</div>
) : (
<div className="editable-cell-input-wrapper">
{/* <Input
value={value}
onChange={this.handleChange}
onKeyDown={this.handleKeydown}
/> */}
<Form.FormItem
className={"formItem-style " + formItemClassName}
mesClassName={"errMessage-style " + mesClassName}
change={this.handleChange}
blur={this.check}
check={this.checkValidate}
{...other}
>
<Input
name={name}
placeholder={placeholder}
onKeyDown={this.handleKeydown}
autoFocus
value={value}
/>
</Form.FormItem>
<Icon
type="uf-correct"
className="editable-cell-icon-check"
onClick={this.check}
/>
</div>
);
} else {
if (format && format === "Currency") {
value = this.formatCurrency(value);
<Form.FormItem
className={"formItem-style " + formItemClassName}
mesClassName={"errMessage-style " + mesClassName}
change={this.handleChange}
blur={this.check}
check={this.checkValidate}
{...other}
>
<Input
name={name}
placeholder={placeholder}
onKeyDown={this.handleKeydown}
autoFocus
value={value}
/>
</Form.FormItem>
<Icon
type="uf-correct"
className="editable-cell-icon-check"
onClick={this.check}
/>
</div>
);
} else {
if (format && format === "Currency") {
value = this.formatCurrency(value);
}
cellContent = isclickTrigger ? (
<div className="editable-cell-text-wrapper" onClick={this.edit}>
{value || " "}
</div>
) : (
<div className="editable-cell-text-wrapper">
{value || " "}
<Icon
type="uf-pencil"
className="editable-cell-icon"
onClick={this.edit}
/>
</div>
);
}
return <div className="editable-cell">{cellContent}</div>;
}
cellContent = isclickTrigger ? (
<div className="editable-cell-text-wrapper" onClick={this.edit}>
{value || " "}
</div>
) : (
<div className="editable-cell-text-wrapper">
{value || " "}
<Icon
type="uf-pencil"
className="editable-cell-icon"
onClick={this.edit}
/>
</div>
);
}
return <div className="editable-cell">{cellContent}</div>;
}
}
InputRender.PropTypes = propTypes;
InputRender.defaultProps = defaultProps;

View File

@ -1,113 +1,119 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import Icon from "bee-icon";
import Select from "bee-select";
const propTypes = {
dataSource: PropTypes.array
};
export default class SelectRender extends Component {
state = {
value: this.props.value,
editable: false
};
handleChange = e => {
const value = e;
if (this.props.onChange) {
this.props.onChange(value);
}
this.setState({ value: value });
setTimeout(() => {
this.setState({ editable: false });
}, 0);
};
check = () => {
this.setState({ editable: false });
if (this.props.onChange) {
this.props.onChange(this.state.value);
}
};
edit = () => {
this.setState({ editable: true });
};
render() {
let { value, editable } = this.state;
let { isclickTrigger, dataSource } = this.props;
let cellContent = "";
if (editable) {
cellContent = isclickTrigger ? (
<div className="editable-cell-input-wrapper">
<Select
{...this.props}
value={this.state.value}
onBlur={(value)=>{
console.log(value);
// this.props.onBlur();
}}
/**
* 渲染下拉框
* @param Select
* @param Icon
* @returns {SelectRender}
*/
export default function renderSelect (Select, Icon) {
return class SelectRender extends Component {
static propTypes = {
dataSource: PropTypes.array
};
state = {
value: this.props.value,
editable: false
};
handleChange = e => {
const value = e;
if (this.props.onChange) {
this.props.onChange(value);
}
this.setState({ value: value });
setTimeout(() => {
this.setState({ editable: false });
}, 0);
};
check = () => {
this.setState({ editable: false });
if (this.props.onChange) {
this.props.onChange(this.state.value);
}
};
edit = () => {
this.setState({ editable: true });
};
render() {
let { value, editable } = this.state;
let { isclickTrigger, dataSource } = this.props;
let cellContent = "";
if (editable) {
cellContent = isclickTrigger ? (
<div className="editable-cell-input-wrapper">
<Select
{...this.props}
value={this.state.value}
onBlur={(value)=>{
console.log(value);
// this.props.onBlur();
}}
onFocus={(value)=>{
console.log(value);
// this.props.onBlur();
}}
onFocus={(value)=>{
console.log(value);
// this.props.onBlur();
}}
onChange={this.handleChange}
>
{this.props.children}
</Select>
<Icon
type="uf-correct"
className="editable-cell-icon-check"
onClick={this.check}
/>
</div>
) : (
<div className="editable-cell-input-wrapper">
<Select
{...this.props}
value={this.state.value}
onBlur={()=>{
this.setState({
editable:true
});
this.props.onBlur();
}}
onChange={this.handleChange}
>
{this.props.children}
</Select>
<Icon
type="uf-correct"
className="editable-cell-icon-check"
onClick={this.check}
/>
</div>
);
} else {
if (dataSource && dataSource.length > 0) {
for (var index = 0; index < dataSource.length; index++) {
var element = dataSource[index];
if (element.value === value) {
value = element.key;
break;
}
onChange={this.handleChange}
>
{this.props.children}
</Select>
<Icon
type="uf-correct"
className="editable-cell-icon-check"
onClick={this.check}
/>
</div>
) : (
<div className="editable-cell-input-wrapper">
<Select
{...this.props}
value={this.state.value}
onBlur={()=>{
this.setState({
editable:true
});
this.props.onBlur();
}}
onChange={this.handleChange}
>
{this.props.children}
</Select>
<Icon
type="uf-correct"
className="editable-cell-icon-check"
onClick={this.check}
/>
</div>
);
} else {
if (dataSource && dataSource.length > 0) {
for (var index = 0; index < dataSource.length; index++) {
var element = dataSource[index];
if (element.value === value) {
value = element.key;
break;
}
}
}
cellContent = isclickTrigger ? (
<div className="editable-cell-text-wrapper" onClick={this.edit}>
{value || " "}
</div>
) : (
<div className="editable-cell-text-wrapper">
{value || " "}
<Icon
type="uf-pencil"
className="editable-cell-icon"
onClick={this.edit}
/>
</div>
);
}
return <div className="editable-cell">{cellContent}</div>;
}
}
cellContent = isclickTrigger ? (
<div className="editable-cell-text-wrapper" onClick={this.edit}>
{value || " "}
</div>
) : (
<div className="editable-cell-text-wrapper">
{value || " "}
<Icon
type="uf-pencil"
className="editable-cell-icon"
onClick={this.edit}
/>
</div>
);
}
return <div className="editable-cell">{cellContent}</div>;
}
}
SelectRender.propTypes = propTypes;