You are viewing a plain text version of this content. The canonical link for it is here.
Posted to submarine-dev@hadoop.apache.org by "Xun Liu (Jira)" <ji...@apache.org> on 2019/08/30 16:05:00 UTC

[jira] [Comment Edited] (SUBMARINE-158) [WEB] Dict Select Component

    [ https://issues.apache.org/jira/browse/SUBMARINE-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16919674#comment-16919674 ] 

Xun Liu edited comment on SUBMARINE-158 at 8/30/19 4:04 PM:
------------------------------------------------------------

!image-2019-08-31-00-02-54-616.png|width=465,height=382!


was (Author: liuxun323):
!image-2019-08-31-00-02-54-616.png|width=875,height=718!

> [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"/>
> 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);
>  }



--
This message was sent by Atlassian Jira
(v8.3.2#803003)