5.0.327 • Published 8 months ago

zova-ui-element v5.0.327

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

zova-ui-element

zova-ui-element is a vue3 framework with ioc container. With the support of ioc container, defining reactive states no longer needs ref/reactive, nor ref.value

LICENSE MIT NPM version NPM download

Documentation

Features

zova-ui-element has introduced the following distinct features for Vue3:

  1. No ref/reactive, No ref.value: With the support of ioc container, defining reactive states no longer needs ref/reactive. Without ref, naturally there is no need to write a lot of ref.value
  2. Type programming without type: Zova adopts a strategy that combines dependency injection and dependency lookup, significantly reducing the use of decorator functions. Prioritizing the use of dependency lookup can achieve a development experience of Type programming without type, which means that we can enjoy the many benefits of type programming without the need to annotate types, thus keeping our code concise and elegant, significantly improving development efficiency, and ensuring code quality
  3. Modularization: In a large web business system, as the business grows and changes, it is also necessary to divide the system into relatively independent modules in order to avoid code bloating. This is why Zova introduces modularization. In Zova, a module is a natural bundle boundary, and automatically bundled into an independent asynchronous chunk when building, bidding farewell to the hassle of Vite configuration and effectively avoiding the fragmentation of bundles. Especially in large business systems, this advantage is particularly evident

Gif demonstration

No ref/reactive

Demonstration: no ref/reactive, no ref.value

1. Define reactive state

Define a reactive variable count in the component and add two methods to modify its value

export class ControllerPageCounter {
  count: number = 0;

  increment() {
    this.count++;
  }

  decrement() {
    this.count--;
  }
}

2. Use reactive state

Use count in render class

export class RenderCounter {
  render() {
    return (
      <div>
        <div>count(ref): {this.count}</div>
        <button onClick={() => this.increment()}>Increment</button>
        <button onClick={() => this.decrement()}>Decrement</button>
      </div>
    );
  }
}

Demonstration: dependency injection

1. Logic Reuse

Create a Counter Bean to implement the logic of count

@Local()
export class Counter {
  count: number = 0;

  increment() {
    this.count++;
  }

  decrement() {
    this.count--;
  }
}

2. Inject and use in a component

export class ControllerPageCounter {
  @Use()
  $$counter: Counter;
}
export class RenderCounter {
  render() {
    return (
      <div>
        <div>count(ref): {this.$$counter.count}</div>
        <button onClick={() => this.$$counter.increment()}>Increment</button>
        <button onClick={() => this.$$counter.decrement()}>Decrement</button>
      </div>
    );
  }
}

Stay In Touch

License

MIT

Copyright (c) 2016-present, Zova

5.0.324

8 months ago

5.0.325

8 months ago

5.0.327

8 months ago

5.0.321

8 months ago

5.0.297

9 months ago

5.0.299

9 months ago

5.0.292

9 months ago

5.0.293

9 months ago

5.0.294

9 months ago

5.0.295

9 months ago

5.0.290

9 months ago

5.0.291

9 months ago

5.0.300

9 months ago

5.0.303

9 months ago

5.0.312

8 months ago

5.0.314

8 months ago

5.0.310

8 months ago

5.0.308

8 months ago

5.0.309

8 months ago

5.0.304

9 months ago

5.0.305

9 months ago

5.0.306

9 months ago

5.0.307

8 months ago

5.0.320

8 months ago

5.0.319

8 months ago

5.0.315

8 months ago

5.0.316

8 months ago

5.0.317

8 months ago

5.0.318

8 months ago

5.0.245

10 months ago

5.0.246

10 months ago

5.0.247

10 months ago

5.0.248

10 months ago

5.0.243

10 months ago

5.0.257

10 months ago

5.0.258

10 months ago

5.0.252

10 months ago

5.0.253

10 months ago

5.0.254

10 months ago

5.0.255

10 months ago

5.0.250

10 months ago

5.0.251

10 months ago

5.0.249

10 months ago

5.0.267

10 months ago

5.0.268

10 months ago

5.0.269

10 months ago

5.0.264

10 months ago

5.0.265

10 months ago

5.0.266

10 months ago

5.0.260

10 months ago

5.0.261

10 months ago

5.0.262

10 months ago

5.0.278

9 months ago

5.0.279

9 months ago

