refactor(components): add custom submit text prop to story form

This commit is contained in:
parent e94c070300
commit 813feaa31c
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -27,6 +27,7 @@
canDraft?: boolean; canDraft?: boolean;
endpoint: string; endpoint: string;
endpointMethod: "put" | "post"; endpointMethod: "put" | "post";
submitText?: string;
}>(); }>();
let drag = false; let drag = false;
let acData = ref(props.data); let acData = ref(props.data);
@ -143,6 +144,7 @@
@click=" @click="
(e) => { (e) => {
if (!Array.isArray(values.chapters)) { if (!Array.isArray(values.chapters)) {
// noinspection TypeScriptValidateTypes
setFieldValue('chapters', []); setFieldValue('chapters', []);
} }
const chaps = [...toRaw(values.chapters)]; const chaps = [...toRaw(values.chapters)];
@ -171,7 +173,9 @@
</template> </template>
</draggable> </draggable>
</field-array> </field-array>
<a-button type="primary" html-type="submit">go.</a-button> <a-button type="primary" html-type="submit">{{
submitText || "Post"
}}</a-button>
</form> </form>
<!-- </vee-form> --> <!-- </vee-form> -->
</template> </template>