• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

miaoxing / article / 4394369420

pending completion
4394369420

push

github

twinh
ci: 更新依赖版本

26 of 43 branches covered (60.47%)

137 of 203 relevant lines covered (67.49%)

6.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/pages/admin/articles/new.js
1
/**
2
 * @share [id]/edit
3
 */
4
import {CListBtn} from '@mxjs/a-clink';
5
import {Page, PageActions} from '@mxjs/a-page';
6
import {Form, FormItem, FormAction} from '@mxjs/a-form';
7
import {FormUeditor} from '@mxjs/ueditor';
8
import LinkPicker from '@miaoxing/link-to/components/LinkPicker';
9
import {Input} from 'antd';
10
import {FormItemSort, Upload, TreeSelect} from '@miaoxing/admin';
11

12
const New = () => {
3✔
13
  return (
6✔
14
    <Page>
15
      <PageActions>
16
        <CListBtn/>
17
      </PageActions>
18

19
      <Form
20
        afterLoad={({ret}) => {
21
          // 未分类提示"请选择"
22
          if (!ret.data.categoryId) {
3!
23
            delete ret.data.categoryId;
×
24
          }
25
        }}
26
      >
27
        <FormItem label="分类" name="categoryId">
28
          <TreeSelect
29
            url="article-categories"
30
            placeholder="请选择"
31
            prependData={{
32
              id: '',
33
              name: '未分类',
34
            }}
35
          />
36
        </FormItem>
37

38
        <FormItem label="标题" name="title" required/>
39

40
        <FormItem label="作者" name="author"/>
41

42
        <FormItem label="封面" name="cover" extra="支持.jpg .jpeg .bmp .gif .png格式照片">
43
          <Upload max={1}/>
44
        </FormItem>
45

46
        <FormItem label="摘要" name="intro" type="textarea">
47
          <Input.TextArea maxLength={255} showCount/>
48
        </FormItem>
49

50
        <FormUeditor label="正文" name={['detail', 'content']}/>
51

52
        <FormItem label="原文链接" name="sourceLink">
53
          <LinkPicker/>
54
        </FormItem>
55

56
        <FormItem label="跳转地址" name="redirectLink">
57
          <LinkPicker/>
58
        </FormItem>
59

60
        <FormItemSort/>
61

62
        <FormItem name="id" type="hidden"/>
63

64
        <FormAction/>
65
      </Form>
66
    </Page>
67
  );
68
};
69

70
export default New;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc