From 1d17c4022a928eacff7309016cde76f29ad257fb Mon Sep 17 00:00:00 2001
From: liangxiaozhen <liangxiaozhen>
Date: 星期日, 06 八月 2023 18:45:18 +0800
Subject: [PATCH] 72_客户按钮提交
---
force-app/main/default/lwc/paginatedList/paginatedList.js | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/force-app/main/default/lwc/paginatedList/paginatedList.js b/force-app/main/default/lwc/paginatedList/paginatedList.js
index fd3051b..e9312e2 100644
--- a/force-app/main/default/lwc/paginatedList/paginatedList.js
+++ b/force-app/main/default/lwc/paginatedList/paginatedList.js
@@ -7,6 +7,11 @@
import ACCOUNT_PHONE_FIELD from "@salesforce/schema/Account.Type";
import ACCOUNT_EMPLOYEES_FIELD from "@salesforce/schema/Account.NumberOfEmployees";
+
+//table css
+import { loadStyle } from "lightning/platformResourceLoader";
+import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+
const COLUMNS = [
{
label: "Account Name",
@@ -44,7 +49,7 @@
connectedCallback() {
this.getAccounts();
}
-
+ stylesLoaded = false;
getAccounts() {
this.loader = true;
getAccountsPaginated({
@@ -117,4 +122,17 @@
get nextButtonDisabled() {
return this.nextPageToken === undefined;
}
+
+ renderedCallback(){
+ if (!this.stylesLoaded) {
+ Promise.all([loadStyle(this, WrappedHeaderTable)])
+ .then(() => {
+ console.log("Custom styles loaded");
+ this.stylesLoaded = true;
+ })
+ .catch((error) => {
+ console.error("Error loading custom styles");
+ });
+ }
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1