Browse Source

Merge remote-tracking branch 'origin/main'

main
wangshaoping 1 year ago
parent
commit
769d86804c
  1. 38
      io.sc.platform.core.frontend/src/platform/components/form/WForm.vue
  2. 4
      io.sc.platform.core.frontend/src/platform/components/form/elements/WCheckbox.vue
  3. 3
      io.sc.platform.core.frontend/src/platform/components/form/elements/WDate.vue
  4. 3
      io.sc.platform.core.frontend/src/platform/components/form/elements/WNumber.vue
  5. 3
      io.sc.platform.core.frontend/src/platform/components/form/elements/WPassword.vue
  6. 3
      io.sc.platform.core.frontend/src/platform/components/form/elements/WSelect.vue
  7. 3
      io.sc.platform.core.frontend/src/platform/components/form/elements/WText.vue
  8. 3
      io.sc.platform.core.frontend/src/platform/components/form/elements/WTextBtn.vue
  9. 3
      io.sc.platform.core.frontend/src/platform/components/form/elements/WTextarea.vue

38
io.sc.platform.core.frontend/src/platform/components/form/WForm.vue

@ -3,7 +3,13 @@
<q-form ref="formRef" :autofocus="false" :greedy="true" v-bind="attrs"> <q-form ref="formRef" :autofocus="false" :greedy="true" v-bind="attrs">
<div class="grid" :class="formLayoutComputed"> <div class="grid" :class="formLayoutComputed">
<template v-for="(field, index) in fields_ as any" :key="String(index)"> <template v-for="(field, index) in fields_ as any" :key="String(index)">
<div <component
:is="fiedType[field.type] || field.type"
v-if="field.name"
v-model="formData[field.name]"
v-bind="field"
:form-data="formData"
:form="instance"
:class=" :class="
(field.colsFirst ? 'col-start-1 ' : ' ') + (field.colsFirst ? 'col-start-1 ' : ' ') +
(field.colspan === 'full' (field.colspan === 'full'
@ -12,18 +18,24 @@
? ' col-span-' + field.colspan ? ' col-span-' + field.colspan
: ' col-span-1') : ' col-span-1')
" "
> @update:model-value="updateModelValue(field.name, formData[field.name])"
<component ></component>
:is="fiedType[field.type] || field.type" <component
v-if="field.name" :is="fiedType[field.type] || field.type"
v-model="formData[field.name]" v-else
v-bind="field" :form-ref="formRef"
:form-data="formData" v-bind="field"
:form="instance" :form-data="formData"
@update:model-value="updateModelValue(field.name, formData[field.name])" :form="instance"
></component> :class="
<component :is="fiedType[field.type] || field.type" v-else :form-ref="formRef" v-bind="field" :form-data="formData" :form="instance"></component> (field.colsFirst ? 'col-start-1 ' : ' ') +
</div> (field.colspan === 'full'
? ' col-span-' + screenColsNumComputed
: field.colspan && screenColsNumComputed >= field.colspan
? ' col-span-' + field.colspan
: ' col-span-1')
"
></component>
</template> </template>
</div> </div>
<slot></slot> <slot></slot>

4
io.sc.platform.core.frontend/src/platform/components/form/elements/WCheckbox.vue

@ -1,6 +1,6 @@
<template> <template>
<div> <div v-show="showIfComputed">
<q-checkbox v-show="showIfComputed" v-bind="attrs" :rules="rulesComputed" :disable="disableIfComputed"></q-checkbox> <q-checkbox v-bind="attrs" :rules="rulesComputed" :disable="disableIfComputed"></q-checkbox>
</div> </div>
</template> </template>

3
io.sc.platform.core.frontend/src/platform/components/form/elements/WDate.vue

@ -1,7 +1,6 @@
<template> <template>
<div> <div v-show="showIfComputed">
<q-input <q-input
v-show="showIfComputed"
ref="dateRef" ref="dateRef"
:hide-bottom-space="true" :hide-bottom-space="true"
:hide-hint="true" :hide-hint="true"

3
io.sc.platform.core.frontend/src/platform/components/form/elements/WNumber.vue

@ -1,7 +1,6 @@
<template> <template>
<div> <div v-show="showIfComputed">
<q-input <q-input
v-show="showIfComputed"
ref="numberRef" ref="numberRef"
:hide-bottom-space="true" :hide-bottom-space="true"
:hide-hint="true" :hide-hint="true"

3
io.sc.platform.core.frontend/src/platform/components/form/elements/WPassword.vue

@ -1,7 +1,6 @@
<template> <template>
<div> <div v-show="showIfComputed">
<q-input <q-input
v-show="showIfComputed"
ref="pwdRef" ref="pwdRef"
:hide-bottom-space="true" :hide-bottom-space="true"
:hide-hint="true" :hide-hint="true"

3
io.sc.platform.core.frontend/src/platform/components/form/elements/WSelect.vue

@ -1,7 +1,6 @@
<template> <template>
<div> <div v-show="showIfComputed">
<q-select <q-select
v-show="showIfComputed"
ref="selectRef" ref="selectRef"
emit-value emit-value
map-options map-options

3
io.sc.platform.core.frontend/src/platform/components/form/elements/WText.vue

@ -1,7 +1,6 @@
<template> <template>
<div> <div v-show="showIfComputed">
<q-input <q-input
v-show="showIfComputed"
ref="textRef" ref="textRef"
:hide-bottom-space="true" :hide-bottom-space="true"
:hide-hint="true" :hide-hint="true"

3
io.sc.platform.core.frontend/src/platform/components/form/elements/WTextBtn.vue

@ -1,7 +1,6 @@
<template> <template>
<div> <div v-show="showIfComputed">
<q-input <q-input
v-show="showIfComputed"
ref="textBtnRef" ref="textBtnRef"
:hide-bottom-space="true" :hide-bottom-space="true"
:hide-hint="true" :hide-hint="true"

3
io.sc.platform.core.frontend/src/platform/components/form/elements/WTextarea.vue

@ -1,7 +1,6 @@
<template> <template>
<div> <div v-show="showIfComputed">
<q-input <q-input
v-show="showIfComputed"
ref="textareaRef" ref="textareaRef"
:hide-bottom-space="true" :hide-bottom-space="true"
:hide-hint="true" :hide-hint="true"

Loading…
Cancel
Save