add.html 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <el-card shadow="never" style="border: 0;">
  3. <yun-form :data="row" :columns="columns">
  4. {:token_field()}
  5. </yun-form>
  6. </el-card>
  7. </template>
  8. <script>
  9. import form from "@components/Form.js";
  10. export default {
  11. components: { 'YunForm': form },
  12. data: {
  13. row: Yunqi.data.row,
  14. columns: [
  15. { field: 'id', title: __('ID'), edit: 'hidden' },
  16. { field: 'type_id', title: __('类型'), edit: 'radio', rules: "required", searchList: Yunqi.data.varietyList },
  17. { field: 'title', title: __('名称'), edit: 'text', rules: 'required' },
  18. { field: 'another_name', title: __('别名'), edit: 'text'},
  19. { field: 'weight', title: __('重量(斤)'), edit: 'text', rules: 'required' },
  20. { field: "pack_specs_id", title: "打包规格", searchList: Yunqi.data.packSpecsList, edit: 'select'},
  21. //{field: 'box_id',title: __('包装箱'),edit:'radio',rules:'required', searchList: Yunqi.data.packingList},
  22. { field: 'sort', title: __('排序'), edit: 'text' },
  23. { field: 'status', title: __('状态'), edit: 'switch', searchList: { 1: __('正常'), 2: __('隐藏') } },
  24. ]
  25. },
  26. methods: {
  27. }
  28. }
  29. </script>
  30. <style>
  31. </style>