-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
独立接口增加传递所有前序选框的值
- Loading branch information
Showing
2 changed files
with
17 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/*! | ||
* jQuery cxSelect | ||
* @name jquery.cxselect.js | ||
* @version 1.4.0 | ||
* @date 2016-04-01 | ||
* @version 1.4.1 | ||
* @date 2016-11-02 | ||
* @author ciaoca | ||
* @email [email protected] | ||
* @site https://github.com/ciaoca/cxSelect | ||
|
@@ -252,21 +252,23 @@ | |
var _query = {}; | ||
var _queryName; | ||
var _selectName; | ||
var _selectValue; | ||
|
||
cxSelect.clear.call(self, index); | ||
|
||
// 使用独立接口 | ||
if (typeof _dataUrl === 'string' && _dataUrl.length) { | ||
if (_indexPrev >= 0) { | ||
if (!self.selectArray[_indexPrev].val().length) {return}; | ||
|
||
_queryName = _select.data('queryName'); | ||
_selectName = self.selectArray[_indexPrev].attr('name'); | ||
|
||
if (typeof _queryName === 'string' && _queryName.length) { | ||
_query[_queryName] = self.selectArray[_indexPrev].val(); | ||
} else if (typeof _selectName === 'string' && _selectName.length) { | ||
_query[_selectName] = self.selectArray[_indexPrev].val(); | ||
if (index > 0) { | ||
for (var i = 0, j = 1; i < index; i++, j++) { | ||
_queryName = self.selectArray[j].data('queryName'); | ||
_selectName = self.selectArray[i].attr('name'); | ||
_selectValue = self.selectArray[i].val(); | ||
|
||
if (typeof _queryName === 'string' && _queryName.length) { | ||
_query[_queryName] = _selectValue; | ||
} else if (typeof _selectName === 'string' && _selectName.length) { | ||
_query[_selectName] = _selectValue; | ||
}; | ||
}; | ||
}; | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.