1. 程式人生 > >織夢聯動列舉欄位無二級時去掉多餘下拉

織夢聯動列舉欄位無二級時去掉多餘下拉

糾結的童學肯定遇到過,當你新增自定義聯動選單後,如果你只有一級聯動,那麼新增文章時,系統會多出一個下拉為二級聯動。

解決方法

開啟/images/enums.js 找到

//if(sonvalue > 0 || topvalue > 0) {

改成

if(sonvalue > 0 || topvalue > 0) {

再找到

document.getElementById('span_'+emname+'_sec').appendChild(selObj);

改成

document.getElementById('span_'+emname+'_sec').appendChild(selObj);
}

再找到

document.getElementById('span_'+emname+'_son').appendChild(oj);

改成

if(oj.options.length>2)
{
    document.getElementById('span_'+emname+'_son').appendChild(oj);
}