diff --git a/src/components/GuipDialog.vue b/src/components/GuipDialog.vue index 851b853..0fcb2dd 100644 --- a/src/components/GuipDialog.vue +++ b/src/components/GuipDialog.vue @@ -6,18 +6,19 @@ :show-close="showCloseButton" :before-close="handleClose" > - - - - - - {{ cancelText }} - {{ confirmText }} - + + + + + {{ cancelText }} + {{ confirmText }} + - \ No newline at end of file diff --git a/src/components/GuipInput.vue b/src/components/GuipInput.vue index baf2ece..545b9ec 100644 --- a/src/components/GuipInput.vue +++ b/src/components/GuipInput.vue @@ -1,6 +1,6 @@ @@ -46,7 +48,7 @@ name: 'GuipInput', props:['styleObject','disabled','defaultValue','placeholder', 'maxlength','minLength','clear','width','height','showWordLimit', - 'label','type','prop','rules','column','addClass','desc'], + 'label','type','prop','rules','column','addClass','desc','unit'], data() { return { value: '', @@ -131,4 +133,11 @@ } \ No newline at end of file diff --git a/src/components/GuipRadio.vue b/src/components/GuipRadio.vue index d2ecd50..e40b28e 100644 --- a/src/components/GuipRadio.vue +++ b/src/components/GuipRadio.vue @@ -12,7 +12,9 @@ :label="option.value" :disabled="option.disabled" > - {{ option.label }} + + {{ selectedValue === option.value ? option.selectedLabel : option.label }} + diff --git a/src/components/GuipSwitch.vue b/src/components/GuipSwitch.vue new file mode 100644 index 0000000..dfad417 --- /dev/null +++ b/src/components/GuipSwitch.vue @@ -0,0 +1,101 @@ + + + + + + \ No newline at end of file diff --git a/src/components/GuipTable.vue b/src/components/GuipTable.vue index 6048c01..cda0abf 100644 --- a/src/components/GuipTable.vue +++ b/src/components/GuipTable.vue @@ -1,52 +1,86 @@ - - \ No newline at end of file + }, + components: { + GuipButton + }, + mounted(){ + }, + methods: { + handleSelectionChange(row) { + // 获取的当前行信息 + console.log(row, '======'); + this.$emit('selectChange', row) + }, + // 点击确定按钮 + handleConfirm(row, prop) { + // 将编辑后的值同步到原始数据 + row[prop] = row[`edit_${prop}`]; + row[`popoverVisible_${prop}`] = false; // 关闭气泡框 + this.$emit('confirm', row, prop); // 触发确认事件 + }, + // 点击取消按钮 + handleCancel(row, prop) { + // 恢复原始数据 + row[`edit_${prop}`] = row[prop]; + row[`popoverVisible_${prop}`] = false; // 关闭气泡框 + this.$emit('cancel', row, prop); // 触发取消事件 + }, + } +} + + \ No newline at end of file diff --git a/src/style/theme/common.scss b/src/style/theme/common.scss index d5706c1..b0d7b5b 100644 --- a/src/style/theme/common.scss +++ b/src/style/theme/common.scss @@ -2,6 +2,10 @@ body{ font-family: Microsoft YaHei UI; font-size: 14px; + p{ + margin: 0; + padding: 0; + } } /* button==== start */ @@ -307,12 +311,54 @@ body{ // table end // dialog--start +.el-dialog{ + min-height: 344px; + max-height: 550px; + border-radius: 4px; + background: #FFFFFF; + box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.16); + display: flex; + flex-direction: column; + .el-dialog__header{ + font-size: 20px; + font-weight: bold; + line-height: 26px; + letter-spacing: 0.08em; + color: #1F2026; + padding: 32px 32px 12px; + } + .el-dialog__body{ + padding: 0 32px 32px; + flex: 1; + } +} .el-dialog__footer{ display: flex; justify-content: center; + padding: 0 32px 32px !important; + .dialog-footer{ + width: 100%; + justify-content: space-between; + } + button{ + width: 247px; + height: 44px; + } } // dialog--end +// switch --start +// .el-switch__core{ +// background-color: #00C261; +// } +// .el-switch.is-checked .el-switch__core{ +// background-color: #BABDC2; +// } +// switch --end + +.el-popover{ + padding: 32px; +} .flex{ display: flex; align-items: center; diff --git a/src/views/elementGroups.vue b/src/views/elementGroups.vue index 8d319b4..09732a8 100644 --- a/src/views/elementGroups.vue +++ b/src/views/elementGroups.vue @@ -1,230 +1,216 @@