fix group name comma use

This commit is contained in:
zombieFox 2021-09-15 08:50:46 +01:00
parent 7050d16751
commit a6f088c2c7
2 changed files with 18 additions and 12 deletions

View File

@ -8,6 +8,7 @@ import { Button } from '../../button';
import { Collapse } from '../../collapse';
import { node } from '../../../utility/node';
import { complexNode } from '../../../utility/complexNode';
import { get } from '../../../utility/get';
import { set } from '../../../utility/set';
import { convertColor } from '../../../utility/convertColor';
@ -66,12 +67,14 @@ export const Control_select = function({
option.forEach((item, i) => {
this.select.appendChild(
node(
'option:' +
item +
'|value:' +
trimString(item).replace(/\s+/g, '-').toLowerCase()
)
complexNode({
tag: 'option',
text: item,
attr: [{
key: 'value',
value: trimString(item).replace(/\s+/g, '-').toLowerCase()
}]
})
);
});

View File

@ -1,4 +1,5 @@
import { node } from '../../../../utility/node';
import { complexNode } from '../../../../utility/complexNode';
import { trimString } from '../../../../utility/trimString';
import './index.css';
@ -38,12 +39,14 @@ export const select = function({
option.forEach((item, i) => {
select.appendChild(
node(
'option:' +
item +
'|value:' +
trimString(item).replace(/\s+/g, '-').toLowerCase()
)
complexNode({
tag: 'option',
text: item,
attr: [{
key: 'value',
value: trimString(item).replace(/\s+/g, '-').toLowerCase()
}]
})
);
});