调整使用dom渲染get等方法的错误; 调整宽度过窄时分页的样式
This commit is contained in:
parent
b493563677
commit
c6a5080161
@ -2,7 +2,7 @@
|
||||
|
||||
### 1.1.2
|
||||
|
||||
*2019-11-27*
|
||||
*2019-12-02*
|
||||
|
||||
#### Bug fixes
|
||||
|
||||
|
2
dist/static/2.js
vendored
2
dist/static/2.js
vendored
File diff suppressed because one or more lines are too long
2
dist/static/3.js
vendored
2
dist/static/3.js
vendored
File diff suppressed because one or more lines are too long
2
dist/xm-select.js
vendored
2
dist/xm-select.js
vendored
File diff suppressed because one or more lines are too long
@ -27,7 +27,7 @@ var demo1 = xmSelect.render({
|
||||
height: 'auto',
|
||||
data(){
|
||||
return [
|
||||
{name: '北京市', value: -1, children: [
|
||||
{name: '北京市时代峰峻莱克斯顿荆防颗粒受到了开发建设的路口附近', value: -1, children: [
|
||||
{name: '朝阳区', value: 1},
|
||||
{name: '海淀区', value: 2},
|
||||
{name: '通州区', value: 3},
|
||||
|
@ -2,7 +2,7 @@
|
||||
* 选中dom元素
|
||||
*/
|
||||
export function selector(el) {
|
||||
return document.querySelector(el);
|
||||
return el.nodeType ? el : document.querySelector(el);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -28,7 +28,7 @@ class xmOptions {
|
||||
this.options = deepMerge(this.options, options);
|
||||
|
||||
//如果dom不存在, 则不进行渲染事项
|
||||
let dom = this.options.el.nodeType ? this.options.el : selector(this.options.el);
|
||||
let dom = selector(this.options.el);
|
||||
if(!dom){
|
||||
warn(`没有找到渲染对象: ${options.el}, 请检查`)
|
||||
return ;
|
||||
|
@ -311,12 +311,16 @@ xm-select{
|
||||
flex: auto;
|
||||
justify-content: center;
|
||||
vertical-align: middle;
|
||||
padding: 0 15px;
|
||||
// padding: 0 15px;
|
||||
margin: 0 -1px 0 0;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
border: 1px solid #e2e2e2;
|
||||
flex-wrap: nowrap;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
min-width: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user