Skip to content

Commit de667b1

Browse files
committed
v1
1 parent d3ca38b commit de667b1

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

resources/assets/component.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,15 @@ function componentDot(name,selected,options) {
101101
options_dom+= "<div class='btn btn-primary btn-sm v-tag' data-id='"+i+"'>"+options[i]+"</div>";
102102
}
103103

104-
let html = '<style>.v-tag{margin-right: 4px;margin-bottom: 4px}</style>'+
105-
'<div style="width: 100%;display: grid; grid-template-rows: 42px 140px;border: 1px solid #ccc;border-radius: 5px">' +
106-
'<div style="display:flex;background: #e1ffa8bf;"><div style="width:120px;background: #e1ffa8bf;">' +
107-
'<input id="'+name+'-search" type="text" class="form-control" placeholder="搜索名称"></div>' +
108-
'<div id="'+name+'-select" style="width:100%;overflow: auto;border-bottom: 1px solid #ccc;padding: 3px;border-radius: 0 0 0 14px;background: #ffffffbf;"></div> ' +
109-
selected_dom+
110-
'</div><div id="'+name+'-content" style="overflow-y: auto;padding: 3px;background: #e1ffa8bf;">' +
111-
options_dom +
112-
'</div>' +
113-
'</div>';
104+
let html = `<style>.v-tag{margin-right: 4px;margin-bottom: 4px}</style>
105+
<div style="width: 100%;display: grid; grid-template-rows: 42px 140px;border: 1px solid #ccc;border-radius: 5px">
106+
<div style="display:flex;background: #e1ffa8bf;"><div style="width:120px;background: #e1ffa8bf;">
107+
<input id="${name}-search" type="text" class="form-control" placeholder="搜索名称"></div>
108+
<div id="${name}-select" style="width:100%;overflow: auto;border-bottom: 1px solid #ccc;padding: 3px;border-radius: 0 0 0 14px;background: #ffffffbf;">${selected_dom}</div>
109+
</div><div id="${name}-content" style="overflow-y: auto;padding: 3px;background: #e1ffa8bf;">
110+
${options_dom}
111+
</div>
112+
</div>`;
114113
DOM.insertAdjacentHTML('afterbegin',html);
115114

116115
/*hidden data container*/

0 commit comments

Comments
 (0)