提交 cf3d2c6c 编写于 作者: jlj05024111@163.com's avatar jlj05024111@163.com

feat: 更新表格列显示代码表多项选择时,支持自定义连接符号

上级 8638f6ae
...@@ -15,6 +15,9 @@ export const CodeList = defineComponent({ ...@@ -15,6 +15,9 @@ export const CodeList = defineComponent({
value: { value: {
type: [String, Number], type: [String, Number],
}, },
textSeparator: {
type: String,
},
}, },
setup(props) { setup(props) {
const ns = useNamespace('code-list'); const ns = useNamespace('code-list');
...@@ -76,7 +79,9 @@ export const CodeList = defineComponent({ ...@@ -76,7 +79,9 @@ export const CodeList = defineComponent({
<span class={this.ns.b()}> <span class={this.ns.b()}>
{this.items.map((item, index) => { {this.items.map((item, index) => {
return [ return [
index !== 0 ? this.codeList?.textSeparator : null, index !== 0
? this.textSeparator || this.codeList?.textSeparator
: null,
<span <span
class={[this.ns.e('item'), item.textCls ? item.textCls : null]} class={[this.ns.e('item'), item.textCls ? item.textCls : null]}
style={this.ns.cssVarBlock({ style={this.ns.cssVarBlock({
......
...@@ -75,6 +75,7 @@ export const GridFieldColumn = defineComponent({ ...@@ -75,6 +75,7 @@ export const GridFieldColumn = defineComponent({
codeListItems={c.codeListItems} codeListItems={c.codeListItems}
codeList={this.codeList} codeList={this.codeList}
value={fieldValue} value={fieldValue}
textSeparator={c.model.source.userParams.textSeparator}
></code-list> ></code-list>
) : ( ) : (
<span class={this.ns.e('text')}> <span class={this.ns.e('text')}>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册