cloud-web-corejs 1.0.178 → 1.0.180

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.178",
4
+ "version": "1.0.180",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -125,6 +125,7 @@
125
125
  "src/components/baseInputNumber",
126
126
  "src/components/baseInputPrint",
127
127
  "src/components/baseTabs",
128
+ "src/components/base-textarea",
128
129
  "src/components/cnPrint",
129
130
  "src/components/code-editor",
130
131
  "src/components/confirmDialog",
@@ -0,0 +1,104 @@
1
+ <template>
2
+ <div class="bt-input">
3
+ <el-input v-bind="$attrs" v-on="$listeners" type="textarea">
4
+ ></el-input>
5
+ <el-tooltip effect="dark" placement="top" :disabled="!$attrs.value">
6
+ <div slot="content" v-html="handleNewlines($attrs.value)"></div>
7
+ <el-link icon="el-icon-question" @click="openDialog" :disabled="$attrs.disabled || $attrs.readonly" v-if="showIcon">
8
+ </el-link>
9
+ </el-tooltip>
10
+ <el-dialog
11
+ :title="title || $t1('内容')"
12
+ :append-to-body="true"
13
+ :modal-append-to-body="true"
14
+ :close-on-click-modal="false"
15
+ v-if="showDialog"
16
+ :visible.sync="showDialog"
17
+ :modal="false"
18
+ custom-class="dialog-style list-dialog dialog-checkbox pd_0"
19
+ width="1200px"
20
+ v-el-drag-dialog
21
+ v-el-dialog-center
22
+ >
23
+ <div class="cont" style="height: 450px">
24
+ <el-input
25
+ type="textarea"
26
+ v-model="content"
27
+ :rows="25"
28
+ :placeholder="$attrs.placeholder || $t1('请输入内容')"
29
+ resize="none"
30
+ :disabled="$attrs.disabled"
31
+ :readonly="$attrs.readonly"
32
+ >
33
+ </el-input>
34
+ </div>
35
+ <span slot="footer" class="dialog-footer">
36
+ <el-button type="primary" plain class="button-sty" @click="close">
37
+ <i class="el-icon-close el-icon"></i>
38
+ 取 消
39
+ </el-button>
40
+ <el-button
41
+ type="primary"
42
+ @click="confirm"
43
+ class="button-sty"
44
+ v-if="!$attrs.disabled && !$attrs.readonly"
45
+ >
46
+ <i class="el-icon-check el-icon"></i>
47
+ 确 定
48
+ </el-button>
49
+ </span>
50
+ </el-dialog>
51
+ </div>
52
+ </template>
53
+ <script>
54
+ export default {
55
+ name: "BaseTextarea",
56
+ components: {
57
+ },
58
+ props: {
59
+ title: {
60
+ type: String,
61
+ default: null,
62
+ },
63
+ showIcon: {
64
+ type: Boolean,
65
+ default: true,
66
+ },
67
+ },
68
+ data() {
69
+ return {
70
+ content: null,
71
+ showDialog: false,
72
+ };
73
+ },
74
+ methods: {
75
+ openDialog() {
76
+ this.content = this.$attrs.value;
77
+ this.showDialog = true;
78
+ },
79
+ confirm() {
80
+ this.$emit("input", this.content);
81
+ this.showDialog = false;
82
+ },
83
+
84
+ close() {
85
+ this.showDialog = false;
86
+ },
87
+ handleNewlines(text) {
88
+ if (text && text.includes("\n")) {
89
+ return text.replaceAll("\n", "<br/>");
90
+ } else {
91
+ return text;
92
+ }
93
+ },
94
+ },
95
+ };
96
+ </script>
97
+ <style scoped>
98
+ .el-link.el-link--default.is-disabled {
99
+ color: #606266;
100
+ }
101
+ ::v-deep.el-textarea {
102
+ width: calc(100% - 12px) !important;
103
+ }
104
+ </style>
package/src/index.js CHANGED
@@ -139,7 +139,11 @@ Vue.component('CodeEditor', () => import('@base/components/code-editor/index.vue
139
139
 
140
140
  Vue.component('scriptDescriptionButton', () => import('@base/components/scriptDescription/button'));
141
141
 
142
- Vue.component('scriptTestButton', () => import('@base/components/scriptTest/button'));
142
+ Vue.component('scriptTestButton', () => import('@base/components/scriptTest/button'));
143
+
144
+ import baseTextarea from '@base/components/base-textarea/index.vue'
145
+
146
+ Vue.component(baseTextarea.name, baseTextarea);
143
147
 
144
148
  import jsonImport from '@base/components/jsonImport/index.js';
145
149