sk-antd

ShaneKing for AntD

Usage no npm install needed!

<script type="module">
  import skAntd from 'https://cdn.skypack.dev/sk-antd';
</script>

README

sk-antd

Let's write page like java, wrap ant-design implements mvc(Model-Validator-Component)

Example

CodeSandbox

Features

  • MVC
  • Two-way Binding
    • component --- add listener --- modelId on model
    • modelId's value change --- fireEvent -- component auto refresh
    • component event --- auto change --- modelId's value
  • Component props
    • model series: skSysModel(SPA just one), skModel(even page), model(some scenario), modelId(auto two-way binding and monitor)
    • bfo(boolean/function/object) series: active, disabled, hidden, preview(Form Components), readOnly, required
      • preview: SKDatePicker, SKRangePicker, SKInput, SKTextArea, SKSelect, SKRemoteSelect, SKSwitch
    • value process series: m2nConvertor, n2mConvertor, m2vConvertor
  • props trans
    • auto trans to child(without compTag,modelId,children,className) and self(without compTag,modelId)

Components

focus

  • no child? default has
  • must models/modelId? default not must
  • side-effect? auto generate id etc...