赞
踩
<script type="text/javascript" src="../js/vue.js"></script>
<!--
<script type="text/javascript" src=".../js/element.js"></script>
<link rel="stylesheet" href=".../style/element.css" type="text/css" />
-->
<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<a href="javascript:void(0);" @click="modifyTopics(<?php echo $d['id']; ?>)" ><?php echo $d['topics']; ?></a> <el-dialog :visible.sync="visible" title="话题修改" width="80%" :append-to-body="true" :lock-scroll="false" :close-on-click-modal="false"> <el-form :model="form"> <el-form-item label=""> <el-checkbox-group v-model="form.topics"> <el-checkbox v-for="item in topic_list" :key="item.id" :label="item.id" name="type">{{item.name}}</el-checkbox> </el-checkbox-group> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> <el-button @click="visible = false">取 消</el-button> <el-button type="primary" @click="submitTopic()">确 定</el-button> </div> </el-dialog>
<div id="app">
</div>
new Vue({ el: '#app', data: { api:'hsBack.php', form:{ post_id:0, topics:[] }, visible: false, topic_list:[] }, created: function() { var that = this; that.getTopicList(); }, methods: { } })
图片:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。