Skip to content

Commit

Permalink
修复配置不换行的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
combineli committed Jun 19, 2019
1 parent bf1dbdf commit 01f6095
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
4 changes: 2 additions & 2 deletions client/dist/dcache.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>DCACHE</title><link href=/static/css/dcache.0c579.css rel=stylesheet></head><body><div id=app></div><script>function isIE() {
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>DCACHE</title><link href=/static/css/dcache.e4d06.css rel=stylesheet></head><body><div id=app></div><script>function isIE() {
if (!!window.ActiveXObject || "ActiveXObject" in window)
return true;
else
Expand All @@ -7,4 +7,4 @@
if (isIE()) {
var body = document.querySelector('body');
body.innerHTML = '<div style="width:500px;margin:0 auto">系统不支持IE浏览器,建议您更换为chrome以获得更好的体验</div>';
}</script><script type=text/javascript src=/static/js/manifest.61e49.js></script><script type=text/javascript src=/static/js/vendor.fa803.js></script><script type=text/javascript src=/static/js/dcache.d330f.js></script></body></html>
}</script><script type=text/javascript src=/static/js/manifest.61e49.js></script><script type=text/javascript src=/static/js/vendor.fa803.js></script><script type=text/javascript src=/static/js/dcache.fee59.js></script></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

25 changes: 22 additions & 3 deletions client/src/pages/cacheConfig/moduleCache.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<section class="">
<section class="moduleCache">
<!-- 服务列表 -->
<let-table v-if="serverList" :data="serverList" :title="$t('serverList.title.serverList')"
:empty-msg="$t('common.nodata')" ref="serverListLoading">
Expand Down Expand Up @@ -49,10 +49,19 @@
<let-table-column :title="$t('cache.config.remark')" prop="remark"></let-table-column>
<let-table-column :title="$t('cache.config.path')" prop="path"></let-table-column>
<let-table-column :title="$t('cache.config.item')" prop="item"></let-table-column>
<let-table-column :title="$t('cache.config.config_value')" prop="config_value"></let-table-column>
<let-table-column :title="$t('cache.config.config_value')" prop="config_value">
<template slot-scope="{ row: { config_value } }"><div style="white-space: pre-wrap;" >{{ config_value }}</div></template>
</let-table-column>
<let-table-column :title="$t('cache.config.modify_value')" prop="period">
<template slot-scope="{row}">
<let-input size="small" v-model="row.modify_value"></let-input>
<let-input
size="small"
v-model="row.modify_value"
type="textarea"
@focus="inputFocus"
@blur="inputBlur"
:rows="1" >
</let-input>
</template>
</let-table-column>
<let-table-column :title="$t('operate.operates')">
Expand Down Expand Up @@ -176,6 +185,12 @@
changePage (page) {
this.pagination.page = page;
},
inputFocus(e) {
e.target.rows = 4
},
inputBlur(e) {
e.target.rows = 1
},
async getModuleConfig () {
try {
const { appName, moduleName } = this;
Expand All @@ -184,6 +199,7 @@
configItemList.forEach(item => {
item.modify_value = "";
item.isChecked = false;
// item.config_value = item.config_value.replace(/\n/g,"<br/>");
});
this.configList = configItemList;
} catch (err) {
Expand Down Expand Up @@ -308,4 +324,7 @@
overflow-y: auto;
margin-top: 20px;
}
.moduleCache .let-input textarea {
padding: 8px;
}
</style>

0 comments on commit 01f6095

Please sign in to comment.