123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <template>
- <div class="edit-grids">
- <el-form
- ref="modalFormComp"
- :model="modalForm"
- :key="modalForm.id"
- label-width="100px"
- >
- <el-form-item prop="columnCount" label="单行网格数:">
- <el-input-number
- style="width:125px;"
- v-model.number="modalForm.columnCount"
- :min="2"
- :max="100"
- :step="1"
- step-strictly
- :controls="false"
- ></el-input-number>
- </el-form-item>
- <el-form-item prop="rowCount" label="网格行数:">
- <el-input-number
- style="width:125px;"
- v-model.number="modalForm.rowCount"
- :min="2"
- :max="100"
- :step="1"
- step-strictly
- :controls="false"
- ></el-input-number>
- </el-form-item>
- <el-form-item prop="rowSpace" label="网格行间距:">
- <el-input-number
- style="width:125px;"
- v-model.number="modalForm.rowSpace"
- :min="0"
- :max="100"
- :step="1"
- step-strictly
- :controls="false"
- ></el-input-number>
- </el-form-item>
- <el-form-item label="网格宽度:">
- <el-input-number
- style="width:125px;"
- v-model.number="modalForm.columnSize"
- :min="0"
- :max="100"
- :step="1"
- step-strictly
- :controls="false"
- :disabled="modalForm.halving"
- ></el-input-number>
- </el-form-item>
- <el-form-item>
- <el-checkbox v-model="modalForm.halving">是否自动网格宽度</el-checkbox>
- </el-form-item>
- <el-form-item label="线条形状:">
- <line-style-select v-model="modalForm.style"></line-style-select>
- </el-form-item>
- </el-form>
- </div>
- </template>
- <script>
- import LineStyleSelect from "../../components/common/LineStyleSelect";
- const initModalForm = {
- id: "",
- columnSize: 43,
- columnCount: 16,
- rowCount: 3,
- rowSpace: 0,
- halving: true,
- style: "solid"
- };
- export default {
- name: "edit-grids",
- components: { LineStyleSelect },
- props: {
- instance: {
- type: Object,
- default() {
- return {};
- }
- }
- },
- data() {
- return {
- modalForm: { ...initModalForm }
- };
- },
- mounted() {
- this.initData(this.instance);
- },
- methods: {
- initData(val) {
- this.modalForm = { ...val };
- },
- submit() {
- this.$emit("modified", this.modalForm);
- }
- }
- };
- </script>
|