Commit 777a6c57 authored by a123456's avatar a123456

Signed-off-by: a123456 <1209165801@qq.com>

parent f3dd3ee8
...@@ -48,8 +48,54 @@ ...@@ -48,8 +48,54 @@
data: '兵不匹配移动端', data: '兵不匹配移动端',
name: '王小虎', name: '王小虎',
}], }],
href: '列表', // href: '列表', //切换页面
addInputType: {}, //添加中的表单项
}, },
methods: {} watch: {
href: function(data) {
var that = this;
if(data == '表单') {
this.$nextTick(function() {
new Sortable(document.getElementById("ms-type-list"), {
group: {
name: 'shared',
pull: 'clone',
ghostClass: 'sortable-ghost', //设置拖动时候显示的样式
},
animation: 150,
sort: false,
onStart: function(event) {
//准备拖动时保存拖动选项的数据
that.addInputType = {
id: event.item.dataset.id,
title: event.item.dataset.title,
downList: [], //下拉列表
downActiveList: [], //多选列表
set: [], //设置
unit: '', //金额单位
fieldType: '', //字段类型
};
},
});
new Sortable(document.getElementById("ms-input-list"), {
group: {
name: 'shared',
pull: false,
ghostClass: 'sortable-ghost', //设置拖动时候显示的样式
},
animation: 150,
onAdd: function(event) {
//拖动成功后删除拖动过来的元素
event.item.parentNode.removeChild(event.item);
//想素组添加拖动过来的选项选项
modelFormVue.selectedList.push(that.addInputType);
//modelFormVue.selectedList.splice(0, 0, that.addInputType);
},
});
})
}
}
},
methods: {},
}) })
</script> </script>
\ No newline at end of file
...@@ -136,6 +136,17 @@ textarea::-webkit-input-placeholder { ...@@ -136,6 +136,17 @@ textarea::-webkit-input-placeholder {
.el-message { .el-message {
border-radius: 0 !important; border-radius: 0 !important;
} }
.sortable-ghost {
opacity: 0.3;
background: #ccc !important;
border-color: transparent !important;
color: transparent !important;
}
.sortable-ghost * {
background: #ccc !important;
border-color: transparent !important;
color: transparent !important;
}
.ms-mdiy-model-form { .ms-mdiy-model-form {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -185,7 +196,7 @@ textarea::-webkit-input-placeholder { ...@@ -185,7 +196,7 @@ textarea::-webkit-input-placeholder {
margin: 8px; margin: 8px;
} }
.ms-mdiy-model-form .ms-editor-body-layout .ms-form-item { .ms-mdiy-model-form .ms-editor-body-layout .ms-form-item {
padding: 5px 40px; padding: 6px 15px 6px 30px;
border: 1px solid transparent; border: 1px solid transparent;
} }
.ms-mdiy-model-form .ms-editor-body-layout .ms-form-item .unit-input { .ms-mdiy-model-form .ms-editor-body-layout .ms-form-item .unit-input {
...@@ -267,15 +278,6 @@ textarea::-webkit-input-placeholder { ...@@ -267,15 +278,6 @@ textarea::-webkit-input-placeholder {
.ms-mdiy-model-form .ms-editor-attr-layout .ms-editor-attr .form .ms-down-list .ms-plus i { .ms-mdiy-model-form .ms-editor-attr-layout .ms-editor-attr .form .ms-down-list .ms-plus i {
margin-right: 6px; margin-right: 6px;
} }
.ms-mdiy-model-form .ms-editor-attr-layout .ms-editor-attr .form .sortable-ghost {
opacity: 0.3;
background: #ccc;
}
.ms-mdiy-model-form .ms-editor-attr-layout .ms-editor-attr .form .sortable-ghost * {
background: #ccc !important;
border-color: transparent !important;
color: transparent !important;
}
.ms-mdiy-model-form .ms-editor-attr-layout .ms-editor-attr .footer { .ms-mdiy-model-form .ms-editor-attr-layout .ms-editor-attr .footer {
margin-top: auto; margin-top: auto;
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
background: #fff; background: #fff;
margin: 8px; margin: 8px;
.ms-form-item { .ms-form-item {
padding: 5px 40px; padding: 6px 15px 6px 30px;
border: 1px solid transparent; border: 1px solid transparent;
//单位输入框 //单位输入框
.unit-input { .unit-input {
...@@ -117,15 +117,6 @@ ...@@ -117,15 +117,6 @@
} }
} }
} }
.sortable-ghost {
opacity: .3;
background: #ccc;
* {
background: #ccc !important;
border-color: transparent !important;
color: transparent !important;
}
}
} }
.footer { .footer {
margin-top: auto; margin-top: auto;
......
/*
*这里的值严格按照UI设计图标注值来进行设置
*/
/*
*颜色
*/
/*
*页面的边距
*/
/*
*字体
*/
/*
*头像
*/
/*
* 按钮
*/
/*
*对常见的多行样式进行了方法封装,方便调用,加快开发效率
*/
html,
body {
min-height: 100vh;
width: 100vw;
background-color: #eee;
margin: 0;
display: flex;
font-weight: initial !important;
font-size: 14px !important;
color: #333 !important;
}
html *,
body * {
text-decoration: none !important;
font-family: Verdana, Arial, Helvetica, sans-serif;
box-sizing: border-box;
}
.ms-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
.ms-align-center {
display: flex;
align-items: center;
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
font-weight: initial;
font-size: 12px;
color: #999;
resize: none;
}
*::-webkit-scrollbar {
width: 8px;
height: 8px;
}
/*定义滚动条轨道 内阴影+圆角*/
*::-webkit-scrollbar-track {
border-radius: 10px;
/*滚动条的背景区域的圆角*/
background-color: #eee;
/*滚动条的背景颜色*/
}
/*定义滑块 内阴影+圆角*/
*::-webkit-scrollbar-thumb {
border-radius: 10px;
/*滚动条的圆角*/
background-color: #e6e6e6;
/*滚动条的背景颜色*/
}
.ms-container {
margin: 12px;
height: calc(100% - 24px);
padding: 14px;
background: #fff;
}
.ms-header {
padding: 10px;
margin: 0;
border-bottom: 1px solid #ddd;
background: #fff;
height: 50px;
}
.ms-header button {
height: 30px;
}
.ms-pagination {
padding: 20px 0;
text-align: right;
}
.ms-fr {
float: right;
}
.ms-tr {
text-align: right;
}
.ms-weixin-content {
width: calc(100% - 140px);
}
.ms-weixin-dialog .el-dialog__header {
height: 55px;
box-sizing: border-box;
padding: 10px 10px 25px 10px;
border-bottom: 1px solid #e6e6e6;
}
.ms-weixin-dialog .el-dialog__header .el-dialog__title {
font-weight: bold;
font-size: 14px;
color: #333;
}
.ms-weixin-dialog .el-dialog__footer {
border-top: 1px solid #e6e6e6;
padding: 15px !important;
}
.ms-hover {
cursor: pointer;
}
.ms-hover:hover {
color: #0099ff;
background: #fff;
border-color: #0099ff;
}
.ms-header-select {
font-size: 0;
}
.ms-header-select > .el-select:nth-of-type(2) {
margin: 0 10px;
}
.el-submenu .el-menu-item.is-active {
border-radius: 4px;
}
.el-card,
.el-message {
border-radius: 0 !important;
}
.sortable-ghost {
opacity: 0.3;
background: #ccc !important;
border-color: transparent !important;
color: transparent !important;
}
.sortable-ghost * {
background: #ccc !important;
border-color: transparent !important;
color: transparent !important;
}
...@@ -148,3 +148,16 @@ textarea::-webkit-input-placeholder { ...@@ -148,3 +148,16 @@ textarea::-webkit-input-placeholder {
.el-card, .el-message{ .el-card, .el-message{
border-radius:0 !important; border-radius:0 !important;
} }
//拖拽样式
.sortable-ghost {
opacity: .3;
background: #ccc !important;
border-color: transparent !important;
color: transparent !important;
* {
background: #ccc !important;
border-color: transparent !important;
color: transparent !important;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment