Trae Assistant commited on
Commit
6369f55
·
1 Parent(s): 6ede89a

Fix: Restore missing refs and add default history data

Browse files
Files changed (1) hide show
  1. templates/index.html +12 -6
templates/index.html CHANGED
@@ -184,13 +184,19 @@
184
  createApp({
185
  delimiters: ['${', '}'], // Avoid conflict with Jinja2
186
  setup() {
187
- const day = ref(0);
188
- const price = ref(50);
189
- const competitorPrice = ref(48);
190
- const totalRevenue = ref(0);
191
- const currentSales = ref(0);
 
 
 
 
 
 
 
192
  const autoRunning = ref(false);
193
- const history = ref([]);
194
  const aiAnalysis = ref(null);
195
  const errorMsg = ref('');
196
 
 
184
  createApp({
185
  delimiters: ['${', '}'], // Avoid conflict with Jinja2
186
  setup() {
187
+ const history = ref([
188
+ { day: 1, price: 50, sales: 98, revenue: 4900, competitorPrice: 48 },
189
+ { day: 2, price: 50, sales: 102, revenue: 5100, competitorPrice: 49 },
190
+ { day: 3, price: 52, sales: 95, revenue: 4940, competitorPrice: 50 },
191
+ { day: 4, price: 52, sales: 93, revenue: 4836, competitorPrice: 49 },
192
+ { day: 5, price: 49, sales: 110, revenue: 5390, competitorPrice: 47 }
193
+ ]);
194
+ const day = ref(5);
195
+ const price = ref(49);
196
+ const competitorPrice = ref(47);
197
+ const totalRevenue = ref(25166);
198
+ const currentSales = ref(110);
199
  const autoRunning = ref(false);
 
200
  const aiAnalysis = ref(null);
201
  const errorMsg = ref('');
202