parent
f36be426d4
commit
b89a982e64
7 changed files with 111 additions and 23 deletions
|
@ -2,7 +2,7 @@
|
||||||
<div
|
<div
|
||||||
:class="[prefixCls]"
|
:class="[prefixCls]"
|
||||||
v-clickoutside="handleClose">
|
v-clickoutside="handleClose">
|
||||||
<div v-el:reference>
|
<div v-el:reference :class="[prefixCls + '-rel']">
|
||||||
<slot>
|
<slot>
|
||||||
<i-input
|
<i-input
|
||||||
:class="[prefixCls + '-editor']"
|
:class="[prefixCls + '-editor']"
|
||||||
|
|
|
@ -161,17 +161,8 @@
|
||||||
const maxRows = autosize.maxRows;
|
const maxRows = autosize.maxRows;
|
||||||
|
|
||||||
this.textareaStyles = calcTextareaHeight(this.$els.textarea, minRows, maxRows);
|
this.textareaStyles = calcTextareaHeight(this.$els.textarea, minRows, maxRows);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
watch: {
|
init () {
|
||||||
value () {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.resizeTextarea();
|
|
||||||
});
|
|
||||||
this.$dispatch('on-form-change', this.value);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
ready () {
|
|
||||||
if (this.type !== 'textarea') {
|
if (this.type !== 'textarea') {
|
||||||
this.prepend = this.$els.prepend.innerHTML !== '';
|
this.prepend = this.$els.prepend.innerHTML !== '';
|
||||||
this.append = this.$els.append.innerHTML !== '';
|
this.append = this.$els.append.innerHTML !== '';
|
||||||
|
@ -182,5 +173,17 @@
|
||||||
this.slotReady = true;
|
this.slotReady = true;
|
||||||
this.resizeTextarea();
|
this.resizeTextarea();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value () {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.resizeTextarea();
|
||||||
|
});
|
||||||
|
this.$dispatch('on-form-change', this.value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
compiled () {
|
||||||
|
this.$nextTick(() => this.init());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
popper._popper.style.transformOrigin = `center ${ origin }`;
|
popper._popper.style.transformOrigin = `center ${ origin }`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ready () {
|
compiled () {
|
||||||
this.$on('on-update-popper', this.update);
|
this.$on('on-update-popper', this.update);
|
||||||
this.$on('on-destroy-popper', this.destroy);
|
this.$on('on-destroy-popper', this.destroy);
|
||||||
},
|
},
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
const cell = document.createElement('div');
|
const cell = document.createElement('div');
|
||||||
cell.innerHTML = template;
|
cell.innerHTML = template;
|
||||||
const _oldParentChildLen = $parent.$children.length;
|
const _oldParentChildLen = $parent.$children.length;
|
||||||
$parent.$compile(cell);
|
$parent.$compile(cell); // todo 这里无法触发 ready 钩子
|
||||||
const _newParentChildLen = $parent.$children.length;
|
const _newParentChildLen = $parent.$children.length;
|
||||||
|
|
||||||
if (_oldParentChildLen !== _newParentChildLen) { // if render normal html node, do not tag
|
if (_oldParentChildLen !== _newParentChildLen) { // if render normal html node, do not tag
|
||||||
|
|
|
@ -4,8 +4,11 @@
|
||||||
@date-picker-cells-width: 196px;
|
@date-picker-cells-width: 196px;
|
||||||
|
|
||||||
.@{date-picker-prefix-cls} {
|
.@{date-picker-prefix-cls} {
|
||||||
position: relative;
|
//position: relative;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
&-rel{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
.@{select-dropdown-prefix-cls} {
|
.@{select-dropdown-prefix-cls} {
|
||||||
width: auto;
|
width: auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
|
<i-input type="textarea" :autosize="true" placeholder="请输入..."></i-input>
|
||||||
|
<i-input type="textarea" :autosize="{minRows: 2,maxRows: 5}" placeholder="请输入..."></i-input>
|
||||||
<i-input name="a" icon="ios-clock-outline" @on-focus="focus" @on-blur="blur" readonly style="width:200px;" :value.sync="v" @on-enter="enter" @on-click="iconclick" size="large" placeholder="请输入"></i-input>
|
<i-input name="a" icon="ios-clock-outline" @on-focus="focus" @on-blur="blur" readonly style="width:200px;" :value.sync="v" @on-enter="enter" @on-click="iconclick" size="large" placeholder="请输入"></i-input>
|
||||||
<i-input icon="ios-clock-outline" style="width:200px;" :value.sync="v" @on-enter="enter" placeholder="请输入"></i-input>
|
<i-input icon="ios-clock-outline" style="width:200px;" :value.sync="v" @on-enter="enter" placeholder="请输入"></i-input>
|
||||||
<i-input name="b" icon="ios-clock-outline" style="width:200px;" :value.sync="v" @on-enter="enter" size="small" placeholder="请输入"></i-input>
|
<i-input name="b" icon="ios-clock-outline" style="width:200px;" :value.sync="v" @on-enter="enter" size="small" placeholder="请输入"></i-input>
|
||||||
|
|
|
@ -1,20 +1,100 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="width: 800px">
|
<div style="width: 800px">
|
||||||
<i-table width="550" height="200" border :columns="columns5" :data="data4"></i-table>
|
<i-table border :content="self" :columns="columns7" :data="data6"></i-table>
|
||||||
<br>
|
<!--<i-table width="550" height="200" border :columns="columns5" :data="data4"></i-table>-->
|
||||||
<i-table border height="300" :columns="columns1" :data="data1"></i-table>
|
<!--<br>-->
|
||||||
<br>
|
<!--<i-table border height="300" :columns="columns1" :data="data1"></i-table>-->
|
||||||
<i-table border height="300" :columns="columns1" :data="data2"></i-table>
|
<!--<br>-->
|
||||||
<br>
|
<!--<i-table border height="300" :columns="columns1" :data="data2"></i-table>-->
|
||||||
<i-table border height="300" :columns="columns2" :data="data1"></i-table>
|
<!--<br>-->
|
||||||
<br>
|
<!--<i-table border height="300" :columns="columns2" :data="data1"></i-table>-->
|
||||||
<i-table border height="300" :columns="columns3" :data="data1"></i-table>
|
<!--<br>-->
|
||||||
|
<!--<i-table border height="300" :columns="columns3" :data="data1"></i-table>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
self: this,
|
||||||
|
cityList: [
|
||||||
|
{
|
||||||
|
value: 'beijing',
|
||||||
|
label: '北京市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'shanghai',
|
||||||
|
label: '上海市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'shenzhen',
|
||||||
|
label: '深圳市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'hangzhou',
|
||||||
|
label: '杭州市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'nanjing',
|
||||||
|
label: '南京市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'chongqing',
|
||||||
|
label: '重庆市'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
model1: '',
|
||||||
|
columns7: [
|
||||||
|
{
|
||||||
|
title: '姓名',
|
||||||
|
key: 'name',
|
||||||
|
render (row, column, index) {
|
||||||
|
return `<Icon type="person"></Icon> <strong>${row.name}</strong>`;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '年龄',
|
||||||
|
key: 'age'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '地址',
|
||||||
|
key: 'address'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
key: 'action',
|
||||||
|
width: 400,
|
||||||
|
align: 'center',
|
||||||
|
render (row, column, index) {
|
||||||
|
return `
|
||||||
|
<Date-picker type="daterange" placement="bottom-end" placeholder="选择日期"></Date-picker>
|
||||||
|
<br><br><br><br><br><br>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
data6: [
|
||||||
|
{
|
||||||
|
name: '王小明',
|
||||||
|
age: 18,
|
||||||
|
address: '北京市朝阳区芍药居'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '张小刚',
|
||||||
|
age: 25,
|
||||||
|
address: '北京市海淀区西二旗'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '李小红',
|
||||||
|
age: 30,
|
||||||
|
address: '上海市浦东新区世纪大道'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '周小伟',
|
||||||
|
age: 26,
|
||||||
|
address: '深圳市南山区深南大道'
|
||||||
|
}
|
||||||
|
],
|
||||||
columns1: [
|
columns1: [
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
|
|
Loading…
Add table
Reference in a new issue