chore: 禁用 Prettier 对 Vue 文件的格式化,修复语法错误
- 在 .prettierignore 中添加 **/*.vue,避免格式化 Vue 组件 - 保留 JS 文件的格式化功能 - 避免 Prettier 将多行 HTML 属性压缩成单行,保持代码可读性 - 修复 ABTestingDemo.vue 中的语法错误: - 第 467 行:computed 回调函数缺少括号 - 第 201 行:HTML 中的 < 符号需要转义为 < - 第 480-481 行:变量声明缺少 const 关键字
This commit is contained in:
@@ -1 +1,2 @@
|
||||
**/*.md
|
||||
**/*.vue
|
||||
|
||||
+11
-1
@@ -1,5 +1,15 @@
|
||||
{
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none"
|
||||
"trailingComma": "none",
|
||||
"overrides": [
|
||||
{
|
||||
"files": "*.vue",
|
||||
"options": {
|
||||
"parser": "vue",
|
||||
"htmlWhitespaceSensitivity": "ignore",
|
||||
"vueIndentScriptAndStyle": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -197,9 +197,7 @@
|
||||
|
||||
<div class="tips">
|
||||
<span class="tips-icon">💡</span>
|
||||
<span class="tips-text"
|
||||
>P值 < 0.05 表示结果统计显著,说明差异不太可能是随机产生的</span
|
||||
>
|
||||
<span class="tips-text">P值 < 0.05 表示结果统计显著,说明差异不太可能是随机产生的</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -464,7 +462,7 @@ const targetRate = computed(
|
||||
)
|
||||
|
||||
const absoluteDifference = computed(
|
||||
=> (targetRate.value - baselineRate.value).toFixed(2)
|
||||
() => (targetRate.value - baselineRate.value).toFixed(2)
|
||||
)
|
||||
|
||||
const estimatedDays = computed(() => {
|
||||
@@ -477,8 +475,8 @@ const estimatedDays = computed(() => {
|
||||
function calculateSampleSize() {
|
||||
const p1 = baselineRate.value / 100
|
||||
const p2 = targetRate.value / 100
|
||||
constZa = 1.96 // alpha = 0.05对应的z值
|
||||
constZb = 0.84 // power = 0.8对应的z值
|
||||
const constZa = 1.96 // alpha = 0.05对应的z值
|
||||
const constZb = 0.84 // power = 0.8对应的z值
|
||||
|
||||
// 合并标准差
|
||||
const pBar = (p1 + p2) / 2
|
||||
|
||||
Reference in New Issue
Block a user