调整使用dom渲染get等方法的错误; 调整宽度过窄时分页的样式

This commit is contained in:
maplemei 2019-12-03 10:35:11 +08:00
parent b493563677
commit c6a5080161
8 changed files with 12 additions and 8 deletions

View File

@ -2,7 +2,7 @@
### 1.1.2 ### 1.1.2
*2019-11-27* *2019-12-02*
#### Bug fixes #### Bug fixes

2
dist/static/2.js vendored

File diff suppressed because one or more lines are too long

2
dist/static/3.js vendored

File diff suppressed because one or more lines are too long

2
dist/xm-select.js vendored

File diff suppressed because one or more lines are too long

View File

@ -27,7 +27,7 @@ var demo1 = xmSelect.render({
height: 'auto', height: 'auto',
data(){ data(){
return [ return [
{name: '北京市', value: -1, children: [ {name: '北京市时代峰峻莱克斯顿荆防颗粒受到了开发建设的路口附近', value: -1, children: [
{name: '朝阳区', value: 1}, {name: '朝阳区', value: 1},
{name: '海淀区', value: 2}, {name: '海淀区', value: 2},
{name: '通州区', value: 3}, {name: '通州区', value: 3},

View File

@ -2,7 +2,7 @@
* 选中dom元素 * 选中dom元素
*/ */
export function selector(el) { export function selector(el) {
return document.querySelector(el); return el.nodeType ? el : document.querySelector(el);
} }
/** /**

View File

@ -28,7 +28,7 @@ class xmOptions {
this.options = deepMerge(this.options, options); this.options = deepMerge(this.options, options);
//如果dom不存在, 则不进行渲染事项 //如果dom不存在, 则不进行渲染事项
let dom = this.options.el.nodeType ? this.options.el : selector(this.options.el); let dom = selector(this.options.el);
if(!dom){ if(!dom){
warn(`没有找到渲染对象: ${options.el}, 请检查`) warn(`没有找到渲染对象: ${options.el}, 请检查`)
return ; return ;

View File

@ -311,12 +311,16 @@ xm-select{
flex: auto; flex: auto;
justify-content: center; justify-content: center;
vertical-align: middle; vertical-align: middle;
padding: 0 15px; // padding: 0 15px;
margin: 0 -1px 0 0; margin: 0 -1px 0 0;
background-color: #fff; background-color: #fff;
color: #333; color: #333;
font-size: 12px; font-size: 12px;
border: 1px solid #e2e2e2; border: 1px solid #e2e2e2;
flex-wrap: nowrap;
width: 100%;
overflow: hidden;
min-width: 50px;
} }
} }