- {spinning === 'true' &&
+ {spinning === true &&
}
-
{children}
+
{children}
}
{!state.hasChildren &&
diff --git a/src/Spin/Spin.js b/src/Spin/Spin.js
index aac4e1e..1338787 100644
--- a/src/Spin/Spin.js
+++ b/src/Spin/Spin.js
@@ -1,21 +1,21 @@
import template from "./Spin.html";
class Spin {
- props = {
- size: String,
- spinning: Boolean
- };
state = {
className: [],
hasChildren: false,
};
- template = template;
-
- constructor() {
+ constructor($element, $attrs, $controllers, $transclude) {
this.state.className = ["ant-spin", "ant-spin-spinning"];
- this.state.hasChildren = JSON.stringify($transclude()) !== "{}";
+
+ if ($transclude()) {
+ let len = $transclude().lenght;
+ if (len > 0) {
+ this.state.hasChildren = true;
+ }
+ }
if (this.size === "small") {
this.state.className.splice(1, 0, "ant-spin-sm");
@@ -25,4 +25,13 @@ class Spin {
this.state.className.splice(1, 0, "ant-spin-lg");
}
}
+
+ render() {
+ return template;
+ }
+}
+
+Spin.propTypes = {
+ size: PropTypes.string,
+ spinning: PropTypes.boolean,
}
diff --git a/temp.txt b/temp.txt
index 6cb2b65..186843b 100644
--- a/temp.txt
+++ b/temp.txt
@@ -1,3 +1,7 @@
image
- [mvo]
- preview=["']\{\{(.*?)\}\}["'] => preview="$1"
\ No newline at end of file
+ [mvo|boss]
+ preview=["']?\{\{(.*?)\}\}["']? => preview="$1"
+
+spin
+ [boss]
+ spinning=["']?\{\{(.*?)\}\}["']? => spinning="$1"
\ No newline at end of file
diff --git a/webpack.config.js b/webpack.config.js
index 700bc4e..57039d4 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -8,9 +8,9 @@ module.exports = {
// bpms
// path: "/Users/shann/Project/essa/bpms/bpms-webapp/src/main/webapp/lib/ng-antd",
// boss
- // path: "/Users/shann/Project/essa/boss/trunk/vendor-lib/ng-antd",
+ path: "/Users/shann/Project/essa/boss/trunk/vendor-lib/ng-antd",
// mvo
- path: "/Users/shann/Project/essa/mvo/mvo-webapp/public/browser-vendor/ng-antd",
+ // path: "/Users/shann/Project/essa/mvo/mvo-webapp/public/browser-vendor/ng-antd",
// local
// path: path.resolve(__dirname, "dist"),
filename: "ng-antd.js",
--
libgit2 0.21.2