mistic100 / mistic100/jQuery-QueryBuilder
Just want to change btn-sm to btn-xs like demo
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 544
- PR merge metrics
- No merged PRs in 30d
Description
<template>
<div id="builder"></div>
</template>
<script>
import { onMounted } from 'vue';
import $ from 'jquery';
import 'jQuery-QueryBuilder/dist/js/query-builder.js'
import 'jQuery-QueryBuilder/dist/css/query-builder.default.css'
export default {
name: 'QueryBuilder',
setup() {
onMounted(() => {
$('#builder').queryBuilder({
template: {
group: function(data) {
const template = doT.template(`
<div id="{{=it.group_id}}" class="rules-group-container">
<div class="rules-group-header">
<div class="btn-group pull-right group-actions">
{{? it.condition_readonly === false }}
<button type="button" class="btn btn-xs btn-success" data-add="rule"><i class="glyphicon glyphicon-plus"></i> Rule</button>
<button type="button" class="btn btn-xs btn-success" data-add="group"><i class="glyphicon glyphicon-plus-sign"></i> Group</button>
{{?}}
{{? it.deletable }}
<button type="button" class="btn btn-xs btn-danger" data-delete="group"><i class="glyphicon glyphicon-remove"></i></button>
{{?}}
</div>
{{~ it.conditions :condition }}
<label class="btn btn-xs btn-primary {{? condition.checked }}active{{?}}" data-toggle="condition" data-value="{{=condition.value}}">{{=condition.label}}</label>
{{~}}
</div>
<div class="rules-group-body">
<div class="rules-list"></div>
</div>
</div>
`);
return template(data);
}
}
,
filters: [
{
id: 'name',
label: 'Name',
type: 'string',
},
{
id: 'age',
label: 'Age',
type: 'integer',
validation: {
min: 0,
max: 100,
},
},
{
id: 'gender',
label: 'Gender',
type: 'string',
input: 'select',
values: {
male: 'Male',
female: 'Female',
},
},
],
});
});
},
};
</script>
here is my screenshot :
i used npm install , and run in vue3, tried to use string template and doT.js ,both not working
not working
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Vue 3 component's custom group template and the imported dist/css/query-builder.default.css, then compare the rendered button classes with the demo. Confirm the template and styling work together in the shown npm/Vue 3 setup and that the buttons render at the requested size.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100