From 12b04f145bae740e1971036b1e2dfc1bc224d17b Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Wed, 11 Jul 2018 14:38:47 +0800
Subject: [PATCH] Revert "框架调整"

---
 src/app/routes/delon/util/util.component.ts |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/src/app/routes/delon/util/util.component.ts b/src/app/routes/delon/util/util.component.ts
new file mode 100644
index 0000000..6dff141
--- /dev/null
+++ b/src/app/routes/delon/util/util.component.ts
@@ -0,0 +1,47 @@
+import { Component } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd';
+import { copy, format, yuan } from '@delon/util';
+
+@Component({
+  selector: 'app-util',
+  templateUrl: './util.component.html',
+})
+export class UtilComponent {
+  constructor(public messageSrv: NzMessageService) {}
+
+  // region: string
+
+  format_str = 'this is ${name}';
+  format_res = '';
+  format_obj = JSON.stringify({ name: 'asdf' });
+  onFormat() {
+    let obj = null;
+    try {
+      obj = JSON.parse(this.format_obj);
+    } catch {
+      this.messageSrv.error(`������������ JSON.parse ������`);
+      return;
+    }
+    this.format_res = format(this.format_str, obj, true);
+  }
+
+  // yuan
+  yuan_str: any;
+  yuan_res: string;
+  onYuan(value: string) {
+    this.yuan_res = yuan(value);
+  }
+
+  // endregion
+
+  // region: other
+
+  content = `time ${+new Date()}
+
+    ���������@#���%������&*`;
+  onCopy() {
+    copy(`time ${+new Date()}`).then(() => this.messageSrv.success(`success`));
+  }
+
+  // endregion
+}

--
Gitblit v1.8.0