Skip to content

(求助)将业务模块封装成个class到模板中直接使用的功能需求 #12873

Answered by l246804
Muspcn asked this question in Help/Questions

You must be logged in to vote

模板中使用方法

          <el-select v-model="editData.form.lang" placeholder="请选择语言">
            <el-option v-for="lan in language.list" :key="lan.key" :label="lan.name" :value="lan.key"></el-option>
          </el-select>

普通对象内部嵌套 ref 对象需要在模板里自己解构。

- <el-option v-for="lan in language.list"
+ <el-option v-for="lan in language.list.value"

Replies: 2 comments 2 replies

You must be logged in to vote
1 reply
@l246804

Answer selected by Muspcn

You must be logged in to vote
1 reply
@Muspcn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants