@truenewx/tnxvue3 3.4.0 → 3.4.2
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 +23 -42
- package/src/bootstrap-vue/alert/Alert.vue +79 -79
- package/src/bootstrap-vue/button/Button.vue +40 -40
- package/src/bootstrap-vue/enum-select/EnumSelect.vue +4 -5
- package/src/bootstrap-vue/form/Form.vue +320 -320
- package/src/bootstrap-vue/form/FormGroup.vue +73 -73
- package/src/bootstrap-vue/loading-icon/LoadingIcon.vue +46 -46
- package/src/bootstrap-vue/paged/Paged.vue +119 -119
- package/src/bootstrap-vue/progress/Progress.vue +58 -58
- package/src/bootstrap-vue/query-table/QueryTable.vue +84 -84
- package/src/bootstrap-vue/region-cascader/RegionCascader.vue +119 -119
- package/src/bootstrap-vue/select/Select.vue +375 -375
- package/src/bootstrap-vue/submit-form/SubmitForm.vue +180 -176
- package/src/bootstrap-vue/tags-input/TagsInput.vue +64 -64
- package/src/bootstrap-vue/tnxbsv.css +107 -107
- package/src/bootstrap-vue/tnxbsv.js +109 -92
- package/src/bootstrap-vue/upload/Upload.vue +173 -173
- package/src/{aj-captcha → element-plus/aj-captcha}/Verify/VerifySlide.vue +9 -9
- package/src/element-plus/aj-captcha/api/index.js +11 -0
- package/src/{aj-captcha → element-plus/aj-captcha}/utils/ase.js +1 -1
- package/src/element-plus/avatar/Avatar.vue +8 -9
- package/src/element-plus/button/Button.vue +2 -2
- package/src/element-plus/curd/Curd.vue +20 -23
- package/src/element-plus/date-picker/DatePicker.vue +1 -1
- package/src/element-plus/detail-form/DetailForm.vue +1 -1
- package/src/element-plus/dialog/Dialog.vue +18 -20
- package/src/element-plus/drawer/Drawer.vue +10 -9
- package/src/element-plus/edit-table/EditTable.vue +3 -3
- package/src/element-plus/enum-select/EnumSelect.vue +3 -3
- package/src/element-plus/enum-view/EnumView.vue +41 -41
- package/src/element-plus/fetch-cascader/FetchCascader.vue +3 -4
- package/src/element-plus/fetch-select/FetchSelect.vue +10 -11
- package/src/element-plus/fetch-tags/FetchTags.vue +4 -5
- package/src/element-plus/fss-upload/FssUpload.vue +18 -18
- package/src/element-plus/fss-view/FssView.vue +1 -1
- package/src/element-plus/icon/Icon.vue +6 -0
- package/src/element-plus/input-dropdown/InputDropdown.vue +74 -74
- package/src/element-plus/query-form/QueryForm.vue +1 -1
- package/src/element-plus/query-table/QueryTable.vue +22 -26
- package/src/element-plus/region-cascader/RegionCascader.vue +4 -5
- package/src/element-plus/select/Select.vue +11 -7
- package/src/element-plus/steps-nav/StepsNav.vue +3 -4
- package/src/element-plus/submit-form/SubmitForm.vue +36 -39
- package/src/element-plus/tabs/Tabs.vue +1 -1
- package/src/element-plus/tnxel.css +22 -0
- package/src/element-plus/tnxel.js +105 -94
- package/src/element-plus/toolbar/ToolBarItem.js +15 -15
- package/src/element-plus/toolbar/Toolbar.vue +56 -56
- package/src/element-plus/transfer/Transfer.vue +8 -9
- package/src/element-plus/upload/Upload.vue +24 -24
- package/src/tdesign/desktop/tnxtdd.ts +16 -0
- package/src/tdesign/foundation/validator.ts +367 -0
- package/src/tdesign/mobile/tnxtdm.ts +16 -0
- package/src/tdesign/tnxtd.ts +20 -0
- package/src/{tnxvue-router.js → tnxvue-router.ts} +66 -48
- package/src/tnxvue.ts +248 -0
- package/src/types.d.ts +7 -0
- package/tsconfig.json +21 -0
- package/index.html +0 -12
- package/src/aj-captcha/api/index.js +0 -19
- package/src/tnxvue-validator.js +0 -365
- package/src/tnxvue.js +0 -439
- /package/src/{aj-captcha → element-plus/aj-captcha}/Verify/VerifyPoints.vue +0 -0
- /package/src/{aj-captcha → element-plus/aj-captcha}/Verify.vue +0 -0
- /package/src/{aj-captcha → element-plus/aj-captcha}/utils/util.js +0 -0
|
@@ -1,176 +1,180 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<TnxbsvForm ref="form" :model="model" :rules="validationRules" :disabled="disabled">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
<TnxbsvFormGroup v-if="submit !== undefined && submit !== null">
|
|
5
|
-
<div class="flex-v-center">
|
|
6
|
-
<TnxbsvButton :type="theme || 'primary'" :size="size" @click="toSubmit" v-if="submit !== false">
|
|
7
|
-
{{ _submitText }}
|
|
8
|
-
</TnxbsvButton>
|
|
9
|
-
<TnxbsvButton class="ms-2" :size="size" @click="toCancel" v-if="cancel !== false">
|
|
10
|
-
{{ cancelText }}
|
|
11
|
-
</TnxbsvButton>
|
|
12
|
-
</div>
|
|
13
|
-
</TnxbsvFormGroup>
|
|
14
|
-
</TnxbsvForm>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
import TnxbsvForm from '../form/Form.vue';
|
|
19
|
-
import TnxbsvFormGroup from '../form/FormGroup.vue';
|
|
20
|
-
import TnxbsvButton from '../button/Button.vue';
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
name: 'TnxbsvSubmitForm',
|
|
24
|
-
components: {TnxbsvForm, TnxbsvFormGroup, TnxbsvButton},
|
|
25
|
-
props: {
|
|
26
|
-
model: Object,
|
|
27
|
-
rules: [String, Object], // 加载字段校验规则的URL地址,或规则集对象
|
|
28
|
-
rulesApp: { // 加载字段校验规则的应用名称
|
|
29
|
-
type: String,
|
|
30
|
-
default: () => window.tnx.componentDefaultApp, // 设置为方法以延时加载,确保更改的值生效
|
|
31
|
-
},
|
|
32
|
-
rulesLoaded: Function, // 规则集加载后的附加处理函数,仅在rules为字符串类型的URL地址时有效
|
|
33
|
-
submit: {
|
|
34
|
-
type: [Function, Boolean],
|
|
35
|
-
default: null,
|
|
36
|
-
},
|
|
37
|
-
submitText: String,
|
|
38
|
-
theme: String,
|
|
39
|
-
cancel: {
|
|
40
|
-
type: [String, Function, Boolean],
|
|
41
|
-
default: true
|
|
42
|
-
},
|
|
43
|
-
cancelText: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: '取消'
|
|
46
|
-
},
|
|
47
|
-
errorFocus: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: false,
|
|
50
|
-
},
|
|
51
|
-
size: String,
|
|
52
|
-
},
|
|
53
|
-
emits: ['rules-loaded', 'meta'],
|
|
54
|
-
data() {
|
|
55
|
-
return {
|
|
56
|
-
validationRules: {},
|
|
57
|
-
disabled: false,
|
|
58
|
-
fieldNames: [],
|
|
59
|
-
};
|
|
60
|
-
},
|
|
61
|
-
computed: {
|
|
62
|
-
_submitText() {
|
|
63
|
-
if (this.submitText) {
|
|
64
|
-
return this.submitText;
|
|
65
|
-
}
|
|
66
|
-
return this.cancel === false ? '保存' : '提交';
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
watch: {
|
|
70
|
-
rules() {
|
|
71
|
-
this.initRules();
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
mounted() {
|
|
75
|
-
this.initRules();
|
|
76
|
-
},
|
|
77
|
-
methods: {
|
|
78
|
-
initRules() {
|
|
79
|
-
if (this.rules) {
|
|
80
|
-
if (typeof this.rules === 'string') {
|
|
81
|
-
window.tnx.app.rpc.getMeta(this.rules, meta => {
|
|
82
|
-
if (this.rulesLoaded) {
|
|
83
|
-
this.rulesLoaded(meta.$rules);
|
|
84
|
-
} else {
|
|
85
|
-
this.$emit('rules-loaded', meta.$rules);
|
|
86
|
-
}
|
|
87
|
-
this.validationRules = meta.$rules;
|
|
88
|
-
delete meta.$rules;
|
|
89
|
-
this.$emit('meta', meta);
|
|
90
|
-
this.fieldNames = Object.keys(meta);
|
|
91
|
-
}
|
|
92
|
-
} else {
|
|
93
|
-
this.validationRules = {};
|
|
94
|
-
Object.keys(this.rules).forEach(fieldName => {
|
|
95
|
-
let fieldRules = this.rules[fieldName] || [];
|
|
96
|
-
if (!Array.isArray(fieldRules)) {
|
|
97
|
-
fieldRules = [fieldRules];
|
|
98
|
-
}
|
|
99
|
-
if (fieldRules.length) {
|
|
100
|
-
this.validationRules[fieldName] = fieldRules.filter((rule, index) => {
|
|
101
|
-
let valid = rule !== undefined && rule !== null;
|
|
102
|
-
if (!valid) {
|
|
103
|
-
console.error(`invalid rules[${index}] for field "${fieldName}": `, rule);
|
|
104
|
-
}
|
|
105
|
-
return valid;
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
} else {
|
|
111
|
-
this.validationRules = {};
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
validate(callback, errorFocus) {
|
|
115
|
-
this.$refs.form.validate().then(() => {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
this
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
</
|
|
1
|
+
<template>
|
|
2
|
+
<TnxbsvForm ref="form" :model="model" :rules="validationRules" :disabled="disabled">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
<TnxbsvFormGroup v-if="submit !== undefined && submit !== null">
|
|
5
|
+
<div class="flex-v-center">
|
|
6
|
+
<TnxbsvButton :type="theme || 'primary'" :size="size" @click="toSubmit" v-if="submit !== false">
|
|
7
|
+
{{ _submitText }}
|
|
8
|
+
</TnxbsvButton>
|
|
9
|
+
<TnxbsvButton class="ms-2" :size="size" @click="toCancel" v-if="cancel !== false">
|
|
10
|
+
{{ cancelText }}
|
|
11
|
+
</TnxbsvButton>
|
|
12
|
+
</div>
|
|
13
|
+
</TnxbsvFormGroup>
|
|
14
|
+
</TnxbsvForm>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import TnxbsvForm from '../form/Form.vue';
|
|
19
|
+
import TnxbsvFormGroup from '../form/FormGroup.vue';
|
|
20
|
+
import TnxbsvButton from '../button/Button.vue';
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
name: 'TnxbsvSubmitForm',
|
|
24
|
+
components: {TnxbsvForm, TnxbsvFormGroup, TnxbsvButton},
|
|
25
|
+
props: {
|
|
26
|
+
model: Object,
|
|
27
|
+
rules: [String, Object], // 加载字段校验规则的URL地址,或规则集对象
|
|
28
|
+
rulesApp: { // 加载字段校验规则的应用名称
|
|
29
|
+
type: String,
|
|
30
|
+
default: () => window.tnx.componentDefaultApp, // 设置为方法以延时加载,确保更改的值生效
|
|
31
|
+
},
|
|
32
|
+
rulesLoaded: Function, // 规则集加载后的附加处理函数,仅在rules为字符串类型的URL地址时有效
|
|
33
|
+
submit: {
|
|
34
|
+
type: [Function, Boolean],
|
|
35
|
+
default: null,
|
|
36
|
+
},
|
|
37
|
+
submitText: String,
|
|
38
|
+
theme: String,
|
|
39
|
+
cancel: {
|
|
40
|
+
type: [String, Function, Boolean],
|
|
41
|
+
default: true
|
|
42
|
+
},
|
|
43
|
+
cancelText: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: '取消'
|
|
46
|
+
},
|
|
47
|
+
errorFocus: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
51
|
+
size: String,
|
|
52
|
+
},
|
|
53
|
+
emits: ['rules-loaded', 'meta'],
|
|
54
|
+
data() {
|
|
55
|
+
return {
|
|
56
|
+
validationRules: {},
|
|
57
|
+
disabled: false,
|
|
58
|
+
fieldNames: [],
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
computed: {
|
|
62
|
+
_submitText() {
|
|
63
|
+
if (this.submitText) {
|
|
64
|
+
return this.submitText;
|
|
65
|
+
}
|
|
66
|
+
return this.cancel === false ? '保存' : '提交';
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
watch: {
|
|
70
|
+
rules() {
|
|
71
|
+
this.initRules();
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
mounted() {
|
|
75
|
+
this.initRules();
|
|
76
|
+
},
|
|
77
|
+
methods: {
|
|
78
|
+
initRules() {
|
|
79
|
+
if (this.rules) {
|
|
80
|
+
if (typeof this.rules === 'string') {
|
|
81
|
+
window.tnx.app.rpc.getMeta(this.rules, this.rulesApp).then(meta => {
|
|
82
|
+
if (this.rulesLoaded) {
|
|
83
|
+
this.rulesLoaded(meta.$rules);
|
|
84
|
+
} else {
|
|
85
|
+
this.$emit('rules-loaded', meta.$rules);
|
|
86
|
+
}
|
|
87
|
+
this.validationRules = meta.$rules;
|
|
88
|
+
delete meta.$rules;
|
|
89
|
+
this.$emit('meta', meta);
|
|
90
|
+
this.fieldNames = Object.keys(meta);
|
|
91
|
+
});
|
|
92
|
+
} else {
|
|
93
|
+
this.validationRules = {};
|
|
94
|
+
Object.keys(this.rules).forEach(fieldName => {
|
|
95
|
+
let fieldRules = this.rules[fieldName] || [];
|
|
96
|
+
if (!Array.isArray(fieldRules)) {
|
|
97
|
+
fieldRules = [fieldRules];
|
|
98
|
+
}
|
|
99
|
+
if (fieldRules.length) {
|
|
100
|
+
this.validationRules[fieldName] = fieldRules.filter((rule, index) => {
|
|
101
|
+
let valid = rule !== undefined && rule !== null;
|
|
102
|
+
if (!valid) {
|
|
103
|
+
console.error(`invalid rules[${index}] for field "${fieldName}": `, rule);
|
|
104
|
+
}
|
|
105
|
+
return valid;
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
this.validationRules = {};
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
validate(callback, errorFocus) {
|
|
115
|
+
const promise = this.$refs.form.validate().then(() => {
|
|
116
|
+
return true;
|
|
117
|
+
}).catch(errors => {
|
|
118
|
+
if (this.errorFocus && errorFocus !== false) {
|
|
119
|
+
this.$nextTick(() => {
|
|
120
|
+
this.focusError.call(this, errors);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
return false;
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
if (typeof callback === 'function') {
|
|
127
|
+
return promise.then(result => {
|
|
128
|
+
callback(result);
|
|
129
|
+
return result;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return promise;
|
|
133
|
+
},
|
|
134
|
+
focusError(errors) {
|
|
135
|
+
let fieldNames = Object.keys(errors);
|
|
136
|
+
let fieldName = fieldNames[0];
|
|
137
|
+
if (fieldName) {
|
|
138
|
+
let fieldElement = this.$refs.form.getFieldElement(fieldName);
|
|
139
|
+
if (fieldElement) {
|
|
140
|
+
fieldElement.focus();
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
// 没有找到错误字段输入框,则滚动到错误栏目处
|
|
144
|
+
this.$refs.form.scrollToField(fieldName);
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
disable(disabled) {
|
|
148
|
+
this.disabled = disabled !== false;
|
|
149
|
+
},
|
|
150
|
+
toSubmit(callback, disabled) {
|
|
151
|
+
this.validate(success => {
|
|
152
|
+
if (success) {
|
|
153
|
+
if (typeof callback !== 'function') {
|
|
154
|
+
callback = this.submit;
|
|
155
|
+
}
|
|
156
|
+
if (typeof callback === 'function') {
|
|
157
|
+
if (disabled !== false) {
|
|
158
|
+
this.disable();
|
|
159
|
+
}
|
|
160
|
+
callback(this);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
toCancel() {
|
|
166
|
+
if (typeof this.cancel === 'function') {
|
|
167
|
+
this.cancel();
|
|
168
|
+
} else if (typeof this.cancel === 'string') {
|
|
169
|
+
this.$router.back(this.cancel);
|
|
170
|
+
} else if (this.cancel !== false) {
|
|
171
|
+
this.$router.back();
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
</script>
|
|
177
|
+
|
|
178
|
+
<style>
|
|
179
|
+
|
|
180
|
+
</style>
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<BFormTags class="tnxbsv-tags-input"
|
|
3
|
-
v-model="model"
|
|
4
|
-
:placeholder="placeholder"
|
|
5
|
-
:separator="separator"
|
|
6
|
-
:tag-variant="tagVariant || 'light'"
|
|
7
|
-
add-button-text="+"
|
|
8
|
-
:duplicate-tag-text="duplicateTagText"
|
|
9
|
-
remove-on-delete
|
|
10
|
-
/>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
import {BFormTags} from 'bootstrap-vue-next';
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
name: 'TnxbsvTagsInput',
|
|
18
|
-
components: {BFormTags},
|
|
19
|
-
props: {
|
|
20
|
-
modelValue: {
|
|
21
|
-
type: Array,
|
|
22
|
-
default: () => [],
|
|
23
|
-
},
|
|
24
|
-
placeholder: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: '输入后回车以添加',
|
|
27
|
-
},
|
|
28
|
-
separator: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: ','
|
|
31
|
-
},
|
|
32
|
-
tagVariant: String,
|
|
33
|
-
duplicateTagText: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: '标签重复',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
data() {
|
|
39
|
-
return {
|
|
40
|
-
model: this.modelValue,
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
watch: {
|
|
44
|
-
modelValue() {
|
|
45
|
-
this.model = this.modelValue;
|
|
46
|
-
},
|
|
47
|
-
model() {
|
|
48
|
-
this.$emit('update:modelValue', this.model);
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
methods: {}
|
|
52
|
-
}
|
|
53
|
-
</script>
|
|
54
|
-
|
|
55
|
-
<style>
|
|
56
|
-
.tnxbsv-tags-input .b-form-tag + .b-from-tags-field > div {
|
|
57
|
-
padding-left: 0.25rem;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.tnxbsv-tags-input .btn.b-form-tags-button {
|
|
61
|
-
--bs-btn-padding-x: 0.5rem;
|
|
62
|
-
margin-left: 0.5rem;
|
|
63
|
-
}
|
|
64
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<BFormTags class="tnxbsv-tags-input"
|
|
3
|
+
v-model="model"
|
|
4
|
+
:placeholder="placeholder"
|
|
5
|
+
:separator="separator"
|
|
6
|
+
:tag-variant="tagVariant || 'light'"
|
|
7
|
+
add-button-text="+"
|
|
8
|
+
:duplicate-tag-text="duplicateTagText"
|
|
9
|
+
remove-on-delete
|
|
10
|
+
/>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import {BFormTags} from 'bootstrap-vue-next';
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
name: 'TnxbsvTagsInput',
|
|
18
|
+
components: {BFormTags},
|
|
19
|
+
props: {
|
|
20
|
+
modelValue: {
|
|
21
|
+
type: Array,
|
|
22
|
+
default: () => [],
|
|
23
|
+
},
|
|
24
|
+
placeholder: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: '输入后回车以添加',
|
|
27
|
+
},
|
|
28
|
+
separator: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ','
|
|
31
|
+
},
|
|
32
|
+
tagVariant: String,
|
|
33
|
+
duplicateTagText: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: '标签重复',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
data() {
|
|
39
|
+
return {
|
|
40
|
+
model: this.modelValue,
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
watch: {
|
|
44
|
+
modelValue() {
|
|
45
|
+
this.model = this.modelValue;
|
|
46
|
+
},
|
|
47
|
+
model() {
|
|
48
|
+
this.$emit('update:modelValue', this.model);
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
methods: {}
|
|
52
|
+
}
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style>
|
|
56
|
+
.tnxbsv-tags-input .b-form-tag + .b-from-tags-field > div {
|
|
57
|
+
padding-left: 0.25rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.tnxbsv-tags-input .btn.b-form-tags-button {
|
|
61
|
+
--bs-btn-padding-x: 0.5rem;
|
|
62
|
+
margin-left: 0.5rem;
|
|
63
|
+
}
|
|
64
|
+
</style>
|