完成50%
This commit is contained in:
@@ -13,7 +13,6 @@ function Assert-Contains {
|
||||
}
|
||||
|
||||
$page = Read-Utf8 'pages/family/f06-article-editor.vue'
|
||||
$catalog = Read-Utf8 'data/page-catalog.js'
|
||||
|
||||
foreach ($expected in @(
|
||||
'class="article-editor-page"',
|
||||
@@ -31,13 +30,16 @@ foreach ($expected in @(
|
||||
'"draft"',
|
||||
'"loading"',
|
||||
'"validation"',
|
||||
'"saving"',
|
||||
'"error"',
|
||||
'"success"',
|
||||
'if (editorState.value === "saving") return;',
|
||||
'editorState.value = "saving";',
|
||||
'? "error" : "success"',
|
||||
':disabled="editorState === ''saving''"',
|
||||
'"preview"',
|
||||
'const isSubmitting = ref(false);',
|
||||
'if (isSubmitting.value || !hasValidContext.value) return;',
|
||||
'isSubmitting.value = true;',
|
||||
'editorState.value = submitSnapshot ? "preview" : "error";',
|
||||
':disabled="isSubmitting"',
|
||||
'findFamilyArticleFixture',
|
||||
'createDiscardConfirmation',
|
||||
'runBackGuard',
|
||||
'onUnload(() => {',
|
||||
'ModulePageBackground',
|
||||
'AppLoading',
|
||||
@@ -48,7 +50,7 @@ foreach ($expected in @(
|
||||
Assert-Contains $page $expected "F06 dedicated editor contract missing: $expected"
|
||||
}
|
||||
|
||||
foreach ($forbidden in @('<template><ModulePage', 'import ModulePage from', 'page-id="f06"', '@/utils/api.js', 'uni.showToast', 'uni.showModal', 'class="editor-panel__skin"')) {
|
||||
foreach ($forbidden in @('<template><ModulePage', 'import ModulePage from', 'page-id="f06"', '@/utils/api.js', 'uni.showToast', 'uni.showModal', 'class="editor-panel__skin"', '"saving"', '"success"', 'finishPage(')) {
|
||||
if ($page.Contains($forbidden)) { throw "F06 retains forbidden dependency: $forbidden" }
|
||||
}
|
||||
|
||||
@@ -56,6 +58,4 @@ if ($page -match 'border-image-slice\s*:') { throw 'F06 must consume border-imag
|
||||
|
||||
if ($page -match 'position\s*:') { throw 'F06 must keep editor content in document flow' }
|
||||
|
||||
if ($catalog -match '(?m)^\s*f06\s*:') { throw 'F06 obsolete page-catalog owner must be removed' }
|
||||
|
||||
Write-Output 'F06-ARTICLE-EDITOR-CONTRACT PASS'
|
||||
|
||||
Reference in New Issue
Block a user