https://baidu.github.io/san/
San框架 - 图1

百度FE开发的 MVVM 框架的性能进化
https://github.com/ecomfe/santd
San框架 - 图2

San框架介绍 https://efe.baidu.com/blog/san-a-traditional-mvvm-component-framework/

San-Antd

https://ecomfe.github.io/santd
https://ecomfe.github.io/santd/#/docs/quickstart

san代码风格:类似于 vue3 defineComponent的 MVVM框架
San框架 - 图3

  1. const App = san.defineComponent({
  2. initData() {
  3. return {
  4. date: null
  5. }
  6. },
  7. components: {
  8. 's-datepicker': DatePicker,
  9. 's-alert': Alert
  10. },
  11. handleChange({date}) {
  12. message.info(`您选择的日期是: ${date ? date.format('YYYY-MM-DD') : '未选择'}`);
  13. this.data.set('date', date);
  14. },
  15. getDate(date) {
  16. return date ? date.format('YYYY-MM-DD') : '未选择';
  17. },
  18. template: `<div style="width: 400px; margin: 100px auto;">
  19. <s-datepicker on-change="handleChange" />
  20. <div style="margin-top: 20px;">
  21. <s-alert message="当前日期:{{getDate(date)}}" type="success" />
  22. </div>
  23. </div>`
  24. });