Commit b96e4b79 by chenwq

```

refactor(order): 移除Ref装饰器并更新引用访问方式

移除了ActionConfirmPopup.vue和OrderTransferInfoPanel.vue中的Ref装饰器,
改用this.$refs方式访问组件引用,保持代码功能不变但优化了引用方式。
```
1 parent d1f924b4
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Prop, Ref, Vue } from "vue-facing-decorator"; import { Component, Prop, Vue } from "vue-facing-decorator";
@Component({}) @Component({})
export default class ActionConfirmPopup extends Vue { export default class ActionConfirmPopup extends Vue {
...@@ -45,17 +45,14 @@ export default class ActionConfirmPopup extends Vue { ...@@ -45,17 +45,14 @@ export default class ActionConfirmPopup extends Vue {
@Prop({ type: Number, required: false, default: 10002 }) @Prop({ type: Number, required: false, default: 10002 })
zIndex: number; zIndex: number;
@Ref
popup: any;
open(): void { open(): void {
setTimeout(() => { setTimeout(() => {
this.popup?.open?.("center"); (this.$refs.popup as any)?.open?.("center");
}, 0); }, 0);
} }
close(): void { close(): void {
this.popup?.close?.(); (this.$refs.popup as any)?.close?.();
} }
cancel(): void { cancel(): void {
......
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Prop, Ref, Vue } from "vue-facing-decorator"; import { Component, Prop, Vue } from "vue-facing-decorator";
import { AuctionOrder } from "lib/src/entity/auction/entity/AuctionOrder"; import { AuctionOrder } from "lib/src/entity/auction/entity/AuctionOrder";
import type { FileInfo } from "lib/src/core/bean/FileInfo"; import type { FileInfo } from "lib/src/core/bean/FileInfo";
import type { AuthService } from "@/common/AuthService"; import type { AuthService } from "@/common/AuthService";
...@@ -245,9 +245,6 @@ export default class OrderTransferInfoPanel extends Vue { ...@@ -245,9 +245,6 @@ export default class OrderTransferInfoPanel extends Vue {
newLicensePlate = ""; newLicensePlate = "";
submitConfirmIconSrc = "https://img02.glsx.com.cn/weapp/resource/dj-aus/images/order/icon_pay.png"; submitConfirmIconSrc = "https://img02.glsx.com.cn/weapp/resource/dj-aus/images/order/icon_pay.png";
@Ref
submitConfirmPopup: any;
created(): void { created(): void {
this.initFromOrder(); this.initFromOrder();
} }
...@@ -681,17 +678,17 @@ export default class OrderTransferInfoPanel extends Vue { ...@@ -681,17 +678,17 @@ export default class OrderTransferInfoPanel extends Vue {
openSubmitConfirmPopup(): void { openSubmitConfirmPopup(): void {
if (this.isSubmitting) return; if (this.isSubmitting) return;
if (!this.validateBeforeSubmitReview()) return; if (!this.validateBeforeSubmitReview()) return;
this.submitConfirmPopup?.open?.(); (this.$refs.submitConfirmPopup as any)?.open?.();
} }
closeSubmitConfirmPopup(): void { closeSubmitConfirmPopup(): void {
if (this.isSubmitting) return; if (this.isSubmitting) return;
this.submitConfirmPopup?.close?.(); (this.$refs.submitConfirmPopup as any)?.close?.();
} }
confirmSubmitReview(): void { confirmSubmitReview(): void {
if (this.isSubmitting) return; if (this.isSubmitting) return;
this.submitConfirmPopup?.close?.(); (this.$refs.submitConfirmPopup as any)?.close?.();
this.submitReview(); this.submitReview();
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!