| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <template>
- <div v-if="modalFlag">
- <div class="vehicle_servies_modal" @mousewheel="mousewheel">
- <div class="modal_content">
- <div class="input">
- <p>版块名称</p>
- <input type="text" v-model="platName" />
- </div>
- <div class="btn">
- <button @click="submit" style="margin: 0">保存</button>
- <button @click="hideModal" style="margin: 0">取消</button>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- props: {
- modalFlag: {
- type: Boolean,
- default: false,
- },
- },
- data() {
- return {
- platName: "",
- };
- },
- methods: {
- submit: function () {
- if (this.platName) {
- this.$emit("submit", this.platName);
- } else {
- alert('请输入版块名称');
- }
- },
- hideModal: function () {
- this.$emit("hide_modal");
- },
- mousewheel: function (e) {
- e.preventDefault();
- },
- },
- };
- </script>
- <style scoped lang="less">
- .vehicle_servies_modal {
- position: fixed;
- left: 0;
- top: 0;
- height: 100vh;
- width: 100vw;
- background-color: rgba(127, 127, 127, 0.7);
- display: flex;
- justify-content: center;
- align-items: center;
- .modal_content {
- width: 600px;
- height: 300px;
- background-color: #fff;
- transform: translateY(-50px);
- .input {
- width: 280px;
- margin: 0 auto;
- margin-top: 80px;
- display: flex;
- height: 28px;
- p {
- width: 80px;
- height: 28px;
- line-height: 28px;
- }
- input {
- width: 200px;
- border: 1px solid #555;
- }
- }
- .btn {
- padding-left: 80px;
- margin: 0 auto;
- width: 200px;
- margin-top: 30px;
- display: flex;
- justify-content: space-between;
- button {
- margin: 0!;
- }
- }
- }
- }
- </style>
|