mirror of
https://github.com/dataease/dataease.git
synced 2026-05-24 06:18:10 +08:00
feat: 数据集 数据源优化
* feat: 数据集 数据源优化 * feat: 国际化 * feat: 格式化 * feat: 国际化修正 合并代码
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { log } from "@antv/g2plot/lib/utils";
|
||||
export default {
|
||||
name: "DePwd",
|
||||
inject: {
|
||||
|
||||
55
frontend/src/components/deCustomCm/deTextarea.vue
Normal file
55
frontend/src/components/deCustomCm/deTextarea.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<el-input
|
||||
v-count="value"
|
||||
:placeholder="$t('fu.search_bar.please_input')"
|
||||
show-word-limit
|
||||
:disabled="disabled"
|
||||
:value="value"
|
||||
@input="handleChange"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
/>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "DeTextarea",
|
||||
props: {
|
||||
disabled: Boolean,
|
||||
value: String,
|
||||
},
|
||||
methods: {
|
||||
handleChange(val) {
|
||||
this.$emit("input", val);
|
||||
},
|
||||
},
|
||||
directives: {
|
||||
count: {
|
||||
update: function (el, binding) {
|
||||
const lg = binding.value?.length || 0;
|
||||
const count = el.querySelector(".el-input__count");
|
||||
if (!lg) {
|
||||
if (count.classList.contains("no-zore")) {
|
||||
count.classList.remove("no-zore");
|
||||
}
|
||||
count.innerHTML = "0/200";
|
||||
return;
|
||||
}
|
||||
if (el.querySelector(".no-zore")) {
|
||||
count.firstChild.innerHTML = lg;
|
||||
return;
|
||||
}
|
||||
const newCount = document.createElement("span");
|
||||
const num = document.createElement("span");
|
||||
const total = document.createElement("span");
|
||||
num.style.color = "#1F2329";
|
||||
total.innerHTML = "/200";
|
||||
num.innerHTML = lg;
|
||||
newCount.classList.add("el-input__count", "no-zore");
|
||||
newCount.appendChild(num);
|
||||
newCount.appendChild(total);
|
||||
el.replaceChild(newCount, count);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user