0.0.3 • Published 4 months ago
formlinkage v0.0.3
formLinkage
This template should help get you started developing with Vue 3 in Vite.
Installing
Package manager
Using npm:
npm install formlinkage
Using pnpm:
pnpm install formlinkage
Using yarn:
yarn add formlinkage
Example
js:
import { reactive, computed } from 'vue';
import { computedLinkage } from 'formlinkage';
const form = reactive({
name: '',
post: '',
isRead: false,
});
const linkages = [
{
conditions: [
[
{
key: 'name',
rule: 'eq',
value: '123'
}
]
],
result: ['post']
}
]
const linkageForm = computed(()=> computedLinkage(form, linkages))
template:
<a-form :model="form" :style="{ width: '600px' }">
<a-form-item field="name" tooltip="Please enter username" label="Username">
<a-input v-model="form.name" placeholder="please enter your username..." />
</a-form-item>
<a-form-item v-show="!linkageForm['post']" field="post" label="Post">
<a-input v-model="form.post" placeholder="please enter your post..." />
</a-form-item>
</a-form>
0.0.3
4 months ago
0.0.2
4 months ago
0.0.2-beta.0
4 months ago
0.0.1
5 months ago
0.0.1-beta.6
5 months ago
0.0.1-beta.5
5 months ago
0.0.1-beta.4
5 months ago
0.0.1-beta.3
5 months ago
0.0.1-beta.2
5 months ago
0.0.1-beta.1
5 months ago
0.0.1-beta.0
5 months ago