Browse Source

Make the radio style type work properly in stack

pull/2675/head
Artur Arseniev 6 years ago
parent
commit
8990199508
  1. 6
      src/style_manager/view/PropertyRadioView.js

6
src/style_manager/view/PropertyRadioView.js

@ -17,6 +17,8 @@ export default PropertyView.extend({
const model = this.model;
const prop = model.get('property');
const options = model.get('list') || model.get('options') || [];
const { cid } = model;
const clsInput = `${pfx}radio ${pfx}radio-${prop}`;
if (!this.input) {
if (options && options.length) {
@ -24,12 +26,12 @@ export default PropertyView.extend({
options.forEach(el => {
let cl = el.className ? `${el.className} ${pfx}icon ${itemCls}` : '';
let id = `${prop}-${el.value}`;
let id = `${prop}-${el.value}-${cid}`;
let labelTxt = el.name || el.value;
let titleAttr = el.title ? `title="${el.title}"` : '';
inputStr += `
<div class="${ppfx}radio-item">
<input type="radio" class="${pfx}radio" id="${id}" name="${prop}" value="${
<input type="radio" class="${clsInput}" id="${id}" name="${prop}-${cid}" value="${
el.value
}"/>
<label class="${cl || itemCls}" ${titleAttr} for="${id}">${

Loading…
Cancel
Save