5.0.274

9 months ago

5.0.275

9 months ago

5.0.276

9 months ago

5.0.277

9 months ago

5.0.272

9 months ago

5.0.289

9 months ago

5.0.285

9 months ago

5.0.286

9 months ago

5.0.287

9 months ago

5.0.288

9 months ago

5.0.282

9 months ago

5.0.283

9 months ago

5.0.284

9 months ago

5.0.280

9 months ago

5.0.242

10 months ago

5.0.241

10 months ago

5.0.240

10 months ago

5.0.239

10 months ago

5.0.238

10 months ago

5.0.237

10 months ago

5.0.236

10 months ago

5.0.235

10 months ago

5.0.234

10 months ago

5.0.233

10 months ago

5.0.232

10 months ago

5.0.230

10 months ago

5.0.229

10 months ago

5.0.228

10 months ago

5.0.227

10 months ago

5.0.226

10 months ago

5.0.224

10 months ago

5.0.223

10 months ago

5.0.222

10 months ago

5.0.220

10 months ago

5.0.219

10 months ago

5.0.217

10 months ago

5.0.216

10 months ago

5.0.214

10 months ago

5.0.212

10 months ago

5.0.211

10 months ago

5.0.210

10 months ago

5.0.209

10 months ago

5.0.208

11 months ago

5.0.206

11 months ago

5.0.204

11 months ago

5.0.203

11 months ago

5.0.202

11 months ago

5.0.201

11 months ago

5.0.199

11 months ago

5.0.198

11 months ago

5.0.197

11 months ago

5.0.195

11 months ago

5.0.194

11 months ago

5.0.192

11 months ago

5.0.188

11 months ago

5.0.187

11 months ago

5.0.186

11 months ago

5.0.185

11 months ago

5.0.184

11 months ago

5.0.183

11 months ago

5.0.182

11 months ago

5.0.181

11 months ago

5.0.180

11 months ago

5.0.179

12 months ago

5.0.177

12 months ago

5.0.176

12 months ago

5.0.175

12 months ago

5.0.174

12 months ago

5.0.173

12 months ago

5.0.172

12 months ago

5.0.171

12 months ago

5.0.170

12 months ago

5.0.169

12 months ago

5.0.168

12 months ago

5.0.167

12 months ago

5.0.166

12 months ago

5.0.165

12 months ago

5.0.164

12 months ago

5.0.163

12 months ago

5.0.162

12 months ago

5.0.161

12 months ago

5.0.160

12 months ago

5.0.159

12 months ago

5.0.158

12 months ago

5.0.157

12 months ago

5.0.156

12 months ago

5.0.155

12 months ago

5.0.154

12 months ago

5.0.153

12 months ago

5.0.152

12 months ago

5.0.151

12 months ago

5.0.150

12 months ago

5.0.149

12 months ago

5.0.148

12 months ago

5.0.147

12 months ago

5.0.146

12 months ago

5.0.145

12 months ago

5.0.144

12 months ago

5.0.143

12 months ago

5.0.141

12 months ago

5.0.140

12 months ago

5.0.139

12 months ago

5.0.138

12 months ago

5.0.137

12 months ago

5.0.136

12 months ago

5.0.135

1 year ago

5.0.134

1 year ago

5.0.133

1 year ago

5.0.132

1 year ago

5.0.131

1 year ago

5.0.130

1 year ago

5.0.129

1 year ago

5.0.128

1 year ago

5.0.127

1 year ago

5.0.126

1 year ago

5.0.125

1 year ago

5.0.124

1 year ago

5.0.123

1 year ago

5.0.122

1 year ago

5.0.121

1 year ago

5.0.116

1 year ago

5.0.115

1 year ago

5.0.114

1 year ago

5.0.113

1 year ago

5.0.112

1 year ago

5.0.111

1 year ago

5.0.110

1 year ago

5.0.109

1 year ago

5.0.108

1 year ago

5.0.107

1 year ago

5.0.106

1 year ago

5.0.105

1 year ago

5.0.104

1 year ago

5.0.103

1 year ago

5.0.102

1 year ago

5.0.101

1 year ago

5.0.100

1 year ago

5.0.99

1 year ago

5.0.98

1 year ago

5.0.97

1 year ago

5.0.96

1 year ago

5.0.95

1 year ago