75 lines
1.8 KiB
Vue
75 lines
1.8 KiB
Vue
<script>
|
|
import { toDisplayString } from "vue";
|
|
import { renderList } from "vue";
|
|
import { normalizeClass } from "vue";
|
|
import { mergeModels } from "vue";
|
|
import { useModel } from "vue";
|
|
import { createElementBlock } from "vue";
|
|
import { Fragment } from "vue";
|
|
import { defineComponent } from "vue";
|
|
import { openBlock } from "vue";
|
|
var l = {
|
|
class: `list-segments`,
|
|
role: `group`,
|
|
},
|
|
u = [`aria-pressed`, `onClick`],
|
|
d = Object.assign(
|
|
defineComponent({
|
|
__name: `ListSegments`,
|
|
props: mergeModels(
|
|
{
|
|
options: {},
|
|
},
|
|
{
|
|
modelValue: {},
|
|
modelModifiers: {},
|
|
},
|
|
),
|
|
emits: [`update:modelValue`],
|
|
setup(r) {
|
|
let s = useModel(r, `modelValue`);
|
|
return (i, d) => (
|
|
openBlock(),
|
|
createElementBlock(`div`, l, [
|
|
(openBlock(!0),
|
|
createElementBlock(
|
|
Fragment,
|
|
null,
|
|
renderList(
|
|
r.options,
|
|
(t) => (
|
|
openBlock(),
|
|
createElementBlock(
|
|
`button`,
|
|
{
|
|
key: t.value,
|
|
type: `button`,
|
|
class: normalizeClass([
|
|
`list-seg`,
|
|
{
|
|
active: s.value === t.value,
|
|
},
|
|
]),
|
|
"aria-pressed": s.value === t.value,
|
|
onClick: (e) => (s.value = t.value),
|
|
},
|
|
toDisplayString(t.label),
|
|
11,
|
|
u,
|
|
)
|
|
),
|
|
),
|
|
128,
|
|
)),
|
|
])
|
|
);
|
|
},
|
|
}),
|
|
{
|
|
__name: `ListSegments`,
|
|
},
|
|
);
|
|
export {};
|
|
export default d;
|
|
</script>
|