[ https://issues.apache.org/jira/browse/SUBMARINE-158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xun Liu updated SUBMARINE-158: ------------------------------ Description: h1. DictSelectTag Component introduction * Get data from the sys_dict table, dictCode format description: Dictionary code <dict-select-tag v-model="queryParam.sex" placeholder="Please select sex" dictCode="sex"/> v-decorator Function: <dict-select-tag v-decorator="['sex', {}]" :triggerChange="true" placeholder="Please select sex" dictCode="sex"/> was: h1. DictSelectTag Component introduction * Get data from the sys_dict table, dictCode format description: Dictionary code <dict-select-tag v-model="queryParam.sex" placeholder="Please select sex" dictCode="sex"/> v-decorator Function: <dict-select-tag v-decorator="['sex', {}]" :triggerChange="true" placeholder="Please select sex" dictCode="sex"/> h1. DictSelectUtil.js List dictionary function * Step 1: Introducing a dependency method import {initDictOptions, filterDictText} from '@/components/dict/DictSelectUtil' * Step 2: Execute dictionary configuration method in the created() initialization method // Initialize dictionary configuration this.initDictConfig(); * Step 3: Implement the initDictConfig method, load the dictionary required by the list (multiple dictionary items on the list, execute the initDictOptions method multiple times) initDictConfig() { // Initialize dictionary - gender initDictOptions('sex').then((res) => { if (res.success) { this.sexDictOptions = res.result; } }); }, * Step 4: Implement the customRender method of the field customRender: (text, record, index) => { // Dictionary value replaces general method return filterDictText(this.sexDictOptions, text); } > [WEB] Dict Select Component > --------------------------- > > Key: SUBMARINE-158 > URL: https://issues.apache.org/jira/browse/SUBMARINE-158 > Project: Hadoop Submarine > Issue Type: Sub-task > Reporter: Xun Liu > Assignee: Xun Liu > Priority: Major > Labels: submarine-external-repo > Attachments: image-2019-08-31-00-02-54-616.png, > image-2019-08-31-00-03-41-124.png > > > h1. DictSelectTag Component introduction > * Get data from the sys_dict table, dictCode format description: Dictionary > code > <dict-select-tag v-model="queryParam.sex" placeholder="Please select sex" > dictCode="sex"/> > v-decorator Function: > <dict-select-tag v-decorator="['sex', {}]" :triggerChange="true" > placeholder="Please select sex" dictCode="sex"/> -- This message was sent by Atlassian Jira (v8.3.2#803003)