This commit is contained in:
Ruin
2022-03-09 11:48:11 +08:00
parent 76b499fba6
commit 8647de8177
9 changed files with 95 additions and 47 deletions

View File

@@ -4,23 +4,22 @@
* @Author: Ruin 🍭
* @Date: 2022-03-03 17:07:14
* @LastEditors: 刘引
* @LastEditTime: 2022-03-07 16:15:13
* @LastEditTime: 2022-03-07 17:09:00
*/
import { Component, EventEmitter, OnInit, Output } from "@angular/core";
import { Component, OnInit } from "@angular/core";
import { StorageService } from "src/app/services/storage.service";
@Component({
selector: "app-head",
templateUrl: "./head.component.html",
styleUrls: ["./head.component.scss"],
})
export class HeadComponent implements OnInit {
// 实例化事件广播
@Output() private outerInput = new EventEmitter();
constructor() {}
ngOnInit(): void {}
constructor(public storage: StorageService) {}
getSearchData(e: any) {
// 发送事件数据
this.outerInput.emit("12341234");
// this.storage.inputData = e.target.value;
localStorage.setItem("input", e.target.value);
console.log("方法触发", e.target.value);
}
ngOnInit(): void {}
}