| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <template>
- <div class="vehicle_servies_modal" v-if="modalFlag" @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>
- </template>
- <script>
- export default {
- props: {
- modalFlag: {
- type: Boolean,
- default: false,
- },
- },
- data() {
- return {
- platName: "",
- };
- },
- methods: {
- submit: function () {
- let platName = this.platName.replace(/\s/g,"");
- if (platName) {
- this.$emit("submit", 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>
|